SlideShare a Scribd company logo
1 of 66
Image Enhancement in the frequency
domain
GZ Chapter 4
Contents
• In this lecture we will look at image enhancement in the frequency
domain
– The Fourier series & the Fourier transform
– Image Processing in the frequency domain
• Image smoothing
• Image sharpening
– Fast Fourier Transform
Fourier representation
=
The Discrete Fourier Transform (DFT)
• Here we use the GW’s notations
• The Discrete Time Fourier Transform of f(x,y)ß for
x = 0, 1, 2…M-1 and
y = 0,1,2…N-1, denoted by F(u, v), is given by the equation:
M 1N1
x0 y0
for u = 0, 1, 2…M-1 and v = 0, 1, 2…N-1.
F(u,v)   f (x, y)e j2 (ux/ M vy/ N)
The Inverse DFT
• It is really important to keep in mind that the Fourier transform is
completely reversible
• The inverse DFT is given by:
for x = 0, 1, 2…M-1 and y = 0, 1, 2…N-1
1 M 1N1
u 0 v0
vy/ N)
F(u,v)e
MN
f (x, y) j2(ux/ M 
Fourier spectra
• Fourier spectra in 1D
– The absolute value of the complex function in the Fourier domain is the
amplitude spectrum
– The angle defined by the inverse tg of the ration between the imaginary
and the real components of the complex function is the phase spectrum
– The square of the amplitude spectrum is the power spectrum
6
Fourier spectra in 2D
7
Main properties
• The value of the DFT in the origin is the mean value of the function
f(x,y)
• If f is real its DFT is conjugate symmetric
• Thus the Fourier spectrum is symmetric
8
Basics of filtering in the frequency domain
• To filter an image in the frequency domain:
– Compute F(u,v) the DFT of the image
– Multiply F(u,v) by a filter function H(u,v)
– Compute the inverse DFT of the result
Some Basic Frequency Domain Filters
Low Pass Filter (smoothing)
High Pass Filter (edge detection)
Filtering in Fourier domain
• H(u,v) is the filter transfer function, which is the DFT of the filter
impulse response
• The implementation consists in multiplying point-wise the filter H(u,v)
with the function F(u,v)
• Real filters are called zero phase shift filters because they don’t
change the phase of F(u,v)
11
Filtered image
• The filtered image is obtained by taking the inverse DFT of the
resulting image
• It can happen that the filtered image has spurious imaginary
components even though the original image f(x,y) and the filter
h(x,y) are real. These are due to numerical errors and are neglected
• The final result is thus the real part of the filtered image
12
Smoothing: low pass filtering
Edge detection: high-pass filtering
Original image
Edge detection: greylevel image
15
Filtered image
16
Hints for filtering
17
• Color images are usually converted to graylevel images before
filtering. This is due to the fact that the information about the
structure of the image (what is in the image) is represented in the
luminance component
• Images are usually stored as “unsigned integers”. Some operations
could require the explicit cast to double or float for being
implemented
• The filtered image in general consists of double values, so a cast to
unsigned integer could be required before saving it in a file using a
predefined format. This could introduce errors due to rounding
operations.
Frequency Domain Filters
• The basic model for filtering is:
G(u,v) = H(u,v)F(u,v)
• where F(u,v) is the Fourier transform of the image being filtered and
H(u,v) is the filter transform function
• Filtered image
f x, y 1
Fu,v
• Smoothing is achieved in the frequency domain by dropping out the
high frequency components
– Low pass (LP) filters – only pass the low frequencies, drop the high
ones
– High-pass (HP) filters – olny pass the frequencies above a minimum
value
LP and HP filtering
19
Filtering in spatial and frequency domains
• The filtering operations in spatial and frequency domains are linked
by the convolution theorem
• Modulation theorem (reminder)
20
Another proof of the convolution theorem
• Starting from the digital delta function, we will prove that the filtering
operation in the signal domain is obtained by the convolution of the
signal with the filter impulse response h(x,y)
• Consider the digital delta function, so an impulse function of strength
A located in (x0,y0)
• Shifting (or sampling) property
21
Getting to the impulse response
• FT of the delta function located in the origin
• Now, let’s set f(x,y)=δ(x,y) and calculate the convolution between f
and a filter h(x,y)
22
Getting to the impulse response
• It can be observed that if f is a delta, then the result of the
convolution is equal to the function h(x,y) apart from a change in the
amplitude
• Then, h(x,y) is called impulse response because it represents the
response (output) of the filter when the input is a delta
• So filtering in the signal domain is performed by the convolution of
the signal with the filter impulse response
f(x,y)=delta(x,y)
23
h(x,y)
h(x,y)
Filtering: summary
24
Ideal Low Pass Filter
• Simply cut off all high frequency components that are a specified
distance D0 from the origin of the transform
• changing the distance changes the behaviour of the filter
Ideal Low Pass Filter (cont…)


• where D(u,v) is given as:
0


0 if D(u, v) D
• The transfer function for the ideal low pass filter can be given as:
H(u,v) 


1if D(u,v)  D0
D(u,v) [(u  M / 2)2
(v  N / 2)2
]1/2
Ideal Low Pass Filter (cont…)
• Above we show an image, it’s Fourier spectrum and a series of ideal
low pass filters of radius 5, 15, 30, 80 and 230 superimposed on top
of it
Ideal Low Pass Filter (cont…)
Ideal Low Pass Filter (cont…)
Ideal Low Pass Filter (cont…)
Original
image
Result of filtering
with ideal low
pass filter of
radius 5
Result of filtering
with ideal low
pass filter of
radius 30
Result of filtering
with ideal low
pass filter of
radius 230
Result of filtering
with ideal low
pass filter of
radius 80
Result of filtering
with ideal low
pass filter of
radius 15
Ideal Low Pass Filter (cont…)
Result of filtering
with ideal low
pass filter of
radius 5
Ideal Low Pass Filter (cont…)
Result of filtering
with ideal low
pass filter of
radius 15
Butterworth Lowpass Filters
• The transfer function of a Butterworth lowpass filter of order n with
cutoff frequency at distance D0 from the origin is defined as:
0
1
1[D(u,v) / D ]2n
H(u,v) 
Butterworth Lowpass Filter (cont…)
Original
image
Result of filtering
with Butterworth
filter of order 2 and
cutoff radius 5
Result of filtering
with Butterworth
filter of order 2 and
cutoff radius 30
Result of filtering
with Butterworth
filter of order 2 and
cutoff radius 230
Result of filtering
with Butterworth
filter of order 2 and
cutoff radius 80
Result of filtering
with Butterworth
filter of order 2 and
cutoff radius 15
Butterworth Lowpass Filter (cont…)
Original
image
Result of filtering
with Butterworth
filter of order 2 and
cutoff radius 5
Butterworth Lowpass Filter (cont…)
Result of filtering
with Butterworth
filter of order 2 and
cutoff radius 15
Gaussian Lowpass Filters
• The transfer function of a Gaussian lowpass filter is defined as:
2 2
H(u,v)  eD (u,v)/ 2D0
Gaussian LP
38
Gaussian Lowpass Filters (cont…)
Original
image
Result of filtering
with Gaussian
filter with cutoff
radius 5
Result of filtering
with Gaussian filter
with cutoff radius
30
Result of filtering
with Gaussian
filter with cutoff
radius 230
Result of
filtering with
Gaussian filter
with cutoff
radius 85
Result of filtering
with Gaussian
filter with cutoff
radius 15
Lowpass Filters Compared
Result of filtering
with ideal low
pass filter of
radius 15
Result of filtering
with Butterworth
filter of order 2
and cutoff radius
15
Result of filtering
with Gaussian
filter with cutoff
radius 15
Lowpass Filtering Examples
• A low pass Gaussian filter is used to connect broken text
Lowpass Filtering Examples
Lowpass Filtering Examples (cont…)
• Different lowpass Gaussian filters used to remove blemishes in a
photograph
D0=100
D0=80
Lowpass Filtering Examples (cont…)
Original
image
Gaussian
lowpass filter
Processed
image
Spectrum of
original image
Sharpening in the Frequency Domain
•
• Edges and fine details in images are associated with high frequency
components
• High pass filters – only pass the high frequencies, drop the low ones
• High pass frequencies are precisely the reverse of low pass filters,
so:
Hhp(u, v) = 1 – Hlp(u, v)
Ideal High Pass Filters
• where D0 is the cut off distance as before

 0


1if D(u, v) D
• The ideal high pass filter is given as:
H(u,v) 


0if D(u,v)  D0
Ideal High Pass Filters (cont…)
Results of ideal high
pass filtering with D0
= 15
Results of ideal high
pass filtering with D0
= 30
Results of ideal high
pass filtering with D0
= 80
Butterworth High Pass Filters
• The Butterworth high pass filter is given as:
• where n is the order and D0 is the cut off distance as before
0
1
1[D / D(u,v)]2n
H(u,v) 
Butterworth High Pass Filters (cont…)
Butterworth
of order 2
D0 = 15
Butterworth
of order 2
D0 = 80
Butterworth of order 2
D0 = 30
Gaussian High Pass Filters
• where D0 is the cut off distance as before
• The Gaussian high pass filter is given as:
2 2
H(u,v) 1 eD (u,v)/ 2D0
Gaussian High Pass Filters (cont…)
Gaussian
high pass
D0 = 15
Gaussian
high pass
D0 = 80
Gaussian high
pass D0 = 30
High pass filters comparison
52
Highpass Filter Comparison
Results of ideal
high pass filtering
with D0 = 15
Results of Gaussian
high pass filtering with
D0 = 15
Results of Butterworth
high pass filtering of
order 2 with D0 = 15
Highpass Filter Comparison
Results of ideal
high pass filtering
with D0 = 15
Highpass Filter Comparison
Results of Butterworth
high pass filtering of
order 2 with D0 = 15
Highpass Filter Comparison
Results of Gaussian
high pass filtering with
D0 = 15
Laplacian filter
• It can be shown that
From this it follows that
The expression on the left side is the laplacian of the function f, thus
57
Laplacian filter
• Thus, the Laplacian can be implemented in the Fourier domain by
using the filter
58
Laplacian
filter
59
Laplacian
filter
60
High boost filtering
• A special case of unsharp masking
• Idea: HP filters cut the zero frequency component, namely the mean
value. The resulting image is zero mean and looks very dark
• High boost filtering “sums” the original image to the result of HPF in
order to get an image with sharper (emphasized) edges but with
same range of gray values as the original one
• In formulas
– High pass
– High boost Signal domain
61
Frequency domain
High boost filtering
62
Reworking the formulas
fhb x, y Af x, y flp x, y
fhb x, y Af x, y f x, y f x, y flp x, y
 A1 f x, y fhp x, y
For A=1 the high-boost corresponds to the HP
For A>1 the contribution of the original image
becomes larger
High boost filtering
63
• Note: high pass filtering is also called unsharp filtering
• In the Fourier domain
Hhb u,v A1H u,v Hhp u,v
High boost filtering
Laplacian
64
A=2 A=2.7
High boost + histogram equalization
Butterworth
65
High boost equalization
Rest of Chapter 4
66
• 2D Fourier transform and properties
• Convolution and correlation
• Need for padding
• Fast Fourier Transform (FFT)

More Related Content

Similar to ch-2.5 Image Enhancement in FREQUENCY Domain.pptx

Unit1 image transform
Unit1  image transformUnit1  image transform
Unit1 image transformjaiksolanki
 
Image Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain FiltersImage Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain FiltersSuhaila Afzana
 
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.pdfnagwaAboElenein
 
07 frequency domain DIP
07 frequency domain DIP07 frequency domain DIP
07 frequency domain DIPbabak danyal
 
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 Transformvijayanand Kandaswamy
 
Image Restoration (Frequency Domain Filters):Basics
Image Restoration (Frequency Domain Filters):BasicsImage Restoration (Frequency Domain Filters):Basics
Image Restoration (Frequency Domain Filters):BasicsKalyan Acharjya
 
Discrete Time Fourier Transform
Discrete Time Fourier TransformDiscrete Time Fourier Transform
Discrete Time Fourier TransformWaqas Afzal
 
FourierTransform detailed power point presentation
FourierTransform detailed power point presentationFourierTransform detailed power point presentation
FourierTransform detailed power point presentationssuseracb8ba
 
Smoothing in Digital Image Processing
Smoothing in Digital Image ProcessingSmoothing in Digital Image Processing
Smoothing in Digital Image ProcessingPallavi Agarwal
 
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-domainMalik obeisat
 
Adaptive filters and band reject filters
Adaptive filters and band reject filtersAdaptive filters and band reject filters
Adaptive filters and band reject filtersSanSan149
 
Image filtering in Digital image processing
Image filtering in Digital image processingImage filtering in Digital image processing
Image filtering in Digital image processingAbinaya B
 
Dss
Dss Dss
Dss nil65
 

Similar to ch-2.5 Image Enhancement in FREQUENCY Domain.pptx (20)

Unit1 image transform
Unit1  image transformUnit1  image transform
Unit1 image transform
 
Image Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain FiltersImage Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain Filters
 
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
 
Module 31
Module 31Module 31
Module 31
 
07 frequency domain DIP
07 frequency domain DIP07 frequency domain DIP
07 frequency domain DIP
 
Lecture 10
Lecture 10Lecture 10
Lecture 10
 
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
 
PDF3.pdf
PDF3.pdfPDF3.pdf
PDF3.pdf
 
Lecture 6
Lecture 6Lecture 6
Lecture 6
 
Image Restoration (Frequency Domain Filters):Basics
Image Restoration (Frequency Domain Filters):BasicsImage Restoration (Frequency Domain Filters):Basics
Image Restoration (Frequency Domain Filters):Basics
 
Discrete Time Fourier Transform
Discrete Time Fourier TransformDiscrete Time Fourier Transform
Discrete Time Fourier Transform
 
FourierTransform detailed power point presentation
FourierTransform detailed power point presentationFourierTransform detailed power point presentation
FourierTransform detailed power point presentation
 
Smoothing in Digital Image Processing
Smoothing in Digital Image ProcessingSmoothing in Digital Image Processing
Smoothing in Digital Image Processing
 
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
 
Fourier transform
Fourier transformFourier transform
Fourier transform
 
Adaptive filters and band reject filters
Adaptive filters and band reject filtersAdaptive filters and band reject filters
Adaptive filters and band reject filters
 
Image filtering in Digital image processing
Image filtering in Digital image processingImage filtering in Digital image processing
Image filtering in Digital image processing
 
Fourier transform
Fourier transformFourier transform
Fourier transform
 
Lecture 11
Lecture 11Lecture 11
Lecture 11
 
Dss
Dss Dss
Dss
 

Recently uploaded

Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 

Recently uploaded (20)

Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 

ch-2.5 Image Enhancement in FREQUENCY Domain.pptx

  • 1. Image Enhancement in the frequency domain GZ Chapter 4
  • 2. Contents • In this lecture we will look at image enhancement in the frequency domain – The Fourier series & the Fourier transform – Image Processing in the frequency domain • Image smoothing • Image sharpening – Fast Fourier Transform
  • 4. The Discrete Fourier Transform (DFT) • Here we use the GW’s notations • The Discrete Time Fourier Transform of f(x,y)ß for x = 0, 1, 2…M-1 and y = 0,1,2…N-1, denoted by F(u, v), is given by the equation: M 1N1 x0 y0 for u = 0, 1, 2…M-1 and v = 0, 1, 2…N-1. F(u,v)   f (x, y)e j2 (ux/ M vy/ N)
  • 5. The Inverse DFT • It is really important to keep in mind that the Fourier transform is completely reversible • The inverse DFT is given by: for x = 0, 1, 2…M-1 and y = 0, 1, 2…N-1 1 M 1N1 u 0 v0 vy/ N) F(u,v)e MN f (x, y) j2(ux/ M 
  • 6. Fourier spectra • Fourier spectra in 1D – The absolute value of the complex function in the Fourier domain is the amplitude spectrum – The angle defined by the inverse tg of the ration between the imaginary and the real components of the complex function is the phase spectrum – The square of the amplitude spectrum is the power spectrum 6
  • 8. Main properties • The value of the DFT in the origin is the mean value of the function f(x,y) • If f is real its DFT is conjugate symmetric • Thus the Fourier spectrum is symmetric 8
  • 9. Basics of filtering in the frequency domain • To filter an image in the frequency domain: – Compute F(u,v) the DFT of the image – Multiply F(u,v) by a filter function H(u,v) – Compute the inverse DFT of the result
  • 10. Some Basic Frequency Domain Filters Low Pass Filter (smoothing) High Pass Filter (edge detection)
  • 11. Filtering in Fourier domain • H(u,v) is the filter transfer function, which is the DFT of the filter impulse response • The implementation consists in multiplying point-wise the filter H(u,v) with the function F(u,v) • Real filters are called zero phase shift filters because they don’t change the phase of F(u,v) 11
  • 12. Filtered image • The filtered image is obtained by taking the inverse DFT of the resulting image • It can happen that the filtered image has spurious imaginary components even though the original image f(x,y) and the filter h(x,y) are real. These are due to numerical errors and are neglected • The final result is thus the real part of the filtered image 12
  • 13. Smoothing: low pass filtering
  • 14. Edge detection: high-pass filtering Original image
  • 17. Hints for filtering 17 • Color images are usually converted to graylevel images before filtering. This is due to the fact that the information about the structure of the image (what is in the image) is represented in the luminance component • Images are usually stored as “unsigned integers”. Some operations could require the explicit cast to double or float for being implemented • The filtered image in general consists of double values, so a cast to unsigned integer could be required before saving it in a file using a predefined format. This could introduce errors due to rounding operations.
  • 18. Frequency Domain Filters • The basic model for filtering is: G(u,v) = H(u,v)F(u,v) • where F(u,v) is the Fourier transform of the image being filtered and H(u,v) is the filter transform function • Filtered image f x, y 1 Fu,v • Smoothing is achieved in the frequency domain by dropping out the high frequency components – Low pass (LP) filters – only pass the low frequencies, drop the high ones – High-pass (HP) filters – olny pass the frequencies above a minimum value
  • 19. LP and HP filtering 19
  • 20. Filtering in spatial and frequency domains • The filtering operations in spatial and frequency domains are linked by the convolution theorem • Modulation theorem (reminder) 20
  • 21. Another proof of the convolution theorem • Starting from the digital delta function, we will prove that the filtering operation in the signal domain is obtained by the convolution of the signal with the filter impulse response h(x,y) • Consider the digital delta function, so an impulse function of strength A located in (x0,y0) • Shifting (or sampling) property 21
  • 22. Getting to the impulse response • FT of the delta function located in the origin • Now, let’s set f(x,y)=δ(x,y) and calculate the convolution between f and a filter h(x,y) 22
  • 23. Getting to the impulse response • It can be observed that if f is a delta, then the result of the convolution is equal to the function h(x,y) apart from a change in the amplitude • Then, h(x,y) is called impulse response because it represents the response (output) of the filter when the input is a delta • So filtering in the signal domain is performed by the convolution of the signal with the filter impulse response f(x,y)=delta(x,y) 23 h(x,y) h(x,y)
  • 25. Ideal Low Pass Filter • Simply cut off all high frequency components that are a specified distance D0 from the origin of the transform • changing the distance changes the behaviour of the filter
  • 26. Ideal Low Pass Filter (cont…)   • where D(u,v) is given as: 0   0 if D(u, v) D • The transfer function for the ideal low pass filter can be given as: H(u,v)    1if D(u,v)  D0 D(u,v) [(u  M / 2)2 (v  N / 2)2 ]1/2
  • 27. Ideal Low Pass Filter (cont…) • Above we show an image, it’s Fourier spectrum and a series of ideal low pass filters of radius 5, 15, 30, 80 and 230 superimposed on top of it
  • 28. Ideal Low Pass Filter (cont…)
  • 29. Ideal Low Pass Filter (cont…)
  • 30. Ideal Low Pass Filter (cont…) Original image Result of filtering with ideal low pass filter of radius 5 Result of filtering with ideal low pass filter of radius 30 Result of filtering with ideal low pass filter of radius 230 Result of filtering with ideal low pass filter of radius 80 Result of filtering with ideal low pass filter of radius 15
  • 31. Ideal Low Pass Filter (cont…) Result of filtering with ideal low pass filter of radius 5
  • 32. Ideal Low Pass Filter (cont…) Result of filtering with ideal low pass filter of radius 15
  • 33. Butterworth Lowpass Filters • The transfer function of a Butterworth lowpass filter of order n with cutoff frequency at distance D0 from the origin is defined as: 0 1 1[D(u,v) / D ]2n H(u,v) 
  • 34. Butterworth Lowpass Filter (cont…) Original image Result of filtering with Butterworth filter of order 2 and cutoff radius 5 Result of filtering with Butterworth filter of order 2 and cutoff radius 30 Result of filtering with Butterworth filter of order 2 and cutoff radius 230 Result of filtering with Butterworth filter of order 2 and cutoff radius 80 Result of filtering with Butterworth filter of order 2 and cutoff radius 15
  • 35. Butterworth Lowpass Filter (cont…) Original image Result of filtering with Butterworth filter of order 2 and cutoff radius 5
  • 36. Butterworth Lowpass Filter (cont…) Result of filtering with Butterworth filter of order 2 and cutoff radius 15
  • 37. Gaussian Lowpass Filters • The transfer function of a Gaussian lowpass filter is defined as: 2 2 H(u,v)  eD (u,v)/ 2D0
  • 39. Gaussian Lowpass Filters (cont…) Original image Result of filtering with Gaussian filter with cutoff radius 5 Result of filtering with Gaussian filter with cutoff radius 30 Result of filtering with Gaussian filter with cutoff radius 230 Result of filtering with Gaussian filter with cutoff radius 85 Result of filtering with Gaussian filter with cutoff radius 15
  • 40. Lowpass Filters Compared Result of filtering with ideal low pass filter of radius 15 Result of filtering with Butterworth filter of order 2 and cutoff radius 15 Result of filtering with Gaussian filter with cutoff radius 15
  • 41. Lowpass Filtering Examples • A low pass Gaussian filter is used to connect broken text
  • 43. Lowpass Filtering Examples (cont…) • Different lowpass Gaussian filters used to remove blemishes in a photograph D0=100 D0=80
  • 44. Lowpass Filtering Examples (cont…) Original image Gaussian lowpass filter Processed image Spectrum of original image
  • 45. Sharpening in the Frequency Domain • • Edges and fine details in images are associated with high frequency components • High pass filters – only pass the high frequencies, drop the low ones • High pass frequencies are precisely the reverse of low pass filters, so: Hhp(u, v) = 1 – Hlp(u, v)
  • 46. Ideal High Pass Filters • where D0 is the cut off distance as before   0   1if D(u, v) D • The ideal high pass filter is given as: H(u,v)    0if D(u,v)  D0
  • 47. Ideal High Pass Filters (cont…) Results of ideal high pass filtering with D0 = 15 Results of ideal high pass filtering with D0 = 30 Results of ideal high pass filtering with D0 = 80
  • 48. Butterworth High Pass Filters • The Butterworth high pass filter is given as: • where n is the order and D0 is the cut off distance as before 0 1 1[D / D(u,v)]2n H(u,v) 
  • 49. Butterworth High Pass Filters (cont…) Butterworth of order 2 D0 = 15 Butterworth of order 2 D0 = 80 Butterworth of order 2 D0 = 30
  • 50. Gaussian High Pass Filters • where D0 is the cut off distance as before • The Gaussian high pass filter is given as: 2 2 H(u,v) 1 eD (u,v)/ 2D0
  • 51. Gaussian High Pass Filters (cont…) Gaussian high pass D0 = 15 Gaussian high pass D0 = 80 Gaussian high pass D0 = 30
  • 52. High pass filters comparison 52
  • 53. Highpass Filter Comparison Results of ideal high pass filtering with D0 = 15 Results of Gaussian high pass filtering with D0 = 15 Results of Butterworth high pass filtering of order 2 with D0 = 15
  • 54. Highpass Filter Comparison Results of ideal high pass filtering with D0 = 15
  • 55. Highpass Filter Comparison Results of Butterworth high pass filtering of order 2 with D0 = 15
  • 56. Highpass Filter Comparison Results of Gaussian high pass filtering with D0 = 15
  • 57. Laplacian filter • It can be shown that From this it follows that The expression on the left side is the laplacian of the function f, thus 57
  • 58. Laplacian filter • Thus, the Laplacian can be implemented in the Fourier domain by using the filter 58
  • 61. High boost filtering • A special case of unsharp masking • Idea: HP filters cut the zero frequency component, namely the mean value. The resulting image is zero mean and looks very dark • High boost filtering “sums” the original image to the result of HPF in order to get an image with sharper (emphasized) edges but with same range of gray values as the original one • In formulas – High pass – High boost Signal domain 61 Frequency domain
  • 62. High boost filtering 62 Reworking the formulas fhb x, y Af x, y flp x, y fhb x, y Af x, y f x, y f x, y flp x, y  A1 f x, y fhp x, y For A=1 the high-boost corresponds to the HP For A>1 the contribution of the original image becomes larger
  • 63. High boost filtering 63 • Note: high pass filtering is also called unsharp filtering • In the Fourier domain Hhb u,v A1H u,v Hhp u,v
  • 65. High boost + histogram equalization Butterworth 65 High boost equalization
  • 66. Rest of Chapter 4 66 • 2D Fourier transform and properties • Convolution and correlation • Need for padding • Fast Fourier Transform (FFT)