Standard rank order filters are MED3x3 and MED5x5; these filters sort 9 resp. 25 pixel values and assign the 5th resp. the 13th value (median value) to the center pixel in the output map. In the Filter dialog box as well as on the command line, you may define other rank order and median filters of any user-defined size and assigning any user-defined rank order value to the central pixel.
Using the Filter dialog box:
This ensures that larger differences between neighbouring pixels remain in the output, while small variations are removed.
See also the example below.
Using the command line (advanced):
OUTMAP |
= |
MapFilter(InputMapName, Med3x3) |
|
OUTMAP |
= |
MapFilter(InputMapName, Med5x5) |
where:
OUTMAP |
is the name of your output map. |
|
MapFilter |
is the command to start the Filter operation. |
|
InputMapName |
is the name of your input map. |
|
Med3x3 |
is the name of the standard Median 3x3 filter. |
|
Med5x5 |
is the name of the standard Median 5x5 filter. |
OUTMAP |
= |
MapFilter(InputMapName, Rankorder(rows,cols,rank)) |
|
OUTMAP |
= |
MapFilter(InputMapName, Rankorder(rows,cols,rank,threshold)) |
where:
OUTMAP |
is the name of your output map. |
|
MapFilter |
is the command to start the Filter operation. |
|
InputMapName |
is the name of your input map. |
|
Rankorder |
is the command to define a rank order filter. |
|
rows |
are the number of rows of your rank order filter. |
|
cols |
are the number of columns of your rank order filter. |
|
rank |
is the rank order number that determines the output value. |
|
threshold |
when a threshold is set, the value of the center pixel will only be replaced by the new value if the difference between the original and new pixel value is smaller than or equal to the threshold. |
OUTMAP |
= |
MapFilter(InputMapName,Median(rows,cols)) |
|
OUTMAP |
= |
MapFilter(InputMapName,Median(rows,cols,threshold)) |
where:
OUTMAP |
is the name of your output map. |
|
MapFilter |
is the command to start the Filter operation. |
|
InputMapName |
is the name of your input map. |
|
Median |
is the command to define a median filter. |
|
rows |
are the number of rows of your median filter. |
|
cols |
are the number of columns of your median filter. |
|
rank |
is the rank order number that determines the output value. |
|
threshold |
when a threshold is set, the value of the center pixel will only be replaced by the new value if the difference between the original and new pixel value is smaller than or equal to the threshold. |
Examples:
Rank 1 means the smallest value of each 9 (3 by 3) pixel values examined will be used for the output pixel.
Rank 7 means that the largest value of each 7 (1 by 7) pixel values examined is used as output value.
Tips:
See also: