SlideShare a Scribd company logo
4/28/2008
1
Frequency domain filtering 
fundamentals
Spring 2008 ELEN 4304/5365 DIP 1
by Gleb V. Tcheslavski: gleb@ee.lamar.edu
http://ee.lamar.edu/gleb/dip/index.htm
Preliminaries 
For a digital image f(x,y) the basic filtering equation is
{ }1
{ }1
( , ) ( , ) ( , )g x y H u v F u v−
= ℑ
Where H(u,v) and F(u,v) are DFTs of the image and of the filter.
Their product is defined by array (element-by-element)
multiplication. Specifications of H(u,v) are simplified considerably
when using functions symmetric about their centers This requires
Spring 2008 ELEN 4304/5365 DIP 2
when using functions symmetric about their centers. This requires
that F(u,v) is also centered, which is accomplished by multiplying
the input image by (-1)x+y before computing its transform.
4/28/2008
2
Simple filters
Considering the following image with centered (and scaled) DFT
Spring 2008 ELEN 4304/5365 DIP 3
Simple filters
One of the simplest filters would be H(u,v) having 0 at the center
and 1 elsewhere. Such filter will reject the DC (constant) term and
l thi l h dleave everything else unchanged.
Since the DC term
represents an average
intensity, setting it to zero
results in reduction of
average intensity to zero.
Spring 2008 ELEN 4304/5365 DIP 4
Therefore, the resulting
image appears darker.
Actually, aero average
implies negative intensities.
4/28/2008
3
Simple filters
Low frequencies in the transform are related to slowly varying
intensity components of image. High frequencies are caused by
sharp transitions in intensity (edges, noise).
Therefore, LPF will blur an image reducing details (and noise).
HPF will enhance sharp details but cause reduction in contrast
since it eliminates DC component. Adding a small constant to a
HPF d t ff t h i ti b t t li i ti
Spring 2008 ELEN 4304/5365 DIP 5
HPF does not affect sharpening properties but prevents elimination
of DC term and, thus, preserves contrast.
Simple filters
a=0.85
Spring 2008 ELEN 4304/5365 DIP 6
4/28/2008
4
Zero‐padding 
Periodicity implied by DFT 
leads to a “wraparound” 
error: data from adjacent 
periods aliases leading to 
incorrect results of 
convolution.
To avoid “wraparounds”, 
convolved functions must 
be zero padded
Spring 2008 ELEN 4304/5365 DIP 7Correct result
be zero‐padded.
More on zero‐padding
Sample image Blurred without padding Blurred with padding
Spring 2008 ELEN 4304/5365 DIP 8
p g p g p g
Blurred images are not uniform: top white edges are blurred but 
side edges are not (without zero‐padding). The zero‐padding leads 
to an expected result.
4/28/2008
5
More on zero‐padding
Image 
Image 
Spring 2008 ELEN 4304/5365 DIP 9
No padding With padding
Due to periodicity implicit while using DFT, a spatial filter passing
through the top edge of the image encompasses a part of the image
and also a part of the bottom of the periodic image right above it.
Padding helps to avoid this…
Zero‐padding and ringing
Considering an ideal LPF
and its spatial representation
obtained via multiplication
by (-1)u and IDFT, we
notice that zero-padding
will lead to discontinuities.
If we compete DFT of zero-
padded filter (to obtain its
f h t i ti )
Spring 2008 ELEN 4304/5365 DIP 10
frequency characteristic),
ringing (Gibbs?) will occur.
Ideal – infinite sinc –
truncation – ringing!
4/28/2008
6
Appearance of ringing
Results of filtering
with ILPF… Notice
ringing
We cannot use ideal filters AND zero-padding at the same time!
ringing
appearance.
Spring 2008 ELEN 4304/5365 DIP 11
We cannot use ideal filters AND zero padding at the same time!
One approach would be to zero-pad images and then create filters
(of the same zero-padded size) in frequency domain. However, this
will produce (insignificant though) wraparounds since the filter
won’t be zero-padded.
On phase angle
Since DFT of an image is a complex array, say
( , ) ( , ) ( , )F u v R u v jI u v= +
The filtered image would be
{ }1
( , ) ( , ) ( , ) ( , ) ( , )g x y H u v R u v jH u v I u v−
= ℑ +
We are interested in filters
affecting the real and
imaginary parts equally –
Spring 2008 ELEN 4304/5365 DIP 12
ag a y pa ts equa y
zero-phase-shift filters.
Even small changes in the
phase angle may have
drastic effect!
Phase multiplied by 0.5 Phase multiplied by 0.25
4/28/2008
7
Summary of steps
1. For the input image f(x,y) of size MxN, form the zero-padded
image fp(x,y) of size PxQ (typically P = 2M, Q = 2N), where
2 1 2 1P M Q N≥ ≥2 1; 2 1P M Q N≥ − ≥ −
2. Obtain fc(x,y) multiplying fp(x,y) by (-1)x+y to center its transform;
3. Compute the DFT of the fc(x,y);
4. Generate a real, symmetric filter function H(u,v) of size PxQ with
center at coordinates (P/2, Q/2);
5. Form the product G(u,v) = H(u,v) F(u,v) via array multiplication;
6 Ob i h d i
Spring 2008 ELEN 4304/5365 DIP 13
6. Obtain the processed image
7. Finally, extract g(x,y) – the MxN region from the top left quadrant
of gp(x,y).
{ }( )( )1
( , ) ( , ) 1
x y
pg x y real G u v
+−
⎡ ⎤= ℑ −⎣ ⎦
Summary of steps
The original image
– zero-padded –
scaled by (-1)x+y –scaled by ( 1)
DFT – DFT of LPF
– DFT of filtering
result – IDFT –
extracted filtered
image.
Spring 2008 ELEN 4304/5365 DIP 14
4/28/2008
8
Spatial vs. Frequency domains
The link between filtering in spatial and in frequency domains is the
convolution theorem...
( ) ( )h H⇔( , ) ( , )h x y H u v⇔
However, DFT implements a circular convolution.
Considering
next the image
and its spectrum
Spring 2008 ELEN 4304/5365 DIP 15
(magnitude of
its DFT) of size
600 x 600
Spatial vs. Frequency domains
We attempt to use a 3x3
Sobel mask…
Therefore, we need to
zero-pad both the image
and the mask to size of
602 x 602 (keeping the
mask at the center to
preserve symmetry) to
avoid wraparounds.
h fil f
Spring 2008 ELEN 4304/5365 DIP 16
The filter I n frequency
domain…
Results of frequency-
domain filtering and
spatial filtering are same.
Ad

More Related Content

What's hot (20)

Signal analysis
Signal analysisSignal analysis
Signal analysis
SRNiloy
 
Digital Image Processing - Frequency Filters
Digital Image Processing - Frequency FiltersDigital Image Processing - Frequency Filters
Digital Image Processing - Frequency Filters
Aly Abdelkareem
 
Lti system
Lti systemLti system
Lti system
Fariza Zahari
 
Image Restoration
Image RestorationImage Restoration
Image Restoration
Srishti Kakade
 
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and SystemsDSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
Amr E. Mohamed
 
Filtering in frequency domain
Filtering in frequency domainFiltering in frequency domain
Filtering in frequency domain
GowriLatha1
 
Discrete Fourier Transform
Discrete Fourier TransformDiscrete Fourier Transform
Discrete Fourier Transform
Abhishek Choksi
 
Digital Image Processing: Image Segmentation
Digital Image Processing: Image SegmentationDigital Image Processing: Image Segmentation
Digital Image Processing: Image Segmentation
Mostafa G. M. Mostafa
 
Digital Image Processing: Image Enhancement in the Frequency Domain
Digital Image Processing: Image Enhancement in the Frequency DomainDigital Image Processing: Image Enhancement in the Frequency Domain
Digital Image Processing: Image Enhancement in the Frequency Domain
Mostafa G. M. Mostafa
 
Filter- IIR - Digital signal processing(DSP)
Filter- IIR - Digital signal processing(DSP)Filter- IIR - Digital signal processing(DSP)
Filter- IIR - Digital signal processing(DSP)
tamil arasan
 
08 frequency domain filtering DIP
08 frequency domain filtering DIP08 frequency domain filtering DIP
08 frequency domain filtering DIP
babak danyal
 
Image degradation and noise by Md.Naseem Ashraf
Image degradation and noise by Md.Naseem AshrafImage degradation and noise by Md.Naseem Ashraf
Image degradation and noise by Md.Naseem Ashraf
MD Naseem Ashraf
 
Image Enhancement using Frequency Domain Filters
Image Enhancement using Frequency Domain FiltersImage Enhancement using Frequency Domain Filters
Image Enhancement using Frequency Domain Filters
Karthika Ramachandran
 
Design of Filters PPT
Design of Filters PPTDesign of Filters PPT
Design of Filters PPT
Imtiyaz Rashed
 
Fourier transform
Fourier transformFourier transform
Fourier transform
Naveen Sihag
 
Encoder for (7,3) cyclic code using matlab
Encoder for (7,3) cyclic code using matlabEncoder for (7,3) cyclic code using matlab
Encoder for (7,3) cyclic code using matlab
SneheshDutta
 
Region based segmentation
Region based segmentationRegion based segmentation
Region based segmentation
Imran Hossain
 
Edge Detection and Segmentation
Edge Detection and SegmentationEdge Detection and Segmentation
Edge Detection and Segmentation
Dr. A. B. Shinde
 
Digital Image Processing Fundamental
Digital Image Processing FundamentalDigital Image Processing Fundamental
Digital Image Processing Fundamental
Thuong Nguyen Canh
 
Synchronization
SynchronizationSynchronization
Synchronization
Sri Manakula Vinayagar Engineering College
 
Signal analysis
Signal analysisSignal analysis
Signal analysis
SRNiloy
 
Digital Image Processing - Frequency Filters
Digital Image Processing - Frequency FiltersDigital Image Processing - Frequency Filters
Digital Image Processing - Frequency Filters
Aly Abdelkareem
 
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and SystemsDSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
DSP_2018_FOEHU - Lec 03 - Discrete-Time Signals and Systems
Amr E. Mohamed
 
Filtering in frequency domain
Filtering in frequency domainFiltering in frequency domain
Filtering in frequency domain
GowriLatha1
 
Discrete Fourier Transform
Discrete Fourier TransformDiscrete Fourier Transform
Discrete Fourier Transform
Abhishek Choksi
 
Digital Image Processing: Image Segmentation
Digital Image Processing: Image SegmentationDigital Image Processing: Image Segmentation
Digital Image Processing: Image Segmentation
Mostafa G. M. Mostafa
 
Digital Image Processing: Image Enhancement in the Frequency Domain
Digital Image Processing: Image Enhancement in the Frequency DomainDigital Image Processing: Image Enhancement in the Frequency Domain
Digital Image Processing: Image Enhancement in the Frequency Domain
Mostafa G. M. Mostafa
 
Filter- IIR - Digital signal processing(DSP)
Filter- IIR - Digital signal processing(DSP)Filter- IIR - Digital signal processing(DSP)
Filter- IIR - Digital signal processing(DSP)
tamil arasan
 
08 frequency domain filtering DIP
08 frequency domain filtering DIP08 frequency domain filtering DIP
08 frequency domain filtering DIP
babak danyal
 
Image degradation and noise by Md.Naseem Ashraf
Image degradation and noise by Md.Naseem AshrafImage degradation and noise by Md.Naseem Ashraf
Image degradation and noise by Md.Naseem Ashraf
MD Naseem Ashraf
 
Image Enhancement using Frequency Domain Filters
Image Enhancement using Frequency Domain FiltersImage Enhancement using Frequency Domain Filters
Image Enhancement using Frequency Domain Filters
Karthika Ramachandran
 
Encoder for (7,3) cyclic code using matlab
Encoder for (7,3) cyclic code using matlabEncoder for (7,3) cyclic code using matlab
Encoder for (7,3) cyclic code using matlab
SneheshDutta
 
Region based segmentation
Region based segmentationRegion based segmentation
Region based segmentation
Imran Hossain
 
Edge Detection and Segmentation
Edge Detection and SegmentationEdge Detection and Segmentation
Edge Detection and Segmentation
Dr. A. B. Shinde
 
Digital Image Processing Fundamental
Digital Image Processing FundamentalDigital Image Processing Fundamental
Digital Image Processing Fundamental
Thuong Nguyen Canh
 

Viewers also liked (15)

Lecture 10
Lecture 10Lecture 10
Lecture 10
Wael Sharba
 
Frequency domain methods
Frequency domain methods Frequency domain methods
Frequency domain methods
thanhhoang2012
 
Signal transmission and filtering section 3.1
Signal transmission and filtering section 3.1Signal transmission and filtering section 3.1
Signal transmission and filtering section 3.1
nahrain university
 
Enhancement in frequency domain
Enhancement in frequency domainEnhancement in frequency domain
Enhancement in frequency domain
Ashish Kumar
 
Frequency Domain Image Enhancement Techniques
Frequency Domain Image Enhancement TechniquesFrequency Domain Image Enhancement Techniques
Frequency Domain Image Enhancement Techniques
Diwaker Pant
 
Ppt ---image processing
Ppt ---image processingPpt ---image processing
Ppt ---image processing
Spandana Mandava
 
Image Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain FiltersImage Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain Filters
Suhaila Afzana
 
Ajal filters
Ajal filtersAjal filters
Ajal filters
AJAL A J
 
Signal transmission and filtering section 3.2
Signal transmission and filtering section 3.2Signal transmission and filtering section 3.2
Signal transmission and filtering section 3.2
nahrain university
 
PA Output Notch Filter Consideration
PA Output Notch Filter ConsiderationPA Output Notch Filter Consideration
PA Output Notch Filter Consideration
criterion123
 
07 frequency domain DIP
07 frequency domain DIP07 frequency domain DIP
07 frequency domain DIP
babak danyal
 
Lecture 8 audio compression
Lecture 8 audio compressionLecture 8 audio compression
Lecture 8 audio compression
Mr SMAK
 
Audio compression
Audio compressionAudio compression
Audio compression
priyanka pandey
 
filters for noise in image processing
filters for noise in image processingfilters for noise in image processing
filters for noise in image processing
Sardar Alam
 
Audio compression
Audio compressionAudio compression
Audio compression
Madhawa Gunasekara
 
Frequency domain methods
Frequency domain methods Frequency domain methods
Frequency domain methods
thanhhoang2012
 
Signal transmission and filtering section 3.1
Signal transmission and filtering section 3.1Signal transmission and filtering section 3.1
Signal transmission and filtering section 3.1
nahrain university
 
Enhancement in frequency domain
Enhancement in frequency domainEnhancement in frequency domain
Enhancement in frequency domain
Ashish Kumar
 
Frequency Domain Image Enhancement Techniques
Frequency Domain Image Enhancement TechniquesFrequency Domain Image Enhancement Techniques
Frequency Domain Image Enhancement Techniques
Diwaker Pant
 
Image Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain FiltersImage Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain Filters
Suhaila Afzana
 
Ajal filters
Ajal filtersAjal filters
Ajal filters
AJAL A J
 
Signal transmission and filtering section 3.2
Signal transmission and filtering section 3.2Signal transmission and filtering section 3.2
Signal transmission and filtering section 3.2
nahrain university
 
PA Output Notch Filter Consideration
PA Output Notch Filter ConsiderationPA Output Notch Filter Consideration
PA Output Notch Filter Consideration
criterion123
 
07 frequency domain DIP
07 frequency domain DIP07 frequency domain DIP
07 frequency domain DIP
babak danyal
 
Lecture 8 audio compression
Lecture 8 audio compressionLecture 8 audio compression
Lecture 8 audio compression
Mr SMAK
 
filters for noise in image processing
filters for noise in image processingfilters for noise in image processing
filters for noise in image processing
Sardar Alam
 
Ad

Similar to 04 1 - frequency domain filtering fundamentals (20)

CSE6366_11(enhancement in frequency domain 2).ppt
CSE6366_11(enhancement in frequency domain 2).pptCSE6366_11(enhancement in frequency domain 2).ppt
CSE6366_11(enhancement in frequency domain 2).ppt
rahulkodag2
 
Lect5 v2
Lect5 v2Lect5 v2
Lect5 v2
Senthilnathan Subramaniyam
 
10780340.ppt
10780340.ppt10780340.ppt
10780340.ppt
fgjf3
 
Frequency Domain FIltering.pdf
Frequency Domain FIltering.pdfFrequency Domain FIltering.pdf
Frequency Domain FIltering.pdf
Muhammad_Ilham_21
 
Digital Image Processing_ ch3 enhancement freq-domain
Digital Image Processing_ ch3 enhancement freq-domainDigital Image Processing_ ch3 enhancement freq-domain
Digital Image Processing_ ch3 enhancement freq-domain
Malik obeisat
 
04 cie552 image_filtering_frequency
04 cie552 image_filtering_frequency04 cie552 image_filtering_frequency
04 cie552 image_filtering_frequency
Elsayed Hemayed
 
PPT s05-machine vision-s2
PPT s05-machine vision-s2PPT s05-machine vision-s2
PPT s05-machine vision-s2
Binus Online Learning
 
Nabaa
NabaaNabaa
Nabaa
Nabaa Badee
 
imagetransforms1-210417050321.pptx
imagetransforms1-210417050321.pptximagetransforms1-210417050321.pptx
imagetransforms1-210417050321.pptx
MrsSDivyaBME
 
DIGITAL IMAGE PROCESSING - Day 4 Image Transform
DIGITAL IMAGE PROCESSING - Day 4 Image TransformDIGITAL IMAGE PROCESSING - Day 4 Image Transform
DIGITAL IMAGE PROCESSING - Day 4 Image Transform
vijayanand Kandaswamy
 
Image transforms
Image transformsImage transforms
Image transforms
Visvesvaraya National Institute of Technology, Nagpur, Maharashtra, India
 
Lec_4_Frequency Domain Filtering-I.pdf
Lec_4_Frequency Domain Filtering-I.pdfLec_4_Frequency Domain Filtering-I.pdf
Lec_4_Frequency Domain Filtering-I.pdf
nagwaAboElenein
 
A review on sparse Fast Fourier Transform applications in image processing
A review on sparse Fast Fourier Transform applications in image processing A review on sparse Fast Fourier Transform applications in image processing
A review on sparse Fast Fourier Transform applications in image processing
IJECEIAES
 
DFT,DCT TRANSFORMS.pdf
DFT,DCT TRANSFORMS.pdfDFT,DCT TRANSFORMS.pdf
DFT,DCT TRANSFORMS.pdf
satyanarayana242612
 
13 fourierfiltrationen
13 fourierfiltrationen13 fourierfiltrationen
13 fourierfiltrationen
hoailinhtinh
 
