Tutorial 3 - Image Enhancement in Frequency Domain
Tutorial 3 - Image Enhancement in Frequency Domain
TUTORIAL 3
❑ Fourier Transform.
❑ Continuous.
❑ Discrete.
❑ Sheet 2.
Frequency in a Digital Image
➢ Frequency
It is the rate of change of intensity values.
• A high-frequency image is the one where the intensity
values change quickly from one pixel to the next.
• A low-frequency image may be one that is relatively
uniform in brightness or where intensity changes very
slowly
Why Frequency Domain?
➢ 1D Fourier Transform
F (u ) =
−
f ( x )e − j 2 ux dx
➢ 2D Fourier Transform
F (u , v ) =
− −
f ( x, y )e − j 2 ( ux + vy ) dxdy
➢ 1D Fourier Transform N −1 − j 2 kx
F (k ) = f ( x )e N
, k = 0,1, ...N − 1
x =0
➢ 2D Fourier Transform
N −1 M −1 − j 2 (
ux vy
+ )
F (u, v) = f ( x, y )e N M
, u = 0,1,...N − 1& v = 0,1,....M − 1
x =0 y =0
DFT.
▪ To better visualize the spectrum, it is converted to log scale: log(1+ | F (u, v) |)
DC component and Power
▪ DC component (frequency zero) has the largest magnitude.
▪ Average intensity of the image:
➢ Formula 1 if D (u , v ) D0
H (u , v ) =
0 if D (u , v ) D0
1.A Ideal Low Pass Filter
➢ Example
▪ As D0 increases, the blurriness
decreases and less power is
removed.
➢ Ringing Effect
➢ Formula
1
H (u , v) =
1 + [ D(u , v) / D0 ]2 n
▪ It doesn’t have the sharp discontinuity of the ideal low pass filter.
1.B Butterworth Low Pass Filter
➢ Example
▪ Less ringing effect that ideal low
pass filter.
n=2
1.B Butterworth Low Pass Filter
➢ Ringing Effect
▪ As n (order of filter) increases, it approaches the ideal low pass filter.
1.C Gaussian Low Pass Filter
➢ Formula
− D 2 ( u , v ) / 2 D0 2
H (u , v ) = e
1.C Gaussian Low Pass Filter
➢ Example
▪ No ringing effect.
2.A Ideal High Pass Filter
➢ Formula
0 if D(u , v) D0
H (u , v) =
1 if D(u , v) D0
2.A Ideal High Pass Filter
➢ Example
▪ The filtered image is suffering
from ringing effect.
2.A Ideal High Pass Filter
➢ Ringing Effect
➢ Formula
1
H (u , v) =
1 + [ D0 / D(u , v)]2 n
▪ It doesn’t have the sharp discontinuity of the ideal high pass filter.
2.B Butterworth High Pass Filter
➢ Example
▪ Less ringing effect than ideal high
pass filter.
2.C Gaussian High Pass Filter
➢ Formula
− D 2 ( u , v ) / 2 D0 2
H (u , v ) = 1 − e
2.C Gaussian High Pass Filter
➢ Example
▪ No ringing effect.
Question 1
Question 1
▪ Image A → FT-2. This is the normal Image transform.
▪ Low pass with D0 = 50 → C. Low pass filter. We also see ringing effects due to low
cutoff.
▪ Low pass with D0 =100 → B. Also, a low pass filter. The ringing effects are almost
not there due to the somewhat high cutoff.
▪ High pass with D0 = 50 → A. High pass filter that highlight the edges in the image.
Question 3
Question 3