Professional Documents
Culture Documents
Zhen Li
lizhen@cuhk.edu.cn
School of Science and Engineering
The Chinese University of Hong Kong, Shen Zhen
February 19-21, 2019
Basics of Frequency
Domain
1
Outline
• Preliminary:
• Complex Numbers
• Fourier Series & Fourier Transform
• Impulses
• Convolution
• Sampling
• Sampled Function
• Sampling Theorem
2
Revisit of Complex Numbers
• Definition
• ! = # + % '
• Conjugate: ! ∗ = # − % '
n= 1
• With
Z T /2
1 j 2⇡n
cn = f (t)e T t dt
T T /2
Fourier Series for real value function and conplex value function 4
https://www.youtube.com/watch?v=kP02nBNtjrU
Chapter 4
Filtering in the Frequency Domain
Unit Impulse
4.2.3 Impulses and their Shifting Property
and
Sifting property :
Chapter 4
Filtering in the Frequency Domain
Sifting property :
6
T. Peynot
Chapter 4
7
Chapter 4
Continuous Functions
4.2.4 The Fourier Transform of Functions of One Continuous Variable
8
Digital Image Processing
T. Peynot
FT Example
Chapter 4
Filtering in the Frequency Domain
Example :
10
Digital Image Processing
T. Peynot
Where :
=>
Chapter 4
4.2.5 Convolution
Convolution of functions f(t) and h(t), of one continuous variable t :
Sampling
4.3 Sampling and the Filtering in the Frequency
Fourier Transform Domain
of Sampled Functions
4.3.1 Sampling
4.3 Sampling and the Fourier Transform of Sampled Functions
Model of the sampled function:
4.3.1 Sampling of f(t) by a sampling
multiplication
function equal to a train of impulses ΔT
units apart
Model of the sampled function:
multiplication of f(t) by a sampling
function equal to a train of impulses ΔT
units apart
1 X1 ⇣ n ⌘
= F µ
T n= 1
T
14
Digital Image Processing
T. Peynot
Sampling Theorem:
A continuous, band-limited function can be recovered completely
from a set of its samples if the samples are acquired at a rate
exceeding twice the highest frequency content of the function
15
Digital Image Processing
T. Peynot
16
Digital Image Processing
T. Peynot
Aliasing
Chapter 4
Filtering in the Frequency Domain
4.3.4 Aliasing
17
Chapter 4
Filtering in the Frequency Domain
Aliasing (Illustration)
4.3.4 Aliasing
18
Function Reconstruction
h i
1
f (t) = F T F̃ (µ)H(µ)
1
X
1
= f (n T ) · sinc (t n T)
n= 1
T
https://blog.csdn.net/u010592995/article/details/73555425
https://blog.csdn.net/liyuanbhu/article/details/42061089
19
Discrete Fourier Transform
FT of a sampled function
Z 1
F̃ (µ) = f˜(t)e j2⇡µt
dt
1
Z 1 1
X
j2⇡µt
= f (t) (t n T )e dt
1 n= 1
1 Z 1
X
j2⇡µt
= f (t) (t n T )e dt
n= 1 1
X1
j2⇡µn T
= fn e
n= 1
⇣ m ⌘
M
X1
j2⇡unm/M
DFT: Fm = F̃ = fne
M T n=0
20
DFT and IDFT
Discrete Fourier Transform (DFT)
M
X1
j2⇡mn/M
Fm = fn e
n=0
M
X1
1
fn = Fm ej2⇡mn/M
M m=0
21
Relation between Sampling &
Frequency Interval
• Consider ! samples of ", with interval ∆$
22
Chapter 4
Filtering in the Frequency Domain
Circular Convolution
4.4 The Discrete Fourier Transform (DFT) of One Variable
4.4.1 Obtaining the DFT from the Continuous Transform of a Sampled Function
Both forward and inverse discrete transforms are infinitely periodic, with period M
Where k is an integer
23
Chapter 4
Filtering in the Frequency Domain
Chapter 4
Filtering in the Frequency Domain
Impulse of two continuous variables t and z :
Sifting property:
© 1992–2008 R. C. Gonzalez & R. E. Woods
24
4.5 Extension to Function of Two Variables
Extension
4.5.1 The 2-D of Discrete
impulse and its SiftingImpulse
Property
Sifting property:
Extension of Fourier
4.5 Extension to Function of Two VariablesTransform
f(t,z) continuous function of two continuous variables t and z, the 2-D continuous
Fourier transform pair is given by:
and
26
Digital Image Processing
T. Peynot
2D FT: Example
Chapter 4
Filtering in the Frequency Domain
27
T. Peynot
Chapter 4
Filtering in the Frequency Domain
2D Sampling
4.5.3 Two-Dimensional Sampling and the 2-D Sampling Theorem
Sampling in 2-D can be modeled using the sampling function (2-D impulse train):
28
Digital Image Processing
T. Peynot
and
29
T. Peynot
Chapter 4
2-D Discrete Fourier Transform (DFT) of a digital image f(x,y) of size MxN:
translation
insensitive,
but rotation
sensitive
Filtering in the Frequency Domain
If ΔT and ΔZ are the separations between samples, the separations between the
corresponding discrete, frequency domain variables are:
and
31
Filtering
in Frequency Domain
Chapter 4
Filtering in the Frequency Domain
2D Convolution
4.6.6 The 2-D Convolution Theorem
and conversely:
Chapter 4
Filtering in the Frequency Domain
More 2D
© 1992–2008 R. C.wraparound/padding
Gonzalez & R. E. Woods
Chapter 4
Given a digital image f(x,y) of size MxN, the basic filtering equation is:
M
X1
j2⇡ux/M
f (x) , F (u) = f (x)e
x=0
M
X1
f (x)ej2⇡(u0 x/M ) , F (u u0 ) = f (x)e j2⇡(u u0 )x/M
x=0
M
X1
x j2⇡(u M/2)x/M
f (x)( 1) , F (u M/2) = f (x)e
x=0
Extension to 2D:
1. Given an input image f(x,y) of size MxN, obtain padding parameters P and
Q. Typically, P=2M and Q=2N.
2. Form a padded image fp(x,y) of size PxQ by appending the necessary number
of zeros to f(x,y).
3. Multiply fp(x,y) by (-1)x+y to centre its transform.
4. Compute the DFT, F(u,v), of the image from step 3.
5. Generate a real, symmetric filter function, H(u,v), of size PxQ with centre at
coordinates (P/2,Q/2). Form the product G(u,v)=H(u,v)F(u,v) using array
multiplication.
6. Obtain the processed image:
7. Obtain the final processed result, g(x,y), by extracting the MxN region from
the top, left quadrant of gp(x,y)
© 1992–2008 R. C. Gonzalez & R. E. Woods
T. Peynot
Chapter 4
1)
4) DFT
5) Filter H
6) Filtered
image (IDFT) 7) Final
Result
© 1992–2008 R. C. Gonzalez & R. E. Woods
Filtering in the Frequency Domain
Ideal Lowpass Filter (ILPF) = 2-D lowpass filter that passes without attenuation all
Chapter 4
frequencies within a circle of radius D0 from the origin and “cuts off” all frequencies
Filtering in the Frequency Domain
outside this circle
Example:
r = 30
r = 60
r = 160 r = 460
Chapter 4
Filtering in the Frequency Domain
Butterworth Lowpass Filter
4.8.2 Butterworth Lowpass Filters
4.8.2 (Spatial)
Butterworth Lowpass Filters
Digital Image Processing
Chapter 4
Filtering in the Frequency Domain
Chapter 4
Filtering in the Frequency Domain
Chapter 4
Highpass Filter
Filtering in the Frequency Domain
Do = 30 Do = 60 Do = 160
Digital Image Processing
T. Peynot
Chapter 4
Ideal HPF Filtering in the Frequency Domain
Do = 30 Do = 60Processing
Digital Image Do = 160
T. Peynot
Chapter 4
Butterfly HPF
© 1992–2008 R. C. Gonzalez & R. E. Woods
Filtering in the Frequency Domain
Do = 30 Do = 60 Do = 160
Gaussian HPF
© 1992–2008 R. C. Gonzalez & R. E. Woods