Majority filters

Majority filters assign the predominant (=most frequently occurring) value or class name of each 3x3 pixels to the center pixel in the output map. Undef-majority filters only do this when the center pixel in the input map is undefined; zero-majority filters only do this when the value of the center pixel in the input map is 0.

Undef-majority filters are often used after an image classification to reduce the number of undefined pixels.

Standard majority filters are: MAJORITY, MAJUNDEF, and MAJZERO.

Furthermore, user-defined majority filters can be used: specify the size of the filter and whether a condition has to be used or not.