bwhist [-v] [file.bw]
BWHIST(1)
NAME
bwhist - display a histogram of a black and white bw file on a framebuffer
On this page
SYNOPSIS
DESCRIPTION
bwhist calculates and displays a histogram of the pixel values in a bw(5) format file. If a file is not specified, standard input is read. The histogram is displayed on the framebuffer selected via the FB_FILE environment variable (see brlcad(1)) opened at 512x512.
The relative frequency of each pixel value is drawn as a horizontal bar of white pixels along the x-axis, scaled so that the most frequent value spans the full width of the screen. The 256 pixel values map to the y-axis, with 0 (black) at the bottom and 255 (white) at the top. The pixel count corresponding to a full-width bar is always reported to standard output as a "Full screen = N pixels" line.
OPTIONS
- -v
-
Verbose: in addition to displaying the histogram, print each pixel value, its count, and its relative frequency to standard output. Must appear before the optional file argument.
- -h, -?
-
Print a usage summary and exit.
EXAMPLES
pix-bw scene.pix > scene.bw
bwhist -v scene.bw
Converts a color pix(5) image to black and white with pix-bw(1), then displays its intensity histogram on the framebuffer while dumping the per-value counts and frequencies to the terminal. The printed table makes it easy to spot clipping at 0 or 255 and to judge overall exposure before adjusting a render.
SEE ALSO
brlcad(1), bwhisteq(1), bwstat(1), bw(5)
BUGS
This program assumes the framebuffer has at least 512 scanlines to display the full histogram (2 lines per pixel value).
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