image smoothing using frequency domain filters
TRANSCRIPT
1
IMAGE SMOOTHING USING FREQUENCY DOMAIN FILTERS
By,H. Suhaila Afzana M.Phil (CS)C. Surega Department of Computer Science & Engg.T. Vaitheeswari MS University
2
CONTENTS
Frequency Domain Filters Lowpass Filters Ideal Lowpass Filters Butterworth Lowpass Filters Gaussian Lowpass Filters Lowpass Filters – Comparison Lowpass Filtering Examples
3
FREQUENCY DOMAIN FILTERS
Smoothing(blurring) is achieved in the frequency domain by high-frequency attenuation; that is, by lowpass filtering.
Here, we consider 3 types of lowpass filters: Ideal lowpass filters
Butterworth lowpass filters
Gaussian lowpass filters
These three categories cover the range from very sharp(ideal), to very smooth(Gaussian) filtering.
4
FREQUENCY DOMAIN FILTERS
The Butterworth filter has a parameter called the filter order.
For high order values, the Butterworth filter approaches the ideal filter. For low order values, Butterworth filter is more like a Gaussian filter.
Thus, the Butterworth filter may be viewed as providing a transition between two “extremes”.
5
LOWPASS FILTERS
The most basic of filtering operations is called “lowpass”.
A lowpass filter is also called a “blurring” or smoothing filter.
The simplest lowpass filter just calculates the average of a pixel and all of its eight immediate neighbours.
Lowpass is also called as blurring mask.
6
IDEAL LOWPASS FILTERS
A 2-D lowpass filter that passes without attenuation all frequencies within a circle of radius D0 from the origin and “cuts off” all frequencies outside this circle is called an ideal lowpass filter(ILPF); it is specified by the function:
0
0
),( if 0),( if 1
),(DvuDDvuD
vuH
7
IDEAL LOWPASS FILTERS
D0 is a positive constant and D(u,v) is the distance between a point (u,v) in the frequency domain and the center of the frequency rectangle; that is,
2/122 ])2/()2/[(),( QvPuvuD
8
IDEAL LOWPASS FILTERS
The ideal lowpass filter is radially symmetric about the origin, which means that the filter is completely defined by a radial cross section.
Rotating the cross section by 360° yields the filter in 2-D.
For an ILPF cross section, the point of transition between H(u,v)=1 and H(u,v)=0 is called the cutoff frequency D0.
Simply cut off all high frequency components that are at a specified distance D0 from the origin of the transform, changing the distance changes the behaviour of the filter.
9
IDEAL LOWPASS FILTERS
A)Perspective plot of an ideal lowpass filter transfer functionB)Filter displayed as an imageC)Filter radius cross section
10
IDEAL LOWPASS FILTERS
When the lowpass filter is applied ringing occurs in the image.
The narrower the filter in the frequency domain, the more severe are the blurring and ringing.
The more ringing in the image, the more blurring of the image.
11
IDEAL LOWPASS FILTERS
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.
12
IDEAL LOWPASS FILTERS
Originalimage
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
13
BUTTERWORTH LOWPASS FILTERS
The Butterworth lowpass filter is a type of signal processing filter designed to have as flat a frequency response as possible in the passband.
It is also referred to as a maximally flat magnitude filter.
It was first described in 1930 by the British Engineer and physicist Stephen Butterworth.
14
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:
nDvuDvuH 2
0 ]/),([11),(
15
BUTTERWORTH LOWPASS FILTERS
A)Perspective plot of an Butterworth lowpass filter transfer functionB)Filter displayed as an imageC)Filter radius cross section of orders 1 through 4
16
BUTTERWORTH LOWPASS FILTERS
Originalimage
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
17
BUTTERWORTH LOWPASS FILTERS
18
GAUSSIAN LOWPASS FILTERS
The transfer function of a Gaussian lowpass filter is defined as:
Here, is the standard deviation and is a measure of spread of the Gaussian curve.
If we put =D0 we get,
22 2/),(),( vuDevuH
20
2 2/),(),( DvuDevuH
19
GAUSSIAN LOWPASS FILTERS
A)Perspective plot of a GLPF transfer function B)Filter displayed as an imageC)Filter radius cross section for various values of D0
20
GAUSSIAN LOWPASS FILTERS
Main advantage of a Gaussian LPF over a Butterworth LPF is that we are assured that there will be no ringing effects no matter what filter order we choose to work with.
21
GAUSSIAN LOWPASS FILTERS
Originalimage
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
22
LOWPASS FILTERS-COMPARISON
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
23
LOWPASS FILTERING EXAMPLES
A low pass Gaussian filter is used to connect broken text
24
LOWPASS FILTERING EXAMPLES
Different lowpass Gaussian filters used to remove blemishes in a photograph
25