1Pnmhistmap User Manual(0) Pnmhistmap User Manual(0)
2
3
4
6 pnmhistmap - draw a histogram for a PGM or PPM file
7
8
10 pnmhistmap
11
12 [-red] [-green] [-blue]
13
14 [-black] [-white]
15
16 [-max N]
17
18 [-lval] [-rval]
19
20 [-height] [-width]
21
22 [-dots]
23
24 [-verbose]
25
26 [pnmfile]
27
28 Minimum unique abbreviation of option is acceptable. You may use dou‐
29 ble hyphens instead of single hyphen to denote options. You may use
30 white space in place of the equals sign to separate an option name from
31 its value.
32
33
35 This program is part of Netpbm(1).
36
37 pnmhistmap reads a PNM image as input and produces an image showing a
38 histogram of the color (or gray) values in the input. A PGM input
39 results in a PBM output. A PPM input results in a PPM output with
40 three overlaid histograms: a red one for the red input, a green one for
41 the green input, and a blue one for the blue input.
42
43 For example, from the following image produces the following histogram:
44
45 image histogram from image
46
47 If the input is PBM, pnmhistmap produces an error message and no output
48 image.
49
50
52 In addition to the options common to all programs based on libnetpbm
53 (most notably -quiet, see
54 Common Options ⟨index.html#commonoptions⟩ ), pnmhistmap recognizes the
55 following command line options:
56
57
58
59
60 -red
61
62 -green
63
64 -blue Include the indicated color component in the output. If you
65 specify none of these, pnmhistmap include all three.
66
67 These options are meaningless if the input is PGM.
68
69 These options were new in Netpbm 10.26 (January 2005). Before
70 that, pnmhistmap always included all three color components.
71
72
73 -dots Plot the histogram as dots. By default, pnmhistmap plots bars.
74
75 Example of dots:.B -dots example
76
77 This option was new in Netpbm 10.26 (January 2005). Before
78 that, pnmhistmap always plotted bars.
79
80
81 -lval minpixval
82
83 -rval maxpixval
84 These options specify the range of intensity values to include.
85 pnmhistmap ignores intensities less than minpixval and greater
86 than maxpixval. So the left side of the histogram corresponds
87 to minpixval and the right side corresponds to maxpixval.
88
89 By default, pnmhistmap plots the entire possible range: zero to
90 the maxval.
91
92 These options were new in Netpbm 10.26 (January 2005). Before
93 that, pnmhistmap always plotted from zero to the maxval.
94
95
96 -height
97
98 -width These options specify the dimensions, in pixels of the histogram
99 image.
100
101 The default height is 200 pixels.
102
103 The default width is one pixel for each plotted intensity value
104 (so it's controlled by the maxval of the image and the -lval and
105 -rval options). The "count buckets" in the histogram are always
106 one pixel wide. If you specify a width less than the number of
107 plotted intensity values, a bucket represents more than one
108 intensity value. If you specify a width greater that the number
109 of plotted intensity values, some buckets represent no color
110 (the count is zero).
111
112 This option was new in Netpbm 10.26 (January 2005). Before
113 that, the dimensions were always what the default is today.
114
115
116 -black Ignore the count of black pixels when scaling the histogram.
117
118
119 -white Ignore the count of white pixels when scaling the histogram.
120
121 The -black and -white options, which can be used separately or
122 together, are useful for images with a large percentage of pix‐
123 els whose value is zero or 255, which can cause the remaining
124 histogram data to become unreadably small. Note that, for color
125 inputs, these options apply to all colors; if, for example, the
126 input has a large number of bright-red areas, you will probably
127 want to use the -white option.
128
129
130 -max N Force the scaling of the histogram to use N as the largest-count
131 value. This is useful for inputs with a large percentage of
132 single-color pixels which are not black or white.
133
134
135 -verbose
136 Report the progress of making the histogram, including the
137 largest-count value used to scale the output.
138
139
140
141
142
144 pnmhistmap assumes maxval is always 255. Images with a smaller maxval
145 will only use the lower-value side of the histogram. You can overcome
146 this either by piping the input through pamdepth or by cutting and
147 scaling the lower-value side of the histogram. Neither is a particu‐
148 larly elegant solution to the problem.
149
150
152 pgmhist(1), ppmhist(1), pgm(1), ppm(1)
153
154
156 Wilson H. Bent. Jr. (whb@usc.edu).
157
159 This manual page was generated by the Netpbm tool 'makeman' from HTML
160 source. The master documentation is at
161
162 http://netpbm.sourceforge.net/doc/pnmhistmap.html
163
164netpbm documentation 13 July 2009 Pnmhistmap User Manual(0)