Order Statistic Filters are filters which rank neighboring pixels in an attempt to remove low frequency effects while retaining edges. It is recommended that one be familiar general low pass and high pass filters first.
In Median filtering the output pixels are computed by taking first selecting a window of pixels around the input window. Then the pixels in the window are ranked according to their brightness. The median or middle of valued brightness is then assigned to the output value. The median filter will preserve boundaries or edges in the source image provided that half of the window is contains one side of the edge and the other half of the window another. For example if we examine the Black on White box discussed in the Low/High pass filtering section then we find that the edges of the box are preserved. Also large constant regions are also preserved. However, if we examine the corners of the box we find that these are not preseved. The resason for this is that on a quarter of the window can be dark when the window is at the extremes of the square. This means that the filter output is white, causing a rounding effect. Also note that if a thin one pixel line were to travel though the window that it would be removed. Hence the median filter is highly non-linear in its operation and effects. Because of its both low and high pass qualities, the median filter is sometimes thought of as an edge preserving lowpass filter, but this is not entirely accurate. If an image is repeatedly median filtered the image will eventually reach a stage where is it does not change with repeated application of the filter. This non=changing filtered image is called the median root. It is possible using a special type of filter to reach this in one pass. If another order statistic is used instead of the median, such as the second prder statistic or third order statistic, then a few slight changes will occur relative ti if a pure median filter had been used. First,if higher statistics are used the image will eventually get brighter, while if lower statistics are used then the image gets darker. With repeated application of an orderstatistic filter other than the median, every pixel in the image will approach a constant value.