Download presentation
Presentation is loading. Please wait.
1
Digital Image Processing , 2008
Chapter 4: Image Enhancement in the Frequency Domain کانال تلگرامی Telegram.me/Digital_Image_Processing @ Digital _image _processing کانال تلگرامی Update: Monday, April 11, 2016
2
Background: Fourier Series
Any periodic signals can be viewed as weighted sum of sinusoidal signals with different frequencies Frequency Domain: view frequency as an independent variable @ Digital _image _processing کانال تلگرامی
3
Fourier Tr. and Frequency Domain
Time, spatial Domain Signals Frequency Domain Signals Inv Fourier Tr. 1-D, Continuous case Fourier Tr.: Inv. Fourier Tr.: @ Digital _image _processing کانال تلگرامی
4
Fourier Tr. and Frequency Domain (cont.)
1-D, Discrete case Fourier Tr.: u = 0,…,M-1 Inv. Fourier Tr.: x = 0,…,M-1 F(u) can be written as or where @ Digital _image _processing کانال تلگرامی
5
Example of 1-D Fourier Transforms
Notice that the longer the time domain signal, The shorter its Fourier transform @ Digital _image _processing کانال تلگرامی
6
Relation Between Dx and Du
For a signal f(x) with M points, let spatial resolution Dx be space between samples in f(x) and let frequency resolution Du be space between frequencies components in F(u), we have Example: for a signal f(x) with sampling period 0.5 sec, 100 point, we will get frequency resolution equal to This means that in F(u) we can distinguish 2 frequencies that are apart by 0.02 Hertz or more. @ Digital _image _processing کانال تلگرامی
7
2-Dimensional Discrete Fourier Transform
For an image of size MxN pixels 2-D DFT u = frequency in x direction, u = 0 ,…, M-1 v = frequency in y direction, v = 0 ,…, N-1 2-D IDFT x = 0 ,…, M-1 y = 0 ,…, N-1 @ Digital _image _processing کانال تلگرامی
8
2-Dimensional Discrete Fourier Transform (cont.)
F(u,v) can be written as or where For the purpose of viewing, we usually display only the Magnitude part of F(u,v) @ Digital _image _processing کانال تلگرامی
9
2-D DFT Properties @ Digital _image _processing کانال تلگرامی
10
2-D DFT Properties (cont.)
@ Digital _image _processing کانال تلگرامی
11
2-D DFT Properties (cont.)
@ Digital _image _processing کانال تلگرامی
12
2-D DFT Properties (cont.)
@ Digital _image _processing کانال تلگرامی
13
Computational Advantage of FFT Compared to DFT
@ Digital _image _processing کانال تلگرامی
14
Relation Between Spatial and Frequency Resolutions
where Dx = spatial resolution in x direction Dy = spatial resolution in y direction Du = frequency resolution in x direction Dv = frequency resolution in y direction N,M = image width and height ( Dx and Dy are pixel width and height. ) @ Digital _image _processing کانال تلگرامی
15
How to Perform 2-D DFT by Using 1-D DFT
f(x,y) 1-D DFT by row F(u,y) 1-D DFT by column @ Digital _image _processing کانال تلگرامی F(u,v)
16
How to Perform 2-D DFT by Using 1-D DFT (cont.)
f(x,y) Alternative method 1-D DFT by column 1-D DFT by row F(x,v) F(u,v) @ Digital _image _processing کانال تلگرامی
17
Periodicity of 1-D DFT From DFT: -N 2N N We display only in this range DFT repeats itself every N points (Period = N) but we usually display it for n = 0 ,…, N-1 @ Digital _image _processing کانال تلگرامی
18
Conventional Display for 1-D DFT
f(x) DFT N-1 N-1 Time Domain Signal High frequency area Low frequency area The graph F(u) is not easy to understand ! @ Digital _image _processing کانال تلگرامی
19
Conventional Display for DFT : FFT Shift
FFT Shift: Shift center of the graph F(u) to 0 to get better Display which is easier to understand. N-1 High frequency area Low frequency area -N/2 N/2-1 @ Digital _image _processing کانال تلگرامی
20
Periodicity of 2-D DFT 2-D DFT: g(x,y) -M For an image of size NxM pixels, its 2-D DFT repeats itself every N points in x-direction and every M points in y-direction. M We display only in this range 2M @ Digital _image _processing کانال تلگرامی -N N 2N
21
Conventional Display for 2-D DFT
F(u,v) has low frequency areas at corners of the image while high frequency areas are at the center of the image which is inconvenient to interpret. High frequency area Low frequency area @ Digital _image _processing کانال تلگرامی
22
2-D FFT Shift : Better Display of 2-D DFT
2-D FFT Shift is a MATLAB function: Shift the zero frequency of F(u,v) to the center of an image. 2D FFTSHIFT @ Digital _image _processing کانال تلگرامی High frequency area Low frequency area
23
2-D FFT Shift (cont.) : How it works
-M Display of 2D DFT After FFT Shift M Original display of 2D DFT 2M -N N 2N @ Digital _image _processing کانال تلگرامی
24
Example of 2-D DFT Notice that the longer the time domain signal,
The shorter its Fourier transform @ Digital _image _processing کانال تلگرامی
25
Example of 2-D DFT Notice that direction of an object in spatial image and Its Fourier transform are orthogonal to each other. @ Digital _image _processing کانال تلگرامی
26
Examples of 2DFT Image Fourier transform a a b b c c
@ Digital _image _processing کانال تلگرامی
27
Example of 2-D DFT 2D DFT Original image 2D FFT Shift
@ Digital _image _processing کانال تلگرامی
28
Example of 2-D DFT 2D DFT Original image 2D FFT Shift
@ Digital _image _processing کانال تلگرامی
29
Basic Concept of Filtering in the Frequency Domain
From Fourier Transform Property: We cam perform filtering process by using Multiplication in the frequency domain is easier than convolution in the spatial Domain. @ Digital _image _processing کانال تلگرامی
30
Filtering in the Frequency Domain with FFT shift
F(u,v) H(u,v) (User defined) g(x,y) FFT shift X 2D IFFT 2D FFT FFT shift f(x,y) G(u,v) In this case, F(u,v) and H(u,v) must have the same size and have the zero frequency at the center. @ Digital _image _processing کانال تلگرامی
31
Multiplication in Freq. Domain = Circular Convolution
f(x) DFT F(u) G(u) = F(u)H(u) IDFT g(x) h(x) DFT H(u) Multiplication of DFTs of 2 signals is equivalent to perform circular convolution in the spatial domain. f(x) h(x) “Wrap around” effect g(x) @ Digital _image _processing کانال تلگرامی
32
Multiplication in Freq. Domain = Circular Convolution
H(u,v) Gaussian Lowpass Filter with D0 = 5 Original image Filtered image (obtained using circular convolution) Incorrect areas at image rims @ Digital _image _processing کانال تلگرامی
33
f(x) Zero padding DFT F(u) G(u) = F(u)H(u) h(x) Zero padding DFT H(u)
Linear Convolution by using Circular Convolution and Zero Padding f(x) Zero padding DFT F(u) G(u) = F(u)H(u) h(x) Zero padding DFT H(u) IDFT Concatenation g(x) Padding zeros Before DFT Keep only this part @ Digital _image _processing کانال تلگرامی
34
Linear Convolution by using Circular Convolution and Zero Padding
@ Digital _image _processing کانال تلگرامی
35
Linear Convolution by using Circular Convolution and Zero Padding
Filtered image Zero padding area in the spatial Domain of the mask image (the ideal lowpass filter) Only this area is kept. @ Digital _image _processing کانال تلگرامی
36
Filtering in the Frequency Domain : Example
In this example, we set F(0,0) to zero which means that the zero frequency component is removed. Note: Zero frequency = average intensity of an image @ Digital _image _processing کانال تلگرامی
37
Filtering in the Frequency Domain : Example
Lowpass Filter Highpass Filter @ Digital _image _processing کانال تلگرامی
38
Filtering in the Frequency Domain : Example (cont.)
Result of Sharpening Filter @ Digital _image _processing کانال تلگرامی
39
Filter Masks and Their Fourier Transforms
@ Digital _image _processing کانال تلگرامی
40
Ideal Lowpass Filter Ideal LPF Filter Transfer function
where D(u,v) = Distance from (u,v) to the center of the mask. @ Digital _image _processing کانال تلگرامی
41
Examples of Ideal Lowpass Filters
The smaller D0, the more high frequency components are removed. @ Digital _image _processing کانال تلگرامی
42
Results of Ideal Lowpass Filters
Ringing effect can be obviously seen! @ Digital _image _processing کانال تلگرامی
43
How ringing effect happens
Surface Plot Ideal Lowpass Filter with D0 = 5 Abrupt change in the amplitude @ Digital _image _processing کانال تلگرامی
44
Spatial Response of Ideal
How ringing effect happens (cont.) Surface Plot Spatial Response of Ideal Lowpass Filter with D0 = 5 Ripples that cause ringing effect @ Digital _image _processing کانال تلگرامی
45
How ringing effect happens (cont.)
@ Digital _image _processing کانال تلگرامی
46
Butterworth Lowpass Filter
Transfer function Where D0 = Cut off frequency, N = filter order. @ Digital _image _processing کانال تلگرامی
47
Results of Butterworth Lowpass Filters
There is less ringing effect compared to those of ideal lowpass filters! @ Digital _image _processing کانال تلگرامی
48
Spatial Masks of the Butterworth Lowpass Filters
@ Digital _image _processing کانال تلگرامی Some ripples can be seen.
49
Gaussian Lowpass Filter Transfer function
Where D0 = spread factor. (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Note: the Gaussian filter is the only filter that has no ripple and hence no ringing effect. @ Digital _image _processing کانال تلگرامی
50
Gaussian Lowpass Filter (cont.)
filter with D0 = 5 Spatial respones of the Gaussian lowpass filter with D0 = 5 @ Digital _image _processing کانال تلگرامی Gaussian shape
51
Results of Gaussian Lowpass Filters
No ringing effect! @ Digital _image _processing کانال تلگرامی
52
Application of Gaussian Lowpass Filters
Original image Better Looking The GLPF can be used to remove jagged edges and “repair” broken characters. @ Digital _image _processing کانال تلگرامی
53
Application of Gaussian Lowpass Filters (cont.)
Remove wrinkles Original image Softer-Looking @ Digital _image _processing کانال تلگرامی
54
Application of Gaussian Lowpass Filters (cont.)
Original image : The gulf of Mexico and Florida from NOAA satellite. Filtered image Remove artifact lines: this is a simple but crude way to do it! @ Digital _image _processing کانال تلگرامی
55
Hhp = 1 - Hlp Highpass Filters
@ Digital _image _processing کانال تلگرامی
56
Ideal Highpass Filters
Ideal LPF Filter Transfer function where D(u,v) = Distance from (u,v) to the center of the mask. @ Digital _image _processing کانال تلگرامی
57
Butterworth Highpass Filters Transfer function
Where D0 = Cut off frequency, N = filter order. @ Digital _image _processing کانال تلگرامی
58
Gaussian Highpass Filters Transfer function
Where D0 = spread factor. @ Digital _image _processing کانال تلگرامی
59
Gaussian Highpass Filters (cont.)
filter with D0 = 5 Spatial respones of the Gaussian highpass filter with D0 = 5 @ Digital _image _processing کانال تلگرامی
60
Spatial Responses of Highpass Filters
Ripples @ Digital _image _processing کانال تلگرامی
61
Results of Ideal Highpass Filters
Ringing effect can be obviously seen! @ Digital _image _processing کانال تلگرامی
62
Results of Butterworth Highpass Filters
@ Digital _image _processing کانال تلگرامی
63
Results of Gaussian Highpass Filters
@ Digital _image _processing کانال تلگرامی
64
Laplacian Filter in the Frequency Domain
From Fourier Tr. Property: Then for Laplacian operator We get Image of –(u2+v2) @ Digital _image _processing کانال تلگرامی Surface plot
65
Laplacian Filter in the Frequency Domain (cont.)
Spatial response of –(u2+v2) Cross section Laplacian mask in Chapter 3 @ Digital _image _processing کانال تلگرامی
66
Sharpening Filtering in the Frequency Domain
Spatial Domain Frequency Domain Filter @ Digital _image _processing کانال تلگرامی
67
Sharpening Filtering in the Frequency Domain (cont.)
@ Digital _image _processing کانال تلگرامی
68
Sharpening Filtering in the Frequency Domain (cont.)
@ Digital _image _processing کانال تلگرامی
69
High Frequency Emphasis Filtering
Butterworth highpass filtered image Original High freq. emphasis filtered image After Hist Eq. @ Digital _image _processing کانال تلگرامی a = 0.5, b = 2
70
Homomorphic Filtering
An image can be expressed as i(x,y) = illumination component r(x,y) = reflectance component We need to suppress effect of illumination that cause image Intensity changed slowly. @ Digital _image _processing کانال تلگرامی
71
Homomorphic Filtering
@ Digital _image _processing کانال تلگرامی
72
Homomorphic Filtering
More details in the room can be seen! @ Digital _image _processing کانال تلگرامی
73
Correlation Application: Object Detection
@ Digital _image _processing کانال تلگرامی
74
Telegram.me/Digital_Image_Processing
END کانال تلگرامی Telegram.me/Digital_Image_Processing @ Digital _image _processing کانال تلگرامی
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.