PIXHIST(1)

πŸ“¦
version 7.44.0 Β· 2 versions
, in nixpkgs unstable

πŸ’… PIXHIST(1) β€” the BRL-CAD manual, bestie edition πŸŽ€

okay so real talk: this is pixhist, from the BRL-CAD manual pages, section 1. She's a little histogram girlie and she's about to show you exactly what's going on inside your pix file. let's get into it ✨


✨ NAME ✨

pixhist β€” displays a color histogram of a pix file on a framebuffer. that's it, that's the whole vibe 🌈


✨ SYNOPSIS ✨

pixhist [-v] [file.pix]

literally that simple, no cap 🫢


🌸 DESCRIPTION 🌸

so pixhist reads a pix(5) format color image and displays a per-channel histogram of its pixel values on the current framebuffer. iconic behavior honestly πŸ’…

if you don't hand her a file.pix, she just reads the image from standard input. no drama, she adapts. and the framebuffer she draws on? that's picked via the FB_FILE environment variable, falling back to the system default device (peep brlcad(1) for the deets).

now the fun part β€” the drawing. the histogram goes into a 512x512 framebuffer. each of the 256 possible intensity levels occupies two scan lines; level 0 is at the top of the display and level 255 is at the bottom πŸ‘‘

for each level, the relative frequency is drawn as a horizontal bar extending along the x axis, with the red, green, and blue channels overlaid on the same line. all three channels get scaled by the same factor so that the most populous bin spans the full width β€” no channel gets to be the main character here, they share the spotlight πŸŽ€

and heads up: the result is drawn over whatever is already on the display. she does not clean up after herself, she just layers 🫠

the peak bin count and the resulting scale factor are always reported on standard error. always. she's proud of her math πŸ“Š


πŸ’– OPTIONS πŸ’–

  • -v β€” Verbose mode, bestie. in addition to the framebuffer display, this prints the red, green, and blue counts (and the bar length) for each of the 256 levels on standard error. yes, all 256. she's thorough. if present, this flag must appear before the optional file name β€” order matters, don't test her πŸ™ˆ

πŸ”₯ EXAMPLES πŸ”₯

Example 1. Inspect the tonal distribution of a rendered image

rt -o frame.pix model.g component &&
pixhist -v frame.pix

so what's happening here: this renders a region to a pix(5) image with rt(1), then displays its color histogram on the framebuffer while also printing the per-level red, green, and blue counts to the terminal. two jobs, one command, she ate πŸ’€βœ¨

and the little reading tip they give you: heavy clustering of bins near level 0 or 255 indicates an underexposed or clipped image. so if all your bars are hanging out at the edges, your render is either hiding in the dark or blown out. noted, screenshotting, sending to the group chat πŸ“Έ


πŸ¦‹ SEE ALSO πŸ¦‹

brlcad(1), pixhist3d(1), pixstat(1), rt(1), pix(5)

(the whole friend group, go say hi πŸ’œ)


πŸ’€ BUGS πŸ’€

this program assumes the framebuffer has at least 512 lines in y to work with. that's the whole bug note. that's the assumption. don't come for her if your framebuffer is short, she warned you 😭


πŸ‘‘ AUTHOR πŸ‘‘

BRL-CAD Team β€” legends, fr fr 🫢


This software is Copyright (c) 1989-2026 by the United States Government as represented by U.S. Army Research Laboratory. (yes the whole range, 1989 through 2026, she's been around πŸ’…)


🌈 BUG REPORTS 🌈

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. don't be shy, they literally want to hear from you πŸ“¬


okay that's the whole page, you're officially a pixhist expert now, i'm so proud of you πŸ₯Ή and for the record, this whole thing came to you from BRL-CAD, page PIXHIST(1) β€” no date stamped on this one, so consider this your timeless little sign-off. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from