[SciPy-User] ifft on images, symmetry artifacts?
Tue Jan 12 16:54:09 CST 2010
On 01/11/10 16:18, Joe Barfett wrote:
> I'm using scipy (numpy.fft.fft2) to transform an image into the frequency
> domain. Then by using numpy.fft.ifft2 to transform the same image back into the
> spatial domain, I find that I get symmetry in the image around a reflection
> line (and not the original image).
I'm struggling a bit to understand what exactly you're doing. In general you
have to be careful when you plot your resulting function, i.e. do you want to
plot the real part or the absolute value of the image? Anyway can you maybe
post your code and the image you're converting?
can sometimes lead to weird symmetry artifacts, e.g if you
> Google has revealed websites like this one: http://www.rzuser.uni-heidelberg.de
> This is the code snippet they use:
> def Convolution(image1,image2):
> """ Simple convolution example """
> fftimage = fft2(image1)*fft2(image2)
> return ifft2(fftimage).real
> #end of Convolution
> which uses ifft but generates appropriate output. They do however only use the
> real component of the frequency domain image. I find the exact same approach
> does not work in my case, but rather gives these weird symmetries.
> It's been a few weeks of hacking and I would really appreciate the guidance of
> someone more experienced than me. Thanks a great deal if you know the answer!
> The new Internet Explorer 8 - Faster, safer, easier. Optimized for Yahoo! Get
> it Now for Free!
> SciPy-User mailing list
More information about the SciPy-User