Image Processing-Ch4 - Part 2
Image Processing-Ch4 - Part 2
Ch4:
Filtering in frequency domain
part2
1
Ch4, lesson 7: summary of properties
Usefulness of FT Concepts:
16/08/2020 2
Frequency Domain Filtering & Spatial
Domain Filtering
Similar jobs can be done in the spatial and
frequency domains
4
Ch4, lesson 8: The basics of filtering in the Frequency Domain (FD)
introduction
It consists of modifying the FT of an input image and
then finding the IFT to get the output image.
Mathematically its given by:
G(u,v)= H(u,v)F(u,v)
5
Ch4, lesson 8: The basics of filtering in the Frequency Domain (FD)
7
Ch4, lesson 10: low pass & high pass filters in FD
8
Ch4, lesson 10: low pass & high pass filters in FD
3 types of LPFs will be studied i.e. Ideal LPF, Butterworth LPF and
Gaussian LPF.
10
Ch4, lesson 10: low pass filters
1 if D(u, v) D0
H (u, v)
0 if D(u, v) D0
Where
D(u,v) is the distance from (u,v) to the center of the frequency rectangle
Image size: MxN
Center of the frequency rectangle: (u,v) = (M/2, N/2)
Distance to the center: D(u,v) = [(u – M/2)2 + (v – N/2)2]1/2
12
H(u,v)
Example on 2-D Ideal
low pass filter ILPF
D(u,v)
D0
1 if D(u, v) D0
H (u, v)
(u,v)
0 if D(u, v) D0
1 2 3 4 5 6 7 8 9
1
Center of the frequency rectangle:
2
(M/2, N/2) = (5,5)
3
Suppose D0 = 3
4 The value of H1 = [(5-5)2 + (5-7)2]1/2
5
H1
= 2<3 then H1 = 1
6
13
Ch4, lesson 11: ILPF
•نضرب قيم هذا الماسك ) H(u,vبالقيم المكافئة لها بالصورة ) .F(u,vفنحصل فقط على ال frequenciesداخل
الدائرة
•دائما منتصف الصورة تحمل اهم المعلومات عنها ( اي معظم معلومات الصورة) ,بينما تتوزع التفاصيل
•كل ما14كبر نصف قطر الدائرة (اي ,)D0كل ما حصلنا على صورة اقرب لالصل (.انظر الشريحة التالية)
Ch4, lesson 11: ILPF
Radius total image power % دائما منتصف الصورة تحمل اهم
5 92.0 المعلومات عنها ( اي معظم معلومات
15 94.6 الصورة) ,بينما تتوزع التفاصيل
30 96.4
80 98
230 pixels 99.5
15
ILPF: example
original Freq.
94.6
92
96.4
98
99.5
16
Ch4, lesson 11: ILPF
Result of filtering
Result of filtering with ideal low
with ideal low pass filter of
pass filter of radius 30
radius 15
18
Ch4, lesson 11: ILPF
ILPF: Freq.
blurring
ILPF: spatial
F-1
19
ringing
Ch4, lesson 12: BLPF
1
H (u, v)
1 [ D(u, v) / D0 ]2 n
20
Ch4, lesson 12: BLPF
21
Ch4, lesson 12: BLPF
25
Ch4, lesson 13: GLPF
Result of Result of
filtering with filtering with
Gaussian filter Gaussian filter
with cutoff with cutoff
radius 15 radius 30
Result of Result of
filtering with filtering with
Gaussian Gaussian filter
filter with with cutoff
cutoff radius radius 230
Lowpass Filters Compared
Result of
Result of
filtering with
filtering with
Butterworth
ideal low pass
filter of order
filter of radius
2 and cutoff
15
radius 15
Result of
filtering with
Gaussian filter
with cutoff
radius 15
Practical applications
A lowpass Gaussian filter is used to connect
broken text
GLPF, D0=80
1028x732
GLPF, D0=100
Practical applications:
Scan line
30
2)High pass - image Sharpening
Low-pass filter
High-pass filter
High
High
freq.
freq.
Low Low
freq. freq.
High High
freq. freq.
31
Ch4, lesson 14: high pass
Results of Results of
Butterworth Butterworth
high pass high pass
filtering of filtering of
order 2 with order 2 with
D0 = 15 D0 = 80
Results of Results of
Gaussian Gaussian
high pass high pass
filtering with filtering with
D0 = 15 D0 = 80
BF represents a transition
between the sharpness
of the IF and the
smoothness of the GF
Noise components
16/08/2020 44
44
bandreject
45
46
Horizontal
Scan lines
Notch
DFT pass
Notch Notch
47
47
pass reject