Digital Image ProcessingHomework II Fast Fourier Transform
2012/03/28
Chih-Hung Lu (呂志宏 )Visual Communications Laboratory
Department of Communication Engineering National Central University
ChungLi, Taiwan
The Goal of This Homework
• Implement Fast Fourier Transform.• Implement Inverse Fast Fourier
Transform.• Implement Notch Filter.
3
Work Chart
FFT
Filtering (Notch Filter)
IFFT
4
• To compute a discrete Fourier transform:
N: number of pixel f(x): value of pixel x: pixel positionF(u): value of frequency u: frequency
• Rewritten as:
where
Fast Fourier Transform(1/3)
5
Fast Fourier Transform(2/3)• Assume N= 2n , Let N=2M.
6
Fast Fourier Transform(3/3)
• Because
(ejx = cos(x) + j sin(x))
7
Fast Fourier Transform(8 points)
8
Inverse Fast Fourier TransformTo compute a Inverse Fourier transform:
N: number of pixel f(x): value of pixel x: pixel positionF(u): value of frequency u: frequency
where
9
Notch Filter• Ideal Notch Reject Filter:
H: Filter
• Set F(0,0) to zero & leave all other frequency components of the Fourier transform untouched.
10
Display of Frequency Spectrum• Modulation in space domain:
Moving (0,0) to the central in image.
• Log transformation
Example:
Grading
• FFT (3 points)• Filtering (3 points)• IFFT (2 points)• Report (2 points)
• Computation complexity (Bonus 1 points)• Other properties (Bonus 1 points)
Demo Schedule
• Thursday night, 19 April , 2012. - Begin around at 19:00 at R3-307.(VCLab)
NOTE: We will use another image to test your code.
The details will be announced on our course website. ( http://140.115.156.251/vclab/html/course/DIP2012.html )
References
• Paul Heckbert, Fourier Transforms and the Fast Fourier Transform (FFT) Algorithm
• www.cs.cmu.edu/afs/andrew/.../fourier/fourier.pdf
• J.W. Cooley and J.W. Tukey, “An algorithm for the machine calculation of complex Fourier series”, Math. Computation, 19:297-301, 1965.