Presentation is loading. Please wait.

Presentation is loading. Please wait.

Amity School of Engineering & Technology 1 Amity School of Engineering & Technology DIGITAL IMAGE PROCESSING & PATTERN RECOGNITION Credit Units: 4 Mukesh.

Similar presentations


Presentation on theme: "Amity School of Engineering & Technology 1 Amity School of Engineering & Technology DIGITAL IMAGE PROCESSING & PATTERN RECOGNITION Credit Units: 4 Mukesh."— Presentation transcript:

1 Amity School of Engineering & Technology 1 Amity School of Engineering & Technology DIGITAL IMAGE PROCESSING & PATTERN RECOGNITION Credit Units: 4 Mukesh Bhardwaj

2 Amity School of Engineering & Technology Module I Frequency Domain Methods: Low pass & high pass filters 2

3 Amity School of Engineering & Technology 3 Image Smoothing Using Frequency Domain Filters This presentation deals with various filtering techniques in frequency domain.We begin with low pass filters. Edges and other sharp intensity transitions(such as noise) in an image contribute significantly to the high frequency content of its fourier transform. Hence, smoothing (blurring) is achieved in frequency domain by high-frequency attenuation i.e., by low-pass filtering.

4 Amity School of Engineering & Technology Types of low pass filter s There are 3 types of LPF Ideal Butterworth Gaussian These three categories cover the range from very sharp(ideal) to very smooth(Gaussian) filtering. Butterworth filter has a parameter called the filter order. For high order values, butterworth filter approaches the ideal filter. For low order values, Butterworth fiter is more like a Gaussian filter. 4

5 Amity School of Engineering & Technology Ideal Lowpass Filters A 2-D lowpass filter that passes without attenuation all frequencies within a circle of radius D o from the origin and “cuts off” all frequencies outside this circle is called an ideal low pass filter (ILPF) 5

6 Amity School of Engineering & Technology Ideal Low Pass Filter Simply cut off all high frequency components that are a specified distance D 0 from the origin of the transform 6 changing the distance changes the behaviour of the filter

7 Amity School of Engineering & Technology Ideal Low Pass Filter (cont…) The transfer function for the ideal low pass filter can be given as: where D(u,v) is given as: Where D(u,v) is the distance between a point (u,v) in the freqency domain & the centre of the frequency rectangle. 7

8 Amity School of Engineering & Technology 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 8

9 Amity School of Engineering & Technology 9 Ideal Low Pass Filter (cont…) Original image Result of filtering with ideal low pass filter of radius 15 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 80 Result of filtering with ideal low pass filter of radius 230

10 Amity School of Engineering & Technology Butterworth Lowpass Filters The transfer function of a Butterworth lowpass filter of order n with cutoff frequency at distance D 0 from the origin is defined as: 10

11 Amity School of Engineering & Technology BBuutterworth Lowpass Filters unlike the ILPF,the B LPF transfer function does not have a sharp discontinuity that gives a clear cut off between passed and filtered frequencies. 11

12 Amity School of Engineering & Technology 12 Buutterworth Lowpass Filter (cont…) O riginal image Result of filtering with Butterworth filter of order 2 and cutoff radius 15 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 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

13 Amity School of Engineering & Technology Gaussian Lowpass Filters The transfer function of a Gaussian lowpass filter is defined as: 13

14 Amity School of Engineering & Technology Blurring masks vs derivative masks. We are going to perform a comparison between blurring masks and derivative masks. Bl lurring masks: 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 will take place 14

15 Amity School of Engineering & Technology Derrivative masks: A derivative mask has the following properties. A derivative mask have positive and as well as negative values The sum of all the values in a derivative mask is equal to zero The edge content is increased by a derivative mask As the size of the mask grows, more edge content is increased 15

16 Amity School of Engineering & Technology Relationship between blurring mask and derivative mask with high pass filters and low pass filters. 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 16

17 Amity School of Engineering & Technology H High pass frequency components and Low pass frequency components The high pass frequency components denotes edges whereas the low pass frequency components denotes smooth regions. 17

18 Amity School of Engineering & Technology Ideal low pass and Ideal High pass filters This is the common example of low pass filter. 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. This is a common example of high pass filter. 18

19 Amity School of Engineering & Technology When 0 is placed inside, we get edges, which gives us a sketched image. An ideal low pass filter in frequency domain is given below 19

20 Amity School of Engineering & Technology The ideal low pass filter can be graphically represented as 20 Now let’s apply this filter to an actual image and let’s see what we got.

21 Amity School of Engineering & Technology Sample image. Image in frequency domain 21

22 Amity School of Engineering & Technology Applying filter over this image 22 Resultant Image

23 Amity School of Engineering & Technology 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. This is due to reason because at some points transition between one color to the other cannot be defined precisely, due to which the ringing effect appears at that point. Have a look at this graph. 23

24 Amity School of Engineering & Technology This is the representation of ideal low pass filter. Now at the exact point of Do, you cannot tell that the value would be 0 or 1. Due to which the ringing effect appears at that point. So in order to reduce the effect that appears is ideal low pass and ideal high pass filter, the following Gaussian low pass filter and Gaussian high pass filter is introduced. 24

25 Amity School of Engineering & Technology Gauassian Low 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 25

26 Amity School of Engineering & Technology Note the smooth curve transition, due to which at each point, the value of Do, can be exactly defined. Gaussian high pass filter Gaussian high pass filter has the same concept as ideal high pass filter, but again the transition is more smooth as compared to the ideal one. 26

27 Amity School of Engineering & Technology Frequency Domain Methods 27 Spatial DomainFrequency Domain

28 Amity School of Engineering & Technology Major filter categories Typically, filters are classified by examining their properties in the frequency domain: (1) Low-pass (2) High-pass (3) Band-pass (4) Band-stop 28

29 Amity School of Engineering & Technology Example 29 Original signal Low-pass filtered High-pass filtered Band-pass filtered Band-stop filtered

30 Amity School of Engineering & Technology Low-pass filters (i.e., smoothing filters 30 frequency domaintime domain Preserve low frequencies - useful for noise suppression

31 Amity School of Engineering & Technology High-pass filters (i.e., sharpening filters) 31 frequency domain time domain Preserves high frequencies - useful for edge detection

32 Amity School of Engineering & Technology Band-pass filters 32 frequency domain time domain Preserves frequencies within a certain band

33 Amity School of Engineering & Technology Band-stop filters 33 How do they look like?

34 Amity School of Engineering & Technology Frequency Domain Methods 34 Case 1: h(x,y) is given in the spatial domain. Case 2: H(u,v) is given in the frequency domain.

35 Amity School of Engineering & Technology Results of Filtering in the Spatial and Frequency Domains 35 spatial domain filtering frequency domain filtering

36 Amity School of Engineering & Technology Low-pass (LP) filtering 36 ideal in practice D 0 : cut-off frequency Preserves low frequencies, attenuates high frequencies.

37 Amity School of Engineering & Technology Lowpass (LP) filtering (cont’d) 37 In 2D, the cutoff frequencies lie on a circle.

38 Amity School of Engineering & Technology Specifying a 2D low-pass filter Specify cutoff frequencies by specifying the radius of a circle centered at point (N/2, N/2) in the frequency domain. The radius is chosen by specifying the percentage of total power enclosed by the circle. 38


Download ppt "Amity School of Engineering & Technology 1 Amity School of Engineering & Technology DIGITAL IMAGE PROCESSING & PATTERN RECOGNITION Credit Units: 4 Mukesh."

Similar presentations


Ads by Google