Professional Documents
Culture Documents
Lec012 Frequency
Lec012 Frequency
Lec012 Frequency
Department of
Computer Science & Engineering
P.C. Rossin
College of Engineering
and Applied Science
Class Objectives/Announcements
Review of RIP06 Grand Challenge Rules
Questions?
Objectives
Investigate image representation, analysis and processing
techniques in the frequency domain
Review of Fourier Transforms
Questions about homework assignment?
JR Spletzer
References
JR Spletzer
e it = cos(t ) + i sin(t )
e it + e it
cos(t ) =
2
e it e it
sin(t ) =
2i
JR Spletzer
Definitions
JR Spletzer
Image Processing
JR Spletzer
Frequencies in an Image
JR Spletzer
JR Spletzer
Functions that are NOT periodic BUT with finite area under the
curve can be expressed as the integral of sines and/or cosines
multiplied by a weight function
Fourier
Transform
f ( x )e
F (u ) =
Fourier
Synthesis
j 2ux
dx
Fourier
Analysis
f ( x) =
F (u )e
j 2ux
du
Inverse
Fourier
Transform
JR Spletzer
f ( x , y )e
j 2 ( ux + vy )
dxdy
f ( x, y ) =
F (u, v)e
j 2 ( ux + vy )
dudv
2.
F (af + bg ) = aF ( f ) + bF ( g )
Periodic
Real
Symmetric
f+g
F+G
f*g
FG
JR Spletzer
F (u ) =
Sinc
j 2xu
dx
f ( x )e j 2xu dx = e
1
1 j 2u j 2u
e
e
j 2u
sin 2u
=
u
JR Spletzer
F (u ) =
f ( x )e
Gaussian
j 2xu
2 2
u /a
JR Spletzer
iDFT
M 1
f ( x )e
j 2ux / M
u = 0,..., M 1
x =0
f ( x) = F (u )e j 2ux / M ,
x = 0,..., M 1
x =0
e j = cos + j sin
from which we obtain
F (u ) =
1
M
M 1
f ( x) cos
x =0
2ux
2ux
j sin
M
M
for u = 0,,M-1
1
F (u , v ) =
MN
M 1 N 1
f ( x, y)e
j 2 ( ux / M + vy / N )
x =0 y = 0
f ( x, y ) = F (u, v)e j 2 ( ux / M + vy / N )
x =0 y =0
JR Spletzer
Comb
w
2/w
JR Spletzer
Sampling
JR Spletzer
Sampling Limits
JR Spletzer
Aliasing
JR Spletzer
10
Aliasing Examples
75 dpi
Scan
600 dpi
Scan
How might we
handle this effect?
Moire
Pattern
* Wikipedia
JR Spletzer
DFT (Continued)
F (u , v ) = F (u , v ) e j ( u , v )
where the magnitude or spectrum is denoted by
F (u , v ) = R 2 (u , v ) + I 2 (u, v)
1
2
R (u , v)
(u, v) = tan 1
JR Spletzer
11
DFT (Continued)
F (u , v) =
1
MN
M 1 N 1
f ( x, y)e
j 2 ( ux / M + vy / N )
x =0 y = 0
1
MN
M 1 N 1
f ( x, y)
x =0 y =0
DFT (Continued)
f ( x, y )e j 2 (u0 x / M + v0 y / N ) F (u u0 , v v0 )
which for u0=M/2 and v0=N/2 we see that
F ( f ( x, y )(1) x + y ) = F (u M / 2, v N / 2)
12
FFT Example
JR Spletzer
FFT Example
JR Spletzer
13
FFT Example
JR Spletzer
F (af + bg ) = aF ( f ) + bF ( g )
Real
Basis for
filtering in the
f+g
frequency domain!
f*g
Periodic
Symmetric
F+G
FG
JR Spletzer
14
2.
3.
4.
5.
6.
JR Spletzer
Filtering Example
Smooth an Image with a Gaussian Kernel
1 4 6 4 1
4 16 24 16 4
6 24 36 24 6 / 256
4 16 24 16 4
1 4 6 4 1
15
Filtering Example
Smooth an Image with a Gaussian Kernel
1.
JR Spletzer
Filtering Example
Smooth an Image with a Gaussian Kernel
2. Compute the DFT F(u,v) of the resulting image
log transform
JR Spletzer
16
Filtering Example
Smooth an Image with a Gaussian Kernel
3. Multiply F(u,v) by a filter G(u,v)
1 4 6 4 1
4 16 24 16 4
6 24 36 24 6 / 256
4 16 24 16 4
1 4 6 4 1
g(x,y)
G(u,v)
JR Spletzer
Filtering Example
Smooth an Image with a Gaussian Kernel
3. Multiply F(u,v) by a filter G(u,v)
JR Spletzer
17
Filtering Example
Smooth an Image with a Gaussian Kernel
4.
5.
6.
JR Spletzer
Filtering Example
Smooth an Image with a Gaussian Kernel
f ( x, y ) g ( x, y )
18
* HIPR2
JR Spletzer
Geometrical Information
* HIPR2
JR Spletzer
19
Summary
20