Digital Signal Processing Reference
In-Depth Information
Figure 16.1. Median lter of random noise.
The median filter is a non-linear filter, and, unlike a conven-
tional digital filer, does not require any multipliers. The median
filter operates by taking a group of pixels in a certain area, for
example a 3
3 pixel area. The new pixel value in the center of
that area is the median, or middle value, of the nine pixel values.
There is no weighting or linear combination. The entire image is
processed by shifting the 3
3 pixel area in vertical and hori-
zontal increments. If a single pixel is very different from all
surrounding pixels, it will never be the median value, and will be
filtered out by the median filter. This is shown in the black and
white pixel image in Figure 16.1 .
Figure 16.2. Median
lter with sharp edge.
However, consider a sharp vertical edge: this will be smoothed
or softened by a low pass digital filter. But with a median filter, the
same sharp transition can be preserved, as shown in Figure 16.2 .
Alternate pixel areas can be used for median filtering, as shown
in Figure 16.3 . The operations are the same
the output pixel value
at the center of the pixel area is themedian, set equal to the value of
the pixel value in themiddle after all the pixels have been sorted by
value. As the median filter is shifted across the image, it always
operates on the original pixel data. The output of the median filter
forms a new image, built up pixel by pixel using the median filter.
Themedianfilter is but one type of filter that canbe used. There are
other types of more complex filtering that can be applied.
e
Search WWH ::




Custom Search