it523: digital image processingcourses.daiict.ac.in/pluginfile.php/28248/mod_resource/... ·...
TRANSCRIPT
IT523: Digital Image Processing
Chapter 4: Frequency Domain Enhancement
Frequency domain filtering methodology
Figure: Frequency domain filtering
IT523 DIP: Lecture 8 2/28
Padding during convolution
Figure: Ciruclar and linear convolution
IT523 DIP: Lecture 8 3/28
Notch filtering
Figure: Periodic noise
IT523 DIP: Lecture 8 4/28
Notch filtering
H(u, v) =0 (u, v) = (p, q)
=1 otherwise.
Figure: Notch filteringIT523 DIP: Lecture 8 5/28
Low pass and High pass filtering
Figure: Low and High pass filtering
IT523 DIP: Lecture 8 6/28
Ideal low pass filter
Figure: Ideal low pass fitler. (top) Frequency response (bottom) Impulseresponse
IT523 DIP: Lecture 8 7/28
Ideal low pass filter
Figure: Ideal Low pass filter output
IT523 DIP: Lecture 8 8/28
Butterworth filter
Hn(u, v) = 11+(D(u,v)/D0)2n
, where D(u, v) is the Euclidean
distance from origin and D0 is the cut-off frequency.
Figure: Butterworth low pass fitler. (top) Frequency response (bottom)Impulse response
IT523 DIP: Lecture 8 9/28
Butterworth low pass filter
Figure: Butterworth Low pass filter output
IT523 DIP: Lecture 8 10/28
Gaussian low pass filter
Hn(u, v) = exp(−D2
u0,v0(u, v)/2D20
), where
Du0,v0(u, v) = (u − u0)2 + (v − v0)2 is the Euclidean distancefrom (u0, v0) and D0 is the cut-off frequency.
Figure: Gaussian low pass fitler. (top) Frequency response (bottom)Impulse response
IT523 DIP: Lecture 8 11/28
Gaussian low pass filter
Figure: Gaussian Low pass filter output
IT523 DIP: Lecture 8 12/28
Applications of Low pass filters
Figure: Applications of low pass filter (top) Character recognition(bottom) Removing horizontal scan lines.
IT523 DIP: Lecture 8 13/28
High pass filters
Hhp(u, v) = 1− Hlp(u, v).
Figure: High pass filter frequency responses.
IT523 DIP: Lecture 8 14/28
High pass filters
Figure: High pass filter impulse responses.
IT523 DIP: Lecture 8 15/28
Ideal High pass filters
Figure: Ideal High pass filter outputs.
IT523 DIP: Lecture 8 16/28
Gaussian High pass filters
Figure: Gaussian High pass filter outputs.
IT523 DIP: Lecture 8 17/28
Laplacian filter
One-dimensional signals:
F(
d2
dx2f (x)
)= −ω2F (ω).
Two-dimensional signals:
F(
∂2
∂x2f (x , y) + ∂2
∂y2 f (x , y))
= −(u2 + v2)F (u, v).
Therefore the Laplacian filter’s frequency response is
Hlap(u, v) = −(u2 + v2)
IT523 DIP: Lecture 8 18/28
Laplacian filter
One-dimensional signals:
F(
d2
dx2f (x)
)= −ω2F (ω).
Two-dimensional signals:
F(
∂2
∂x2f (x , y) + ∂2
∂y2 f (x , y))
= −(u2 + v2)F (u, v).
Therefore the Laplacian filter’s frequency response is
Hlap(u, v) = −(u2 + v2)
IT523 DIP: Lecture 8 18/28
Laplacian filter
One-dimensional signals:
F(
d2
dx2f (x)
)= −ω2F (ω).
Two-dimensional signals:
F(
∂2
∂x2f (x , y) + ∂2
∂y2 f (x , y))
= −(u2 + v2)F (u, v).
Therefore the Laplacian filter’s frequency response is
Hlap(u, v) = −(u2 + v2)
IT523 DIP: Lecture 8 18/28
Laplacian filter
Figure: Laplacian frequency response and impulse response
IT523 DIP: Lecture 8 19/28
Laplacian filter
Figure: Laplacian filter output
IT523 DIP: Lecture 8 20/28
Phase of Image DFT
Fourier transform is a complex valued function:
F (f (x , y)) =F (u, v)
F (u, v) =R(u, v) + jI (u, v)
Phase: φ(u, v) = tan−1(
I (u,v)R(u,v)
).
IT523 DIP: Lecture 8 21/28
Phase of Image DFT
Fourier transform is a complex valued function:
F (f (x , y)) =F (u, v)
F (u, v) =R(u, v) + jI (u, v)
Phase: φ(u, v) = tan−1(
I (u,v)R(u,v)
).
IT523 DIP: Lecture 8 21/28
Phase
Figure: Phase is more crucial than DFT magnitude.
IT523 DIP: Lecture 8 22/28
Effect of Translation and rotation
Figure: Effect of translation and rotation on DFT magnitude and phase.
IT523 DIP: Lecture 8 23/28
Homomorphic filtering
Image formation model: f (x , y) = i(x , y)r(x , y)
We are interested in r(x , y), not in the illumination i(x , y).
Unfortunately f is a multiplicative combination of i and r . SoF (u, v) 6= I (u, v)R(u, v).
IT523 DIP: Lecture 8 24/28
Homomorphic filtering
Image formation model: f (x , y) = i(x , y)r(x , y)
We are interested in r(x , y), not in the illumination i(x , y).
Unfortunately f is a multiplicative combination of i and r . SoF (u, v) 6= I (u, v)R(u, v).
IT523 DIP: Lecture 8 24/28
Homomorphic filtering
Image formation model: f (x , y) = i(x , y)r(x , y)
We are interested in r(x , y), not in the illumination i(x , y).
Unfortunately f is a multiplicative combination of i and r . SoF (u, v) 6= I (u, v)R(u, v).
IT523 DIP: Lecture 8 24/28
Homomorphic filtering
Use Logarithm:z(x , y) = ln(f (x , y)) = ln(i(x , y)) + ln(r(x , y)).
Take Fourier Transform: Z (u, v) = Fi (u, v) + Fr (u, v), whereFi (u, v) = F{ln(i(x , y))} and Fr (u, v) = F{ln(r(x , y))}.
Apply a filter H(u, v) to eliminate Fi (u, v):
S(u, v) = H(u, v)Z (u, v) = H(u, v)Fi (u, v) + H(u, v)Fr (u, v)
Output image:
s(x , y) =F−1{S(u, v)}=F−1{H(u, v)Fi (u, v) + H(u, v)Fr (u, v)}=F−1{H(u, v)Fi (u, v)}+ F−1{H(u, v)Fr (u, v)}=i1(x , y) + r1(x , y)
IT523 DIP: Lecture 8 25/28
Homomorphic filtering
Use Logarithm:z(x , y) = ln(f (x , y)) = ln(i(x , y)) + ln(r(x , y)).
Take Fourier Transform: Z (u, v) = Fi (u, v) + Fr (u, v), whereFi (u, v) = F{ln(i(x , y))} and Fr (u, v) = F{ln(r(x , y))}.
Apply a filter H(u, v) to eliminate Fi (u, v):
S(u, v) = H(u, v)Z (u, v) = H(u, v)Fi (u, v) + H(u, v)Fr (u, v)
Output image:
s(x , y) =F−1{S(u, v)}=F−1{H(u, v)Fi (u, v) + H(u, v)Fr (u, v)}=F−1{H(u, v)Fi (u, v)}+ F−1{H(u, v)Fr (u, v)}=i1(x , y) + r1(x , y)
IT523 DIP: Lecture 8 25/28
Homomorphic filtering
Use Logarithm:z(x , y) = ln(f (x , y)) = ln(i(x , y)) + ln(r(x , y)).
Take Fourier Transform: Z (u, v) = Fi (u, v) + Fr (u, v), whereFi (u, v) = F{ln(i(x , y))} and Fr (u, v) = F{ln(r(x , y))}.
Apply a filter H(u, v) to eliminate Fi (u, v):
S(u, v) = H(u, v)Z (u, v) = H(u, v)Fi (u, v) + H(u, v)Fr (u, v)
Output image:
s(x , y) =F−1{S(u, v)}=F−1{H(u, v)Fi (u, v) + H(u, v)Fr (u, v)}=F−1{H(u, v)Fi (u, v)}+ F−1{H(u, v)Fr (u, v)}=i1(x , y) + r1(x , y)
IT523 DIP: Lecture 8 25/28
Homomorphic filtering
Use Logarithm:z(x , y) = ln(f (x , y)) = ln(i(x , y)) + ln(r(x , y)).
Take Fourier Transform: Z (u, v) = Fi (u, v) + Fr (u, v), whereFi (u, v) = F{ln(i(x , y))} and Fr (u, v) = F{ln(r(x , y))}.
Apply a filter H(u, v) to eliminate Fi (u, v):
S(u, v) = H(u, v)Z (u, v) = H(u, v)Fi (u, v) + H(u, v)Fr (u, v)
Output image:
s(x , y) =F−1{S(u, v)}=F−1{H(u, v)Fi (u, v) + H(u, v)Fr (u, v)}=F−1{H(u, v)Fi (u, v)}+ F−1{H(u, v)Fr (u, v)}=i1(x , y) + r1(x , y)
IT523 DIP: Lecture 8 25/28
Inverting the logarithm using exponential:
g(x , y) = exp(s(x , y))
= exp(i1(x , y) + r1(x , y))
= exp(i1(x , y)) exp(r1(x , y))
g(x , y) =i0(x , y)r0(x , y)
IT523 DIP: Lecture 8 26/28
Assumption about Illumination
Illumination component typically has low spatial variationscompared to reflectance component, for example aroundedges.
Figure: Homomorphic filter response.
IT523 DIP: Lecture 8 27/28
Homomorphic filtering output
Figure: Eliminating Illuminance component.
IT523 DIP: Lecture 8 28/28