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.   In  the
26       case  of  a PGM or PPM or PAM equivalent (i.e. a visual image), this is
27       not the same as the light intensities  represented  by  those  samples.
28       See  the  format  specifications of PGM(1), PPM(1), and PAM(1), for the
29       precise meanings of samples in these formats.  If you want to do arith‐
30       metic on light intensities of such a visual image, you can use pnmgamma
31       to convert it to one with samples proportional to light intensity,  and
32       then use pamsumm on the result.
33
34       If  you  want  to  summarize  by  column (e.g. add up the columns sepa‐
35       rately), use pamsummcol.  If you want to summarize by row, use a combi‐
36       nation  of pamsummcol and pamflip.  If you want to summarize a particu‐
37       lar plane, use pamchannel to extract it and then pamsumm.
38
39
40

OPTIONS

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

SEE ALSO

108       pamsummcol(1), pam(1),
109
110

HISTORY

112       pamsumm was added to Netpbm in Release 10.21 (March 2004).
113

DOCUMENT SOURCE

115       This  manual  page was generated by the Netpbm tool 'makeman' from HTML
116       source.  The master documentation is at
117
118              http://netpbm.sourceforge.net/doc/pamsumm.html
119
120netpbm documentation            26 October 2012         Pamsumm User Manual(0)
Impressum