lecture 13 filtering in the frequency domain dr. … digital image processing lecture 13 filtering...
TRANSCRIPT
![Page 1: Lecture 13 Filtering in the Frequency Domain Dr. … Digital Image Processing Lecture 13 Filtering in the Frequency Domain Dr. Arslan Shaukat Acknowledgement: Lecture slides material](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accf9337f8b9ab10a8d1152/html5/thumbnails/1.jpg)
EC-433 Digital Image Processing
Lecture 13
Filtering in the Frequency Domain
Dr. Arslan Shaukat
Acknowledgement: Lecture slides material from
Dr. Rehan Hafiz, Gonzalez and Woods
![Page 2: Lecture 13 Filtering in the Frequency Domain Dr. … Digital Image Processing Lecture 13 Filtering in the Frequency Domain Dr. Arslan Shaukat Acknowledgement: Lecture slides material](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accf9337f8b9ab10a8d1152/html5/thumbnails/2.jpg)
Highpass Filtering
),(1),( vuHvuH LPHP
![Page 3: Lecture 13 Filtering in the Frequency Domain Dr. … Digital Image Processing Lecture 13 Filtering in the Frequency Domain Dr. Arslan Shaukat Acknowledgement: Lecture slides material](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accf9337f8b9ab10a8d1152/html5/thumbnails/3.jpg)
Highpass Filters
26/05/2011 EME (NUST) EC-433 Digital Image Processing
![Page 4: Lecture 13 Filtering in the Frequency Domain Dr. … Digital Image Processing Lecture 13 Filtering in the Frequency Domain Dr. Arslan Shaukat Acknowledgement: Lecture slides material](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accf9337f8b9ab10a8d1152/html5/thumbnails/4.jpg)
Highpass Filters - Spatial Domain
26/05/2011 EME (NUST) EC-433 Digital Image Processing
![Page 5: Lecture 13 Filtering in the Frequency Domain Dr. … Digital Image Processing Lecture 13 Filtering in the Frequency Domain Dr. Arslan Shaukat Acknowledgement: Lecture slides material](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accf9337f8b9ab10a8d1152/html5/thumbnails/5.jpg)
IHPF
BHPF
GHPF
Do = 30, 60, 160
26/05/2011 EME (NUST) EC-433 Digital Image Processing
![Page 6: Lecture 13 Filtering in the Frequency Domain Dr. … Digital Image Processing Lecture 13 Filtering in the Frequency Domain Dr. Arslan Shaukat Acknowledgement: Lecture slides material](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accf9337f8b9ab10a8d1152/html5/thumbnails/6.jpg)
HPF and Thresholding
Application: Finger Print Enhancement
HP Filtered image lost the gray-level Zero DC Term
Dark tones pre-dominate in HP Filtered Images (-ve & +ve values)
Binary Thresholding
26/05/2011 EME (NUST) EC-433 Digital Image Processing
![Page 7: Lecture 13 Filtering in the Frequency Domain Dr. … Digital Image Processing Lecture 13 Filtering in the Frequency Domain Dr. Arslan Shaukat Acknowledgement: Lecture slides material](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accf9337f8b9ab10a8d1152/html5/thumbnails/7.jpg)
Scaling considerations for:
– Can have different scaling
– Need to normalize
Solution:
– Pre-Scale f(x,y)
– Re-Scale Laplacian Image after DFT application
The Laplacian in the Frequency Domain
),(4),( 22 vuDvuH
26/05/2011 EME (NUST) EC-433 Digital Image Processing
)],(),([),( 12 vFvHyxf
)],([),(),( 2 yxfcyxfyxg
![Page 8: Lecture 13 Filtering in the Frequency Domain Dr. … Digital Image Processing Lecture 13 Filtering in the Frequency Domain Dr. Arslan Shaukat Acknowledgement: Lecture slides material](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accf9337f8b9ab10a8d1152/html5/thumbnails/8.jpg)
The Laplacian in the Frequency Domain
26/05/2011 EME (NUST) EC-433 Digital Image Processing
![Page 9: Lecture 13 Filtering in the Frequency Domain Dr. … Digital Image Processing Lecture 13 Filtering in the Frequency Domain Dr. Arslan Shaukat Acknowledgement: Lecture slides material](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accf9337f8b9ab10a8d1152/html5/thumbnails/9.jpg)
Implementation
gmask(x,y) = f(x,y) - fLP(x,y)
g(x,y) = f(x,y)+ k*gmask(x,y)
Unsharp Masking k =1
Highboost Filtering k>1
Unsharp Masking and Highboost Filtering
),()],(1[*1),( 1 vuFvuHkyxg LP
),(),(*1),( 1 vuFvuHkyxg HP
26/05/2011 EME (NUST) EC-433 Digital Image Processing
)],(),([),( 1 vFvHyxf LPLP
DC Term is not forced to ZERO !!
![Page 10: Lecture 13 Filtering in the Frequency Domain Dr. … Digital Image Processing Lecture 13 Filtering in the Frequency Domain Dr. Arslan Shaukat Acknowledgement: Lecture slides material](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accf9337f8b9ab10a8d1152/html5/thumbnails/10.jpg)
High-Frequency Emphasis Filtering
High-pass filtering emphasizes edges but fine details in
the image (i.e., low frequencies) are lost.
Add a constant to H(u,v) to preserve low frequencies.
26/05/2011 EME (NUST) EC-433 Digital Image Processing
![Page 11: Lecture 13 Filtering in the Frequency Domain Dr. … Digital Image Processing Lecture 13 Filtering in the Frequency Domain Dr. Arslan Shaukat Acknowledgement: Lecture slides material](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accf9337f8b9ab10a8d1152/html5/thumbnails/11.jpg)
Combining Spatial and Frequency Domain Techniques
26/05/2011 EME (NUST) EC-433 Digital Image Processing
![Page 12: Lecture 13 Filtering in the Frequency Domain Dr. … Digital Image Processing Lecture 13 Filtering in the Frequency Domain Dr. Arslan Shaukat Acknowledgement: Lecture slides material](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accf9337f8b9ab10a8d1152/html5/thumbnails/12.jpg)
Homomorphic Filtering
![Page 13: Lecture 13 Filtering in the Frequency Domain Dr. … Digital Image Processing Lecture 13 Filtering in the Frequency Domain Dr. Arslan Shaukat Acknowledgement: Lecture slides material](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accf9337f8b9ab10a8d1152/html5/thumbnails/13.jpg)
Homomorphic Filtering
Consider the following model of image formation:
The illumination component is characterized by slow
spatial variations
The reflectance component tends to vary abruptly,
particularly at the junctions of dissimilar objects
Associate the low frequencies of the Fourier transform of
the logarithm of an image with illumination and the high
frequencies with reflectance
So probable solution is to specify H(u,v):
– Enhance high frequencies
– Attenuate low frequencies but preserve fine detail26/05/2011 EME (NUST) EC-433 Digital Image Processing
![Page 14: Lecture 13 Filtering in the Frequency Domain Dr. … Digital Image Processing Lecture 13 Filtering in the Frequency Domain Dr. Arslan Shaukat Acknowledgement: Lecture slides material](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accf9337f8b9ab10a8d1152/html5/thumbnails/14.jpg)
Separating Low from High Frequencies
Here, low and high frequencies from i(x,y) and r(x,y)
have been mixed together
Difficult to operate on low/high frequencies separately
Solution?
– Attempt to separate signals combined in a nonlinear way by
making the problem become linear (Homomorphic techniques)
26/05/2011 EME (NUST) EC-433 Digital Image Processing
)],([)],([)],([ yxryxiyxf
![Page 15: Lecture 13 Filtering in the Frequency Domain Dr. … Digital Image Processing Lecture 13 Filtering in the Frequency Domain Dr. Arslan Shaukat Acknowledgement: Lecture slides material](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accf9337f8b9ab10a8d1152/html5/thumbnails/15.jpg)
Homomorphic Filtering
Take the log( )Idea
26/05/2011 EME (NUST) EC-433 Digital Image Processing
![Page 16: Lecture 13 Filtering in the Frequency Domain Dr. … Digital Image Processing Lecture 13 Filtering in the Frequency Domain Dr. Arslan Shaukat Acknowledgement: Lecture slides material](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accf9337f8b9ab10a8d1152/html5/thumbnails/16.jpg)
Homomorphic Filtering - STEPS
(1) Take Log
(2) Apply FT:
or
(3) Apply H(u,v)
26/05/2011 EME (NUST) EC-433 Digital Image Processing
![Page 17: Lecture 13 Filtering in the Frequency Domain Dr. … Digital Image Processing Lecture 13 Filtering in the Frequency Domain Dr. Arslan Shaukat Acknowledgement: Lecture slides material](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accf9337f8b9ab10a8d1152/html5/thumbnails/17.jpg)
Homomorphic Filtering (cont’d)
(4) Take Inverse FT:
or
(5) Take exp( )
or
26/05/2011 EME (NUST) EC-433 Digital Image Processing
![Page 18: Lecture 13 Filtering in the Frequency Domain Dr. … Digital Image Processing Lecture 13 Filtering in the Frequency Domain Dr. Arslan Shaukat Acknowledgement: Lecture slides material](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accf9337f8b9ab10a8d1152/html5/thumbnails/18.jpg)
Homomorphic Filtering (cont’d)
How to choose H(u,v)?
– If l<1 and H>1, the filter tends to decrease the contribution
made by the low frequencies (illumination) and amplify the
contribution made by high frequencies (reflectance)
]/),([ 22
1),( DovuDc
LH evuH
26/05/2011 EME (NUST) EC-433 Digital Image Processing
![Page 19: Lecture 13 Filtering in the Frequency Domain Dr. … Digital Image Processing Lecture 13 Filtering in the Frequency Domain Dr. Arslan Shaukat Acknowledgement: Lecture slides material](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accf9337f8b9ab10a8d1152/html5/thumbnails/19.jpg)
Application: PET Scan
Blurry Image
Low intensity features obscured by high intensity
of “hot spots”
High Detail
Reduction of effects of dominant illumination allows dynamic
range of lower intensity to be displayed properly
Reflectance components are sharpened26/05/2011 EME (NUST) EC-433 Digital Image Processing
![Page 20: Lecture 13 Filtering in the Frequency Domain Dr. … Digital Image Processing Lecture 13 Filtering in the Frequency Domain Dr. Arslan Shaukat Acknowledgement: Lecture slides material](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accf9337f8b9ab10a8d1152/html5/thumbnails/20.jpg)
Selective Filtering
![Page 21: Lecture 13 Filtering in the Frequency Domain Dr. … Digital Image Processing Lecture 13 Filtering in the Frequency Domain Dr. Arslan Shaukat Acknowledgement: Lecture slides material](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accf9337f8b9ab10a8d1152/html5/thumbnails/21.jpg)
Bandreject and Bandpass Filters
26/05/2011 EME (NUST) EC-433 Digital Image Processing
![Page 22: Lecture 13 Filtering in the Frequency Domain Dr. … Digital Image Processing Lecture 13 Filtering in the Frequency Domain Dr. Arslan Shaukat Acknowledgement: Lecture slides material](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accf9337f8b9ab10a8d1152/html5/thumbnails/22.jpg)
Rejects/Passes a predefined neighborhood of frequencies
Zero phase shift filters must be symmetric about origin.
H(u,v)=H(-u,-v)
Can be defined as product of high pass filters centered at
notch location
Let Q be the no. of notches
Notch Filter
26/05/2011 EME (NUST) EC-433 Digital Image Processing
),(),(),(1
vuHvuHvuH kk
Q
kNR
![Page 23: Lecture 13 Filtering in the Frequency Domain Dr. … Digital Image Processing Lecture 13 Filtering in the Frequency Domain Dr. Arslan Shaukat Acknowledgement: Lecture slides material](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accf9337f8b9ab10a8d1152/html5/thumbnails/23.jpg)
26/05/2011 EME (NUST) EC-433 Digital Image Processing
![Page 24: Lecture 13 Filtering in the Frequency Domain Dr. … Digital Image Processing Lecture 13 Filtering in the Frequency Domain Dr. Arslan Shaukat Acknowledgement: Lecture slides material](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accf9337f8b9ab10a8d1152/html5/thumbnails/24.jpg)
Notch Filters - Applications
26/05/2011 EME (NUST) EC-433 Digital Image Processing
![Page 25: Lecture 13 Filtering in the Frequency Domain Dr. … Digital Image Processing Lecture 13 Filtering in the Frequency Domain Dr. Arslan Shaukat Acknowledgement: Lecture slides material](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accf9337f8b9ab10a8d1152/html5/thumbnails/25.jpg)
Separability of the 2-D DFT
![Page 26: Lecture 13 Filtering in the Frequency Domain Dr. … Digital Image Processing Lecture 13 Filtering in the Frequency Domain Dr. Arslan Shaukat Acknowledgement: Lecture slides material](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accf9337f8b9ab10a8d1152/html5/thumbnails/26.jpg)
2-D DFT: Separability
The 2-D DFT can be computed using 1-D transforms
– Forward DFT:
– Inverse DFT:
26/05/2011 EME (NUST) EC-433 Digital Image Processing
![Page 27: Lecture 13 Filtering in the Frequency Domain Dr. … Digital Image Processing Lecture 13 Filtering in the Frequency Domain Dr. Arslan Shaukat Acknowledgement: Lecture slides material](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accf9337f8b9ab10a8d1152/html5/thumbnails/27.jpg)
DFT Properties: Separability (cont’d)
Rewrite F(u,v) as follows:
Let’s set:
Then:
26/05/2011 EME (NUST) EC-433 Digital Image Processing
![Page 28: Lecture 13 Filtering in the Frequency Domain Dr. … Digital Image Processing Lecture 13 Filtering in the Frequency Domain Dr. Arslan Shaukat Acknowledgement: Lecture slides material](https://reader033.vdocuments.us/reader033/viewer/2022042517/5accf9337f8b9ab10a8d1152/html5/thumbnails/28.jpg)
DFT Properties: (cont’d)
26/05/2011 EME (NUST) EC-433 Digital Image Processing