[Numpy-discussion] strange behavior convolving via fft

Stéfan van der Walt stefan@sun.ac...
Mon May 11 15:06:33 CDT 2009

Hi Chris

2009/5/11 Chris Colbert <sccolbert@gmail.com>:
> When convolving an image with a large kernel, its know that its faster to
> perform the operation as multiplication in the frequency domain. The below
> code example shows that the results of my 2d filtering are shifted from the
> expected value a distance 1/2 the width of the filter in both the x and y
> directions. Can anyone explain why this occurs? I have been able to find the
> answer in any of my image processing books.

Just as a reminder, when doing this kind of filtering always pad
correctly.  Scipy does this in


I've also got some filtering implemented in



More information about the Numpy-discussion mailing list