[SciPy-User] ifft on images, symmetry artifacts?

David Baddeley david_baddeley at yahoo.com.au
Mon Jan 11 20:21:25 EST 2010


There are few possibilities - the most likely is that you are taking either the real part or the absolute value in the frequency domain. This kills all the phase information and results in a symmetric image. Note that the code snippet you cite takes the real part AFTER the inverse transformation, which is perfectly legit.

hope this helps,
David



________________________________
From: Joe Barfett <joebarfett at yahoo.ca>
To: scipy-user at scipy.org
Sent: Tue, 12 January, 2010 1:18:07 PM
Subject: [SciPy-User] ifft on images, symmetry artifacts?


Hello,
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).
Google has revealed websites like this one: http://www.rzuser.uni-heidelberg.de/~ge6/Programing/convolution.html
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!
joe 

 
________________________________
The new Internet Explorer® 8 - Faster, safer, easier.  Optimized for Yahoo! Get it Now for Free!


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20100111/4758256a/attachment.html>


More information about the SciPy-User mailing list