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 you want a result that is independent of maxval but still in
76                   integers, and your input is PNM, you can use pamdepth to
77                   convert  to some standard maxval.  For example, if you want
78              the mean
79                   intensity of a PPM image, on a scale of 0 to 99, do
80
81                  pamdepth 99 myimage.ppm | pamsumm -mean
82
83              This option was new in Netpbm 10.22 (April 2004)
84
85
86       -brief
87
88              This option causes pamsumm to display the answer as a bare
89                   number, rather than in a complete sentence.
90
91              This option was new in Netpbm 10.22 (April 2004)
92
93
94
95

SEE ALSO

97       pamsumm(1), pam(1),
98
99

HISTORY

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