Some “facts” about software…
Download
Report
Transcript Some “facts” about software…
Discrete Fourier Transform in
2D – Chapter 14
Discrete Fourier Transform – 1D
• Forward
1
G(m)
M
1
G(m)
M
• Inverse
1
M
1
g (u )
M
g (u )
M 1
M 1
u 0
u 0
m u
m u
g (u ) cos 2
i sin 2
M
M
i 2
g (u ) e
mu
M
0mM
m u
m u
G
(
m
)
cos
2
i
sin
2
m0
M
M
M 1
M 1
m 0
i 2
G(m) e
M is the length (number of discrete samples)
mu
M
0uM
Discrete Fourier Transform – 2D
• After a bit of algebraic manipulation we find that the
2D Fourier Transform is nothing more than two 1D
transforms
1
G(m, n)
N
1
v0 M
N 1
M 1
u 0
i 2
g (u, v) e
mu
M
i 2 nvN
e
1D DFT over row g(*,v)
• Do a 1D DFT over the rows of the image
• Then do a 1D DFT over the columns of the row-wise
DFT
• This is for an MxN (columns by rows)
What’s it all mean?
• Whereas for the 1D DFT we were adding
together 1D sinusoidal waves…
– For the 2D DFT we are adding together 2D
sinusoidal surfaces
• Whereas for the 1D DFT we considered
parameters of amplitude, frequency, and
phase
– For the 2D DFT we consider parameters of
amplitude, frequency, phase, and orientation
(angle)
Visualization
• A pixel in DFT space represents an orientation and frequency of
the sinusoidal surface
• The corners each represent low frequency components which is
inconvenient
Quadrant swapping
• Quadrant swapping brings all low
frequency data to the center
A
D
C
B
B
C
D
A
Visualization
• A pixel in DFT space represents an
orientation and frequency of the sinusoidal
surface
Visualization
• The image is really a depiction of the frequency power spectrum
and as such should be thought of as a surface
• Low frequencies are at the center, high frequencies are at the
boundaries
Visualization
• Image coordinates represent the effective frequency…
2
f (m, n)
1
2
m n
M N
is the sampling interval
• …and the orientation
(m, n) tan
1
mN , nM
Something interesting
• If the DFT space is square then rotation in the
spatial domain is rotation in the frequency
domain
Artifacts
• Since spatial signal is assumed to be
periodic, drastic differences (large gradients)
at the opposing edges cause a strong vertical
line in the DFT
No border differences