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.
This program is part of Netpbm.
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.
Pixels at the edges of the image, pixels where the convolution kernel would go off the edge of the image, are just copied. For example, if -height is 9, the first 4 and last 4 rows of the input image are just copied to the output.
See the -type and -cutoff options for information on how pgmmedian chooses between the two methods.
In addition to the options common to all programs based on libnetpbm (most notably -quiet, see Common Options), pgmmedian recognizes the following command line options:
This option has no effect if you specify -type.
The default is 250
Maximum allowed is the width of the input image.
Default is 3.
Maximum allowed is the height of the input image.
Default is 3.
By default, pgmmedian decides which method to use as described under the -cutoff option.
pgmmedian was added to Netpbm in Version 10.29 (August 2005). It had been distributed by Mike Burns via his own web site before that (and continued to be so).