1Pamsumm User Manual(0) Pamsumm User Manual(0)
2
3
4
6 pamsumm - Summarize the samples in a Netpbm image arithmetically
7
8
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
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
42 You must specify exactly one of -sum, -mean, -min, or -max.
43
44
45
46 -sum
47
48 This option makes the summary function addition.
49
50
51 -mean
52
53 This option makes the summary function arithmetic mean.
54
55
56 -min
57
58 This option makes the summary function arithmetic minimum.
59
60
61 -max
62
63 This option makes the summary function arithmetic maximum.
64
65
66 -normalize
67
68 This option causes each sample to be normalized to a fraction
69 (in the range 0..1) so the result is independent of the
70 image's
71 maxval. E.g. if you request the mean of an image which has
72 maxval
73 200 and all the samples have value 50, pamsumm will give
74 you
75 50 as an answer. But pamsumm -normalize will give you .25.
76
77 If instead you want a result that is independent of maxval but
78 still
79 in integers, you can use pamdepth to convert the input to
80 some
81 standard maxval and not use -normalize. For example, if
82 you want
83 the mean brightness of a PPM image, on a scale of 0 to 99,
84 do
85
86 pamdepth 99 myimage.ppm | pamsumm -mean
87
88 This option was new in Netpbm 10.22 (April 2004)
89
90
91 -brief
92
93 This option causes pamsumm to display the answer as a bare
94 number, rather than in a complete sentence.
95
96 This option was new in Netpbm 10.22 (April 2004)
97
98
99
100
102 pamsummcol(1), pam(1),
103
104
106 pamsumm was added to Netpbm in Release 10.21 (March 2004).
107
109 This manual page was generated by the Netpbm tool 'makeman' from HTML
110 source. The master documentation is at
111
112 http://netpbm.sourceforge.net/doc/pamsumm.html
113
114netpbm documentation 26 October 2012 Pamsumm User Manual(0)