MED5x5 filter
The MED5x5 is a standard rank order filter which works in a 5 by 5 environment.
When 25 pixel values encountered in the input map are:
2 |
4 |
10 |
3 |
21 |
|
14 |
1 |
9 |
12 |
9 |
|
11 |
7 |
5 |
8 |
13 |
|
8 |
8 |
13 |
15 |
6 |
|
12 |
2 |
5 |
10 |
12 |
Then the median filter orders these 25 values as:
1,2,2,3,4,5,5,6,7,8,8,8,9,9,10,10,11,12,12,12,13,13,14,15,21
The value at rank order 13 is assigned to the pixel in the output map: 9.
Input pixel value 5 is smaller than the value of surrounding pixels in this example, while the output pixel value 9 is the median value of the 25 pixels examined.
See also: