The median filter is a robust filter . Median filters are widely used as smoothers for image processing , as well as in signal processing and time series processing. A major advantage of the median filter over linear filters is that the median filter can eliminate the effect of input noise values with extremely large magnitudes. (In contrast, linear filters are sensitive to this type of noise - that is, the output may be degraded severely by even by a small fraction of anomalous noise values).
The output of the median filter at the moment is calculated as the median of the input values corresponding to the moments adjacent to :
is the size of the window of the median filter.
Besides the one-dimensional median filter described above, there are two-dimensional filters used in image processing .