Sie sind auf Seite 1von 14

# A Spatial Median Filter for

## Noise Removal in Digital

Images
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.
Need of Noise Removal
 The inexpensiveness and simplicity of point-and shoot
cameras, combined with the speed at which budding
photographers can send their photos over the Internet
to be viewed by the world, makes digital photography a
popular hobby.
 With each snap of a digital photograph, a signal is
transmitted from a photon sensor to a memory chip
embedded 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 and
software 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 noise
from an image.
 Each pixel is represented by three scalar values
representing the red, green, and blue chromatic intensities.
 At each pixel studied, a smoothing filter takes into
account the surrounding pixels to derive a more accurate
version of this pixel.
 By taking neighboring pixels into consideration, extreme
“noisy” pixels can be replaced.
 However, outlier pixels may represent uncorrupted fine
details, which may be lost due to the smoothing process.
Block Diagram

## Random Noise Different types of

Output Image
Generation Algorithms
Mean Filter
 The Mean Filter is a linear filter which uses a
mask over each pixel in the signal.

##  Each of the components of the pixels which fall

under the mask are averaged together to form a
single pixel.

##  This new pixel is then used to replace the pixel

in the signal studied.
8 5 3

2 7 1 8+5+3+2+7+1+4+6+9
9
4 6 9

Mean=5
Median Filter
 Drawback in the Mean Filter is poor at maintaining edges
within the image.
 The Median Filter is performed by taking the magnitude of all
of the vectors within a mask and sorting the magnitudes.
 The pixel with the median magnitude is then used to replace
the pixel studied.
 The Simple Median Filter has an advantage over the Mean
filter 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
vectors and then you have to find out center
value that is median value.
 If it will be matrix data means you have to sort
the column values first and row values.
 A=[4 2 3;7 9 6;2 5 6]; 2 6 2
 Median=5 A= 3 7 5 = 3 5 7
4 9 6
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 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, a
single median component is determined.
 These components are then combined to form a new
point, which is then used to represent the point in the
signal studied.
 When working with color images, however, this filter
regularly outperforms the Simple Median Filter.
 When noise affects a point in a grayscale image, the
result is called “salt and pepper” noise.
 In color images, this property of “salt and pepper”
noise is typical of noise models where only one scalar
value of a point is affected.
 For this noise model, the Component Median
Filter is more accurate than the Simple Median
Filter.
 The disadvantage of this filter is that it will
create a new signal point that did not exist in
the original signal, which may be undesirable
in some applications.