1Pnmsmooth User Manual(0) Pnmsmooth User Manual(0)
2
3
4
6 pnmsmooth - smooth out an image
7
8
10 pnmsmooth [-width=cols] [-height=rows] [pnmfile] [-size]
11
12 Minimum unique abbreviations of options is acceptable. You may use
13 double hyphens instead of single hyphen to denote options. You may use
14 white space in place of the equals sign to separate an option name from
15 its value.
16
17
19 This program is part of Netpbm(1).
20
21 pnmsmooth smoothes out an image by replacing each pixel with the aver‐
22 age of its width X height neighbors. It is implemented as a progam
23 that invokes pnmconvol with an appropriate convolution matrix.
24
25
27 In addition to the options common to all programs based on libnetpbm
28 (most notably -quiet, see
29 Common Options ⟨index.html#commonoptions⟩ ), pnmsmooth recognizes the
30 following command line options:
31
32
33
34 -width=cols
35
36 -height=rows
37 These options specify the dimensions of the convolution matrix.
38 Default dimensions are 3 wide and 3 high.
39
40 Before Netpbm 10.49 (December 2009), the maximum size of the
41 convolution matrix is limited by the maxval of the image such
42 that width * height * 2 must not exceed the maxval. (use
43 pamdepth to increase the maxval if necessary).
44
45 These options were new in Netpbm 10.32 (February 2006). Before
46 that, use -size.
47
48
49 -size This deprecated option exists in current Netpbm for backward
50 compatibility. It was obsoleted by -width and -height in Netpbm
51 10.32 (February 2006).
52
53 When you use this option, the first two program arguments are
54 the width and height, respectively, of the convolution matrix
55 and do the same thing as the -width and -height option values.
56 The third (optional) program argument is the input file name.
57
58 In reality, in old pnmsmooth, the width and height are two val‐
59 ues of the -size option, but the modern Netpbm command syntax
60 paradigm doesn't allow an option with multiple values, so in‐
61 stead -size is an option with no value and width and height are
62 program arguments. That has the fortunate effect of making the
63 following command mean the same in current pnmsmooth as in old
64 pnmsmooth:
65 pnmsmooth -size 5 5 infile.ppm >outfile.ppm
66
67
68
69 -dump=dumpfile
70 This options makes pnmsmooth only show you the convolution ma‐
71 trix. It writes to Standard Output a pnmconvol -matrix option
72 value that represents the matrix. It does not invoke pnmconvol
73 and does not produce an output image.
74
75 Before Netpbm 10.49 (December 2009), this option is rather dif‐
76 ferent. It takes a file name as a value, and it writes to that
77 file the convolution matrix as a PGM file (as used to be the
78 normal input for pnmconvol).
79
80
81
82
83
84
86 pnmconvol(1), pnm(1)
87
88
90 Before Netpbm 10.32 (February 2006), pnmsmooth did not use the modern
91 Netpbm command line parser, so had an unconventional command line syn‐
92 tax. Most importantly, you could not use an equal sign or double hy‐
93 phens in the options.
94
95 Before Netpbm 10.49 (December 2009), there was a -dump option. This
96 strange option caused pnmsmooth not to do any smoothing or produce any
97 output image but instead write the convolution matrix it would have
98 used, as PGM file such as pnmconvol used to use, to a file you specify.
99 The idea was you could then use that file with a separate invocation of
100 pnmconvol.
101
102 Then, in Netpbm 10.49, there was a rather different -dump option with a
103 similar purpose: It caused pnmsmooth to write to Standard Error a
104 string suitable as a value for the pnmconvol -matrix option (an option
105 that was new in Netpbm 10.49).
106
107 But in Netpbm 10.51 (June 2010), pnmconvol started using the even newer
108 pnmconvol -normalize option (new in 10.50), which made specifying the
109 convolution matrix for the kind of smoothing that pnmsmooth does triv‐
110 ial, so -dump disappeared from pnmsmooth.
111
112 (There were also ease of implementation issues that kept us from simply
113 keeping the original -dump around for backward compatibility: As we
114 modified pnmsmooth to take advantage of the new features of pnmconvol,
115 which pnmsmooth uses internally, the information needed to implement
116 -dump was no longer available in the program).
117
119 This manual page was generated by the Netpbm tool 'makeman' from HTML
120 source. The master documentation is at
121
122 http://netpbm.sourceforge.net/doc/pnmsmooth.html
123
124netpbm documentation 19 December 2009 Pnmsmooth User Manual(0)