Smoothing Filters in Spatial Domain

35,259 views 26 slides Oct 25, 2016
Slide 1
Slide 1 of 26
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26

About This Presentation

Smoothing Filters in Spatial Domain, linear and non-linear filter, Min filter, Max Filter, Median filter, average filter, weighted average filter


Slide Content

SMOOTHING FILTERS IN SPATIAL DOMAIN Submitted by, M.Madhu Bala P.Malathi R.Mathu Sini V.Praseetha 1 Submitted to, G. M urugeswari M.E, Assistant Professor, MS U niversity, Triunelveli .

C ontents What is Spatial filter Mechanism of spatial filter Smoothing filters in spatial Linear filter Non-linear filter conclusion 2

Spatial Filter A spatial filter is an image operation where each pixel value I(u, v ) is changed by a function of the intensities of pixels in a neighborhood of ( u, v). Spatial filtering term is the filtering operations that are performed directly on the pixels of an image . 3

Mechanism of Spatial F iltering The process consists simply of moving the filter mask from point to point in an image . At each point ( x,y ) the response of the filter at that point is calculated using a predefined relationship. 4

Smoothing Spatial F ilter Smoothing filters are used for blurring noise reduction. Blurring is used in preprocessing steps to removal of small details from an image prior to object extraction and bridging of small gaps in lines or curves Noise reduction can be accomplished by blurring 5

Types of Smoothing F ilter There are 2 way of smoothing spatial filters Linear Filters – operations performed on image pixel Order-Statistics (non-linear) Filters - based on ranking the pixels 6

L inear F ilter Linear spatial filter is simply the average of the pixels contained in the neighborhood of the filter mask . The idea is replacing the value of every pixel in an image by the average of the gray levels in the neighborhood defined by the filter mask . 7

L inear F ilter (cont ..) This process result in an image reduce the sharp transitions in intensities. Two mask Averaging filter Weighted averaging filter 8

Averaging Filter A major use of averaging filters is in the reduction of irrelevant detail in image. mxn mask would have a normalizing constant equal to 1/ mn . Its also known as low pass filter. A spatial averaging filter in which all coefficients are equal is called a box filter. 9

Averaging F ilter - Example 1 1 1 1 1 1 1 1 1 10

Weighted Averaging F ilter Pixels are multiplied by different coefficients, thus giving more weight to some pixel at the expanses of others. The center pixel is multiplied by a higher value than any other, thus giving the pixel more importance in the calculation of average. The other pixels are inversely weighted as a function of their distance from center of mask 11

Weighted Averaging F ilter The general implementation for filtering an MxN image with a weighted averaging filter of size m x n is given by the expression For complete filtered image apply x = 0,1,2,3……..m-1 and y=0,1,2,3,……..n-1 in the above equation . 12

Weighted Average F ilter - Example 1 2 1 2 4 2 1 2 1 13

Order-Statistics F ilter Order-statistics filters are nonlinear spatial filters . It is based on ordering (ranking) the pixels contained in the image area encompassed by the filter , I t replacing the value of the center pixel with the value determined by the ranking result . 14

Order- statics filter The filter selects a sample from the window, does not average Edges are better preserved than with liner filters Best suited for “ salt and pepper ” noise 15

Types of order-statics filter Different types of order-statics filters are Minimum filter Maximum filter Median filter 16

Minimum Filter The th percentile filter is the min filter. M inimum filter selects the smallest value in the window and replace the center by the smallest value Using comparison the minimum value can be obtained fast.(not necessary to sort) I t enhances the dark areas of image 17

Minimum F ilter - Example . ( mask size =3 x 3) ( mask size =7 x 7) 18

Maximum Filter The maximum filter selects the largest value within of pixel values, and replace the center by the largest value. Using comparison the maximum value can be obtained fast.(not necessary to sort) Using the 100 th percentile results in the so-called max filter it enhances bright areas of image 19

Maximum Filter mask (3 x 3) mask (7 x 7) 20

Median Filter Three steps to be followed to run a median filter : 1 . Consider each pixel in the image 2. Sort the neighboring pixels into order based upon their intensities 3 . Replace the original value of the pixel with the median value from the list. 21

Median Filter - Process 22

Median Filter - Example Median Filter size =7 x 7 23 Median Filter size = 3 x 3

conclusion A linear filter cannot totally eliminate impulse noise , as a single pixel which acts as an intensity spike can contribute significantly to the weighted average of the filter. Non-linear filters can be robust to this type of noise because single outlier pixel intensities can be eliminated entirely. 24

Original image Median filter Original image Mean filter 25

26