pixstat [-v] [file.pix]
PIXSTAT(1)
NAME
pixstat - list statistics related to a color pix image
On this page
SYNOPSIS
DESCRIPTION
pixstat reads the given pix(5) format file, or standard input if no file is given, and reports a collection of statistics on the pixel intensities for each color plane (red, green, and blue). The values reported are: the number of pixels (and the square root of that count, which equals the image dimension if the image is square); the minimum and maximum values; the mean; the median (the value below which half the pixels fall); the mode (most frequently occurring value) and the number of pixels at that value; and the variance, standard deviation, and skew.
The statistics are derived from a 256-bin histogram of the input, so a single pass over the file suffices and computation is performed on the per-bin lump sums rather than on individual samples.
OPTIONS
- -v
-
Verbose. In addition to the summary statistics, dump the full histogram, one line per intensity value (0-255) giving the red, green, and blue bin counts. This flag must precede the optional input file name.
EXAMPLES
pixstat moss.pix
Prints the per-channel min, max, mode, median, mean, standard deviation, variance, and skew for the image, a quick way to confirm an image is not over- or under-exposed before further processing.
rt -o - -s512 moss.g all.g | pixstat -v
Renders a 512x512 image of the moss.g model, pipes the raw pix(5) stream directly into pixstat, and emits both the summary statistics and the complete 256-line red/green/blue histogram for examining the value distribution.
SEE ALSO
brlcad(1), pixhist(1), pixhist3d(1), bwstat(1), rt(1), pix(5)
AUTHOR
BRL-CAD Team
COPYRIGHT
This software is Copyright (c) 1989-2026 by the United States Government as represented by U.S. Army Research Laboratory.
BUG REPORTS
Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org