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

2008-07-02 Thread Mike Sarahan
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

Re: [Numpy-discussion] FFT's IFFT's on images

2008-07-02 Thread Stéfan van der Walt
Hi Mike 2008/7/2 Mike Sarahan [EMAIL PROTECTED]: 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

Re: [Numpy-discussion] FFT's IFFT's on images

2008-07-02 Thread Robert Kern
On Wed, Jul 2, 2008 at 16:33, Mike Sarahan [EMAIL PROTECTED] wrote: 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.

Re: [Numpy-discussion] FFT's IFFT's on images

2008-07-02 Thread Mike Sarahan
I agree that the components are very small, and in a numeric sense, I wouldn't worry at all about them, but the image result is simply noise, albeit periodic-looking noise. Here's a code snippet: import numpy,Image img=Image.open('LlamaTeeth.jpg')

Re: [Numpy-discussion] FFT's IFFT's on images

2008-07-02 Thread Andrew Straw
Mike Sarahan wrote: I agree that the components are very small, and in a numeric sense, I wouldn't worry at all about them, but the image result is simply noise, albeit periodic-looking noise. Fernando Perez and John Hunter have written a nice FFT image denoising example:

Re: [Numpy-discussion] FFT's IFFT's on images

2008-07-02 Thread Robert Kern
On Wed, Jul 2, 2008 at 17:14, Mike Sarahan [EMAIL PROTECTED] wrote: I agree that the components are very small, and in a numeric sense, I wouldn't worry at all about them, but the image result is simply noise, albeit periodic-looking noise. Here's a code snippet:

Re: [Numpy-discussion] FFT's IFFT's on images

2008-07-02 Thread Stéfan van der Walt
Hi Mike 2008/7/3 Mike Sarahan [EMAIL PROTECTED]: I agree that the components are very small, and in a numeric sense, I wouldn't worry at all about them, but the image result is simply noise, albeit periodic-looking noise. Here's a code snippet:

Re: [Numpy-discussion] FFT's IFFT's on images

2008-07-02 Thread Mike Sarahan
Beautiful! Thanks Stefan! It was the PIL bug. Thanks for all the replies. -Mike On Thu, 2008-07-03 at 01:00 +0200, Stéfan van der Walt wrote: Hi Mike 2008/7/3 Mike Sarahan [EMAIL PROTECTED]: I agree that the components are very small, and in a numeric sense, I wouldn't worry at all

Re: [Numpy-discussion] FFT's IFFT's on images

2008-07-02 Thread Fernando Perez
On Wed, Jul 2, 2008 at 3:53 PM, Fernando Perez [EMAIL PROTECTED] wrote: On Wed, Jul 2, 2008 at 3:33 PM, Andrew Straw [EMAIL PROTECTED] wrote: Mike Sarahan wrote: I agree that the components are very small, and in a numeric sense, I wouldn't worry at all about them, but the image result is