.TL Pnmhistmap User Manual .SH 1 pnmhistmap .LP Updated: 25 October 1993 .br Table Of Contents .SH 2 NAME .LP pnmhistmap - draw a histogram for a PGM or PPM file .SH 2 SYNOPSIS .LP \fBpnmhistmap\fR [\fB-black\fR] [\fB-white\fR] [\fB-max\fR \fIN\fR] [\fB-verbose\fR] [\fIpnmfile\fR] .LP Minimum unique abbreviation of option is acceptable. You may use double hyphens instead of single hyphen to denote options. You may use white space in place of the equals sign to separate an option name from its value. .SH 2 DESCRIPTION .LP .LP This program is part of Netpbm. .LP \fBpnmhistmap\fR reads a PNM image as input and produces an image showing a histogram of the color (or gray) values in the input. A PGM input results in a PBM output. A PPM input results in a PPM output with three overlaid histograms: a red one for the red input, a green one for the green input, and a blue one for the blue input. .LP For example, from the following image produces the following histogram: .LP .LP If the input is PBM, \fBpnmhistmap\fR produces an error message and no output image. .SH 2 OPTIONS .LP .RS .IP "\fB-red\fR" .IP "\fB-green\fR" .IP "\fB-blue\fR" Include the indicated color component in the output. If you specify none of these, \fBpnmhistmap\fR include all three. .LP These options are meaningless if the input is PGM. .LP These options were new in Netpbm 10.26 (January 2005). Before that, \fBpnmhistmap\fR always included all three color components. .IP "\fB-dots\fR" Plot the histogram as dots. By default, \fBpnmhistmap\fR plots bars. .LP Example of dots: .LP This option was new in Netpbm 10.26 (January 2005). Before that, \fBpnmhistmap\fR always plotted bars. .IP "\fB-lval\fR \fIminpixval\fR" .IP "\fB-rval\fR \fImaxpixval\fR" These options specify the range of intensity values to include. \fBpnmhistmap\fR ignores intensities less than \fIminpixval\fR and greater than \fImaxpixval\fR. So the left side of the histogram corresponds to \fIminpixval\fR and the right side corresponds to \fImaxpixval\fR. .LP By default, \fBpnmhistmap\fR plots the entire possible range: zero to the maxval. .LP These options were new in Netpbm 10.26 (January 2005). Before that, \fBpnmhistmap\fR always plotted from zero to the maxval. .IP "-height" .IP "-width" These options specify the dimensions, in pixels of the histogram image. .LP The default height is 200 pixels. .LP The default width is one pixel for each plotted intensity value (so it's controlled by the maxval of the image and the \fB-lval\fR and \fB-rval\fR options). The "count buckets" in the histogram are always one pixel wide. If you specify a width less than the number of plotted intensity values, a bucket represents more than one intensity value. If you specify a width greater that the number of plotted intensity values, some buckets represent no color (the count is zero). .LP This option was new in Netpbm 10.26 (January 2005). Before that, the dimensions were always what the default is today. .RE .RS .IP "\fB-black \fR" Ignore the count of black pixels when scaling the histogram. .IP "\fB-white\fR" Ignore the count of white pixels when scaling the histogram. .RE .LP The -black and -white options, which can be used separately or together, are useful for images with a large percentage of pixels whose value is zero or 255, which can cause the remaining histogram data to become unreadbaly small. Note that, for pixmap inputs, these options apply to all colors; if, for example, the input has a large number of bright-red areas, you will probably want to use the -white option. .RS .IP "\fB-max N\fR" Force the scaling of the histogram to use N as the largest-count value. This is useful for inputs with a large percentage of single-color pixels which are not black or white. .IP "\fB-verbose\fR" Report the progress of making the histogram, including the largest-count value used to scale the output. .RE .SH 2 LIMITATIONS .LP .LP \fBpnmhistmap\fR assumes maxval is always 255. Images with a smaller maxval will only use the lower-value side of the histogram. You can overcome this either by piping the input through \fBpamdepth\fR or by cutting and scaling the lower-value side of the histogram. Neither is a particularly elegant solution to the problem. .LP The program does not allow you to specify the output size. .SH 2 SEE ALSO .LP pgmhist, ppmhist, pgm, ppm .SH 2 AUTHOR .LP .LP Wilson H. Bent. Jr. (whb@usc.edu). .br \l'5i' .SH 2 Table Of Contents .LP .IP \(bu NAME .IP \(bu SYNOPSIS .IP \(bu DESCRIPTION .IP \(bu OPTIONS .IP \(bu BUGS .IP \(bu SEE ALSO .IP \(bu AUTHOR .LP