1Pgmmedian User Manual(0)                              Pgmmedian User Manual(0)
2
3
4

NAME

6       pgmmedian - apply a median filter to a PGM file
7
8

SYNOPSIS

10       pgmmedian
11
12       [-width=n]
13
14       [-height=n]
15
16       [-type=median_type]
17
18       [-cutoff=int]
19
20       [pnmfile]
21
22       Minimum  unique abbreviation of option is acceptable.  You may use dou‐
23       ble hyphens instead of single hyphen to denote options.   You  may  use
24       white space in place of the equals sign to separate an option name from
25       its value.
26
27
28

DESCRIPTION

30       This program is part of Netpbm(1).
31
32       pgmmedian applies a median filter to a PGM image, using either the his‐
33       togram sort or select kth value method to determine the median.
34
35       A  median  filter is a convolution filter in which the value of a pixel
36       in the output is the median of a certain set of pixels in the neighbor‐
37       hood  of  the  corresponding  input  pixel.  The effect is to eliminate
38       locally extreme values.  Such pixels typically show up as speckles.
39
40       See the -type and -cutoff options  for  information  on  how  pgmmedian
41       chooses between the two methods.
42
43
44

OPTIONS

46       In  addition  to  the options common to all programs based on libnetpbm
47       (most notably -quiet, see
48        Common Options ⟨index.html#commonoptions⟩ ), pgmmedian recognizes  the
49       following command line options:
50
51
52
53       -cutoff int
54              This  option  provides  the  cutoff value that pgmmedian uses to
55              decide between using the histogram  sort  or  select  kth  value
56              method to find the median.
57
58              If (maxval / ((width * height) - 1)), where maxval is the maxval
59              of the image and width and height  are  the  dimensions  of  the
60              mask,  is  less  than the cutoff value, pgmmedian uses histogram
61              sort.  Otherwise, it uses kth value.
62
63              This option has no effect if you specify -type.
64
65              The default is 250
66
67
68       -width=n
69              Width of the median mask to apply.
70
71              Default is 3.
72
73
74       -height=n
75              Height of the median mask to apply.
76
77              Default is 3.
78
79
80       -type median_type
81              This option selects which method to use to find  median  regard‐
82              less of cutoff value.  Choices are histogram_sort and select.
83
84              By  default,  pgmmedian decides which method to use as described
85              under the -cutoff option.
86
87
88
89

REFERENCES

91       ·      "Collected Algorithms from ACM"  Volume  II,  Algorithm  489  by
92              Robert W. Floyd
93
94
95       ·      "A  Fast  Two-Dimensional  Median  Filtering Algorithm" in "IEEE
96              Transactions on Acoustics, Speech, and Signal  Processing"  Vol.
97              ASSP-27, No. 1, February 1979
98
99
100       ·      "Digital Image Processing Algorithms" by Ioannis Pitas, Prentice
101              Hall, 1993 ISBN 0-13-145814-0
102
103
104
105
106

SEE ALSO

108       pgmnoise(1), pamaddnoise(1), pnmconvol(1), pgmmorphconv(1), pgm(1)
109
110

HISTORY

112       pgmmedian was added to Netpbm in Version 10.29 (August 2005).   It  had
113       been  distributed  by  Mike Burns via his own web site before that (and
114       continued to be so).
115
116
117

AUTHOR

119       Copyright (C) 1996 by Mike Burns <burns@cac.psu.edu>
120

DOCUMENT SOURCE

122       This manual page was generated by the Netpbm tool 'makeman'  from  HTML
123       source.  The master documentation is at
124
125              http://netpbm.sourceforge.net/doc/pgmmedian.html
126
127netpbm documentation            28 August 2005        Pgmmedian User Manual(0)
Impressum