# convolve to differentiate black and white colors

a figure for instance of size 500*500 has half above part with black and below half white should result in a white line where the white meets the black (something like a single line at line 250 with pixels as 255) on convolution with a matrix. I am trying to make a matrix, but not able to visualise how the matrix would be? can some one help me build the matrix for this

• one hint: imagine only a single column of this image. Which (filtering) operation do you need to do such that this column becomes $[0 \dots 0 1 0 \dots 0]'$? Once you have this, you almost have the solution Jan 17 '17 at 13:07