In addition to the median filter, which you

studied in some detail, there are a number of

other filters under the grouping of order statistic

filters suitable primarily for handling impulsive type of noise.

They're called so because they're based on the

ordering of the pixel values in the neighborhood.

So here's again the expression for

the median filter, written slightly differently.

So x is the input image, y the output.

So the value at n1, n2 is the result, is the median, of the values of the input

in a neighborhood N which is centered at n1 and n2.

Another filter in this family is the max filter, which finds

the brightest, the maximum value, the brightest intensity in the neighborhood.

Since pepper has low value it's reduced by this operation.

It's replaced by the maximum value in the neighborhood, so

this is therefore good for handling pepper type of noise.

[BLANK_AUDIO]

The min filter finds the darkest point in the neighborhood, the

minimum value, and therefore, this is good for reducing salt noise.

[BLANK_AUDIO]

The mid-point combines order statistics and averaging.

So it is the average of the maximum and the minimum values in the neighborhood.

And this works best for randomly

distributed noise like Gaussian or uniform.

And finally, the alpha-trimmed mean.