FFT of sinusoidal grating
Posted by
Gabriele Umbriaco on
Oct 02, 2008; 9:45am
URL: http://imagej.273.s1.nabble.com/Competition-ImageJ-Video-Tutorials-tp3694884p3694885.html
Good day to all.
If I compute the FFT with ImageJ the result is not the same of IDL.
I do not understand because, it is wrong ?
You can help me?
Thanks you.
Gabriele
ORIGINAL IMAGE 512x512
http://www.zshare.net/image/19808361cf9f18a5/IDL FFT 512x512
http://www.zshare.net/image/198083993bc66e61/IMAGEJ FFT 512x512
http://www.zshare.net/image/1980841949a36387/ORIGINAL IMAGE 800x800
http://www.zshare.net/image/1980603911fc4e4d/IDL FFT 800x800
http://www.zshare.net/image/198059600f47c99d/IMAGEJ FFT 800x800
http://www.zshare.net/image/198060136c636fcb/
>
> IDL code:
>
> ; IDL Version 5.2 (Win32 x86)
> ; Journal File for rockford@C3B0E6
> ; Working directory: D:\RSI\IDL52
> ; Date: Sat Jan 17 18:09:01 2004
> cd, 'C:\immagini'
> read_jpeg,'sin_grid_30.jpg',ima
> image=fltarr(512,512)
> image(*,*)=ima(1:512,1:512)
> dimx=512
> dimy=512
> window, 1, xs=dimx, ys=dimy, title='original'
> tvscl,image
>
> ;Power Spectrum F(u)*F^(u)
> window, 2, xs=dimx, ys=dimy, title='Filtered Power Spectrum'
> pspect= shift((fft(image, -1)*fft(conj(image),1)),dimx/2,dimy/2)
> tvscl, pspect
>
> write_jpeg, 'FFT_IDL.jpg', pspect, Quality=100
> write_jpeg, 'sin_grid.jpg', image, Quality=100
>
> end
=================================================
Gabriele Umbriaco