Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
158 views

5 - Lesson (Frequency Domain Image Processing)

This document discusses filtering images in the frequency domain. It covers: 1) The Fourier transform which transforms images into the frequency domain for processing before applying the inverse transform back to the spatial domain. 2) Common filters used in the frequency domain like ideal high pass, ideal low pass, Gaussian high pass and Gaussian low pass filters which are used for operations like blurring and sharpening images. 3) The relationship between the spatial and frequency domains and how filtering in one domain is equivalent to convolution in the other.

Uploaded by

Abdataa waaqaa
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
158 views

5 - Lesson (Frequency Domain Image Processing)

This document discusses filtering images in the frequency domain. It covers: 1) The Fourier transform which transforms images into the frequency domain for processing before applying the inverse transform back to the spatial domain. 2) Common filters used in the frequency domain like ideal high pass, ideal low pass, Gaussian high pass and Gaussian low pass filters which are used for operations like blurring and sharpening images. 3) The relationship between the spatial and frequency domains and how filtering in one domain is equivalent to convolution in the other.

Uploaded by

Abdataa waaqaa
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 58

Digital Image Processing

Adama Science and Technology University


School of Electrical Engineering and Computing
Department of Computer Science & Engineering
Dr. Mesfin Abebe Haile (2020)
Filtering in the Frequency Domain

 Fourier Transform
 Filtering in Fourier Transform Domain

09/09/21 2
Filtering in the Frequency Domain

 The Fourier transform is a fundamental mathematical tool


in image processing, especially in image filtering.
 This method transforms the input images into a transform
domain, processes some operation in the domain, and applies
the inverse transform to return to the spatial domain as
shown in below diagram:
Fourier Inverse Fourier
Transform Transform

09/09/21 3
Fourier Series and Fourier Transform:
History

 Jean Baptiste Joseph Fourier, French mathematician and


physicist (03/21/1768-05/16/1830)
http://en.wikipedia.org/wiki/Joseph_Fourier
 Théorie analytique de la chaleur : 1822 (The Analytic Theory
of Heat)

09/09/21 4
Frequency Domain Analysis

 Now we are processing signals images in frequency


domain. (contrary to time)
 Fourier series and frequency domain is purely
mathematics, here we will focus more on its use in DIP
than the math.

 Difference between spatial domain and frequency domain:


 In spatial domain , we deal with images as it is. (directly
deal with the image matrix)
 In frequency domain , we deal with the rate at which the
09/09/21 pixel values are changing in spatial domain. 5
Frequency Domain Analysis

 Spatial domain:

 Frequency domain:

09/09/21 6
Frequency Domain Analysis

 Transformation:
 A signal can be converted from time domain into frequency
domain using mathematical operators called transforms.

 There are many kind of transformation that does this. Some


of them are given below:
 Fourier Series
 Fourier transformation
 Laplace transform
 Z transform
09/09/21 7
Frequency Domain Analysis

 Frequency components:
 Any image in spatial domain can be represented in a
frequency domain.

 But what do this frequencies actually mean. We will divide


frequency components into two major components.
 High frequency components: High frequency components
correspond to edges in an image.
 Low frequency components: Low frequency components in
an image correspond to smooth regions.

09/09/21 8
Frequency Domain Analysis

 Fourier Series and Transformation:


 Fourier Series:
 It simply states that, periodic signals can be represented into
sum of sines and cosines when multiplied with a certain
weight.

 It further states that periodic signals can be broken down into


further signals with the following properties.
 The signals are sines and cosines.
 The signals are harmonics of each other.

09/09/21 9
Frequency Domain Analysis

 Frequency components:
 The last signal is the sum of all the above signal.

09/09/21 10
Frequency Domain Analysis

 Fourier series:
 The Fourier series can be denoted by this formula.

 The inverse can be calculated by this formula.

09/09/21 11
Frequency Domain Analysis

 Fourier transform:
 The Fourier transform simply states that the non periodic
signals whose area under the curve is finite can also be
represented into integrals of the sines and cosines after
being multiplied by a certain weight.

 The Fourier transform has many wide applications that


