PIXFILTER(1)
π PIXFILTER(1) β the BRL-CAD glow-up filter π
okay bestie, grab a snack, because this one is literally the "make my image look different" tool and it's giving main character energy β¨
πΈ NAME πΈ
pixfilter β applies a 3x3 kernel filter to a color pix file π
β¨ SYNOPSIS β¨
pixfilter [-v] [-f type] [-d div] [-o offset] [-w width] [-n height] [-s squaresize] [file.pix] > newfile.pix
π DESCRIPTION π
so basically, pixfilter convolves a 3x3 kernel filter over a color pix(5) format image π¦. It reads from the named file.pix, or from standard input if you don't name one, and writes the result straight to standard output. slay.
The outermost rows and columns? They get copied through untouched β no filtering, no drama, they're just vibing as-is π .
Also, heads up: the input is assumed to be 512x512 pixels unless you pass -w, -n, or -s. No cap. A low-pass filter is what you get by default; you pick other kernels with -f π.
Now for the β¨mathβ¨ part, and it's actually important so listen up: each kernel divides the convolved result by a divisor to keep values in the 0β255 range (the boxcar average, for instance, divides by nine, bestie). Some kernels also add an offset. The Laplacian is centered about zero, so it adds 128 to express a difference from neutral grey π. And because you're the main character, the -d and -o options override a kernel's built-in divisor and offset whenever you feel like it π.
π«Ά OPTIONS π«Ά
-vβ verbose mode, bb β¨. Prints the kernel values and the resulting minimum and maximum pixel values on standard error.-f typeβ picks the filter kernel π. The recognizedtypevalues arelo(low pass, which is the default),hi(high pass),la(Laplacian),hg(horizontal gradient),vg(vertical gradient), andb(boxcar average).-d divβ divides the convolved result bydivinstead of the kernel's default divisor. It must be non-zero β like, don't even try it π.-o offsetβ addsoffsetto the result instead of the kernel's default offset.-w widthβ sets the input scanline width in pixels (default512).-n heightβ sets the number of scanlines in the input (default512).-s squaresizeβ sets both width and height tosquaresizepixels. one number, two jobs, iconic π.-h,-?β prints a usage message, including the list of filter types, and exits. your lil' help button π¦.
π EXAMPLES π
Example 1. Edge detection on a rendered image
rt -s 1024 -o scene.pix scene.g all.g
pixfilter -s 1024 -f la scene.pix > edges.pix
here's the tea β: this renders a 1024x1024 image with rt(1), then applies the Laplacian kernel to produce an edge-emphasized image whose values are centered on neutral grey β which is literally so useful for highlighting object boundaries. ate and left no crumbs π₯.
π SEE ALSO π
brlcad(1), pix3filter(1), pixscale(1), rt(1), pix(5)
go read those too, iykyk π
π BUGS π
This should allow any 3x3 kernel to be specified directly. (ngl, we're manifesting that for a future release β¨)
π 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 β they genuinely wanna hear from you, bestie, so don't be shy π
fr fr, don't forget the > newfile.pix redirect or your filtered pixels will just spill onto your terminal and that's a whole vibe check you don't want π
k bye ily, this has been the PIXFILTER(1) page from the BRL-CAD manual π
β¨ see you in the next one, and remember: outer rows and columns are literally just copy-pasted through untouched, periodt ππ¦π
π¦ 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