You are on page 1of 8

A Spatial Median Filter for Noise Removal in DigitalImages

Objective

The purpose of these algorithms is to removenoise from a signal that might occur throughthe transmission of an image.

Comparing the different algorithm results.

Need of Noise Removal

The inexpensiveness and simplicity of point-and shootcameras, combined with the speed at which budding photographers can send their photos over the Internetto be viewed by the world, makes digital photography a popular hobby.

With each snap of a digital photograph, a signal istransmitted from a photon sensor to a memory chipembedded inside a camera.

Transmission technology is prone to a degree of error,and noise is added to each photograph.

Significant work has been done in both hardware andsoftware to improve the signal-to-noise ratio in digital photography.

Literature Survey

Mean Filter

Median Filter

Component Median Filter

Vector Median Filter

Spatial Median Filter

Modified Spatial Median Filter

Modules

Smoothing Algorithms

Spatial Median Filter

Modified Spatial Median Filter

Smoothing Algorithms

In software, a smoothing filter is used to remove noisefrom an image.

Each pixel is represented by three scalar valuesrepresenting the red, green, and blue chromatic intensities.

At each pixel studied, a smoothing filter takes intoaccount the surrounding pixels to derive a more accurateversion of this pixel.

By taking neighboring pixels into consideration, extremenoisy pixels can be replaced.

However, outlier pixels may represent uncorrupted finedetails, which may be lost due to the smoothing process.

Block Diagram

Random NoiseGeneration = Input Image =Noisy Image =Impulse Detection =Different types of Algorithms= Output Image

Mean Filter

The Mean Filter is a linear filter which uses amask over each pixel in the signal.

Each of the components of the pixels which fallunder the mask are averaged together to form asingle pixel

This new pixel is then used to replace the pixelin the signal studied

8+5+3+2+7+1+4+6+99=5

Median Filter

Drawback in the Mean Filter is poor at maintaining edgeswithin the image.

The Median Filter is performed by taking the magnitude of allof the vectors within a mask and sorting the magnitudes.

The pixel with the median magnitude is then used to replacethe pixel studied.

The Simple Median Filter has an advantage over the Meanfilter in that it relies on median of the data instead of the mean.

The median of a set is more robust with respect to the presence of noise.

How does Median Filter Work

First of all you have to sort the values of First of all you have to sort the values of vectors and then you have to find out center vectors and then you have to find out center value that is median value.value that is median value.

If it will be matrix data means you have to sortIf it will be matrix data means you have to sortthe column values first and row values.the column values first and row values.

A=[4 2 3;7 9 6;2 5 6]; Median=5

Component Median Filter

In the Simple Median Filter, each point in the signalis converted to a single magnitude.

In the Component Median Filter each scalar component is treated independently.

A filter mask is placed over a point in the signal. For each component of each point under the mask, asingle median component is determined.

These components are then combined to form a new point, which is then used to represent the point in thesignal studied.

When working with color images, however, this filter regularly outperforms the Simple Median Filter.

When noise affects a point in a grayscale image, theresult is called salt and pepper noise.

In color images, this property of salt and peppernoise is typical of noise models where only one scalar value of a point is affected.

For this noise model, the Component MedianFilter is more accurate than the Simple MedianFilter.

The disadvantage of this filter is that it willcreate a new signal point that did not exist inthe original signal, which may be undesirablein some applications.