pgmmedian

NAME

SYNOPSIS

Minimum unique abbreviation of option is acceptable. You may use double
hyphens instead of single hyphen to denote options. You may use white
space in place of the equals sign to separate an option name from its value.

DESCRIPTION

pgmmedian applies a median filter to a PGM image, using either
the histogram sort or select kth value method to determine the median.

A median filter is a convolution filter in which the value of a pixel in
the output is the median of a certain set of pixels in the neighborhood of the
corresponding input pixel. The effect is to eliminate locally extreme values.
Such pixels typically show up as speckles.

See the -type and -cutoff options for information on
how pgmmedian chooses between the two methods.

OPTIONS

-cutoffint

This option provides the cutoff value that pgmmedian uses
to decide between using the histogram sort or select kth value method
to find the median.
If (maxval / ((width * height) - 1)), where
maxval is the maxval of the image and width and
height are the dimensions of the mask, is less than the cutoff
value, pgmmedian uses histogram sort. Otherwise, it uses kth
value.

This option has no effect if you specify -type.

The default is 250

-width=n

Width of the median mask to apply.

Default is 3.

-height=n

Height of the median mask to apply.

Default is 3.

-typemedian_type

This option selects which method to use to find median regardless
of cutoff value. Choices are histogram_sort and select.

By default, pgmmedian decides which method to use as described
under the -cutoff option.