You are on page 1of 30

Median Filtering

Objective
The purpose of these algorithms is to remove noise from a signal that might occur through the transmission of an image. Comparing the different algorithm results.

Basics of Spatial Filtering


Spatial filtering term is the filtering operations that are performed directly on the pixels of an image

Mechanics of spatial filtering


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

Literature Survey
Mean Filter Median Filter Component Median Filter Vector Median Filter Spatial Median Filter Modified Spatial Median Filter

Mean Filter
The Mean Filter is a linear filter which uses a mask over each pixel in the signal. 8 5 Each of the components of the 2 7 pixels which fall under the mask 4 6 are averaged together to form a single pixel.

3 1 9

Median filter
In signal processing, it is often desirable to be able to perform some kind of noise reduction on an image or signal. The median filter is a nonlinear digital filtering technique, often used to remove noise. Median filtering is very widely used in digital image processing because it preserves edges while removing noise.

Median filtering
o The median filter is a sliding-window spatial filter.
o It replaces the value of the center pixel with the median of the intensity values in the neighborhood of that pixel.

Median Filter
Median filtering is a nonlinear operation often used in image processing to reduce "salt and pepper" noise. A median filter is more effective than convolution when the goal is to simultaneously reduce noise and preserve edges.

o Median filters are particularly effective in the presence of impulse noise, also called salt and pepper noise because of its appearance as white and black dots superimposed on an image. o For every pixel, a 3x3 neighborhood with the pixel as center is considered. In median filtering, the value of the pixel is replaced by the median of the pixel values in the 3x3 neighborhood.

Median filter

Component Median Filter


In the simple median filter each point in the signal is converted to a single magnitude. In the component Median filter each scaler component is treated independently. A filter mask is placed over a point in the signal for each component of each point under the mask.

Master Layout

1
Original Image

Image with Salt & pepper noise

Image after filtering

Give a slider ranging from 0 to 1 so that user can select any one value of noise density.

Step 1:

Noise density 0.01

3
4
Instruction for the animator The first fig. should appear and then when the slider points at 0.01, the second fig. should be shown The text in DT should appear in parallel to the figures Text to be displayed in the working area (DT) The image with salt & pepper noise with noise density 0.01 The resulting image after median filtering is done

Step 2:

Noise density 0.02

3
4
Instruction for the animator The first fig. should appear and then when the slider points at 0.02, the second fig. should be shown The text in DT should appear in parallel to the figures Text to be displayed in the working area (DT) The image with salt & pepper noise with noise density 0.02 The resulting image after median filtering is done

Step 3:

Noise density 0.05

3
4
Instruction for the animator The first fig. should appear and then when the slider points at 0.05, the second fig. should be shown The text in DT should appear in parallel to the figures Text to be displayed in the working area (DT) The image with salt & pepper noise with noise density 0.05 The resulting image after median filtering is done

Step 4:

Noise density 0.07

3
4
Instruction for the animator The first fig. should appear and then when the slider points at 0.07, the second fig. should be shown The text in DT should appear in parallel to the figures Text to be displayed in the working area (DT) The image with salt & pepper noise with noise density 0.07 The resulting image after median filtering is done

Step 5:

Noise density 0.09

3
4
Instruction for the animator The first fig. should appear and then when the slider points at 0.09, the second fig. should be shown The text in DT should appear in parallel to the figures Text to be displayed in the working area (DT) The image with salt & pepper noise with noise density 0.09 The resulting image after median filtering is done

Step 6:

Noise density 0.1

3
4
Instruction for the animator The first fig. should appear and then when the slider points at 0.1, the second fig. should be shown The text in DT should appear in parallel to the figures Text to be displayed in the working area (DT) The image with salt & pepper noise with noise density 0.1 The resulting image after median filtering is done

Step 7:

Noise density 0.15

3
4
Instruction for the animator The first fig. should appear and then when the slider points at 0.15, the second fig. should be shown The text in DT should appear in parallel to the figures Text to be displayed in the working area (DT) The image with salt & pepper noise with noise density 0.15 The resulting image after median filtering is done

Step 8:

Noise density 0.2

3
4
Instruction for the animator The first fig. should appear and then when the slider points at 0.2, the second fig. should be shown The text in DT should appear in parallel to the figures Text to be displayed in the working area (DT) The image with salt & pepper noise with noise density 0.2 The resulting image after median filtering is done

Step 9:

Noise density 0.22

3
4
Instruction for the animator The first fig. should appear and then when the slider points at 0.22, the second fig. should be shown The text in DT should appear in parallel to the figures Text to be displayed in the working area (DT) The image with salt & pepper noise with noise density 0.22 The resulting image after median filtering is done

Step 10:

Noise density 0.3

3
4
Instruction for the animator The first fig. should appear and then when the slider points at 0.3, the second fig. should be shown The text in DT should appear in parallel to the figures Text to be displayed in the working area (DT) The image with salt & pepper noise with noise density 0.3 The resulting image after median filtering is done

Step 11:

Noise density 0.4

3
4
Instruction for the animator The first fig. should appear and then when the slider points at 0.4, the second fig. should be shown The text in DT should appear in parallel to the figures Text to be displayed in the working area (DT) The image with salt & pepper noise with noise density 0.4 The resulting image after median filtering is done

Step 12:

Noise density 0.5

3
4
Instruction for the animator The first fig. should appear and then when the slider points at 0.5, the second fig. should be shown The text in DT should appear in parallel to the figures Text to be displayed in the working area (DT) The image with salt & pepper noise with noise density 0.5 The resulting image after median filtering is done

Step 13:

Noise density 0.6

3
4
Instruction for the animator The first fig. should appear and then when the slider points at 0.6, the second fig. should be shown The text in DT should appear in parallel to the figures Text to be displayed in the working area (DT) The image with salt & pepper noise with noise density 0.6 The resulting image after median filtering is done

Step 14:

Noise density 0.7

3
4
Instruction for the animator The first fig. should appear and then when the slider points at 0.7, the second fig. should be shown The text in DT should appear in parallel to the figures Text to be displayed in the working area (DT) The image with salt & pepper noise with noise density 0.7 The resulting image after median filtering is done

Step 15:

Noise density 0.8

3
4
Instruction for the animator The first fig. should appear and then when the slider points at 0.8, the second fig. should be shown The text in DT should appear in parallel to the figures Text to be displayed in the working area (DT) The image with salt & pepper noise with noise density 0.8 The resulting image after median filtering is done

Step 16:

Noise density 0.9

3
4
Instruction for the animator The first fig. should appear and then when the slider points at 0.9, the second fig. should be shown The text in DT should appear in parallel to the figures Text to be displayed in the working area (DT) The image with salt & pepper noise with noise density 0.9 The resulting image after median filtering is done

Step 17:

Noise density 1

3
4
Instruction for the animator The first fig. should appear and then when the slider points at 1, the second fig. should be shown The text in DT should appear in parallel to the figures Text to be displayed in the working area (DT) The image with salt & pepper noise with noise density 1 The resulting image after median filtering is done

THANK YOU

You might also like