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

NAME

6       pgmhist - print a histogram of the values in a PGM image
7
8

SYNOPSIS

10       pgmhist
11
12       [-median, -quartile, -decile]
13
14       [-forensic]
15
16       [-machine]
17
18       [pgmfile]
19
20

DESCRIPTION

22       This program is part of Netpbm(1).
23
24       pgmhist  reads  a PGM image as input and prints a histogram of the gray
25       values or other gray value distribution metrics.
26
27       If you specify none of -median, -quartile, or -decile, pgmhist prints a
28       complete  histogram showing how many pixels of each possible gray value
29       exist in the image.  Along with each gray value, it tells you how  many
30       pixels are more black and more white than it.
31
32       -median,  -quartile, and -decile options cause pgmhist instead to print
33       the indicated quantiles.  Each quantile is a gray value  that  actually
34       appears  in  the  image (as opposed to fractional values that are some‐
35       times used for quantiles).  The 3rd quartile is the  least  gray  value
36       for  which  at  least  75% of the pixels are as dark or darker than it.
37       The 4th quartile is the brightest gray value that appears in the image.
38
39
40

OPTIONS

42       You must specify exactly one of the ramp type options.
43
44
45       -median
46
47              This option causes pgmhist to print the median gray value.
48
49              You may specify at most one of -median, -quartile, and -decile.
50
51              This option was new in Netpbm 10.61 (December 2012).
52
53
54       -quartile
55
56              This option causes pgmhist to print the four quartile gray  val‐
57              ues.
58
59              You may specify at most one of -median, -quartile, and -decile.
60
61              This option was new in Netpbm 10.61 (December 2012).
62
63
64       -decile
65
66              This option causes pgmhist to print the ten decile gray values.
67
68              You may specify at most one of -median, -quartile, and -decile.
69
70              This option was new in Netpbm 10.61 (December 2012).
71
72
73       -forensic
74
75              With  this  option, pgmhist works on images that contain invalid
76              gray values.  Normally, like most Netpbm programs, pgmhist fails
77              if  it  encounters a gray value greater than the maxval that the
78              image declares.  The presence of such a value means the image is
79              invalid,  so  the  pixels  have no meaning.  But with -forensic,
80              pgmhist produces a histogram of the actual gray  values  without
81              regard  to  maxval.   It issues messages summarizing the invalid
82              pixels if there are any.
83
84              One use for this is to diagnose  the  problem  that  caused  the
85              invalid Netpbm image to exist.
86
87              There  is a small exception to the ability of pgmhist to process
88              invalid pixels even with -forensic: it can never process a  gray
89              value  greater  than  65535.  Note that in the rarely used Plain
90              PGM format, it is possible for a number  greater  than  that  to
91              appear where a gray value belongs.
92
93              This  option  was  new in Netpbm 10.66 (March 2014).  But Netpbm
94              older than 10.66 does not properly reject invalid sample values,
95              so the effect is very similar to -forensic.
96
97
98       -machine
99
100              This  option  causes  pgmhist  to print the information in a way
101              easily digestible by a machine as opposed to a human.
102
103              For the quantiles, there is one line per quantile,  in  quantile
104              order, and it consists of the gray value of the quantile in dec‐
105              imal with no leading zeroes.
106
107              For the full histogram output, it consists of one line per  pos‐
108              sible  gray  value  (whether  that value appears in the image or
109              not), in order of the gray values.  The  line  consists  of  two
110              tokens  separated  by a space.  The first is the gray value; the
111              second is the number of pixels in the image that have that  gray
112              value.  Both are decimal numbers without leading zeroes.
113
114              This option was new in Netpbm 10.61 (December 2012).
115
116
117
118
119

SEE ALSO

121       pnmnorm(1), ppmhist(1) pgm(1),
122
123

AUTHOR

125       Copyright (C) 1989 by Jef Poskanzer.
126

DOCUMENT SOURCE

128       This  manual  page was generated by the Netpbm tool 'makeman' from HTML
129       source.  The master documentation is at
130
131              http://netpbm.sourceforge.net/doc/pgmhist.html
132
133netpbm documentation             2 March 2014           Pgmhist User Manual(0)
Impressum