Module 3-DCT.pptxssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss...
Module 3-DCT.pptxssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss...Module 3-DCT.pptxssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss...
Module 3-DCT.pptxssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss...
ATHMARANJANBhandary
 
Hilbert
HilbertHilbert
Hilbert
honkahonka
 
Pres Simple and Practical Algorithm sft.pptx
Pres Simple and Practical Algorithm sft.pptxPres Simple and Practical Algorithm sft.pptx
Pres Simple and Practical Algorithm sft.pptx
DonyMa
 
DONY Simple and Practical Algorithm sft.pptx
DONY Simple and Practical Algorithm sft.pptxDONY Simple and Practical Algorithm sft.pptx
DONY Simple and Practical Algorithm sft.pptx
DonyMa
 
Image filtering in Digital image processing
Image filtering in Digital image processingImage filtering in Digital image processing
Image filtering in Digital image processing
Abinaya B
 
CSE6366_11(enhancement in frequency domain 2).ppt
CSE6366_11(enhancement in frequency domain 2).pptCSE6366_11(enhancement in frequency domain 2).ppt
CSE6366_11(enhancement in frequency domain 2).ppt
rahulkodag2
 
10780340.ppt
10780340.ppt10780340.ppt
10780340.ppt
fgjf3
 
Frequency Domain FIltering.pdf
Frequency Domain FIltering.pdfFrequency Domain FIltering.pdf
Frequency Domain FIltering.pdf
Muhammad_Ilham_21
 
Digital Image Processing_ ch3 enhancement freq-domain
Digital Image Processing_ ch3 enhancement freq-domainDigital Image Processing_ ch3 enhancement freq-domain
Digital Image Processing_ ch3 enhancement freq-domain
Malik obeisat
 
04 cie552 image_filtering_frequency
04 cie552 image_filtering_frequency04 cie552 image_filtering_frequency
04 cie552 image_filtering_frequency
Elsayed Hemayed
 
imagetransforms1-210417050321.pptx
imagetransforms1-210417050321.pptximagetransforms1-210417050321.pptx
imagetransforms1-210417050321.pptx
MrsSDivyaBME
 
DIGITAL IMAGE PROCESSING - Day 4 Image Transform
DIGITAL IMAGE PROCESSING - Day 4 Image TransformDIGITAL IMAGE PROCESSING - Day 4 Image Transform
DIGITAL IMAGE PROCESSING - Day 4 Image Transform
vijayanand Kandaswamy
 
Lec_4_Frequency Domain Filtering-I.pdf
Lec_4_Frequency Domain Filtering-I.pdfLec_4_Frequency Domain Filtering-I.pdf
Lec_4_Frequency Domain Filtering-I.pdf
nagwaAboElenein
 
A review on sparse Fast Fourier Transform applications in image processing
A review on sparse Fast Fourier Transform applications in image processing A review on sparse Fast Fourier Transform applications in image processing
A review on sparse Fast Fourier Transform applications in image processing
IJECEIAES
 
13 fourierfiltrationen
13 fourierfiltrationen13 fourierfiltrationen
13 fourierfiltrationen
hoailinhtinh
 
Module 3-DCT.pptxssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss...
Module 3-DCT.pptxssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss...Module 3-DCT.pptxssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss...
Module 3-DCT.pptxssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss...
ATHMARANJANBhandary
 
Pres Simple and Practical Algorithm sft.pptx
Pres Simple and Practical Algorithm sft.pptxPres Simple and Practical Algorithm sft.pptx
Pres Simple and Practical Algorithm sft.pptx
DonyMa
 
DONY Simple and Practical Algorithm sft.pptx
DONY Simple and Practical Algorithm sft.pptxDONY Simple and Practical Algorithm sft.pptx
DONY Simple and Practical Algorithm sft.pptx
DonyMa
 
Image filtering in Digital image processing
Image filtering in Digital image processingImage filtering in Digital image processing
Image filtering in Digital image processing
Abinaya B
 
Ad

Recently uploaded (20)

Deepfake Phishing: A New Frontier in Cyber Threats
Deepfake Phishing: A New Frontier in Cyber ThreatsDeepfake Phishing: A New Frontier in Cyber Threats
Deepfake Phishing: A New Frontier in Cyber Threats
RaviKumar256934
 
Domain1_Security_Principles --(My_Notes)
Domain1_Security_Principles --(My_Notes)Domain1_Security_Principles --(My_Notes)
Domain1_Security_Principles --(My_Notes)
efs14135
 
Hostelmanagementsystemprojectreport..pdf
Hostelmanagementsystemprojectreport..pdfHostelmanagementsystemprojectreport..pdf
Hostelmanagementsystemprojectreport..pdf
RajChouhan43
 
DeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFT
DeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFTDeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFT
DeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFT
Kyohei Ito
 
860556374-10280271.pptx PETROLEUM COKE CALCINATION PLANT
860556374-10280271.pptx PETROLEUM COKE CALCINATION PLANT860556374-10280271.pptx PETROLEUM COKE CALCINATION PLANT
860556374-10280271.pptx PETROLEUM COKE CALCINATION PLANT
Pierre Celestin Eyock
 
VISHAL KUMAR SINGH Latest Resume with updated details
VISHAL KUMAR SINGH Latest Resume with updated detailsVISHAL KUMAR SINGH Latest Resume with updated details
VISHAL KUMAR SINGH Latest Resume with updated details
Vishal Kumar Singh
 
May 2025 - Top 10 Read Articles in Network Security and Its Applications
May 2025 - Top 10 Read Articles in Network Security and Its ApplicationsMay 2025 - Top 10 Read Articles in Network Security and Its Applications
May 2025 - Top 10 Read Articles in Network Security and Its Applications
IJNSA Journal
 
Personal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.pptPersonal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.ppt
ganjangbegu579
 
HSE Induction for heat stress work .pptx
HSE Induction for heat stress work .pptxHSE Induction for heat stress work .pptx
HSE Induction for heat stress work .pptx
agraahmed
 
Urban Transport Infrastructure September 2023
Urban Transport Infrastructure September 2023Urban Transport Infrastructure September 2023
Urban Transport Infrastructure September 2023
Rajesh Prasad
 
7- Bearing..pptx 7- Bearing..pptx7- Bearing..pptx
7- Bearing..pptx 7- Bearing..pptx7- Bearing..pptx7- Bearing..pptx 7- Bearing..pptx7- Bearing..pptx
7- Bearing..pptx 7- Bearing..pptx7- Bearing..pptx
abdokhattab2015
 
WHITE PAPER-Best Practices in Syngas Plant Optimization.pdf
WHITE PAPER-Best Practices in Syngas Plant Optimization.pdfWHITE PAPER-Best Practices in Syngas Plant Optimization.pdf
WHITE PAPER-Best Practices in Syngas Plant Optimization.pdf
Floyd Burgess
 
Compressive Strength Estimation of Mesh Embedded Masonry Prism Using Empirica...
Compressive Strength Estimation of Mesh Embedded Masonry Prism Using Empirica...Compressive Strength Estimation of Mesh Embedded Masonry Prism Using Empirica...
Compressive Strength Estimation of Mesh Embedded Masonry Prism Using Empirica...
Journal of Soft Computing in Civil Engineering
 
Environment .................................
Environment .................................Environment .................................
Environment .................................
shadyozq9
 
Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025
Antonin Danalet
 
Construction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil EngineeringConstruction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil Engineering
Lavish Kashyap
 
22PCOAM16 Unit 3 Session 23 Different ways to Combine Classifiers.pptx
22PCOAM16 Unit 3 Session 23  Different ways to Combine Classifiers.pptx22PCOAM16 Unit 3 Session 23  Different ways to Combine Classifiers.pptx
22PCOAM16 Unit 3 Session 23 Different ways to Combine Classifiers.pptx
Guru Nanak Technical Institutions
 
Zeiss-Ultra-Optimeter metrology subject.pdf
Zeiss-Ultra-Optimeter metrology subject.pdfZeiss-Ultra-Optimeter metrology subject.pdf
Zeiss-Ultra-Optimeter metrology subject.pdf
Saikumar174642
 
Frontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend EngineersFrontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend Engineers
Michael Hertzberg
 
introduction to Rapid Tooling and Additive Manufacturing Applications
introduction to Rapid Tooling and Additive Manufacturing Applicationsintroduction to Rapid Tooling and Additive Manufacturing Applications
introduction to Rapid Tooling and Additive Manufacturing Applications
vijimech408
 
Deepfake Phishing: A New Frontier in Cyber Threats
Deepfake Phishing: A New Frontier in Cyber ThreatsDeepfake Phishing: A New Frontier in Cyber Threats
Deepfake Phishing: A New Frontier in Cyber Threats
RaviKumar256934
 
Domain1_Security_Principles --(My_Notes)
Domain1_Security_Principles --(My_Notes)Domain1_Security_Principles --(My_Notes)
Domain1_Security_Principles --(My_Notes)
efs14135
 
Hostelmanagementsystemprojectreport..pdf
Hostelmanagementsystemprojectreport..pdfHostelmanagementsystemprojectreport..pdf
Hostelmanagementsystemprojectreport..pdf
RajChouhan43
 
DeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFT
DeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFTDeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFT
DeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFT
Kyohei Ito
 
860556374-10280271.pptx PETROLEUM COKE CALCINATION PLANT
860556374-10280271.pptx PETROLEUM COKE CALCINATION PLANT860556374-10280271.pptx PETROLEUM COKE CALCINATION PLANT
860556374-10280271.pptx PETROLEUM COKE CALCINATION PLANT
Pierre Celestin Eyock
 
VISHAL KUMAR SINGH Latest Resume with updated details
VISHAL KUMAR SINGH Latest Resume with updated detailsVISHAL KUMAR SINGH Latest Resume with updated details
VISHAL KUMAR SINGH Latest Resume with updated details
Vishal Kumar Singh
 
May 2025 - Top 10 Read Articles in Network Security and Its Applications
May 2025 - Top 10 Read Articles in Network Security and Its ApplicationsMay 2025 - Top 10 Read Articles in Network Security and Its Applications
May 2025 - Top 10 Read Articles in Network Security and Its Applications
IJNSA Journal
 
Personal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.pptPersonal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.ppt
ganjangbegu579
 
HSE Induction for heat stress work .pptx
HSE Induction for heat stress work .pptxHSE Induction for heat stress work .pptx
HSE Induction for heat stress work .pptx
agraahmed
 
Urban Transport Infrastructure September 2023
Urban Transport Infrastructure September 2023Urban Transport Infrastructure September 2023
Urban Transport Infrastructure September 2023
Rajesh Prasad
 
7- Bearing..pptx 7- Bearing..pptx7- Bearing..pptx
7- Bearing..pptx 7- Bearing..pptx7- Bearing..pptx7- Bearing..pptx 7- Bearing..pptx7- Bearing..pptx
7- Bearing..pptx 7- Bearing..pptx7- Bearing..pptx
abdokhattab2015
 
WHITE PAPER-Best Practices in Syngas Plant Optimization.pdf
WHITE PAPER-Best Practices in Syngas Plant Optimization.pdfWHITE PAPER-Best Practices in Syngas Plant Optimization.pdf
WHITE PAPER-Best Practices in Syngas Plant Optimization.pdf
Floyd Burgess
 
Environment .................................
Environment .................................Environment .................................
Environment .................................
shadyozq9
 
Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025
Antonin Danalet
 
Construction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil EngineeringConstruction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil Engineering
Lavish Kashyap
 
22PCOAM16 Unit 3 Session 23 Different ways to Combine Classifiers.pptx
22PCOAM16 Unit 3 Session 23  Different ways to Combine Classifiers.pptx22PCOAM16 Unit 3 Session 23  Different ways to Combine Classifiers.pptx
22PCOAM16 Unit 3 Session 23 Different ways to Combine Classifiers.pptx
Guru Nanak Technical Institutions
 
Zeiss-Ultra-Optimeter metrology subject.pdf
Zeiss-Ultra-Optimeter metrology subject.pdfZeiss-Ultra-Optimeter metrology subject.pdf
Zeiss-Ultra-Optimeter metrology subject.pdf
Saikumar174642
 
Frontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend EngineersFrontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend Engineers
Michael Hertzberg
 
introduction to Rapid Tooling and Additive Manufacturing Applications
introduction to Rapid Tooling and Additive Manufacturing Applicationsintroduction to Rapid Tooling and Additive Manufacturing Applications
introduction to Rapid Tooling and Additive Manufacturing Applications
vijimech408
 

04 1 - frequency domain filtering fundamentals

  • 1. 4/28/2008 1 Frequency domain filtering  fundamentals Spring 2008 ELEN 4304/5365 DIP 1 by Gleb V. Tcheslavski: [email protected] http://ee.lamar.edu/gleb/dip/index.htm Preliminaries  For a digital image f(x,y) the basic filtering equation is { }1 { }1 ( , ) ( , ) ( , )g x y H u v F u v− = ℑ Where H(u,v) and F(u,v) are DFTs of the image and of the filter. Their product is defined by array (element-by-element) multiplication. Specifications of H(u,v) are simplified considerably when using functions symmetric about their centers This requires Spring 2008 ELEN 4304/5365 DIP 2 when using functions symmetric about their centers. This requires that F(u,v) is also centered, which is accomplished by multiplying the input image by (-1)x+y before computing its transform.
  • 2. 4/28/2008 2 Simple filters Considering the following image with centered (and scaled) DFT Spring 2008 ELEN 4304/5365 DIP 3 Simple filters One of the simplest filters would be H(u,v) having 0 at the center and 1 elsewhere. Such filter will reject the DC (constant) term and l thi l h dleave everything else unchanged. Since the DC term represents an average intensity, setting it to zero results in reduction of average intensity to zero. Spring 2008 ELEN 4304/5365 DIP 4 Therefore, the resulting image appears darker. Actually, aero average implies negative intensities.
  • 3. 4/28/2008 3 Simple filters Low frequencies in the transform are related to slowly varying intensity components of image. High frequencies are caused by sharp transitions in intensity (edges, noise). Therefore, LPF will blur an image reducing details (and noise). HPF will enhance sharp details but cause reduction in contrast since it eliminates DC component. Adding a small constant to a HPF d t ff t h i ti b t t li i ti Spring 2008 ELEN 4304/5365 DIP 5 HPF does not affect sharpening properties but prevents elimination of DC term and, thus, preserves contrast. Simple filters a=0.85 Spring 2008 ELEN 4304/5365 DIP 6
  • 4. 4/28/2008 4 Zero‐padding  Periodicity implied by DFT  leads to a “wraparound”  error: data from adjacent  periods aliases leading to  incorrect results of  convolution. To avoid “wraparounds”,  convolved functions must  be zero padded Spring 2008 ELEN 4304/5365 DIP 7Correct result be zero‐padded. More on zero‐padding Sample image Blurred without padding Blurred with padding Spring 2008 ELEN 4304/5365 DIP 8 p g p g p g Blurred images are not uniform: top white edges are blurred but  side edges are not (without zero‐padding). The zero‐padding leads  to an expected result.
  • 5. 4/28/2008 5 More on zero‐padding Image  Image  Spring 2008 ELEN 4304/5365 DIP 9 No padding With padding Due to periodicity implicit while using DFT, a spatial filter passing through the top edge of the image encompasses a part of the image and also a part of the bottom of the periodic image right above it. Padding helps to avoid this… Zero‐padding and ringing Considering an ideal LPF and its spatial representation obtained via multiplication by (-1)u and IDFT, we notice that zero-padding will lead to discontinuities. If we compete DFT of zero- padded filter (to obtain its f h t i ti ) Spring 2008 ELEN 4304/5365 DIP 10 frequency characteristic), ringing (Gibbs?) will occur. Ideal – infinite sinc – truncation – ringing!
  • 6. 4/28/2008 6 Appearance of ringing Results of filtering with ILPF… Notice ringing We cannot use ideal filters AND zero-padding at the same time! ringing appearance. Spring 2008 ELEN 4304/5365 DIP 11 We cannot use ideal filters AND zero padding at the same time! One approach would be to zero-pad images and then create filters (of the same zero-padded size) in frequency domain. However, this will produce (insignificant though) wraparounds since the filter won’t be zero-padded. On phase angle Since DFT of an image is a complex array, say ( , ) ( , ) ( , )F u v R u v jI u v= + The filtered image would be { }1 ( , ) ( , ) ( , ) ( , ) ( , )g x y H u v R u v jH u v I u v− = ℑ + We are interested in filters affecting the real and imaginary parts equally – Spring 2008 ELEN 4304/5365 DIP 12 ag a y pa ts equa y zero-phase-shift filters. Even small changes in the phase angle may have drastic effect! Phase multiplied by 0.5 Phase multiplied by 0.25
  • 7. 4/28/2008 7 Summary of steps 1. For the input image f(x,y) of size MxN, form the zero-padded image fp(x,y) of size PxQ (typically P = 2M, Q = 2N), where 2 1 2 1P M Q N≥ ≥2 1; 2 1P M Q N≥ − ≥ − 2. Obtain fc(x,y) multiplying fp(x,y) by (-1)x+y to center its transform; 3. Compute the DFT of the fc(x,y); 4. Generate a real, symmetric filter function H(u,v) of size PxQ with center at coordinates (P/2, Q/2); 5. Form the product G(u,v) = H(u,v) F(u,v) via array multiplication; 6 Ob i h d i Spring 2008 ELEN 4304/5365 DIP 13 6. Obtain the processed image 7. Finally, extract g(x,y) – the MxN region from the top left quadrant of gp(x,y). { }( )( )1 ( , ) ( , ) 1 x y pg x y real G u v +− ⎡ ⎤= ℑ −⎣ ⎦ Summary of steps The original image – zero-padded – scaled by (-1)x+y –scaled by ( 1) DFT – DFT of LPF – DFT of filtering result – IDFT – extracted filtered image. Spring 2008 ELEN 4304/5365 DIP 14
  • 8. 4/28/2008 8 Spatial vs. Frequency domains The link between filtering in spatial and in frequency domains is the convolution theorem... ( ) ( )h H⇔( , ) ( , )h x y H u v⇔ However, DFT implements a circular convolution. Considering next the image and its spectrum Spring 2008 ELEN 4304/5365 DIP 15 (magnitude of its DFT) of size 600 x 600 Spatial vs. Frequency domains We attempt to use a 3x3 Sobel mask… Therefore, we need to zero-pad both the image and the mask to size of 602 x 602 (keeping the mask at the center to preserve symmetry) to avoid wraparounds. h fil f Spring 2008 ELEN 4304/5365 DIP 16 The filter I n frequency domain… Results of frequency- domain filtering and spatial filtering are same.