ImageProcessing Chap4
ImageProcessing Chap4
및 무단 복제를 금함)
Chapter 4
Filtering in the Frequency Domain
(from 2nd +3rd editions of main
text)
2
Fourier series and Fourier transform
Weight3 x Any function that periodically repeats itself
can be expressed as the sum of
+ Weight2 x sines and/or cosines of different frequency,
each multiplied by a different coefficient
+ Weight1 x
=> Fourier series
f ( x) = F [k ]e
k =−
jk0 x
, 0 = 2 u0
+ Weight0 x
x(t ) = X [k ]e
k =−
jk0t
= 2 u
Spring 이영렬 3
Understanding frequency domain
∞
𝑋(𝑗𝜔) = න 𝑥(𝑡)𝑒 −𝑗𝜔𝑡 𝑑𝑡
−∞
𝜔 = 2𝜋𝑢
5
Convolution
Convolution Theorem
−u
frequency
t
t- = l
= F(u)H(u)
Spring 이영렬 6
Correlation theorem (Homework 3)
When f(t) has real number, compute Correlation theorem을 풀어서 제출하시오.
𝑓 𝑡 •ℎ 𝑡
∞
= න 𝑓 𝜏 ℎ 𝑡 + 𝜏 𝑑𝜏 여기에
−∞
수식을 입력하십시오.
Spring 이영렬 7
Discrete Space(Time) Fourier Transform (DSFT)
Fourier Transform Pair : +∞ +∞
𝑋(𝜔
ෝ1 , 𝜔
ෝ2 ) = ෝ 1 𝑛1 −𝑗𝜔
𝑥(𝑛1 , 𝑛2 )𝑒 −𝑗𝜔 𝑒 ෝ 2 𝑛2
ෝ =2𝜋𝑢
𝑛1 =−∞ 𝑛2 =−∞
ෝ 1,
ෝ 2 : discrete angular freq. 𝜋 𝜋
1 ෝ 1 𝑛1 𝑗𝜔
𝑥(𝑛1 , 𝑛2 ) = 2 න න 𝑋(𝜔 ෝ2 )𝑒 𝑗𝜔
ෝ1 , 𝜔 𝑒 ෝ 2 𝑛2 𝑑 𝜔
ෝ1 𝑑𝜔
ෝ2
4𝜋
−𝜋 −𝜋
1,
X(ෝ ෝ 2) is in general complex; function of continuous variables and periodic :
1,
X(ෝ ෝ 2) = X(ෝ 1 +2, 1,
ෝ 2) = X(ෝ ෝ 2 +2).
1,
X(ෝ ෝ 2) exists if x(n1,n2) is stable (absolute sum over entire n1,n2 space is finite)
Magnitude and Phase:
𝑋(𝜔
ෝ1 , 𝜔
ෝ2 ) = 𝑋(𝜔 ෝ2 ) 𝑒 +𝑗𝜃 ;
ෝ1 , 𝜔 Polar form
ෝ 1 ,𝜔
Im{𝑋(𝜔 ෝ 2 )} ෝ 1 ,𝜔
Im 𝑋(𝜔 ෝ 2)
𝜃 = arctan ෝ 1 ,𝜔
ෝ 2 )}
= tan−1 Re{𝑋(𝜔
ෝ 1 ,𝜔
ෝ 2)
= 𝑎𝑟𝑔{𝑋 𝜔
ෝ1 , 𝜔
ෝ2 }
Re{𝑋(𝜔
Spring 이영렬 8
Example 4.1
Obtaining the Continuous-Time FT (CTFT) of a simple function
Text typo
should be
changed to u ( frequency )
u 0
𝐴
= sin(𝜋𝑢W) zero crossings: 𝜋𝑢W= l 𝜋, l:integer
𝜋𝑢
= 𝐴𝑊 sin 𝑐 (𝑢𝑊)
What happens
if W increase :
If W decrease:
Spring 이영렬 9
Properties of DSFT
𝑋(𝜔 ෝ2 ) = 𝐹{𝑥(𝑛1 , 𝑛2 )}; 𝑥(𝑛1 , 𝑛2 ) = 𝐹 −1 {𝑋(𝜔
ෝ1 , 𝜔 ෝ1 , 𝜔
ෝ2 )}
Linearity FT
• ax(n1,n2) + by(n1,n2) <-> a X(1, 2) + b Y(1, 2)
IFT
Convolution
• x(n1,n2)**y(n1,n2) <-> X(1, 2) Y(1, 2)
DTFT
ෝ
ෝ = 𝑋(𝑒 𝑗𝜔𝑛
𝑋 𝜔 )
Fourier Transform of Separable sequence
• x(n1,n2)=x1(n1)x2(n2) <-> X(1, 2) = X1(1)X2(2)
∞ ∞
2
𝑥(𝑛) = 𝑥(𝑛)𝑥(𝑛)∗
Parseval’s Theorem <proof> 𝑛=−∞ 𝑛=−∞
𝜋
∞ ∞ 𝜋 𝜋 1 ෝ
1 use 𝑥 ∗ (𝑛) = ( ෝ 𝑗𝜔𝑛
න 𝑋(𝜔)𝑒 ෝ ∗
𝑑𝜔)
|𝑥(𝑛1 , 𝑛2 ) |2 = 2 න න |𝑋(𝜔 ෝ2 )|2 𝑑𝜔
ෝ1 , 𝜔 ෝ1 𝑑𝜔
ෝ2 2𝜋
4𝜋 −𝜋
𝑛1=−∞ 𝑛2=−∞ −𝜋 −𝜋
Proof in the 1-D case
10
Spring 이영렬 11
Example 1 of DSFT
n2 +∞ +∞
ෝ 1 𝑛1 −𝑗 𝜔
𝐻(𝜔
ෝ1 , 𝜔
ෝ2 ) = ℎ(𝑛1 , 𝑛2 )𝑒 −𝑗𝜔 𝑒 ෝ 2 𝑛2
h(n1,n2) 𝑛1 =−∞ 𝑛2 =−∞
1
ෝ1 ෝ2 ෝ1 ෝ2
1 2 1 = 2 + 𝑒 −𝑗𝜔 + 𝑒 −𝑗𝜔 + 𝑒 𝑗𝜔 + 𝑒 𝑗𝜔
n1
= 2{1 + cos( 𝜔
ෝ1 ) + cos( 𝜔
ෝ2 )}
1
ෝ 𝟏, 𝝎
What is magnitudes of | H(𝝎 ෝ 𝟐) |
LPF (H)
(V)
-
Spring 이영렬 12
Example 2 of Fourier Transform
n2 This is separable h(n1,n2)=h1(n1)h2(n2) where,
h(n1,n2)
1 -3 1 3 h2(n2)
3 h1(n1)
-3 9 -3
n1
1 -3 1 n1 n2
-1 -1 -1 -1
H1(𝜔
ෝ1 )= 3 - 2cos(𝜔
ෝ1 ), H2(𝜔
ෝ2 )= 3 - 2 cos(𝜔
ෝ2 ); H (𝜔
ෝ1 , 𝜔
ෝ2 )= H1(𝜔
ෝ1 )H2(𝜔
ෝ2 )
ෝ 𝟏, 𝝎
What is magnitudes of | H(𝝎 ෝ 𝟐) | ?
HPF
(H)
(V)
Spring 이영렬 13
Let’s check what we have covered (1)
Box filter: 1/9[1 1 1; 1 1 1; 1 1 1]
HPF : [-1 -1 -1;-1 9 -1;-1 -1 -1]
Spring 이영렬 14
Let’s check what we have covered (2)
Sobel(H): [-1 0 1;-2 0 2; -1 0 1]
Laplacian: [-1 -1 -1; -1 8 -1; -1 -1 -1]
continuous → F (u ) or F ( j )
f ( x) ⎯⎯
sampling
→ F (e jˆ )
f (n) ⎯⎯ : continuous periodic: 2𝜋 periodic on 𝜔
ෝ axis
sampling for digital computer: 2𝜋/N, 𝜔=
ෝ 2𝜋𝒖/N
F (u )
extracting one period and
f (n) ⎯⎯
→ F (u )
DFT
sampling
Spring 이영렬 16
Discrete Fourier Transform (DFT)
1D DFT
• For finite discrete sequence
𝑓(𝑛) for 𝑛 = 0, ⋯ , 𝑁 − 1
– Inverse DFT
𝑁−1
1 1
𝑓(𝑛) = 𝐹(𝑘)𝑊𝑁−𝑘𝑛 , 𝑛 = 0, ⋯ , 𝑁 − 1 𝑥[𝑛] = න ෝ
𝑋(𝑒 𝑗 𝜔 ෝ
)𝑒 𝑗 𝜔𝑛 𝑑𝜔
ෝ
𝑁 2𝜋 <2𝜋>
𝑘=0
𝑓(𝑛) = 𝑓(𝑛 + 𝑁)
𝑤𝑁𝑁+𝑙 = 𝑤𝑁𝑙 , 0 ≤ 𝑙 < 𝑁
2𝜋
– Forward DFT (refer to DFT) ( 𝑤𝑁𝑁+𝑙 = (𝑒 −𝑗 𝑁 )𝑁+𝑙 = 𝑤𝑁𝑙 )
k=u
𝑁−1
frequency 𝐹(𝑘) = 𝑓(𝑛)𝑊𝑁𝑘𝑛 , 𝑘 = 0, ⋯ , 𝑁 − 1
𝑛=0 ∞
𝐹(𝑘) = 𝐹(𝑘 + 𝑁) ෝ
𝑋(𝑒 𝑗𝜔 ෝ
) = 𝑥[𝑛]𝑒 −𝑗𝜔𝑛
2𝜋
−𝑗 𝑛=−∞
where 𝑊𝑁 ≡ 𝑒 𝑁
Euler formula
2𝜋𝑘𝑛 2𝜋𝑘𝑛
𝐹(𝑘) = σ𝑁−1
𝑛=0 𝑓(𝑛)(cos − 𝑗 𝑠𝑖𝑛 )
𝑁 𝑁
17
DFT
Basis vectors
N −1 2 kn N −1 2 kn
Imaginary F ( k ) = f ( n) sin Real F ( k ) = f ( n) cos
n =0 N n =0 N
u=k, frequency u=k, frequency
If N=16
18
DFT (basis): orthogonal bases are usually used
Basis vectors: N=4 𝑁−1
1
𝐹(𝑘) = 𝑓(𝑛)𝑊𝑁𝑘𝑛
For 𝑁 = 4 𝑁
𝑛=0
𝐹(0) 1 1 1 1 𝑓(0)
𝐹(1) 1 1 𝑤41 𝑤42 𝑤43 𝑓(1)
= ⇒ 𝐅 = 𝐴𝐟 𝐯0 𝐓 𝐯1∗ = 1/16(1 + 𝑤4−1 + 𝑤4−2 + 𝑤4−3 ) = 0
𝐹(2) 4 1 𝑤42 𝑤40 𝑤42 𝑓(2)
𝐹(3) 1 𝑤43 𝑤42 𝑤41 𝑓(3) 1 (j) -1 (-j)
𝐯0 𝐓 𝐯2∗ = 1/16(1 + 𝑤4−2 + 𝑤40 + 𝑤4−2 ) = 0
Orthogonal? 2𝜋
⇒ easy to handle mathematically ..... −𝑗
𝑤4 = 𝑒 4
2𝜋
𝑤𝑁𝑁+𝑙 = 𝑤𝑁𝑙 , 0 ≤ 𝑙 < 𝑁 𝐯0 𝐓 𝐯0∗ =4/16=1/4 𝑤4−1 =𝑒 4 =𝑗 𝑗
2𝜋 4𝜋
( 𝑤𝑁𝑁+𝑙 = (𝑒 −𝑗 𝑁 )𝑁+𝑙 = 𝑤𝑁𝑙 ) −2 𝑗
𝑤4 = 𝑒 4 = −1
6𝜋
−3 𝑗
Norm is not 1 for each 4-dimensional vector 𝑤4 = 𝑒 4 = −𝑗
v0, v1, v2, v3: orthogonal vectors −𝑗
2𝜋
𝑊𝑁 ≡ 𝑒 𝑁
v0, v1, v2, v3: orthogonal vectors
N −1
1
Depending on applications F (k ) =
N
f (n)W
n=0
kn
N , k = 0, , N −1
▪ Inverse DFT
▪ Euler’s formula
20
Spring 이영렬
𝑁−1 𝑁−1 𝑁−1
1
|𝑓 𝑥 |2 = 𝑓 𝑥 𝑓(𝑥)∗ = ⋯ = |𝐹 𝑢 |2
𝑥=0 𝑥=0
𝑁
𝑢=0
DFT Example
𝑁−1
2𝜋𝑢𝑥
−𝑗
𝐹 𝑢 = 𝑓 𝑥 𝑒 𝑁 , 𝑢 = 0, ⋯ , 𝑁 − 1, 𝑁 = 4 2𝜋𝑢𝑥
1 𝑁−1 𝑗 𝑁
𝑥=0 f(𝑥) = σ 𝐹(𝑢)𝑒 , 𝑥 = 0, ⋯ , 𝑁 − 1
𝑁 𝑢=0
Spring 이영렬 21
Parseval theorem
𝑁−1 𝑁−1
|𝑓 𝑥 |2 = 𝑓 𝑥 𝑓(𝑥)∗
𝑥=0 𝑥=0
Spring 이영렬 22
1-D Fourier Transform and Inverse
Digital pixel Discrete
𝑀−1 𝐾−1
1 2𝜋𝑢𝑥 𝐴 2𝜋𝑢𝑥
𝐹(𝑢) = 𝑓(𝑥)𝑒 −𝑗 𝑀 = 𝑒 −𝑗 𝑀
𝑀 𝑀
𝑥=0 𝑥=0 M/K
𝐴 𝜋𝑢(𝐾−1) sin( 𝜋𝑢𝐾/𝑀) 𝑀
= 𝑒 −𝑗 𝑀 Zero crossing= ± 𝑙, 𝑙: 𝑖𝑛𝑡𝑒𝑔𝑒𝑟, 𝑙0
𝑀 sin( 𝜋𝑢/𝑀) 𝐾
Homework 4
Spring 이영렬 23
2𝜋𝑢𝐾
2𝜋𝑢𝑥 −𝑗
1 𝑀−1 −𝑗 𝑀 𝐴 𝐾−1 −𝑗2𝜋𝑢𝑥 𝐴 1−𝑒 𝑀
𝐹 𝑢 = σ
𝑀 𝑥=0
𝑓 𝑥 𝑒 = σ
𝑀 𝑥=0
𝑒 𝑀 = 𝑀 −𝑗
2𝜋𝑢 =...
1−𝑒 𝑀
𝐴 −𝑗𝜋𝑢(𝐾−1) sin( 𝜋𝑢𝐾/𝑀) u ≠ 0, ±𝑀, ±2𝑀, … . .
= 𝑒 𝑀
𝑀 sin( 𝜋𝑢/𝑀)
Homework 4
1) 1D DFT를 유도하고
2) K=0에만 존재(f(x)=A(x))와 K가 M points인 경우 F(u)의 magnitude를
계산하고 그리시오.
Spring 이영렬 24
2-D DFT and Inverse
Periodic Characteristics
y
• The inverse Fourier transform is given by (v)
x
(u)
• At point (0, 0)
Spring 이영렬 25
Properties of the 2-D Fourier Transform (DFT)
u=100, v=400
• Separability
For all u, v
26
26
2-D DFT and Inverse
S=clog(1+r) (3.2-2)
Spring 이영렬 27
Filtering in Frequency Domain
Spring 이영렬 28
Spatial Filtering in Frequency Domain
𝑁−1
2𝜋𝑢𝑥
Properties of 2D DFT (cont.): NN image 𝑓 𝑥 = 𝐹 𝑢 𝑒𝑗 𝑁 , → 𝑥 − 𝑥0
𝑢=0
– Translation Phase change (no change in magnitude) 𝑁−1
2𝜋𝑢(𝑥−𝑥0 )
𝑓 𝑥 − 𝑥0 = 𝐹 𝑢 𝑒 𝑗 𝑁
2𝜋 2𝜋 𝑢=0
𝑓(𝑥 − 𝑥0 , 𝑦 − 𝑦0 ) ⇔ 𝐹(𝑢, 𝑣) exp −𝑗 𝑢𝑥0 exp −𝑗 𝑣𝑦0 𝑁−1
𝑁 𝑁 −𝑗
2𝜋𝑢𝑥0
𝑗
2𝜋𝑢𝑥
Image shift = 𝐹 𝑢 𝑒 𝑁 𝑒 𝑁
𝑢=0
Shift in Frequency domain
2𝜋 2𝜋
𝑓(𝑥, 𝑦) exp 𝑗 𝑢 𝑥 exp 𝑗 𝑣 𝑦 ⇔ 𝐹(𝑢 − 𝑢0 , 𝑣 − 𝑣0 )
𝑁 0 𝑁 0 1
𝑁−1
2𝜋𝑢𝑥
𝐹(𝑢) = 𝑓(𝑥)𝑒 −𝑗 𝑁
𝑁
– Conjugate symmetry: For real 𝑓(𝑥, 𝑦) 𝑥=0
𝑢 −> 𝑢 − 𝑢0
𝐹 ∗ (𝑢, 𝑣) = 𝐹(−𝑢, −𝑣)
𝑁−1
Proof ∗
1 −𝑗
2𝜋(−𝑢)𝑥
𝐹 (𝑢) = 𝑓(𝑥) 𝑒 𝑁 = 𝐹(−𝑢)
𝑁
𝑛=0
𝐹 ∗ (𝑢, 𝑣) = 𝐹(−𝑢, −𝑣)
Spring 이영렬 29
Basic steps for filtering in frequency domain
Spring 이영렬 30
Spatial Filtering in Frequency Domain
Frequency mask
DFT
Freq. Mask
Spring 이영렬 31
Filtering in frequency domain
Spring 이영렬 32
Some basic filters and their properties
Low-pass filter(LPF)
High-pass filter(HPF)
Spring 이영렬 33
Correspondence between filtering in spatial
domain and frequency domain
Convolution in spatial domain multiplication in frequency domain
f(x)*h(x) F(u)H(u)
f(x,y)*h(x,y) F(u,v)H(u,v) : convolution property
f(x,y)h(x,y) F(u,v)*H(u,v) : multiplication property
Fourier
Transform
f(x) F(u)
* multiplication
h(x) H(u)
y[x] Y[u]
Spring 이영렬 34
Computing the inverse Fourier transform using a
forward transform algorithm
𝑀−1
1
𝐹(𝑢) = 𝑓(𝑥)𝑒 −𝑗2𝜋𝑢𝑥/𝑀 𝑢 = 0,1,2, . . . , 𝑀 − 1
𝑀
𝑥=0
𝑀−1
𝑀−1 𝑁−1
1 ∗ 1
𝑓 (𝑥, 𝑦) = 𝐹 ∗ (𝑢, 𝑣)𝑒 −𝑗2𝜋(𝑢𝑥/𝑀+𝑣𝑦/𝑁)
𝑀𝑁 𝑀𝑁
𝑢=0 𝑣=0
35
Period=400
Period=400
Without
-200+t t
padding ℎ(𝑥) ℎ(𝑥)
36
36
300
𝑦 𝑛 = 𝑓𝑐 𝑚 ℎ𝑐 ( 𝑛 − 𝑚 )
𝑘=0
Zero padding
P ≥ A+B-1
padding
Period ≥ A+B-1
the DFT 37
Convolution
𝑁 𝑝𝑜𝑖𝑛𝑡𝑠 N + M −1
𝑓 𝑛 −> 𝑁 + 𝑀 − 1 𝑓𝑐 ′ 𝑛
N insertion F (k)
𝑔(𝑛) −> 𝑁 + 𝑀 − 1 𝑔𝑐 ′ (𝑛) G(k)
𝑀 𝑝𝑜𝑖𝑛𝑡𝑠 insertion
M
𝑦 𝑛 = 𝑓 𝑘 𝑔(𝑛 − 𝑘)
𝑦(𝑛) = 𝑓(𝑛) ∗ 𝑔(𝑛) = {2,3,5,2} 𝑘=0
3
P=2M, Q=2N
P=2M, Q=2N
g(x,y)
Spring 이영렬 39
Smoothing Frequency-Domain Filters
• Noise and sharp transitions are the high-frequency components
• Remove noise by attenuating the specified range of high frequency components
• Basic model of filtering in frequency domain
G(u, v) = H(u, v)F(u, v)
• Basic three types of low-pass filters, H(u, v)
➢ Ideal filter
➢ Butterworth filter
➢ Gaussian filter
40
40
Ideal LPF(1)
G(u,v)=H(u,v)F(u,v)
Cut off all high frequency components of the Fourier transform that are at a
distance greater than a specified distance D0 from the origin
2D ideal low-pass filter (ILPF) with transfer function
Spring 이영렬 41
Ideal LPF(2)
Power(Energy) conservation
v = Au || v ||2 =|| u ||2
N −1 N −1
( || v || = | v(k ) | = u A Au = u u = | u (n) |2 =|| u ||2 )
2 2 *T *T *T
k =0 *T n =0
Spring 이영렬
v v Unitary transform 42
Ideal LPF(3)
D0=5
h(x)
h(x,y) =DFT-1[H(u,v)]
Spring 이영렬 43
Butterworth Lowpass Filter(1):BLPF
• Transfer function of a Butterworth lowpass filter (BLPF) of
order n with cutoff frequency D0 from the origin is defined as
n : shape control
If n is large, it looks like more rectangle
44
44
Butterworth Lowpass Filter(2) :BLPF
D0=5 BLPF in spatial domain; h(x,y)
n=1 n=2 n=5 n= 20
cutoff freq. D0
Spring 이영렬 46
Additional Examples of Gaussian LPF
주름제거
Spring 이영렬 48
Lowpass filters
Spring 이영렬 49
Sharpening Frequency Domain Filters(1)
50
50
Sharpening Frequency Domain Filters(2)
51
Ideal Highpass Filter
• A 2D ideal highpass filter (IHPF) is defined as
Slide 40
52
Butterworth Highpass Filters
• Transfer function of a Butterworth highpass filter (BHPF) of
order n with cutoff frequency D0 from the origin is defined as
BLPF BHPF (u , v) = 1 − H (u , v)
n=2
53
53
Gaussian Highpass Filters
• Gaussian highpass filter (GHPF) in two dimensions is given by
− D 2 ( u ,v ) / 2 D02
H (u, v) = 1 − e
54
54
The Laplacian in the Frequency Domain(1)
∞
𝑓(𝑥) = න 𝐹(𝑢)𝑒 𝑗2𝜋𝑢𝑥 𝑑𝑢
−∞
∞
• The expression on the left side is the Laplacian of f(x, y) 𝜕𝑓(𝑥)
= න (𝑗2𝜋𝑢)𝐹(𝑢)𝑒 𝑗2𝜋𝑢𝑥 𝑑𝑢
𝜕𝑥
and we have [ 2 f ( x, y )] = −4 2 (u 2 + v 2 ) F (u, v) 𝜕 𝑚
−∞
2 f ( x, y ) = −1[−4 2 ((u − M / 2) 2 + (v − N / 2) 2 ) F (u , v )]
2 f ( x, y ) = −1[ H (u , v) F (u, v)] 55
55
The Laplacian in the Frequency Domain(2)
𝐻 𝑢, 𝑣 = −4𝜋 2 ((𝑢 − 𝑀/2)2 + (𝑣 − 𝑁/2)2 )
𝐹 −1 [𝐻(𝑢, 𝑣)]
56
56
The Laplacian in the Frequency Domain(3)
Spatial-domain image enhancement with the Laplacian
𝑔 𝑥, 𝑦 = 𝐹 −1 {𝐹 𝑢, 𝑣 + 𝑐𝐻 𝑢, 𝑣 𝐹 𝑢, 𝑣 }
𝐻 𝑢, 𝑣 = −4𝜋 2 (𝑢2 + 𝑣 2 )
The Laplacian in the Frequency Domain(4)
58
58
Unsharp Masking, High-Boost Filtering, and High-Frequency
Emphasis Filtering(1)
◆ Frequency domain formulations of the unsharp masking and high boost
filtering for image sharpening techniques
• using frequency domain method
• Multiply high-pass filter by a constant and add an offset so that the DC term
is not eliminated by the filter
k1,k2 0
where k1 gives control of the DC offset from the origin and k2 controls the
contribution of high frequencies
60
High boost filtering in the frequency domain
61
61
High-frequency emphasis filtering
62
62
Homomorphic Filtering(1)
63
Homomorphic Filtering(2)
64
Homomorphic Filtering(3)
𝑔(𝑚, 𝑛) = 𝑖 𝑚, 𝑛 𝑓(𝑚, 𝑛) , 𝑖(𝑚, 𝑛): 𝑚𝑢𝑙𝑡𝑖𝑝𝑙𝑖𝑐𝑎𝑡𝑖𝑣𝑒 𝑛𝑜𝑖𝑠𝑒
ln 𝑔 (𝑚, 𝑛) = ln 𝑖 (𝑚, 𝑛) + ln 𝑓 (𝑚, 𝑛)
H(u,v): filter to remove I(u,v)
𝐹[ln 𝑔 (𝑚, 𝑛)] = 𝑍(𝑢, 𝑣) = 𝐼(𝑢, 𝑣) + 𝐹(𝑢, 𝑣) 0
𝑍 𝑢, 𝑣 𝐻 𝑢, 𝑣 = 𝐼 𝑢, 𝑣 𝐻 𝑢, 𝑣 + 𝐹 𝑢, 𝑣 𝐻 𝑢, 𝑣 −> 𝐼. 𝐹. 𝑇. → ln 𝑓′ (𝑚, 𝑛)
′
→ 𝑒 𝑙𝑛(𝑓 𝑚,𝑛 ) ≈ 𝑓′(𝑚, 𝑛)
Gaussian HPF
When D(u,v)=0, ……………… 66
When D(u,v) is higher, ……….
Homomorphic Filtering(4)
67
67
Properties of the 2-D Fourier Transform (1)
• Translation
68
F 𝑢 = −∞ 𝑓 𝑥 𝑒 −𝑗2𝑢𝑥 𝑑𝑥,
∞
∞
[f 𝑎𝑥 ] = න 𝑓 𝑎𝑥 𝑒 −𝑗2𝑢𝑥 𝑑𝑥, 𝑙𝑒𝑡 𝑎𝑥 = 𝑦
−∞
−𝑗2( )𝑦
𝑢
∞ 𝐹𝑇
1/𝑎 −∞ 𝑓 𝑦 𝑒 𝑎 𝑑𝑦 , 𝑎 > 0 [f 𝑎𝑥 ] 1/ 𝑎 𝐹 𝑢/𝑎
[f 𝑎𝑥 ] = ൞
𝑦 𝑒 −𝑗2
𝑢
−∞ ( )𝑦
1/𝑎 𝑓 ∞ 𝑎 𝑑𝑦, 𝑎 < 0
Spring 이영렬 69
Properties of the 2-D Fourier Transform (2)
𝑀−1
1
• Periodicity and conjugate symmetry 𝐹(𝑢) = 𝑓(𝑥)𝑒 −𝑗2𝜋𝑢𝑥/𝑀 𝑢 = 0,1,2, . . . , 𝑀 − 1
𝑀
𝑥=0
70
Properties of the 2-D Fourier Transform (3)
71
71
Example 4.1
Slide 35
Spring 이영렬 72
Proof of (11)
F [cos(2 u0 x)] = ?
1 j 2 u0 x 1 − j 2 u 0 x 1
e + e { (u − Mu0 ) + (u + Mu0 )}
2 2 2
𝑀−1
Because 2𝜋𝑢𝑥
𝑓(𝑥) = 𝐹(𝑢)𝑒 𝑗 𝑀
1 (u ) 𝑢=0
𝑀−1
2 u0 x 1 −𝑗
2𝜋𝑢𝑥
j 𝐹(𝑢) = 𝑓(𝑥)𝑒 𝑀
e M
f ( x) F (u − u0 ) 𝑀
𝑥=0
j 2 u0 x
𝑢 −> 𝑢 − 𝑢0
e f ( x) F (u − Mu0 ) 𝑢 −> 𝑢 − 𝑀𝑢0
F [cos(2 u0 x + 2 v0 y )] = ?
1 j 2 u0 x j 2 v0 y 1 − j 2 u0 x − j 2 v0 y 1
e e + e e { (u − Mu0 , v − Nv0 ) + (u + Mu0 , v + Nv0 )}
2 2 2
Spring 이영렬 73
Convolution and correlation theorems
Convolution
1 M −1 N −1
f ( x, y ) * h ( x, y ) =
MN m =0 n =0
f (m, n)h( x − m, y − n)
f ( x, y ) * h( x, y ) F (u , v) H (u , v)
f(x,y): real number
Correlation correlation : R (m, n) = E[ f ( x, y )h( x + m, y + n)]
M −1 N −1
1
f(x,y) h(x,y ) =
MN
f (m, n)h( x + m, y + n)
m =0 n =0
f ( x, y ) h( x, y ) F * (u , v) H (u , v)
Autocorrelation
f ( x, y ) f ( x, y ) F * (u , v) F (u , v) =| F (u , v) |2 74
74
Image correlation
𝑎 𝑏
75
75
Study yourself from here
Chapter 4 End
Spring 이영렬 76
Discrete-Time Systems (1-D systems): Review of DSP
Filter = System
A filter is a system that is designed to remove some components or modify
some characteristics of a signal, but the two terms have same meaning.
Spring 이영렬 77
Discrete-Time Systems (1-D systems)
M
y[n] = b0 x[n] + b1 x[n − 1] + ... + bM x[n − M ] = bk x[n − k ]
k =0
Spring 이영렬 78
Linear Time-Invariant(LTI) Systems
Time-invariant(TI) :
• A discrete-time system is said to be time-invariant if, when an input is delayed
by n0, the output is delayed by the same amount. That is, x[n-n0] -> y[n-no] if
x[n] -> y[n].
Linear : A discrete-time system is said to be linear if, the input consists of a sum
of scaled sequences, then the corresponding output is a sum of scaled outputs
corresponding to the individual input sequences.
Spring 이영렬 79
Examples (Self-test)
(1). y[n]={x[n]}2
Spring 이영렬 80