[SciPy-User] Rotated, Anisotropic Gaussian Filtering (Kernel Density Estimation)
Fri Oct 19 12:18:15 CDT 2012
On Fri, Oct 19, 2012 at 9:34 AM, Daπid <email@example.com> wrote:
> If you are going to apply different filters to the same image, it may
> be faster to switch to the Fourier transform. In this case, the
> result is the IFT of the FT of your data multiplied by the FT of your
> Doing all the FT may be expensive, but it can be useful if you are
> reusing the data, and Scipy is linked to very optimized FFT libraries.
Thanks to all who have taken time to respond to my initial email. I'm
learning a lot here.
With that said, I'm intrigued with the idea of using FFTs. I knew it was
possible but had never actually looked into how to do it. As a simple
experiment, I generated a simple kernel using my Cython code and took the
FFT of this 2D array. I then attempted to apply it using the
IFFT(FFT(kernel) * FFT(hist)) method described about. You can see the
result here: http://nbviewer.ipython.org/3919393/. Obviously, I'm doing
something wrong here, but I'm not sure what. Why is the result separated
into the four corners and not the center of the grid? Any help in figuring
this out…or pointers to references...would be appreciated.
Also, I'm assuming that the kernel and the image need to be the same
dimensions or the multiplication won't work?
Thanks again to all for helping wrap my head around this.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User