Example rank order filters

An example of rank order filters, is for example the standard MED3x3 filter.

When 9 pixel values encountered in the input map are:

 9

12

 9

11

 5

 7

 8

 8

13

The MED3x3 filter orders these 9 values from small to large as:

5,7,8,8,9,9,11,12,13

and the value at rank order 5 is assigned to the pixel in the output map: 9.

You can also create your own user-defined rank order filters (defining filter size, rank order number that determines the output value, and optionally a threshold value).