<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Study and Design of Median Filter</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Elmoncef Benrhouma</string-name>
          <email>benrhouma.moncef@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Meddeb Souad</string-name>
          <email>mmemeddeb@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Hamid Amiri</string-name>
          <email>hamidlamiri@yahoo.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>King Abdulaziz City for Science and Technology (Kacst)</institution>
          ,
          <addr-line>Riyadh, KSA</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>RL-SIIT National School of Engineering of Tunis</institution>
          ,
          <country country="TN">Tunisia</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>- Signal Processing is a very advanced which comes very close to its apogee by the undeniable attempts to reach the best performances. This process is noticed by the orientation with the digital signal processing. This article aims to study and design a median filter. Firstly, we highlighted the behavioral study for this filter using MATLAB software. Secondly, we passed to the functional study of the median with MODELSIM software (VHDL).</p>
      </abstract>
      <kwd-group>
        <kwd>- Median Filter</kwd>
        <kwd>Signal Processing</kwd>
        <kwd>VHDL</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>INTRODUCTION</title>
      <p>
        The digitized image processing has become in recent years
a very important area of research both for image restoration,
image coding or feature extraction for pattern recognition
features. Whatever the sensor used, especially when it comes
to a video camera, the quality of acquired images is often
affected. In general, the images are degraded by the presence
of noise, and the other edges or ridges forms present in some
areas may fade. To remedy this situation, many filtering
techniques have been proposed. The objective of the digitized
image filtering is to eliminate the noise in order to make more
uniform gray levels while preserving the main features such as
edges or ridges. The techniques commonly used include
replacing the gray level of each point of the image processed
by the value resulting from an analysis of local neighborhood
of this point [
        <xref ref-type="bibr" rid="ref2">1, 2</xref>
        ].
      </p>
      <p>This analysis can be predefined, this is the case when using
a convolution mask whose size and the coefficients are set at
the outset. But, although the noise is eliminated relatively
well, it results an attenuation of the transition lines or ridge
lines that can be fatal for the extraction of primitives.</p>
      <p>
        In this context, falls the design of median filter. In fact,
median filtering is used extensively in smoothing and
denoising applications for images and video [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. It is a
costeffective solution used predominantly in video pre- and
postprocessing systems. It is also deployed extensively in real-time
vision systems and automatic target recognition (ATR)
systems [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
      <p>II.</p>
    </sec>
    <sec id="sec-2">
      <title>METHODS</title>
      <sec id="sec-2-1">
        <title>A. Behavior study</title>
        <p>
          The median filter, a sub-class of the rank order filter sorts
the pixels in a region by luminance, finds the median value
and replaces the central pixel with that value [
          <xref ref-type="bibr" rid="ref5 ref6 ref7">5,6,7</xref>
          ]. Used to
remove noise from images, this operation completely
eliminates extreme values from the image. Rank order filtering
is a class of operators that use neighborhood pixels to perform
comparisons and ranking.
        </p>
        <p>Rank operations also include the maximum and minimum
operators, which find the brightest or darkest pixels in each
neighborhood and place that value into the central pixel. By
loose analogy to the erosion and dilation operations on binary
images, these are sometimes called grey scale erosion and
dilation [8].</p>
        <p>One important variable in the use of a rank operator is the
size of the neighborhood. Generally, rectangular (for
convenience of computation) or circular (to minimize
directional effects) shapes are used. As the size of the
neighborhood is increased, however, the computational effort
in performing the ranking increases rapidly.</p>
        <p>In fact, a median filter is a non-linear digital filter which is
able to preserve sharp signal changes and is very effective in
removing impulse noise (or salt and pepper noise). An impulse
noise has a gray level with higher or lower value that is
different from the neighborhood point. Linear filters have no
ability to remove this type of noise without affecting the
distinguishing characteristics of the signal. Median filters have
remarkable advantages over linear filters for this type of noise.
Max
Min</p>
        <p>Median
that an additional sorting is implied if groups of identical
adjacent characters appear in the array). This implies that in
practice, it is possible to reduce more than the number of steps
to solve the suffix problem.</p>
        <p>b) Minimum Exchange Strategy: The graph of Fig.3
shows the minimum exchange network required to produce a
median from nine input pixels by performing a partial sort.
Each node is a two element sort, with the lower input exiting
the node on the left, the higher input leaving on the right.</p>
        <p>P1
P2
P3
P4
P5
P6
P7
P8
P9
Therefore median filter is very widely used in digital signal
and image/video processing applications [9].</p>
        <p>A standard median operation is implemented by sliding a
window of odd size (e.g. 3x3 window) over an image. At each
window position the sampled values of signal or image are
sorted, and the median value of the samples replaces the
sample in the center of the window as shown in Fig.1.</p>
        <p>A 3x3 window
10
14
15
5
3
25
20
11
2</p>
        <p>Center pixel replaced with
median value
11
2
3
5
10
11
14
15
20</p>
        <p>25</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Median Value</title>
      <p>Median filters remove isolated pixels, whether they are
bright or dark. Prior to any hardware design, the software
versions of the algorithms are created in MATLAB. Using
MATLAB procedural routines to operate on images
represented as matrix data, these software algorithms were
designed to resemble the hardware algorithms as closely as
possible. While a hardware system and a matrix- manipulating
software program are fundamentally different, they can
produce identical results, provided that care is taken in
development. This approach was taken because it speeds
understanding of the algorithm design. In addition, this
approach facilitates comparison of the software and
synthesized hardware algorithm outputs [10].</p>
      <sec id="sec-3-1">
        <title>B. Functional study</title>
        <p>In this part, we used two strategy of median filter, the
parallel sorting strategy and the minimum exchange strategy.</p>
        <p>a) Parallel Sorting Strategy : The parallel strategy leads
to a significant reduction compared to the wave sorter
approach.</p>
        <p>P1
P2
P3
P4
P5
P6
P7
P8
P9</p>
        <p>Furthermore, in additional sorts the necessary number of
steps for sorting is equal to the number of characters in the
biggest group of identical characters divided by 2 (remember
Median</p>
        <p>And</p>
        <p>We will compare two bits ai and bi if the bits ai+1 and bi+1
are equal (It is mean that tei= rei+1 = 1). For that, we supposed
that the values of tei are “1” in this table.</p>
        <p>In addition, rmxi=1 only if ai&gt;bi. Based on the logic table,
we have these equations:</p>
        <p>rmx i = tei • a i • bi
rei = te i • (a i • b i + a i • b i ) = te i • (a i b i )
(1)
(2)</p>
        <p>In this functional study, the two strategies are based on
principal element. It is the comparison module (CM). The
figure Fig.4 shows this module.</p>
        <p>Firstly, in order to explain the functioning of this module,
A and B are two 8 bits pixels. We will compare every time
two bits so we need to 8 modules unitary comparison module
(UCM). MCU is based to the following logic table:</p>
        <p>The figure Fig.6 shows the logic schematic of CM.</p>
        <p>The behavioral study is very important; it shows the
operation of this filter and presents its effect on a noisy image.
That is why we have taken any image, and then we have the
noisy image. Figure Fig.1 shows the original image and the
noisy image.
original Image
Nosy Image
rmxi
rei
50
100
150
200
250
50
100
150
200
250</p>
        <p>Impulse noise is visibly reduced. Median filtering of a
pixel P, on a neighborhood V(P) of size (MxN), directs the
pixel values of V(P) in ascending order, and assigned the
median value at the output of this neighborhood to the pixel P
(non-linear operation).</p>
        <p>Using the previous example: the pixel values are arranged
in ascending order: 0, 8, 8, 8, 8, 8, 8, 8, 255. The median is 8.
To this non-linear operation, the pulses 0 and 255 did not
affect the median. Median filtering is therefore suitable for
reducing impulse noise.</p>
        <p>Neighborhood
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
0
8
8
8
8
8
8
8
8
8
8
8
8
255
8
8
8
8
8
8</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Impulse Noise</title>
      <p>50</p>
      <p>By increasing the filter size, the image becomes blurred.
The following figure illustrates four images filtered by various
median filters.</p>
      <p>Filtered image by the median filter 3x3 Filtered image by the median filter 5x5
Filtered image by the median filter 7x7 Filtered image by the median filter 9x9 Filtered image by the median filter 11x11</p>
      <p>We simulated each time a strategy. Indeed, we used an
arbitrary matrix (3x3) and we applied our filter on this matrix
and we had the following results using MODELSIM using
VHDL.</p>
    </sec>
    <sec id="sec-5">
      <title>CONCLUSION</title>
      <p>In this paper, we have approached the study of architecture
very important in the field of signal processing. This
architecture called Median Filter, finds its application in
various fields. In this study, we have achieved a behavioral
study of this filter which allowed us to determine the suitable
settings and the proper functioning of this filter. Based on
these parameters established, we simulated the architecture
designed by MODELSIM.</p>
      <p>As perspective, we aim to optimize the architecture of our
filter and study its performances. Then, choose the optimal
and efficient structure. Finally, implement this architecture on
an FPGA board.
(PAMI) 13(6):568-582.
[10] D.Dhanasekaran and K.B. Bagan, High Speed Pipelined
Architecture for Adaptive Median Filter, European Journal of
Scientific Research ISSN 1450-216X Vol.29 No.4 (2009), pp.
454460</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <surname>W. K. PRATT</surname>
          </string-name>
          , Digital Image Processing, Wiley, New York,
          <year>1978</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>A.</given-names>
            <surname>ROSENFELD</surname>
          </string-name>
          et A . C . KAK, Digital Picture Processing, Acad. Press. NY,
          <year>1976</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>V.</given-names>
            <surname>Fischer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Lukac</surname>
          </string-name>
          , and
          <string-name>
            <given-names>K.</given-names>
            <surname>Martin</surname>
          </string-name>
          ,
          <article-title>Cost-Effective Video Filtering Solution for Real-Time Vision Systems</article-title>
          ,
          <source>EURASIP Journal on Applied Signal Processing</source>
          <year>2005</year>
          :
          <volume>13</volume>
          ,
          <fpage>2036</fpage>
          -
          <lpage>2042</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>J. B.</given-names>
            <surname>Wilburn</surname>
          </string-name>
          ,
          <article-title>A Statistical Methodology for Automatic Target Recognition in Satellite Imagery</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>R.</given-names>
            <surname>Roncella</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Saletti</surname>
          </string-name>
          , P. Terreni,
          <fpage>70</fpage>
          -MHz 2
          <article-title>-mm CMOS Bit-Level Systolic Array Median Filter</article-title>
          ,
          <source>IEEE Journal of Solid State Circuits</source>
          , vol
          <volume>28</volume>
          ,
          <year>1993</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>L.</given-names>
            <surname>Chang</surname>
          </string-name>
          and
          <string-name>
            <given-names>J.</given-names>
            <surname>Lin</surname>
          </string-name>
          ,
          <article-title>Bit Level Systolic Arrays for Real Time Median Filters</article-title>
          , International Conference on Acoustics,
          <source>Speech and Signal Processing</source>
          ,
          <year>1990</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>B. K.</given-names>
            <surname>Kar</surname>
          </string-name>
          and
          <string-name>
            <given-names>D. K.</given-names>
            <surname>Pradhan</surname>
          </string-name>
          ,
          <article-title>A New Algorithm for Order Statistic and Sorting</article-title>
          ,
          <source>IEEE Transactions on Signal Processing</source>
          , vol
          <volume>41</volume>
          ,
          <year>August 1993</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>