.TL
Pgmmedian User Manual
.SH 1
pgmmedian
.LP
Updated: 28 August 2005
.LP
Table Of Contents
.SH 2
NAME
.LP
pgmmedian - apply a median filter to a PGM file
.SH 2
SYNOPSIS
.LP
\fBpgmmedian\fR
[\fB-width=\fR\fIn\fR]
[\fB-height=\fR\fIn\fR]
[\fB-type=\fR\fImedian_type\fR]
[\fB-cutoff=\fR\fIint\fR]
[\fIpnmfile\fR]
.LP
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.
.SH 2
DESCRIPTION
.LP
.LP
This program is part of Netpbm.
.LP
\fBpgmmedian\fR applies a median filter to a PGM image, using either
the histogram sort of select kth value method to determine the median.
.LP
See the \fB-type\fR and \fB-cutoff\fR options for information on
how \fBpgmmedian\fR chooses between the two methods.
.SH 2
OPTIONS
.LP
.RS
.IP "\fB-cutoff\fR \fIint\fR"
This option provides the cutoff value that \fBpgmmedian\fR uses
to decide between using the histogram sort or select kth value method
to find the median.
If (\fImaxval\fR / ((\fIwidth\fR * \fIheight\fR) - 1)), where
\fImaxval\fR is the maxval of the image and \fIwidth\fR and
\fIheight\fR are the dimensions of the mask, is less than the cutoff
value, \fBpgmmedian\fR uses histogram sort. Otherwise, it uses kth
value.
.LP
If expression is less than the cutoff, \fBpgmmedian\fR uses the
histogram sort. Otherwise it uses the select kth value method.
.LP
This option has no effect if you specify \fB-type\fR.
.LP
The default is 250
.IP "\fB-width=\fR\fIn\fR"
Width of the median mask to apply.
.LP
Default is 3.
.IP "\fB-height=\fR\fIn\fR"
Height of the median mask to apply.
.LP
Default is 3.
.IP "\fB-type\fR \fImedian_type\fR"
This option selects which method to use to find median regardless
of cutoff value. Choices are \fBhistogram_sort\fR and \fBselect\fR.
.LP
By default, \fBpgmmedian\fR decides which method to use as described
under the \fB-cutoff\fR option.
.RE
.SH 2
REFERENCES
.LP
.IP \(bu
"Collected Algorithms from ACM" Volume II, Algorithm 489
by Robert W. Floyd
.IP \(bu
"A Fast Two-Dimensional Median Filtering Algorithm" in
"IEEE Transactions on Acoustics, Speech, and Signal
Processing" Vol. ASSP-27, No. 1, February 1979
.IP \(bu
"Digital Image Processing Algorithms" by Ioannis
Pitas, Prentice Hall, 1993 ISBN 0-13-145814-0
.LP
.SH 2
SEE ALSO
.LP
pgmnoise,
pamaddnoise,
pgm
.SH 2
HISTORY
.LP
.LP
\fBpgmmedian\fR 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).
.SH 2
AUTHOR
.LP
Copyright (C) 1996 by Mike Burns <burns@cac.psu.edu>
.br
\l'5i'
.SH 2
Table Of Contents
.LP
.IP \(bu
SYNOPSIS
.IP \(bu
DESCRIPTION
.IP \(bu
OPTIONS
.IP \(bu
REFERENCES
.IP \(bu
SEE ALSO
.IP \(bu
HISTORY
.IP \(bu
AUTHOR
.LP
|