include , image compression e.g JPEG compression ,
filtering and image analysis.

09/09/21 12
Frequency Domain Analysis

 Difference b/n Fourier series and transform:


 Fourier series is applied on periodic signals and Fourier
transform is applied for non periodic signals.
 Images are non – periodic signals.
 And since the images are non periodic , so Fourier
transform is used to convert them into frequency domain.

 Since we are dealing with images, and infact digital


images , so for digital images we will be working on
discrete fourier transform.
09/09/21 13
Frequency Domain Analysis

 Fourier term of a sinusoid includes three things:


 Spatial Frequency,
 Magnitude,
 Phase.

 The spatial frequency directly relates with the brightness.


 The magnitude of the sinusoid directly relates with the contrast.
 Contrast is the difference between maximum and minimum pixel
intensity.
 Phase contains the color information.
09/09/21 14
Frequency Domain Analysis

 The formula for two dimensional discrete Fourier


transform is given below: (Sampled)

 The formula for two dimensional inverse discrete Fourier


transform is given below: (back to the image)

09/09/21 15
Frequency Domain Analysis

 The relationship between frequency domain and spatial


domain can explained by convolution theorem.
 The convolution theorem can be represented as:

 Convolution in spatial domain is equal to filtering in


frequency domain and vice versa.
09/09/21 16
Frequency Domain Analysis

 The filtering in frequency domain can be represented as


following:

 Convolution in spatial domain is equal to filtering in


frequency domain and vice versa.
09/09/21 17
Frequency Domain Analysis

 The steps in filtering are given below:


 At first step we have to do some pre – processing an image
in spatial domain, means increase its contrast or brightness,
 Then we will take discrete Fourier transform of the image,

 Then we will center the discrete Fourier transform , as we


will bring the discrete Fourier transform in center from
corners.
 Then we will apply filtering , means we will multiply the
Fourier transform by a filter function,
09/09/21 18
Frequency Domain Analysis

 The steps in filtering are given below:


 Then we will again shift the DFT from center to the
corners,
 Last step would be take to inverse discrete Fourier
transform , to bring the result back from frequency domain
to spatial domain
 Post processing is optional , just like pre processing , in
which we just increase the appearance of image.

09/09/21 19
Frequency Domain Analysis

 After converting an image to frequency domain, some


filters are applied in filtering process to perform different
kind of processing on an image.
 The processing include blurring an image , sharpening an
image etc.
 The common type of filters for these purposes are:
 Ideal high pass filter
 Ideal low pass filter
 Gaussian high pass filter
 Gaussian low pass filter
09/09/21 20
Frequency Domain Analysis

 The relationship between blurring mask and derivative


mask with a high pass filter and low pass filter can be
defined simply as.
 Blurring masks are also called as low pass filter,
 Derivative masks are also called as high pass filter.

 Gaussian low pass and Gaussian high pass filter minimize


the problem that occur in ideal low pass and high pass
filter.
 This problem is known as ringing effect.
09/09/21 21
Blurring Vs Derivative Mask

 A blurring mask has the following properties:


 All the values in blurring masks are positive,
 The sum of all the values is equal to 1,
 The edge content is reduced by using a blurring mask,
 As the size of the mask grow, more smoothing effect.
 A derivative mask has the following properties:
 It have positive and as well as negative values,
 The sum of all the values is equal to zero,
 The edge content is increased by a derivative mask,
 As the size of the mask grows , more edge content.
09/09/21 22
High Pass and Low Pass Frequency
Components

 When one is placed inside and the zero is placed outside ,


we got a blurred image.
 Now as we increase the size of 1, blurring would be
increased and the edge content would be reduced.
 The following is common example of low pass filter:

09/09/21 23
High Pass and Low Pass Frequency
Components

 When 0 is placed inside, we get edges, which gives us a


sketched image.
 The following is common example of high pass filter:

09/09/21 24
Gaussian Low Pass and Gaussian High
Pass Filter

 Gaussian low pass and Gaussian high pass filter minimize


the problem that occur in ideal low pass and high pass
filter.
 This problem is known as ringing effect.
 The following is the ideal low pass filter representation.

