Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad...
Transcript of Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad...
![Page 1: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/1.jpg)
Filter Design
Lecture 20: 10-Sep-12
Dr. P P Das
![Page 2: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/2.jpg)
Filtering in Frequency Domain
yxyxf
vuF
vuH
vuH
vuFvuHyxg
)1(by ),(y premultipl
- centered is ),( Needs
centerabout symmetric is ),(Usually
unctionTransfer F Filter :),(
),(),(),( 1
![Page 3: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/3.jpg)
Example: Frequency Domain Filter
otherwise
QvPuvuH
,1
2/,2/,0),(
),(),(),( 1 vuFvuHyxg
![Page 4: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/4.jpg)
![Page 5: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/5.jpg)
![Page 6: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/6.jpg)
![Page 7: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/7.jpg)
Wraparound Effect & Zero Padding
![Page 8: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/8.jpg)
![Page 9: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/9.jpg)
Can we pad the filter?
![Page 10: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/10.jpg)
Filtering Steps
f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros to f(x,y) Multiply fp(x,y) by (–1)^(x+y) to center transform Compute F(u,v) by DFT of fp(x,y) Use real symmetric filter H(u,v), of size PxQ & center at (P/2,
Q/2). Form G(u,v)=H(u,v)F(u,v) Compute gp(x,y) by product of real part of IDFT of G(u,v) and
(–1)^(x+y). Extract g(x,y) taking MxN at left top corner of gp(x,y)
![Page 11: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/11.jpg)
![Page 12: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/12.jpg)
Filter Design
Lecture 21-22: 11-Sep-12
Dr. P P Das
![Page 13: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/13.jpg)
Filtering Steps
f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros to f(x,y) Multiply fp(x,y) by (–1)^(x+y) to center transform Compute F(u,v) by DFT of fp(x,y) Use real symmetric filter H(u,v), of size PxQ & center at (P/2,
Q/2). Form G(u,v)=H(u,v)F(u,v) Compute gp(x,y) by product of real part of IDFT of G(u,v) and
(–1)^(x+y). Extract g(x,y) taking MxN at left top corner of gp(x,y)
![Page 14: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/14.jpg)
Filtering in Spatial vis-à-vis Frequency Domains
Filter(FIR) ResponseImpulse Finite:),(
: Hencefinite. are ),( in Quantities
),( of ResponseImpulse :y)(x,
)},({),(Output
: Hence.1),(),,(),(Let
),( : Filter DomainSpatial
),( : FilterDomainFrequency
1
yxh
yxh
vuHh
vuHyxh
vuFyxyxf
yxh
vuH
![Page 15: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/15.jpg)
Example Gaussian Filter
222
22
2
2/
2)(
)(
: FilterLowpass
x
u
Aexh
AeuH
21
22
21
2/2/
and
22)(
)(
: FilterHighpass
222
2221
2
22
221
2
BA
BeAexh
BeAeuHxx
uu
versa- viceand
)( of profileNarrow
)( of profile Broad
High
xh
uH
![Page 16: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/16.jpg)
222
22
2
2/
2)(
)(x
u
Aexh
AeuH
22
2222
12
22
221
2
22
21
2/2/
22)(
)(xx
uu
BeAexh
BeAeuH
![Page 17: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/17.jpg)
![Page 18: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/18.jpg)
![Page 19: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/19.jpg)
Image Smoothing
Frequency Domain Filters
![Page 20: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/20.jpg)
Image Smoothing – Low-pass Filter
Low-pass Filtering– Ideal: Very sharp– Butterworth– Gaussian: Very Smooth
Butterworth Filter is parameterized by Filter Order– High Order Ideal– Low Order Gaussian
![Page 21: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/21.jpg)
Ideal Low-Pass Filter (ILPF)
Frequencyoff-Cut :
)2/()2/(),(
),(,0
),(,1),(
0
2/122
0
0
D
QvPuvuD
DvuD
DvuDvuH
![Page 22: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/22.jpg)
Ideal Low-Pass Filter (ILPF)
![Page 23: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/23.jpg)
Ideal Low-Pass Filter (ILPF)
),(),(),(),( where
),( : PowerImage Total
222
1
0
1
0
vuIvuRvuFvuP
vuPPP
u
Q
vT
}),(:,{ 0
/),(100
:filterby off-cutpower ofPercent
DvuDvuTPvuP
![Page 24: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/24.jpg)
Ideal Low-Pass Filter (ILPF)
![Page 25: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/25.jpg)
ILPF
Radius Power (α)
10 87.0
30 93.1
60 95.7
160 97.8
460 99.2
Blurring & Ringing decreases with increase of radius / power
![Page 26: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/26.jpg)
Blurring & Ringing in ILPF
ILPF Box Filter Sinc in Spatial Domain
![Page 27: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/27.jpg)
Butterworth Low-Pass Filter (BLPF)
BLPFofOrder :
Frequencyoff-Cut :
)2/()2/(),(
/),(1
1),(
0
2/122
20
n
D
QvPuvuD
DvuDvuH n
![Page 28: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/28.jpg)
Butterworth Low-Pass Filter (BLPF)
Unlike ILPF, no sharp cut-off
![Page 29: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/29.jpg)
BLPF
Radius
10
30
60
160
460
![Page 30: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/30.jpg)
ILPF BLPF
- Smooth transition in blurring- No ringing
- Sharp transition in response causing heavy blurring & ringing
![Page 31: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/31.jpg)
BLPF: Ringing increases with order
![Page 32: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/32.jpg)
Gaussian Low Pass Filter (GLPF)
Frequencyoff-Cut :
),(
centerabout spread of Measure:
)2/()2/(),(
),(
0
2/),(
2/122
2/),(
20
2
22
D
evuH
QvPuvuD
evuH
DvuD
vuD
![Page 33: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/33.jpg)
Gaussian Low Pass Filter (GLPF)
![Page 34: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/34.jpg)
Radius
10
30
60
160
460
GLPF
- No ringing as IDFT of Gaussian is Gaussian
![Page 35: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/35.jpg)
ILPF BLPF-Smooth transition in blurring- No ringing
GLPF- No ringing- Sharp transition in
response causing heavy blurring & ringing
Radius: 10, 30, 60, 160, 460
![Page 36: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/36.jpg)
GLFP
BLFP
ILFP
![Page 37: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/37.jpg)
Image Smoothing: Low-Pass Filters
![Page 38: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/38.jpg)
LPF: Character Recognition
![Page 39: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/39.jpg)
LFT: Printing & Publishing
![Page 40: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/40.jpg)
LFT: Printing & Publishing
![Page 41: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/41.jpg)
![Page 42: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/42.jpg)
LPF: Satellite Imagery
![Page 43: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/43.jpg)
Image Sharpening
Frequency Domain Filters
![Page 44: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/44.jpg)
High-Pass Filter (HPF)
),(1),( vuHvuH LPHP
![Page 45: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/45.jpg)
Image Sharpening – High-pass Filter
High-pass Filtering– Ideal: Very sharp– Butterworth– Gaussian: Very Smooth
Butterworth Filter is parameterized by Filter Order– High Order Ideal– Low Order Gaussian
![Page 46: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/46.jpg)
Ideal High-Pass Filter (IHPF)
Frequencyoff-Cut :
)2/()2/(),(
),(,1
),(,0),(
0
2/122
0
0
D
QvPuvuD
DvuD
DvuDvuH
![Page 47: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/47.jpg)
IHFP
BHFP
GHFP
![Page 48: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/48.jpg)
Image Sharpening: High-Pass Filters
![Page 49: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/49.jpg)
Ideal High-Pass Filter (IHPF)
![Page 50: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/50.jpg)
Butterworth High-Pass Filter (BHPF)
BLPFofOrder :
Frequencyoff-Cut :
)2/()2/(),(
),(/1
1),(
0
2/122
20
n
D
QvPuvuD
vuDDvuH n
![Page 51: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/51.jpg)
Butterworth High-Pass Filter (BHPF)
![Page 52: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/52.jpg)
Gaussian High Pass Filter (GHPF)
Frequencyoff-Cutt :
)2/()2/(),(
1),(
0
2/122
2/),( 20
2
D
QvPuvuD
evuH DvuD
![Page 53: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/53.jpg)
Gaussian High Pass Filter (GHPF)
![Page 54: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/54.jpg)
IHPFBHPF GHPF
Radius: 30, 60, 160
![Page 55: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/55.jpg)
Image Sharpening: High-Pass Filters
![Page 56: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/56.jpg)
HPF: Finger Print
BHPF: n=4, D0=50
![Page 57: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/57.jpg)
Thank you
![Page 58: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/58.jpg)
Filter Design
Lecture 23: 17-Sep-12
Dr. P P Das
![Page 59: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/59.jpg)
Laplacian in Spatial Domain
Laplacian– Isotropic – Rotation Invariant
),(4)1,()1,(
),1(),1(2
yxfyxfyxf
yxfyxff
),(),(),( 2 yxfcyxfyxg
2
2
2
22
z
f
t
ff
![Page 60: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/60.jpg)
Laplacian in Frequency Domain
dudteeztfFztf ujtj 22),(),()},({
),()(4}{
),(4}{),(4}{
)},({4
),()2(
),()},({),(
2222
2
2
2
22
222
222
2
2
122
2222
2
221
Ff
z
f
t
ff
Fz
fF
t
f
F
ddeeFjt
f
ddeeFFztf
jtj
jtj
2
2
2
22
z
f
t
ff
![Page 61: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/61.jpg)
Laplacian in Frequency Domain
)},(),{{),(
:image an of Laplacian
),(4
))2/()2/(4),(
:rectanglefrequency ofcenter respect to With
)(4),(
12
22
222
222
vuFvuHyxf
vuD
QvPuvuH
vuvuH
![Page 62: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/62.jpg)
Laplacian in Frequency Domain
Enhancement Eq:
Scales of and as computed by DFT differ widely due to the DFT process
Normalize to [0,1] before DFT Normalize to [-1,1]
1
),(),(),( 2
c
yxfcyxfyxg
),( yxf ),(2 yxf
),( yxf
),(2 yxf
![Page 63: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/63.jpg)
Laplacian in Frequency Domain
![Page 64: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/64.jpg)
Comparative Laplacian in Spatial & Frequency Domains
![Page 65: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/65.jpg)
Unsharp Mask, Highboost Filtering & High-Frequency-Emphasis Filtering
In spatial domain:
Masking Unsharpemphasized- De:1
Filtering Highboost:1
Masking Unsharp:1
),(*),(),(
),(),(),(
k
k
k
yxgkyxfyxg
yxfyxfyxg
mask
mask
![Page 66: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/66.jpg)
Unsharp Mask, Highboost Filtering & High-Frequency-Emphasis Filtering
In frequency domain:
),(),(),(
),(),(),(1 vuFvuHyxf
yxfyxfyxg
LPLP
LPmask
)},(),(*1{
)},(),(1*1{
),(*),(),(
1
1
vuFvuHk
vuFvuHk
yxgkyxfyxg
FilterEmphasisFrequencyHigh
HP
LP
mask
![Page 67: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/67.jpg)
Unsharp Mask, Highboost Filtering & High-Frequency-Emphasis Filtering
In frequency domain:
sfrequencie high of oncontributi theControls:0
origin fromoffset theControls:0
)},(),(*{),(
2
1
211
k
k
vuFvuHkkyxgFilterEmphasisFrequencyHigh
HP
![Page 68: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/68.jpg)
Image: 416x596
D0=40 (5% of short side of padded image)
k1=0.5
k2=0.75
![Page 69: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/69.jpg)
Homomorphic Filtering
Illumination-Reflectance Model in frequency domain Illumination Component
– Slow Spatial Variations– Attenuate contributions by illumination
Reflectance Component– Varies abruptly – junctions of dissimilar objects– Amplify contributions by reflectance
Simultaneous dynamic range compression & contrast enhancement
![Page 70: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/70.jpg)
Homomorphic Filtering
),(),(),(
)},({ln)},({ln
)},({ln)},({
),(ln),(ln
),(ln),(
),(),(),(
vuFvuFvuZ
yxryxi
yxfyxz
yxryxi
yxfyxz
yxryxiyxf
ri
![Page 71: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/71.jpg)
Homomorphic Filtering
),('),('
)},(),({)},(),({
)},({),(
),(),(),(),(
),(),(),(
),(),(),(
11
1
yxryxi
vuFvuHvuFvuH
vuSyxs
vuFvuHvuFvuH
vuZvuHvuS
vuFvuFvuZ
ri
ri
ri
![Page 72: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/72.jpg)
Homomorphic Filtering
),(),(),( 00),('),('),( yxryxieeeyxg yxryxiyxs
![Page 73: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/73.jpg)
Homomorphic Filtering
Illumination Component– Slow Spatial Variations– Low Frequencies log of illumination– attenuate contributions by illumination
Reflectance Component– Varies abruptly – junctions of dissimilar objects– High frequencies log of reflectance– amplify contributions by reflectance
Simultaneous dynamic range compression & contrast enhancement
1L
1H
![Page 74: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/74.jpg)
LDvuDc
HL evuH 20
2 /),(1)(),(
Homomorphic Filtering
![Page 75: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/75.jpg)
Image: 1162x746γL=0.25, γH=2, c=1, D0=80
![Page 76: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/76.jpg)
Band-reject & Band-pass Filters
),(1),( vuHvuH BRBP
![Page 77: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/77.jpg)
Band-reject & Band-pass Filters
![Page 78: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/78.jpg)
D0=80, n=4
Notch Filters – Narrow Filtering
![Page 79: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/79.jpg)
Notch Filters – Narrow Filtering
Q
kkkNR vuHvuHvuH
1
),(),(),(
2/122
2/122
)2/()2/(),(
)2/()2/(),(
kkk
kkk
vNvuMuvuD
vNvuMuvuD
![Page 80: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/80.jpg)
Butterworth Notch Reject Filters
nkkk
nkk
NR
vuDDvuDD
vuH
20
3
12
0 ),(/1
1
),(/1
1
),(
),(1),( vuHvuH NRNP
![Page 81: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/81.jpg)
D0=80, n=4
![Page 82: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/82.jpg)
![Page 83: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/83.jpg)
![Page 84: Filter Designcse.iitkgp.ac.in/~ksrao/pdf/ip-19/rcg-ch4b.pdf · Filtering Steps f(x,y) is MxN. Pad to PxQ. Typically, P=2M, Q=2N Form fp(x,y) of size PxQ by adding necessary zeros](https://reader035.fdocuments.us/reader035/viewer/2022080719/5f7920df99ab311246595159/html5/thumbnails/84.jpg)
Thank you