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

NAME

6       pamsumm - Summarize the samples in a Netpbm image arithmetically
7
8

SYNOPSIS

10       pamsumm  {  -sum  | -mean | -min | -max } [-normalize] [-brief] [image‐
11       file]
12
13       All options can be abbreviated to their shortest  unique  prefix.   You
14       may  use  two  hyphens instead of one.  You may separate an option name
15       and its value with white space instead of an equals sign.
16
17

DESCRIPTION

19       This program is part of Netpbm(1).
20
21       pamsumm reads a Netpbm image (PNM or PAM) and performs a summary  func‐
22       tion  over  all  the  samples  in all the rows, columns, and planes and
23       prints the result to Standard Output.
24
25       pamsumm performs the operation on the actual sample values, not on  the
26       light  intensities  represented by them in the case that the image is a
27       PGM or PPM image or PAM equivalent.  If you want to  do  arithmetic  on
28       light  intensities of such a visual image, you can use pnmgamma to con‐
29       vert it to one with samples proportional to light intensity,  and  then
30       use pamsumm on the result.
31
32       If  you  want  to  summarize  by  column (e.g. add up the columns sepa‐
33       rately), use pamsummcol.  If you want to summarize by row, use a combi‐
34       nation  of pamsummcol and pamflip.  If you want to summarize a particu‐
35       lar plane, use pamchannel to extract it and then pamsumm.
36
37
38

OPTIONS

40       You must specify exactly one of -sum, -mean, -min, or -max.
41
42
43
44       -sum
45
46              This option makes the summary function addition.
47
48
49       -mean
50
51              This option makes the summary function arithmetic mean.
52
53
54       -min
55
56              This option makes the summary function arithmetic minimum.
57
58
59       -max
60
61              This option makes the summary function arithmetic maximum.
62
63
64       -normalize
65
66              This option causes each sample to be normalized to a fraction
67                   (in the range 0..1) so the result  is  independent  of  the
68              image's
69                   maxval.  E.g. if you request the mean of an image which has
70              maxval
71                   200 and all the samples have value 50,  pamsumm  will  give
72              you
73                   50 as an answer.  But pamsumm -normalize will give you .25.
74
75              If  instead  you want a result that is independent of maxval but
76              still
77                   in integers, you can use pamdepth to convert the  input  to
78              some
79                   standard  maxval  and  not use -normalize.  For example, if
80              you want
81                   the mean intensity of a PPM image, on a scale of 0  to  99,
82              do
83
84                  pamdepth 99 myimage.ppm | pamsumm -mean
85
86              This option was new in Netpbm 10.22 (April 2004)
87
88
89       -brief
90
91              This option causes pamsumm to display the answer as a bare
92                   number, rather than in a complete sentence.
93
94              This option was new in Netpbm 10.22 (April 2004)
95
96
97
98

SEE ALSO

100       pamsumm(1), pam(1),
101
102

HISTORY

104       pamsumm was added to Netpbm in Release 10.21 (March 2004).
105
106
107
108netpbm documentation           07 February 2004         Pamsumm User Manual(0)
Impressum