PIXSTAT(1)

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

πŸ’… PIXSTAT(1) β€” the BRL-CAD glow-up πŸ’…

okay so bestie, welcome to pixstat from the BRL-CAD fam 🫢 this little icon reads your color pix image and spills ALL the tea about its pixel intensities. no gatekeeping here ✨

✨ NAME ✨

pixstat β€” list statistics related to a color pix image 🌈

πŸŽ€ SYNOPSIS πŸŽ€

pixstat [-v] [file.pix]

πŸ¦‹ DESCRIPTION πŸ¦‹

So pixstat reads the pix(5) format file you hand it β€” or just takes standard input if you don't give it a file at all, no pressure πŸ’œ β€” and then reports a whole collection of statistics on the pixel intensities for each color plane (red, green, and blue). three channels, three sets of numbers, one very thorough little program πŸ‘‘

The values it reports are, in order:

  • the number of pixels β€” and the square root of that count, which equals the image dimension if the image is square 🧚 (cute math moment)
  • the minimum and maximum values
  • the mean
  • the median β€” that's the value below which half the pixels fall
  • the mode β€” the most frequently occurring value β€” plus the number of pixels at that value
  • the variance, standard deviation, and skew ⭐

ngl the way it does this is kind of iconic: the statistics are derived from a 256-bin histogram of the input, so a single pass over the file suffices and the computation is performed on the per-bin lump sums rather than on individual samples πŸ”₯ one pass, no re-reading, we love an efficient queen.

🌸 OPTIONS 🌸

  • -v β€” Verbose πŸ’… In addition to the summary statistics, it dumps the full histogram, one line per intensity value (0-255) giving the red, green, and blue bin counts. > heads up bestie: this flag must precede the optional input file name, no cap πŸ™ˆ

πŸ’– EXAMPLES πŸ’–

Example 1. Summarize a rendered frame πŸ–ΌοΈ

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 ✨ like a vibe check but for exposure, iykyk.

Example 2. Inspect the full value distribution from a render πŸ”

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 πŸ‘‘ pipe it straight in, no temp files, main character energy fr fr.


πŸ”— SEE ALSO πŸ”—

brlcad(1), pixhist(1), pixhist3d(1), bwstat(1), rt(1), pix(5)

go read those too, they're all part of the friend group 🫢

⭐ AUTHOR ⭐

BRL-CAD Team πŸ’œ

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 πŸ“§ don't suffer in silence bestie, tell them everything.


and that's the whole page πŸŽ€ brought to you by BRL-CAD β€” PIXSTAT(1) β€” go forth and stat your pixels, ily πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from