[Numpy-discussion] FFT's & IFFT's on images

Mike Sarahan msarahan@gmail....
Wed Jul 2 16:33:04 CDT 2008


Hi,

I'm trying to do phase reconstruction on images which involves switching
back and forth between Fourier space and real space.  I'm trying to test
numpy (& scipy, for that matter) just to see if I can go back and forth.
After an FFT/iFFT, the resulting image is garbage.  I'm using
numpy.fft.fftn, but I've also tried fft2, rfftn, rfft2, and the
corresponding inverse FFT's.

>From looking at the matrices, it appears to be creating complex
components that aren't in the matrix prior to any FFT's.  Real fft's
seem to add some small component to each value (<1).  I'm using
Image.fromarray to convert arrays to images, and I'm working with 8-bit
grayscale images.

Any help is much appreciated!

Thanks,
Mike Sarahan



More information about the Numpy-discussion mailing list