[Numpy-discussion] strange behavior convolving via fft

Chris Colbert sccolbert@gmail....
Mon May 11 15:15:18 CDT 2009


Did I pad my example incorrectly? Both images were upped to the larger
nearest power of 2 (256)...

Does the scipy implementation do this differently? I thought that since FFTW
support has been dropped, that scipy and numpy use the same routines...



2009/5/11 Stéfan van der Walt <stefan@sun.ac.za>

> 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
> scipy.signal.fftconvolve
> I've also got some filtering implemented in
> http://mentat.za.net/cgi-bin/hgwebdir.cgi/filter/file/e97c0a6dd0ea/lpi_filter.py
> Regards
> Stéfan
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090511/34fd964e/attachment.html 

More information about the Numpy-discussion mailing list