Image Processing Reference
In-Depth Information
Davies (1988) aims to achieve this. The truncated median filter is based on the premise that
for many non-Gaussian distributions, the order of the mean, the median and the mode is the
same for many images, as illustrated in Figure 3.23 . Accordingly, if we truncate the distribution
(i.e. remove part of it, where the part selected to be removed in Figure 3.23 is from the
region beyond the mean) then the median of the truncated distribution will approach the
mode of the original distribution.
No. of points
Mode
Brightness
Median
Mean
Figure 3.23
Arrangement of mode, median and mean
The implementation of the truncated median, trun_med , operator is given in Code
3.14 . The operator first finds the mean and the median of the current window. The distribution
of intensity of points within the current window is truncated on the side of the mean so that
the median now bisects the distribution of the remaining points (as such not affecting
symmetrical distributions). So that the median bisects the remaining distribution, if the
median is less than the mean then the point at which the distribution is truncated, upper , is
upper = median + ( median - min( distribution ))
(3.24)
= 2 · median - min( distribution )
If the median is greater than the mean, then we need to truncate at a lower point (before the
mean), lower , given by
lower = 2 · median - max( distribution ) (3.25)
The median of the remaining distribution then approaches the mode. The truncation is
performed by storing pixel values in a vector trun . A pointer, cc , is incremented each
time a new point is stored. The median of the truncated vector is then the output of the
truncated median filter at that point. Naturally, the window is placed at each possible
image point, as in template convolution. However, there can be several iterations at each
position to ensure that the mode is approached. In practice only few iterations are usually
required for the median to converge to the mode. The window size is usually large, say 7
7 or 9
9 or more.
The action of the operator is illustrated in Figure 3.24 when applied to a 128
128 part
of the ultrasound image (Figure 1.1 (c)), from the centre of the image and containing a
cross-sectional view of an artery. Ultrasound results in particularly noisy images, in part
Search WWH ::




Custom Search