Undef-Majority filter (MAJUNDEF)

The MAJUNDEF filter is a standard majority filter which works in a 3x3 environment. Of each 9 pixels considered, the predominant value or class name of the other 8 pixels is assigned to the center pixel in the output map, only if the center pixel in the input map is undefined.

If the central pixel in the input map is not undefined, the value or class name remains the same in the output map.

When 9 pixel values encountered in the input map are:

 

 9

 3

 9

11

 ?

 7

 7

 7

13

 

The predominant value is 7; the value for the output pixel is thus 7. If you use the MAJUNDEF filter on a domain Class map, the predominant class name is selected.

See also: