| 1 |
\ |
| 2 |
.\" This man page was generated by the Netpbm tool 'makeman' from HTML source. |
| 3 |
.\" Do not hand-hack it! If you have bug fixes or improvements, please find |
| 4 |
.\" the corresponding HTML page on the Netpbm website, generate a patch |
| 5 |
.\" against that, and send it to the Netpbm maintainer. |
| 6 |
.TH "Pnmsmooth User Manual" 1 "19 December 2009" "netpbm documentation" |
| 7 |
|
| 8 |
.SH NAME |
| 9 |
pnmsmooth - smooth out an image |
| 10 |
|
| 11 |
.UN synopsis |
| 12 |
.SH SYNOPSIS |
| 13 |
|
| 14 |
\fBpnmsmooth\fP |
| 15 |
[\fB-width=\fP\fIcols\fP] [\fB-height=\fP\fIrows\fP] |
| 16 |
[\fIpnmfile\fP] [\fB-size\fP] |
| 17 |
.PP |
| 18 |
Minimum unique abbreviations of options is acceptable. You may use double |
| 19 |
hyphens instead of single hyphen to denote options. You may use white |
| 20 |
space in place of the equals sign to separate an option name from its value. |
| 21 |
|
| 22 |
.UN description |
| 23 |
.SH DESCRIPTION |
| 24 |
.PP |
| 25 |
This program is part of |
| 26 |
.BR "Netpbm" (1)\c |
| 27 |
\&. |
| 28 |
.PP |
| 29 |
\fBpnmsmooth\fP smoothes out an image by replacing each pixel with the |
| 30 |
average of its width X height neighbors. It is implemented as a program that |
| 31 |
invokes \fBpnmconvol\fP with an appropriate convolution matrix. |
| 32 |
|
| 33 |
.UN options |
| 34 |
.SH OPTIONS |
| 35 |
.PP |
| 36 |
In addition to the options common to all programs based on libnetpbm |
| 37 |
(most notably \fB-quiet\fP, see |
| 38 |
.UR index.html#commonoptions |
| 39 |
Common Options |
| 40 |
.UE |
| 41 |
\&), \fBpnmsmooth\fP recognizes the following |
| 42 |
command line options: |
| 43 |
|
| 44 |
|
| 45 |
.TP |
| 46 |
\fB-width=\fP\fIcols\fP |
| 47 |
.TP |
| 48 |
\fB-height=\fP\fIrows\fP |
| 49 |
These options specify the dimensions of the convolution matrix. |
| 50 |
Default dimensions are 3 wide and 3 high. |
| 51 |
.sp |
| 52 |
Before Netpbm 10.49 (December 2009), the maximum size of the convolution |
| 53 |
matrix is limited by the maxval of the image such that width * height * 2 must |
| 54 |
not exceed the maxval. (use \fBpamdepth\fP to increase the maxval if |
| 55 |
necessary). |
| 56 |
.sp |
| 57 |
These options were new in Netpbm 10.32 (February 2006). Before that, |
| 58 |
use \fB-size\fP. |
| 59 |
|
| 60 |
.TP |
| 61 |
\fB-size\fP |
| 62 |
This deprecated option exists in current Netpbm for backward |
| 63 |
compatibility. It was obsoleted by \fB-width\fP and \fB-height\fP |
| 64 |
in Netpbm 10.32 (February 2006). |
| 65 |
.sp |
| 66 |
When you use this option, the first two program arguments are the width |
| 67 |
and height, respectively, of the convolution matrix and do the same thing |
| 68 |
as the \fB-width\fP and \fB-height\fP option values. The third |
| 69 |
(optional) program argument is the input file name. |
| 70 |
.sp |
| 71 |
In reality, in old \fBpnmsmooth\fP, the width and height are two |
| 72 |
values of the \fB-size\fP option, but the modern Netpbm command syntax |
| 73 |
paradigm doesn't allow an option with multiple values, so instead |
| 74 |
\fB-size\fP is an option with no value and width and height are program |
| 75 |
arguments. That has the fortunate effect of making the following command |
| 76 |
mean the same in current \fBpnmsmooth\fP as in old \fBpnmsmooth\fP: |
| 77 |
.nf |
| 78 |
\f(CW |
| 79 |
pnmsmooth -size 5 5 infile.ppm >outfile.ppm |
| 80 |
\fP |
| 81 |
|
| 82 |
.fi |
| 83 |
|
| 84 |
.TP |
| 85 |
\fB-dump=\fP\fIdumpfile\fP |
| 86 |
This options makes \fBpnmsmooth\fP only show you the |
| 87 |
convolution matrix. It writes to Standard Output a \fBpnmconvol\fP |
| 88 |
\fB-matrix\fP option value that represents the matrix. It does not |
| 89 |
invoke \fBpnmconvol\fP and does not produce an output image. |
| 90 |
.sp |
| 91 |
Before Netpbm 10.49 (December 2009), this option is rather different. |
| 92 |
It takes a file name as a value, and it writes to that file the |
| 93 |
convolution matrix as a PGM file (as used to be the normal input for |
| 94 |
\fBpnmconvol\fP). |
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
.UN seealso |
| 101 |
.SH SEE ALSO |
| 102 |
.BR "pnmconvol" (1)\c |
| 103 |
\&, |
| 104 |
.BR "pnm" (1)\c |
| 105 |
\& |
| 106 |
|
| 107 |
.UN history |
| 108 |
.SH HISTORY |
| 109 |
.PP |
| 110 |
Before Netpbm 10.32 (February 2006), \fBpnmsmooth\fP did not use |
| 111 |
the modern Netpbm command line parser, so had an unconventional command line |
| 112 |
syntax. Most importantly, you could not use an equal sign or double |
| 113 |
hyphens in the options. |
| 114 |
.PP |
| 115 |
Before Netpbm 10.49 (December 2009), there was a \fB-dump\fP option. |
| 116 |
This strange option caused \fBpnmsmooth\fP not to do any smoothing or |
| 117 |
produce any output image but instead write the convolution matrix it |
| 118 |
would have used, as PGM file such as \fBpnmconvol\fP used to use, to |
| 119 |
a file you specify. The idea was you could then use that file with a |
| 120 |
separate invocation of \fBpnmconvol\fP. |
| 121 |
.PP |
| 122 |
Then, in Netpbm 10.49, there was a rather different \fB-dump\fP |
| 123 |
option with a similar purpose: It caused \fBpnmsmooth\fP to write to |
| 124 |
Standard Error a string suitable as a value for the \fBpnmconvol\fP |
| 125 |
\fB-matrix\fP option (an option that was new in Netpbm 10.49). |
| 126 |
.PP |
| 127 |
But in Netpbm 10.51 (June 2010), \fBpnmconvol\fP started using the even |
| 128 |
newer \fBpnmconvol\fP \fB-normalize\fP option (new in 10.50), which made |
| 129 |
specifying the convolution matrix for the kind of smoothing that |
| 130 |
\fBpnmsmooth\fP does trivial, so \fB-dump\fP disappeared from |
| 131 |
\fBpnmsmooth\fP. |
| 132 |
.PP |
| 133 |
(There were also ease of implementation issues that kept us from simply |
| 134 |
keeping the original \fB-dump\fP around for backward compatibility: As we |
| 135 |
modified \fBpnmsmooth\fP to take advantage of the new features of |
| 136 |
\fBpnmconvol\fP, which \fBpnmsmooth\fP uses internally, the information |
| 137 |
needed to implement \fB-dump\fP was no longer available in the program). |
| 138 |
.SH DOCUMENT SOURCE |
| 139 |
This manual page was generated by the Netpbm tool 'makeman' from HTML |
| 140 |
source. The master documentation is at |
| 141 |
.IP |
| 142 |
.B http://netpbm.sourceforge.net/doc/pnmsmooth.html |
| 143 |
.PP |