Robust Median Filter With Adaptive Window Length: Risto Estola'
Robust Median Filter With Adaptive Window Length: Risto Estola'
109
Detect ion of nonst at ionarities
Multiresolution Histogram
Controlling window length Realization
Monitored signal e t ( k ) start increase when the front In the proposed median algorithm, the first task is to
end of the data window reaches the transient event and construct the multiresolution histogram. hlultiresolu-
grows as far as the middle point of the window passes tion histogram method sorts the data into a multilevel
by the edge and after that e L ( k ) will decrease towards tree memory. Each tree level contains the moving Iiis-
the end of the window. To know the position of the togram of L data samples. The difference in the res-
window compared to the transient event we actually olution of the histograms between adjacent levels is D
need not to know the distance between the mean and bits and the number of tree levels is M / D , where A i is
median whereas we need to know whether the distance the number of bits to represent the data. In tlie rnul-
is increasing or decreasing. To obtain the information a tiresolution histogram method several histograms arc
derivative of e t ( k ) is extracted using a first difference; computed from the same set of data with diffcrent bin
tliat is, widths W . In the bottom level histogram, the widtli
w ~ ( k= ) e L ( k ) - e L ( k - 1). (3) W,,, = 1, i.e., it has the maximum resolution. I n the
next level W M I D -=~2O and, in general, W, is defined
The actual basis for an adaptation of a data window
as
length will be the sign of w ~ ( k ) . I n Figure 2. the
structure of the proposed filter is depicted. The low- W; = 2(M’D-i)D, i = 1 , . . . , M / D , (4)
pass filter is added to the implementation to obtain
more stable behavior of window length. The optional where i is the histogram level. The histogram data is
small value of A is added to the difference due to the stored in an 2D-ary tree structure.
fact that the maximum length of the window is pre-
ferred in the case of stationary signals. The window The tree update is done in two phases: the oldcst
length is adjusted between a priori set maximum and data sample will be exported out of the tree and tlic
minimum lengths. By choosing the minimum window newest will be imported into the tree. Removing a sani-
length we can control the smallest pulses to be passed ple out of the tree means decrementing the nodes by onc
through the filter. a t each level of the tree and adding a new sample nieaiis
incrementing the corresponding nodes by one.
The window length is changed applying the step size
of two to maintain the proper phase (constant delay) in- For the fast retrieval of the median it is useful to
formation, i.e., the middle point of the window is moved have only few bins. The median search is started from
one sample for each outpbt sample. 0 t h step sizes the top of the tree with the low resolution histograin;
can be also used but by using the step size of two the when the right top level interval is found the senrrlt
procedure to decrease and increase tlie wiiidow length is continued in the next level. The resolutioii of t l i ( ’
110
iiicdiaii cstiiiiate depends on wliicli level tlie search is 4, . . . . . . . . .
s(.opped.
Numerical Examples
W8UllFdU
To depict tlie effects of different window lengths during Figure 4: Window length (dashed line) and pulse data
the median filtering, a signal containing pulses and ad- (solid line).
ditive noise is filtered applying three different median
sclienies. Figure 1 shows the outputs of two fixed length
median filters having window sizes L1 = 11 (dashed median operator according to the local stationarity of
line) and Lz = 81 (dotted line), and tlie output of the the signal. For stationary epochs of the signal the size
proposed median filter with variable size data window, of the window is large and for nonstationary epochs
L = 11, . . . , $1 (solid line). I n Figure 3 , the correspond- short. An efficient adaptation algoritlim and its real-
ing error signals are plotted. From these figures it can ization was given. Examples show that the new method
be clearly seen that by exploiting the adaptive window outperforms the conventional fixed window length me-
size we can reduce the variance of the filtered signal dian operators.
colisiderably without degrading tlie accurate represen-
tation of the discontinuities. The attenuation of the
noise is -18dD with fixed short window, -6dB with
fixed long window and -22dB with adaptive window
References
lengtli when applied to the example data. In the sta-
tionary segment between two pulses the better noise [l] Kari-Pekka Estola and Risto Suoranta. A fast prob-
rejection ability of presented filter is more clearly seen abilistic median algorithm for integer arithmetics.
- tlie noise rejection by using long data window or
In Proc. Twelfth Gretsi Symposium on Signal and
proposed adaptive window is -37dB and by using the Image Processing '89, pages 61-64, Juan-les Pins,
window size of 11 the attenuation is -19dB. France, Jun, 1989.
Figure 4 depicts the adaptation of the window length [2] Risto Suoranta, Kari-Pekka Estola, and Timo Yli-
using tlie proposed distance measure when applied to Pietila. A novel statistical median-like filter. In
Proc. ISSPA '90, pages 523-626, Gold Coast, Aus-
the original clean data.. The input data to the new
tralia, 1990. IASTED.
adaptive window size median filter is shown as the solid
line aiid tlie resulting window size is given by the dashed [3] Timo Yli-Pietila, Risto Suoranta, and Iiari-Pekka
line. Estola. Configurable hardware implementation of a
fast median algorithm. In Proc. ISSPA '90, pages
815-818, Gold Coast, Australia, 1990. IASTICD.
Conclusions
111