Professional Documents
Culture Documents
Transforms
3
1 1 3
F (0)
4
x 0
f ( x)[cos(2 0 x / 4) isin (2 0 x / 4)] f ( x)
2 x 0
3
1
F (1)
4
f ( x)[cos(2x / 4) isin (2x / 4)]
x 0
and so on….
𝑥 𝑥 𝑥 𝑥
𝑥 𝑥 𝑥
𝑥
𝑥 𝑥
𝑥 𝑥
𝑢=7
𝑢=6 8
8
C ( x)
5 S 78 ( x)
C ( x)
4 S 68 ( x)
𝑥
𝑥
𝑥 𝑥
7
C18 ( x)
𝑢=1
• For signal length 𝑀 = 8, the discrete
C178 ( x)
sine and cosine basis functions for
𝑥
the wave nos 𝑢 = 1, 9, 17 (round
𝑥
dots) are all identical, although
their continuous counterparts are
different
𝑢=9
C18 ( x) S18 ( x) • Obviously, 𝑢 = 4 is the max freq.
component that can be represented
𝑥 𝑥
by a discrete signal of length 𝑀 = 8
• Any discrete function with a higher
𝑢 = 17
frequency (𝑢 = 5. . 7 in this case)
C98 ( x)
S178 ( x) has an identical counterpart with a
lower wave number and thus
𝑥 𝑥 cannot be reconstructed from the
sampled signal!
10
f ( x, y) ( x x , y y ) f ( x , y )
x y
0 0 0 0
F (u , v)
ATZ sin(T ) sin(vZ )
MN (T ) (vZ )
11
u·x 1/M 𝑥 = 0, 1, 2, … , 𝑀 − 1
v·x 1/M 𝑦 = 0, 1, 2, … , 𝑁 − 1
12
𝑣=0 𝑣=0
𝑥 𝑥 𝑥 𝑥
𝑦 𝑦
𝑦 𝑦
𝑣=1 𝑣=1
𝑥 𝑥 𝑥 𝑥
𝑦 𝑦 𝑦 𝑦
𝑣=2 𝑣=2
𝑥 𝑥 𝑥 𝑥
𝑦 𝑦
𝑦 𝑦
𝑣=3 𝑣=3
𝑥 𝑥 𝑥
𝑥
13
A Useful Analogy
• Compare Fourier transform to a glass prism
Power Spectrum
• Magnitude of the complex valued Fourier
spectrum
F (u, v) R(u, v) j I (u , v)
Polar coordinate
𝐹 𝑢, 𝑣 = 𝐹(𝑢, 𝑣) 𝑒 𝑖𝜑(𝑢,𝑣) F (u, v) F (u, v) exp( j (u, v))
Magnitude: F (u, v) [ R (u, v) I (u , v )]
2 2 1/ 2
I (u, v)
Phase: (u , v) tan
1
R(u, v)
Power spectrum: 𝑃 𝑢 = 𝐹(𝑢, 𝑣) 2
(or Spectral density)
18
Power Spectrum
• As all computations are carried out for the
discrete variables 𝑢 and 𝑣, therefore F (u, v) ,
(u, v) and P(u, v) are arrays of size 𝑀 × 𝑁
M 1 N 1
1
f ( x, y)
Even
F (u , v) F (u ,v)
symmetry F (0,0)
Odd
MN x 0 y 0
(u, v) (u,v)
symmetry
Zero frequency term
Displaying Transforms
• As elements are complex numbers, we can view
magnitudes F (u, v) directly
• Displaying magnitudes of Fourier transforms called
spectrum of the transform
• Problem: DC component much larger than other
values
• Displays white dot in middle surrounded by black
• So stretch transform values by displaying log of
transform
20
Image DFT
Fourier Transform – Examples (2)
22
In general, visual
analysis of phase angle
images yields little
intuitive information
𝐹 𝑢, 𝑣
= 𝐹(𝑢, 𝑣) 𝑒 𝑖𝜑(𝑢,𝑣)
Inverse DFT using only phase information (with |F(u, v)| = 1 in the equation)
Inverse DFT using only spectrum (set phase angle to 0 in the equation)
27
FT
IFT
28
g f g
IFT FT FT
g
30
Convolution Theorem
G(u,v)=F(u,v)H(u,v) Multiplication in Frequency Domain
f(x,y)*h(x,y)↔ F(u,v)H(u,v)
f(x,y).h(x,y)↔ F(u,v)*H(u,v)
31
2D DFT: Summary
2D DFT: Summary
2D DFT: Summary
1 𝑓𝑜𝑟 𝑢 = 0
For 𝑢 = 0, … , 𝑀 − 1 where 𝐶 𝑢 = 2
1 𝑜𝑡𝑒𝑟𝑤𝑖𝑠𝑒
𝑀−1
2 π 2𝑥 + 1 𝑢
𝑓 𝑥 = 𝐶 𝑢 𝐹 𝑢 cos
𝑀 2𝑀
𝑥=0
1 𝑓𝑜𝑟 𝑢 = 0
For 𝑥 = 0, … , 𝑀 − 1, where 𝐶 𝑢 = 2
1 𝑜𝑡𝑒𝑟𝑤𝑖𝑠𝑒
• All DCT basis function are thus periodic over the length 2𝑀
• DCT can also be computed in 𝑂(𝑀𝑙𝑜𝑔2𝑀) time using FFT
• DCT as spatial filter
39
1 𝑓𝑜𝑟 𝑘 = 0
𝐶 𝑘 = 2
1 𝑜𝑡𝑒𝑟𝑤𝑖𝑠𝑒
where
1 1 1
𝐻1 =
2 1 −1
42
and for n = 3
1 𝐻2 𝐻2
𝐻3 = 𝐻1⊗𝐻2 =
2 𝐻2 −𝐻2
43