FFT-Examples

Category: Image Processing
Author:
Description: Some example functions/code which show how to do FFT manipulation. Please use/develop/expand and correct these examples at will. To use this script, have an image with periodic information in it foremost. Something like a HRTEM image will do fine. The image must be square and have dimensions an integral power of 2 eg 512 x 512, 1024 x 1024 etc. The script shows how to : Calculate the FFT of an image Calculate the inverse FFT of an FFT Create a Butterworth filter to use for high frequency (noise) filtering Apply the Butterworth filter to a FFT Carry out the inverse FFT of the above to show the effect of filtering Extract the real component of a complex image Extract the imaginary component of a complex image Compute the magnitude component of the FFT Compute the Phase component of the FFT - don't stare at it too long Compute the Power Spectrum of an image.
Comments: Require real or integer images of appropriate dimensions. Note (by B.Schaffer): You can use the transform.dll commands by C.Koch for a FFTW FourieTransform without these limitations. You can additionally check the packedFFT examples by V.Hou. There is also an example on how to create and apply masks on FFT for fourier-space filte
Acknowledgements: Thanks to Bernhard Schafer and Kazuo Ishizuka for advice and assistance
Script version: 1.0
DM/GMS version: 3.11
Script written as a function: No
Source: Show code
Download Source Code: Download
Download Zip File: Download