.TL Pamsumm User Manual .SH 1 pamsumm .LP Updated: 07 February 2004 .br Table Of Contents .SH 2 NAME .LP pamsumm - Summarize the samples in a Netpbm image arithmetically .SH 2 SYNOPSIS .LP \fBpamsumm\fR { \fB-sum\fR | \fB-mean\fR | \fB-min\fR | \fB-max\fR } [\fB-normalize\fR] [\fB-brief\fR] [\fIimagefile\fR] .LP All options can be abbreviated to their shortest unique prefix. You may use two hyphens instead of one. You may separate an option name and its value with white space instead of an equals sign. .SH 2 DESCRIPTION .LP .LP This program is part of Netpbm. .LP \fBpamsumm\fR reads a Netpbm image (PNM or PAM) and performs a summary function over all the samples in all the rows, columns, and planes and prints the result to Standard Output. .LP \fBpamsumm\fR performs the operation on the actual sample values, not on the light intensities represented by them in the case that the image is a PGM or PPM image or PAM equivalent. If you want to do arithmetic on light intensities of such a visual image, you can use \fBpnmgamma\fR to convert it to one with samples proportional to light intensity, and then use \fBpamsumm\fR on the result. .LP If you want to summarize by column (e.g. add up the columns separately), use \fBpamsummcol\fR. If you want to summarize by row, use a combination of \fBpamsummcol\fR and \fBpamflip\fR. If you want to summarize a particular plane, use \fBpamchannel\fR to extract it and then \fBpamsumm\fR. .SH 2 OPTIONS .LP .LP You must specify exactly one of \fB-sum\fR, \fB-mean\fR, \fB-min\fR, or \fB-max\fR. .RS .IP "\fB-sum\fR" .LP This option makes the summary function addition. .IP "\fB-mean\fR" .LP This option makes the summary function arithmetic mean. .IP "\fB-min\fR" .LP This option makes the summary function arithmetic minimum. .IP "\fB-max\fR" .LP This option makes the summary function arithmetic maximum. .IP "\fB-normalize\fR" .LP This option causes each sample to be normalized to a fraction (in the range 0..1) so the result is independent of the image's maxval. E.g. if you request the mean of an image which has maxval 200 and all the samples have value 50, \fBpamsumm\fR will give you 50 as an answer. But \fBpamsumm -normalize\fR will give you .25. .LP If you want a result that is independent of maxval but still in integers, and your input is PNM, you can use \fBpamdepth\fR to convert to some standard maxval. For example, if you want the mean intensity of a PPM image, on a scale of 0 to 99, do .DS L \f(CW pamdepth 99 myimage.ppm | pamsumm -mean \fR.DE .LP This option was new in Netpbm 10.22 (April 2004) .IP "\fB-brief\fR" .LP This option causes \fBpamsumm\fR to display the answer as a bare number, rather than in a complete sentence. .LP This option was new in Netpbm 10.22 (April 2004) .RE .SH 2 SEE ALSO .LP \fBpamsumm\fR, \fBpam\fR, .SH 2 HISTORY .LP .LP \fBpamsumm\fR was added to Netpbm in Release 10.21 (March 2004). .br \l'5i' .SH 2 Table Of Contents .LP .IP \(bu NAME .IP \(bu SYNOPSIS .IP \(bu DESCRIPTION .IP \(bu OPTIONS .IP \(bu SEE ALSO .IP \(bu HISTORY .LP