BWHIST(1)
π BWHIST(1) β the histogram glow-up for your bw files π
okay so bestie, bwhist is from the BRL-CAD fam, and it's literally the moment your black-and-white image gets its vibe check on a framebuffer. let's get into it π
β¨ NAME β¨
bwhist β display a histogram of a black and white bw file on a framebuffer π
π¦ SYNOPSIS π¦
bwhist [-v] [file.bw]
π DESCRIPTION π
so here's the tea: bwhist calculates and displays a histogram of the pixel values in a bw(5) format file. if you don't specify a file, no worries β it just reads from standard input, lowkey chill like that π«Ά
the histogram shows up on the framebuffer selected via the FB_FILE environment variable (peep libfb(3) for the deets), and it's opened at 512x512.
the relative frequency of each pixel value gets drawn as a horizontal bar of white pixels along the x-axis β¨ and it's scaled so that the most frequent value spans the full width of the screen β main character bar energy, honestly π. the 256 pixel values map to the y-axis, with 0 (black) at the bottom and 255 (white) at the top. iconic vertical arrangement, no cap.
and the pixel count corresponding to a full-width bar? it's always reported to standard output as a Full screen = N pixels line. every single time. that's the rule π
π OPTIONS π
-vβ Verbose mode, bestie! in addition to displaying the histogram, this prints each pixel value, its count, and its relative frequency to standard output. π£οΈ but heads up: it must appear before the optional file argument. order matters, fr fr.-h,-?β Print a usage summary and exit. the classic "wait how does this work again" escape hatch π
πΈ EXAMPLES πΈ
Example 1. Inspect the tonal distribution of a rendered image π
pix-bw scene.pix > scene.bw
bwhist -v scene.bw
okay so what's happening here: it 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. π₯οΈβ¨
and like, the printed table is genuinely so useful β it makes it easy to spot clipping at 0 or 255 and to judge overall exposure before adjusting a render. it's giving "I actually know what I'm doing" energy ππ₯
π₯ 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 (that's 2 lines per pixel value). so if your framebuffer is shorter than thatβ¦ yeah, it's giving "not enough room for the whole vibe" π plan accordingly!
π 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 π§
and that's the whole page, bestie β go forth and histogram π
signing off: this lil doc is part of BRL-CAD, and it's dated with the BRL-CAD release info β catch you on the framebuffer side π§β¨
π¦ where this page comes from
- nixpkgs unstable: brlcad 7.44.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms