Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chap 4-2. Frequency domain processing Jen-Chang Liu, 2006.

Similar presentations


Presentation on theme: "Chap 4-2. Frequency domain processing Jen-Chang Liu, 2006."— Presentation transcript:

1 Chap 4-2. Frequency domain processing Jen-Chang Liu, 2006

2 Review of Fourier transform Fourier series: Any function that periodically repeats itself can be expressed as the sum of of sines and/or cosines of different frequencies, each multiplied by a different coefficient Fourier transform: Functions that are not periodic can be expressed as the integral of sines and/or cosines multiplied by a weighting functions Discrete Fourier transform: extends to discrete samples

3 1-D Discrete Fourier Transform (DFT) f(x), x=0,1, …,M-1. discrete function F(u), u=0,1, …,M-1. DFT of f(x) Inverse transform (reconstruction): Forward discrete Fourier transform:

4

5 F(u) Complex quantity? Polar coordinate real imaginary m magnitude phase Power spectrum

6 Extend to 2-D DFT from 1-D 2-D DFT: 1-D DFT in horizontal then vertical

7 Complex Quantities to Real Quantities Useful representation magnitude phase Power spectrum

8 Real part 2d DFT basis functions iDFT: 將影像用 合成,其中 (u, v) 代表頻率 DFT

9 More DFT basis (real part) (u,v)= (0,2) (0,30) u v (0,63) (1,1) (1,30) (30,30) (1,0)

10 Example: reconstruction from DFT coefficients … Zigzag scan

11 Example: reconstruction from DFT coefficients http://www.ncnu.edu.tw/~jcliu/course/dip2005/lenaidft.m

12 Notes on showing DFT Lena 256x256 F=fft2(I); imshow(abs(F), []) F(1,1)=7761921F(1,127)=334.79+10i imshow(log(abs(F)), [])

13 Log transformations s = c log(1+r) Compress the dynamic range of images with large variation in pixel values

14 M N M/2 N/2 0 Periodicity and conjugate symmetry property of 2-D DFT

15 Outline Frequency domain operations Smoothing Frequency Domain Filters Sharpening Frequency Domain Filters Homomorphic Filtering

16 mask coefficients underlying neighborhood X (product) output

17 Convolution – 2-D case 2d convolution 旋積 Masking operation

18 Convolution theorem f:image Fourier transform F h: filter or mask Fourier transform H Time domain Frequency domain convolution multiplication

19 Filtering in the frequency domain fftshift

20 Outline Frequency Domain Operations Smoothing Frequency Domain Filters Sharpening Frequency Domain Filters Homomorphic Filtering

21 Smoothing frequency-domain filters Design issue G(u,v)=F(u,v) H(u,v) Remove high freq. component (details, noise, …) Ideal low-pass filter Butterworth filter Gaussian filter More smooth in the edge of cut-off frequency

22 Ideal low-pass filter Sharp cut-off frequency where D(u,v) is the distance to the center freq.

23 Ideal low-pass filter (cont.) Cut-off freq.

24 Ideal low-pass filter (con.t) ILPF can not be realized in electronic components, but can be implemented in a computer Decision of cut-off freq.? Measure the percentage of image power within the low freq. Total image power

25 ILPF: distribution of image power originalFreq. 99.5 98 96.4 94.6 92

26 original  =92 D 0 =5  =94.6 D 0 =15  =96.4 D 0 =30  =98 D 0 =80  =99.5 D 0 =230 Ideal low-pass filtering

27 Ringing effect

28 Effects of ideal low-pass filtering Blurring and ringing ILPF: Freq. F -1 blurring ringing ILPF: spatial

29 Effects of ideal low-pass filtering (cont.) spatial impulse ILPF spatial

30 Butterworth low-pass filters H=0.5 when D(u,v)=D 0

31 Order of butterworth filters n=1n=2n=5n=20 Spatial domain filter of butterworth filters Ringing like Ideal LPF

32 Butterworth filters Order = 2 original D 0 =5 D 0 =15D 0 =30 D 0 =80D 0 =230

33 Gaussian low-pass filters Variance or cut-off freq. D(u,v)=D 0 H = 0.607

34 Gaussian smoothing original D 0 =5 D 0 =15D 0 =30 D 0 =80D 0 =230

35 Practical applications: 1 444x508 GLPF, D 0 =80 斷點

36 Practical applications: 2 GLPF, D 0 =100 GLPF, D 0 =80 1028x732

37 Practical applications: 3 588x600 GLPF, D 0 =30 GLPF, D 0 =10 Scan line

38 Outline Frequency Domain Operations Smoothing Frequency Domain Filters Sharpening Frequency Domain Filters Homomorphic Filtering

39 Sharpening frequency-domain filters Image details corresponds to high- frequency Sharpening: high-pass filters H hp (u,v)=1-H lp (u,v) Ideal high-pass filters Butterworth high-pass filters Gaussian high-pass filters Difference filters Laplacian filters

40 Ideal HPF Butterworth HPF Gaussian HPF

41 Spatial-domain HPF ideal Butterworth Gaussian negative

42 Ideal high-pass filters D 0 =15D 0 =30D 0 =80 ringing original

43 Butterworth high-pass filters n=2,D 0 =15D 0 =30D 0 =80

44 Gaussian high-pass filters D 0 =15D 0 =30D 0 =80

45 Laplacian frequency-domain filters Spatial-domain Laplacian (2nd derivative) Fourier transform

46 Laplacian frequency-domain filters Input f(x,y) Laplacian F(u,v) F F -(u 2 +v 2 )F(u,v) -(u 2 +v 2 ) The Laplacian filter in the frequency domain is H(u,v) = -(u 2 +v 2 )

47 0 frequency spatial H(u,v) = -(u 2 +v 2 )

48 original Laplacian Scaled Laplacian original+ Laplacian

49 Outline Frequency Domain Operations Smoothing Frequency Domain Filters Sharpening Frequency Domain Filters Homomorphic Filtering

50 Image Formation Model Illumination source scene reflection eye

51 Homomorphic filtering Image formation model f(x,y)=i(x,y) r(x,y) illumination: reflectance: Slow spatial variations vary abruptly, particularly at the junctions of dissimilar objects

52 Homomorphic filtering Product term Log of product f(x,y)=i(x,y) r(x,y) => ln f(x,y)=ln i(x,y)+ ln r(x,y) Separation of signal source:

53 Homomorphic filtering approach ln i(x,y) ln r(x,y) illumination reflection filtering

54 How to identify the illumination and reflection? Illumination -> low frequency Reflection -> high frequency Radius from the origin Example filter: sharpening illumination reflection

55 Homomophic filtering: example originalHomomorphic filtering


Download ppt "Chap 4-2. Frequency domain processing Jen-Chang Liu, 2006."

Similar presentations


Ads by Google