Open kavita-srinivasan opened 4 years ago
Dear Kavita, I guess your are right about this error on the convolution multiplication statement. I searched the forums on Coursera to see if someone else also spotted this but it's to crowed and I didn't manage to find any reference to this error.
I saw that there was something funny happening with the code because the filter that was supposed to highlight the vertical lines (filter = [ [-1, 0, 1], [-2, 0, 2], [-1, 0, 1]]) was actually highlighting the horizontal lines and vice-versa.
Thanks for sharing this correction.
The convolution multiplication statement looks like this:
i[x, y-1]
is the pixel horizontally to the left of the center:The corresponding filter value should be
filter[1][0]
, which is horizontally left of the center:In light of this, that code block should be changed to the following: