13
Digital Image Processing Homework II Fast Fourier Transform 2012/03/28 Chih-Hung Lu ( 呂呂呂 ) Visual Communications Laboratory Department of Communication Engineering National Central University ChungLi, Taiwan

Digital Image Processing Homework II Fast Fourier Transform 2012/03/28 Chih-Hung Lu ( 呂志宏 ) Visual Communications Laboratory Department of Communication

Embed Size (px)

Citation preview

Page 1: Digital Image Processing Homework II Fast Fourier Transform 2012/03/28 Chih-Hung Lu ( 呂志宏 ) Visual Communications Laboratory Department of Communication

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

Page 2: Digital Image Processing Homework II Fast Fourier Transform 2012/03/28 Chih-Hung Lu ( 呂志宏 ) Visual Communications Laboratory Department of Communication

The Goal of This Homework

• Implement Fast Fourier Transform.• Implement Inverse Fast Fourier

Transform.• Implement Notch Filter.

Page 3: Digital Image Processing Homework II Fast Fourier Transform 2012/03/28 Chih-Hung Lu ( 呂志宏 ) Visual Communications Laboratory Department of Communication

3

Work Chart

FFT

Filtering (Notch Filter)

IFFT

Page 4: Digital Image Processing Homework II Fast Fourier Transform 2012/03/28 Chih-Hung Lu ( 呂志宏 ) Visual Communications Laboratory Department of Communication

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)

Page 5: Digital Image Processing Homework II Fast Fourier Transform 2012/03/28 Chih-Hung Lu ( 呂志宏 ) Visual Communications Laboratory Department of Communication

5

Fast Fourier Transform(2/3)• Assume N= 2n , Let N=2M.

Page 6: Digital Image Processing Homework II Fast Fourier Transform 2012/03/28 Chih-Hung Lu ( 呂志宏 ) Visual Communications Laboratory Department of Communication

6

Fast Fourier Transform(3/3)

• Because

(ejx = cos(x) + j sin(x))

Page 7: Digital Image Processing Homework II Fast Fourier Transform 2012/03/28 Chih-Hung Lu ( 呂志宏 ) Visual Communications Laboratory Department of Communication

7

Fast Fourier Transform(8 points)

Page 8: Digital Image Processing Homework II Fast Fourier Transform 2012/03/28 Chih-Hung Lu ( 呂志宏 ) Visual Communications Laboratory Department of Communication

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

Page 9: Digital Image Processing Homework II Fast Fourier Transform 2012/03/28 Chih-Hung Lu ( 呂志宏 ) Visual Communications Laboratory Department of Communication

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.

Page 10: Digital Image Processing Homework II Fast Fourier Transform 2012/03/28 Chih-Hung Lu ( 呂志宏 ) Visual Communications Laboratory Department of Communication

10

Display of Frequency Spectrum• Modulation in space domain:

Moving (0,0) to the central in image.

• Log transformation

Example:

Page 11: Digital Image Processing Homework II Fast Fourier Transform 2012/03/28 Chih-Hung Lu ( 呂志宏 ) Visual Communications Laboratory Department of Communication

Grading

• FFT (3 points)• Filtering (3 points)• IFFT (2 points)• Report (2 points)

• Computation complexity (Bonus 1 points)• Other properties (Bonus 1 points)

Page 12: Digital Image Processing Homework II Fast Fourier Transform 2012/03/28 Chih-Hung Lu ( 呂志宏 ) Visual Communications Laboratory Department of Communication

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 )

Page 13: Digital Image Processing Homework II Fast Fourier Transform 2012/03/28 Chih-Hung Lu ( 呂志宏 ) Visual Communications Laboratory Department of Communication

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.