| 1 |
\ |
| 2 |
.\" This man page was generated by the Netpbm tool 'makeman' from HTML source. |
| 3 |
.\" Do not hand-hack it! If you have bug fixes or improvements, please find |
| 4 |
.\" the corresponding HTML page on the Netpbm website, generate a patch |
| 5 |
.\" against that, and send it to the Netpbm maintainer. |
| 6 |
.TH "Pnmhistmap User Manual" 1 "13 July 2009" "netpbm documentation" |
| 7 |
|
| 8 |
.SH NAME |
| 9 |
pnmhistmap - draw a histogram for a PGM or PPM file |
| 10 |
|
| 11 |
.UN synopsis |
| 12 |
.SH SYNOPSIS |
| 13 |
|
| 14 |
\fBpnmhistmap\fP |
| 15 |
|
| 16 |
[\fB-red\fP] [\fB-green\fP] [\fB-blue\fP] |
| 17 |
|
| 18 |
[\fB-black\fP] [\fB-white\fP] |
| 19 |
|
| 20 |
[\fB-max\fP \fIN\fP] |
| 21 |
|
| 22 |
[\fB-lval\fP] [\fB-rval\fP] |
| 23 |
|
| 24 |
[\fB-height\fP] [\fB-width\fP] |
| 25 |
|
| 26 |
[\fB-dots\fP] |
| 27 |
|
| 28 |
[\fB-verbose\fP] |
| 29 |
|
| 30 |
[\fIpnmfile\fP] |
| 31 |
.PP |
| 32 |
Minimum unique abbreviation of option is acceptable. You may use |
| 33 |
double hyphens instead of single hyphen to denote options. You may use |
| 34 |
white space in place of the equals sign to separate an option name |
| 35 |
from its value. |
| 36 |
|
| 37 |
.UN description |
| 38 |
.SH DESCRIPTION |
| 39 |
.PP |
| 40 |
This program is part of |
| 41 |
.BR "Netpbm" (1)\c |
| 42 |
\&. |
| 43 |
.PP |
| 44 |
\fBpnmhistmap\fP reads a PNM image as input and produces an image |
| 45 |
showing a histogram of the color (or gray) values in the input. A PGM |
| 46 |
input results in a PBM output. A PPM input results in a PPM output |
| 47 |
with three overlaid histograms: a red one for the red input, a green |
| 48 |
one for the green input, and a blue one for the blue input. |
| 49 |
.PP |
| 50 |
For example, from the following image produces the following histogram: |
| 51 |
.PP |
| 52 |
.B image |
| 53 |
.IMG -C testimg.png |
| 54 |
.B histogram from image |
| 55 |
.IMG -C testimg_histbar.png |
| 56 |
.PP |
| 57 |
If the input is PBM, \fBpnmhistmap\fP produces an error message |
| 58 |
and no output image. |
| 59 |
|
| 60 |
.UN options |
| 61 |
.SH OPTIONS |
| 62 |
.PP |
| 63 |
In addition to the options common to all programs based on libnetpbm |
| 64 |
(most notably \fB-quiet\fP, see |
| 65 |
.UR index.html#commonoptions |
| 66 |
Common Options |
| 67 |
.UE |
| 68 |
\&), \fBpnmhistmap\fP recognizes the following |
| 69 |
command line options: |
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
.TP |
| 74 |
\fB-red\fP |
| 75 |
.TP |
| 76 |
\fB-green\fP |
| 77 |
.TP |
| 78 |
\fB-blue\fP |
| 79 |
Include the indicated color component in the output. If you |
| 80 |
specify none of these, \fBpnmhistmap\fP include all three. |
| 81 |
.sp |
| 82 |
These options are meaningless if the input is PGM. |
| 83 |
.sp |
| 84 |
These options were new in Netpbm 10.26 (January 2005). Before |
| 85 |
that, \fBpnmhistmap\fP always included all three color components. |
| 86 |
|
| 87 |
.TP |
| 88 |
\fB-dots\fP |
| 89 |
Plot the histogram as dots. By default, \fBpnmhistmap\fP plots |
| 90 |
bars. |
| 91 |
.sp |
| 92 |
Example of dots:.B -dots example |
| 93 |
.IMG -C testimg_histdot.png |
| 94 |
.sp |
| 95 |
This option was new in Netpbm 10.26 (January 2005). Before that, |
| 96 |
\fBpnmhistmap\fP always plotted bars. |
| 97 |
|
| 98 |
.TP |
| 99 |
\fB-lval\fP \fIminpixval\fP |
| 100 |
.TP |
| 101 |
\fB-rval\fP \fImaxpixval\fP |
| 102 |
These options specify the range of intensity values to include. |
| 103 |
\fBpnmhistmap\fP ignores intensities less than \fIminpixval\fP and |
| 104 |
greater than \fImaxpixval\fP. So the left side of the histogram |
| 105 |
corresponds to \fIminpixval\fP and the right side corresponds to |
| 106 |
\fImaxpixval\fP. |
| 107 |
.sp |
| 108 |
By default, \fBpnmhistmap\fP plots the entire possible range: zero |
| 109 |
to the maxval. |
| 110 |
.sp |
| 111 |
These options were new in Netpbm 10.26 (January 2005). Before that, |
| 112 |
\fBpnmhistmap\fP always plotted from zero to the maxval. |
| 113 |
|
| 114 |
.TP |
| 115 |
-height |
| 116 |
.TP |
| 117 |
-width |
| 118 |
These options specify the dimensions, in pixels of the histogram image. |
| 119 |
.sp |
| 120 |
The default height is 200 pixels. |
| 121 |
.sp |
| 122 |
The default width is one pixel for each plotted intensity value (so it's |
| 123 |
controlled by the maxval of the image and the \fB-lval\fP and \fB-rval\fP |
| 124 |
options). The "count buckets" in the histogram are always |
| 125 |
one pixel wide. If you specify a width less than the number of plotted |
| 126 |
intensity values, a bucket represents more than one intensity value. |
| 127 |
If you specify a width greater that the number of plotted intensity values, |
| 128 |
some buckets represent no color (the count is zero). |
| 129 |
.sp |
| 130 |
This option was new in Netpbm 10.26 (January 2005). Before that, |
| 131 |
the dimensions were always what the default is today. |
| 132 |
|
| 133 |
.TP |
| 134 |
\fB-black \fP |
| 135 |
Ignore the count of black pixels when scaling the histogram. |
| 136 |
|
| 137 |
.TP |
| 138 |
\fB-white\fP |
| 139 |
Ignore the count of white pixels when scaling the histogram. |
| 140 |
.sp |
| 141 |
The -black and -white options, which can be used separately or |
| 142 |
together, are useful for images with a large percentage of pixels |
| 143 |
whose value is zero or 255, which can cause the remaining histogram |
| 144 |
data to become unreadably small. Note that, for color inputs, these |
| 145 |
options apply to all colors; if, for example, the input has a large |
| 146 |
number of bright-red areas, you will probably want to use the -white |
| 147 |
option. |
| 148 |
|
| 149 |
.TP |
| 150 |
\fB-max N\fP |
| 151 |
Force the scaling of the histogram to use N as the largest-count value. |
| 152 |
This is useful for inputs with a large percentage of single-color pixels |
| 153 |
which are not black or white. |
| 154 |
|
| 155 |
.TP |
| 156 |
\fB-verbose\fP |
| 157 |
Report the progress of making the histogram, including the largest-count |
| 158 |
value used to scale the output. |
| 159 |
|
| 160 |
|
| 161 |
|
| 162 |
|
| 163 |
.UN limitations |
| 164 |
.SH LIMITATIONS |
| 165 |
.PP |
| 166 |
\fBpnmhistmap\fP assumes maxval is always 255. Images with a |
| 167 |
smaller maxval will only use the lower-value side of the histogram. |
| 168 |
You can overcome this either by piping the input through |
| 169 |
\fBpamdepth\fP or by cutting and scaling the lower-value side of the |
| 170 |
histogram. Neither is a particularly elegant solution to the problem. |
| 171 |
|
| 172 |
.UN seealso |
| 173 |
.SH SEE ALSO |
| 174 |
.BR "pgmhist" (1)\c |
| 175 |
\&, |
| 176 |
.BR "ppmhist" (1)\c |
| 177 |
\&, |
| 178 |
.BR "pgm" (1)\c |
| 179 |
\&, |
| 180 |
.BR "ppm" (1)\c |
| 181 |
\& |
| 182 |
|
| 183 |
.UN author |
| 184 |
.SH AUTHOR |
| 185 |
.PP |
| 186 |
Wilson H. Bent. Jr. (\[email protected]\fP). |
| 187 |
.SH DOCUMENT SOURCE |
| 188 |
This manual page was generated by the Netpbm tool 'makeman' from HTML |
| 189 |
source. The master documentation is at |
| 190 |
.IP |
| 191 |
.B http://netpbm.sourceforge.net/doc/pnmhistmap.html |
| 192 |
.PP |