Image Processing Reference
In-Depth Information
Chapter 6
The Median Filter and Its Variants
6.1 The Grayscale Median as a Special Case of a Generalized
WOS Filter
The median filter is a much used and sometimes misunderstood tool available to
image processing specialists. It should now be clear to readers that the median is
not an alternative filter to those described in this text. It is simply a special case, one
of many options that might arise from the design techniques should it happen to be
the optimum for that example.
As is well known, the standard median filter 1 is formed by rank ordering the
samples within the window and selecting the center value. It is a specific case of a
generalized weighted order statistic (WOS) filter which may be written as
{
}
th
ψ
(
x
)
=
T
largest
W
X
,
W
X
, ................
W
X
(6.1)
0
0
1
1
n
1
n
−1
where
W
X means the sample value X repeated W times,
X i are the input signal sample values associated with each location in the window,
x is a vector containing the signal samples { X 0 , X 1 ….. X n 1 },
W i are the corresponding filter weights and
T is a threshold value between 0 and n- 1.
The general filter described above is a rank selection filter 2 in that the output value
of the filter always corresponds to one of the inputs. The filter is unable to average
or interpolate and this means that it does not produce simple blurring. However, fil-
ters with larger windows can give “streaking” effects in images. This will be ad-
dressed later in the chapter.
The median filter is good at preserving sharp changes in intensity such as
edges. Its rank order properties mean that for impulsive noise, the corrupted pixel
values go to the extremes of the distribution and have little or no chance of emerg-
57
Search WWH ::




Custom Search