Filter types |
Example rank order filters |
Rank order and median filters |
|
Rank order filters have a certain size, but do not have any matrix values nor a gain factor. A rank order filter of size 3x3 for example, examines 9 pixel values of the input map at a time, sorts the values from small to large, and selects for the output value that value which is encountered at a certain rank order number. So one value of the pixel values examined becomes the output value, without any calculation performed on the values itself.
When a threshold is set, the value of the center pixel will only be replaced with the new value if the difference between the original and new value is smaller than or equal to the threshold.
Standard rank order filters:
Standard rank order filters are the median filters: MED3x3, MED5x5. For each 9 pixels considered, the MED3 filter always assigns the value of rank 5 to the center pixel in the output map. For each 25 pixels considered, the MED5 filter always assigns the value of rank 13 to the center pixel in the output map. The median filters can for instance be used to smooth an image.
User-defined rank order and median filters:
In the Filter dialog box as well as on the command line, you can define your own rank order filter and median filter. For a rank order filter, specify the size of the filter, the rank order number and an optional threshold. In this way you can obtain for example the minimum or maximum value of a number of pixels. For median filters, specify the size of the filter and an optional threshold. For more information and some examples, refer to User-defined rank order and median filters.
See also: