Wednesday 5 October 2016

image processing - Difference Between Linear Convolution and Circular Convolution


If I understood correctly (and this page should confirm: http://www.cs.ioc.ee/~khoros2/linear/convolution-teo/front-page.html)





  • if I convolve linearly (the usual point-to-point multiplication and addition without tricks for each element of the image matrix) an image with a kernel I obtain RESULT1




  • if I calculate the DFT of the image and of the padded kernel (to have same size as the image) and perform their multiplication in frequency and then the inverse DFT, the result is RESULT2 and should be like applying the circular convolution in time space




RESULT1 slightly differs from RESULT2 as in the example


Is this correct?



Answer



The difference applies only to the borders of the image.



In the linear convolution you assume the values of pixels beyond the border (examples being mirror of the image pixels, or 50% grey).


In the circular convolution (or DFT, product, IDFT), the pixels beyond the border are the pixels on the other side of the image, just as if you had a repeated tiling of the image.


No comments:

Post a Comment

readings - Appending 内 to a company name is read ない or うち?

For example, if I say マイクロソフト内のパートナーシップは強いです, is the 内 here read as うち or ない? Answer 「内」 in the form: 「Proper Noun + 内」 is always read 「ない...