Professional Documents
Culture Documents
Digital Image Processing: Lect #12
Digital Image Processing: Lect #12
e
Processing
Lect #12
1-D Fourier Transform
The Fourier Transform of a continous function f (t )
F ( ) { f (t )} f (t )e j 2t dt
W /2
F ( ) f (t )e j 2 t
dt Ae j 2t dt
W / 2
A j 2 t W / 2 A
e e jW e jW
j 2 W / 2 j 2
sin(W )
AW
(W )
3
Prelims
The Fourier transform of a unit impulse located at the origin:
F ( ) (t )e j 2t dt
e j 2 0
=1
The Fourier transform of a unit impulse located at t t0 :
F ( ) (t t0 )e j 2t dt
e j 2t0
=cos(2 t0 ) j sin (2 t0 )
2-D Impulse and Sifting Property: Continuous
if t z 0
The impulse (t , z ), (t , z )
0 otherwise
and
(t , z )dtdz 1
1 if x y 0
The impulse ( x, y ), ( x, y )
0 otherwise
x y
f ( x, y ) ( x, y) f (0, 0)
and
x y
f ( x, y ) ( x x0 , y y0 ) f ( x0 , y0 )
01/04/2022 6
2-D Fourier Transform: Continuous
F ( , ) f (t , z )e j 2 ( t z ) dtdz
T /2 Z /2
Ae j 2 ( t z ) dtdz
T / 2 Z /2
sin(T ) sin( T )
ATZ T
T
01/04/2022 7
2-D Sampling and 2-D Sampling Theorem
2 D impulse train:
sT Z (t , z ) (t mT , z nZ )
m n
01/04/2022 8
2-D Sampling and 2-D Sampling Theorem
01/04/2022 10
Moiré patterns
A moiré pattern
formed by
incorrectly down-
sampling the
former image
01/04/2022 11
The Discrete Fourier Transform (DFT) of One
Variable
M 1
F ( ) f ( x)e j 2 x / M , 0,1,..., M 1
x 0
M 1
1
f ( x)
M
F
0
( ) e j 2 x / M
, x 0,1, 2,..., M 1
01/04/2022 12
2-D Discrete Fourier Transform and Its
Inverse
DFT:
M 1 N 1 j 2 ( x / M y / N )
F ( , ) f ( x, y )e
x 0 y 0
IDFT:
M 1 N 1 j 2 ( x / M y / N )
1
f ( x, y )
MN
F ( , )e
x 0 y 0
01/04/2022 13
Properties of the 2-D DFT
3. Periodicity
2 D Fourier transform and its inverse are infinitely periodic
F ( , ) F ( k1M , ) F ( , k2 N ) F ( k1 M , k2 N )
f ( x, y ) f ( x k1M , y ) f ( x, y k2 N ) f ( x k1M , y k2 N )
01/04/2022 15
Properties of the 2-D DFT
periodicity
01/04/2022 16
Shifting the Fourier transform
f ( x ) e j 2 ( 0 x / M ) F ( 0 )
0 M / 2, f ( x)(1) x F ( M / 2)
f ( x, y )(1) x y F ( M / 2, N / 2)
Properties of the 2-D DFT
Fourier Spectrum and Phase Angle
Power spectrum
P(u, v) | F (u, v) |2 R 2 (u, v) I 2 (u, v)
Phase angle
I (u, v)
(u,v)=arctan
R (u , v )
01/04/2022 18
the Fourier image is symmetrical to its center, two points corresponding to the
frequency of the stripes in the original image. Note that the two points lie on a
horizontal line through the image center, because the image intensity in the spatial
domain changes the most if we go along it horizontally.
01/04/2022 20
01/04/2022 21
Phase Angles
01/04/2022 22
Example: Phase Angles and The Reconstructed
01/04/2022 23
another example: amplitude vs. phase
A = “Aron” P = “Phyllis”
FA = fft2(A) FP = fft2(P)
log(abs(FA)) log(abs(FP))
angle(FA) angle(FP)
It causes the
wraparound
error
It can be solved
by appending
zeros
01/04/2022 26
Zero Padding
P ≥A+B-1
01/04/2022 27
Zero Padding
► Let f(x,y) and h(x,y) be two image arrays of sizes A×B and
C×D pixels, respectively. Wraparound error in their
convolution can be avoided by padding these functions with
zeros
f ( x, y ) 0 x A -1 and 0 y B -1
f p ( x, y )
0 A x P or B y Q
h( x, y ) 0 x C -1 and 0 y D -1
h p ( x, y )
0 C x P or D y Q
Here P A C 1; Q B D 1
01/04/2022 28
The Basic Filtering in the Frequency Domain
01/04/2022 29
The Basic Filtering in the Frequency Domain
01/04/2022 30
The Basic Filtering in the Frequency Domain
01/04/2022 31
The Basic Filtering in the Frequency Domain
01/04/2022 32
Summary:
Steps for Filtering in the Frequency Domain
1. Given an input image f(x,y) of size MxN, obtain the
padding parameters P and Q. Typically, P = 2M and Q = 2N.
01/04/2022 33
Summary:
Steps for Filtering in the Frequency Domain
6. Form the product G(u,v) = H(u,v)F(u,v) using array
multiplication
g p ( x, y ) real 1 G (u , v) ( 1) x y
01/04/2022 34
An Example:
Steps for Filtering in the Frequency Domain
01/04/2022 35