09/09/21 25
Gaussian Low Pass and Gaussian High
Pass Filter

 The concept of filtering and low pass remains the same,


but only the transition becomes different and become more
smooth.
 The Gaussian low pass filter can be represented as

09/09/21 26
Fourier Spectrum and Phase Angle

09/09/21 27
Example: Phase Angles

09/09/21 28
Example: Phase Angles and the
Reconstructed

09/09/21 29
Example: NonZero-Phase-Shift Filters

Phase angle Phase angle


is multiplied is multiplied
by 0.5 by 0.25

 Even small changes in the phase angle can have dramatic


(usually undesirable) effects on the filtered output.
09/09/21 30
An Example: Steps for Filtering in the
Frequency Domain

09/09/21 31
Image Smoothing Using Filter Domain Filters:
ILPF (Ideal Lowpass Filter)

09/09/21 32
Image Smoothing Using Filter Domain Filters:
ILPF (Ideal Lowpass Filter)

09/09/21 33
Image Smoothing Using Filter Domain Filters:
ILPF (Ideal Lowpass Filter)

09/09/21 34
The Spatial Representation of ILPF (Ideal
Lowpass Filter)

09/09/21 35
Image Smoothing Using Filter Domain Filters:
BLPF (Butterworth Lowpass Filter)

Butterworth Lowpass Filters (BLPF) of order n and


with cutoff frequency D0
1
H (u , v) 
1   D(u , v) / D0 
2n

09/09/21 36
Image Smoothing Using Filter Domain Filters:
BLPF (Butterworth Lowpass Filter)

ILPF filtering results BLPF filtering results

09/09/21 37
The Spatial Representaion of BLPF (Butterworth
Lowpass Filter)

09/09/21 38
Image Smoothing Using Filter Domain Filters:
GLPF (Gaussian Lowpass Filter)

09/09/21 39
Image Smoothing Using Filter Domain Filters:
GLPF (Gaussian Lowpass Filter)

ILPF filtering results GLPF filtering results

09/09/21 40
Image Smoothing Using Filter Domain Filters:
GLPF (Gaussian Lowpass Filter)

09/09/21 41
Image Smoothing Using Filter Domain Filters:
GLPF (Gaussian Lowpass Filter)

09/09/21 42
Image Smoothing Using Filter Domain Filters:
GLPF (Gaussian Lowpass Filter)

09/09/21 43
Image Sharpening Using Frequency Domain Filters:
IHPF filtering results

BHPF filtering results

GHPF filtering results

09/09/21 44
The Spatial Representation of Highpass Filters

09/09/21 45
Filtering Results by IHPF

09/09/21 46
Filtering Results by BHPF

09/09/21 47
Using Highpass Filtering and Threshold for Image
Enhancement

BHPF
(order 4 with a cutoff
frequency 50)

09/09/21 48
The Laplacian in the Frequency Domain

09/09/21 49
Unsharp Masking, Highboost Filtering and High-
Frequency-Emphasis Filtering

Gaussian Filter
D0=40

High-Frequency-Emphasis Filtering
Gaussian Filter
K1=0.5, k2=0.75

09/09/21 50
Homomorphic Filtering

 The illumination component of an image generally is


characterized by slow spatial variations, while the reflectance
component tends to vary abruptly.
 These characteristics lead to associating the low frequencies
of the Fourier transform of the logarithm of an image with
illumination the high frequencies with reflectance.
09/09/21 51
Homomorphic Filtering

09/09/21 52
Homomorphic Filtering

09/09/21 53
Selective Filtering

 Non-Selective Filters: operate over the entire frequency


rectangle.

 Selective Filters: operate over some part, not entire


frequency rectangle.
 bandreject or bandpass: process specific bands.
 notch filters: process small regions of the frequency
rectangle.

09/09/21 54
Selective Filtering: Bandreject and Bandpass Filters

09/09/21 55
Selective Filtering: Notch Filters

A Butterworth notch
reject filter D 0 =3
and n=4 for all
notch pairs

09/09/21 56
Question & Answer

09/09/21 57
Thank You !!!

09/09/21 58

You might also like