Correct me if I'm wrong, but this example really helped me understand convolution by really thinking about why the values are set as they are. For this example, I notice that the value of the center pixel is scaled up by 5, essentially it's the addition of itself and then itself again for each of the adjacent sides. Then, each side's values are subtracted.
So, essentially, the value of the pixel is the sum of its original value and the sum of the differences between its original value and the pixels around its edges. This gives it the effect of "standing out" from its neighboring pixels, thus making the image sharper, as it removes the averaging that may have been done by blurring.
andrewdcampbell
This website has a nice interactive demo allowing you to set the values of a 3x3 kernel and the see the result of convolution of an image with it. With it, you can get an intuitive grasp for how operations like sharpen, emboss, and outline work.
wjgan7
What happens if the filter leads to a negative pixel value?
Correct me if I'm wrong, but this example really helped me understand convolution by really thinking about why the values are set as they are. For this example, I notice that the value of the center pixel is scaled up by 5, essentially it's the addition of itself and then itself again for each of the adjacent sides. Then, each side's values are subtracted.
So, essentially, the value of the pixel is the sum of its original value and the sum of the differences between its original value and the pixels around its edges. This gives it the effect of "standing out" from its neighboring pixels, thus making the image sharper, as it removes the averaging that may have been done by blurring.
This website has a nice interactive demo allowing you to set the values of a 3x3 kernel and the see the result of convolution of an image with it. With it, you can get an intuitive grasp for how operations like sharpen, emboss, and outline work.
What happens if the filter leads to a negative pixel value?