Convolving an image using an even-sized kernel

I was wondering when you curl up with a 2x2 core, where did you put the result of the operation? With a symmetric mask, the result is applied to the pixel corresponding to the center of the mask; so what happens when the mask has no center? Also, why would anyone use an even-sized kernel?

+4
source share
1 answer

This doesn't really matter, but no matter which approach you use, you can get a 0.5 pixel shift in the resulting image. You can understand why this can happen intuitively if you consider your 2x2 example as 3x3 with zero fill, for example.

 k00  k01   0
 k10  k11   0
  0    0    0

, , , - - ( ). - , ( ), , , / .

+4

Source: https://habr.com/ru/post/1613657/


All Articles