image smoothing using frequency domain filters

25
IMAGE SMOOTHING USING FREQUENCY DOMAIN FILTERS By, H. Suhaila Afzana M.Phil (CS) C. Surega Department of Computer Science & Engg. T. Vaitheeswari MS University 1

Upload: suhaila-afzana

Post on 08-Jan-2017

123 views

Category:

Education


0 download

TRANSCRIPT

Page 1: Image Smoothing using Frequency Domain Filters

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

Page 2: Image Smoothing using Frequency Domain Filters

2

CONTENTS

Frequency Domain Filters Lowpass Filters Ideal Lowpass Filters Butterworth Lowpass Filters Gaussian Lowpass Filters Lowpass Filters – Comparison Lowpass Filtering Examples

Page 3: Image Smoothing using Frequency Domain Filters

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.

Page 4: Image Smoothing using Frequency Domain Filters

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”.

Page 5: Image Smoothing using Frequency Domain Filters

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.

Page 6: Image Smoothing using Frequency Domain Filters

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

Page 7: Image Smoothing using Frequency Domain Filters

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

Page 8: Image Smoothing using Frequency Domain Filters

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.

Page 9: Image Smoothing using Frequency Domain Filters

9

IDEAL LOWPASS FILTERS

A)Perspective plot of an ideal lowpass filter transfer functionB)Filter displayed as an imageC)Filter radius cross section

Page 10: Image Smoothing using Frequency Domain Filters

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.

Page 11: Image Smoothing using Frequency Domain Filters

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.

Page 12: Image Smoothing using Frequency Domain Filters

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

Page 13: Image Smoothing using Frequency Domain Filters

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.

Page 14: Image Smoothing using Frequency Domain Filters

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),(

Page 15: Image Smoothing using Frequency Domain Filters

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

Page 16: Image Smoothing using Frequency Domain Filters

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

Page 17: Image Smoothing using Frequency Domain Filters

17

BUTTERWORTH LOWPASS FILTERS

Page 18: Image Smoothing using Frequency Domain 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

Page 19: Image Smoothing using Frequency Domain Filters

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

Page 20: Image Smoothing using Frequency Domain Filters

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.

Page 21: Image Smoothing using Frequency Domain Filters

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

Page 22: Image Smoothing using Frequency Domain Filters

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

Page 23: Image Smoothing using Frequency Domain Filters

23

LOWPASS FILTERING EXAMPLES

A low pass Gaussian filter is used to connect broken text

Page 24: Image Smoothing using Frequency Domain Filters

24

LOWPASS FILTERING EXAMPLES

Different lowpass Gaussian filters used to remove blemishes in a photograph

Page 25: Image Smoothing using Frequency Domain Filters

25