Figure 4.10: Implementation of comparison network to get the median
value
Noise reduction based on the Median filter is a non–linear digital
filtering approach, often used to remove certain types of random noise,
especially salt and pepper noise. This technique is widely used
Figure
4.11: Stochastic implementation of a node in the comparison network used
for median filter
since it reduces noise and preserve edges
[10]. The main idea is to
replace each pixel with the median of neighboring pixels in the image.
To define the neighbors, a window of dimension m × n which shifts
, pixel by pixel, over the entire image. In this work, a window of
dimension 3 × 3 will be considered as
case study.
It can be seen in Fig.4.10
[16] the implementation of
comparison network to provide the median value in each sliding of the
window. Each node can be considering as a sorting element which arranges
two input i and j in ascending order. As the stochastic
implementation, Fig.4.11 carries
out this element with three MUX and one Stochastic tanh function.
The first multiplexer and tanh component play
the role of comparator which generate a signal ≈ 1 when
Pini > Pinj , ≈ 0 when Pini <
Pinj , and
0.5 elsewhere [16].
Consequently, this element will stochastically provides an ascending
order of two
inputs.
The simulation results of noise reduction based on the median filter
using the conventional and stochas- tic approaches are shown in
Fig.4.12. In this work, the sequence of
length 1024 bits is used to stochas- tically stand for each scaled pixel
value. It can be seen in this figure that the quality of the processed
images is better than the original one with a considerable noise
reduction. Moreover, stochastic ap- proach with a simplicity in hardware
design provides a good result as conventional one. Furthermore, when
consider the influence of the length of bit sequence on simulation
result, it can be shown in Fig.4.12c,
Fig.4.12d,
Fig.4.12e, and
Fig.4.12f that the length 1024 bits
gives a better output ( reduces more noises) in comparison with those of
other lengths. This fact can be explained due to the following feature
[16]: the variation of the
error in case of the binary radix format is independent of the number of
bits, while that of stochastic number is inversely proportional to the
bit sequence length.