PIX3FILTER(1)

πŸ“¦ version 7.44.0, in nixpkgs unstable

πŸŽ€ PIX3FILTER(1) β€” pix3filter, brought to you by BRL-CAD πŸŽ€

✨ NAME ✨

pix3filter β€” apply a 3x3x3 convolution filter across three sequential pix files. That's the whole vibe: three frames, one tiny cube of math, and the middle frame gets the glow-up πŸ’…

🌸 SYNOPSIS 🌸

pix3filter [-f type] [-v] [-d divisor] [-o offset] [-w width] [-n height] [-s squaresize] {file.pix.N | file1.pix file2.pix file3.pix} > output.pix

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so pix3filter applies a 3x3x3 convolution kernel across a temporal sequence of three RGB pix(5) files. The three input frames are consecutive frames in an animation, and the kernel does its thing spatially over the X and Y axes of each frame plus temporally across all three frames. The filtered result for the middle frame goes to standard output. Main character energy only for the middle frame, periodt ✨

Images are assumed to be 512x512 pixels unless you override that. The outer border of the frame β€” the first and last scanlines and the first and last pixel of each scanline β€” is copied unchanged from the middle frame to the output. No touching the edges, bestie 🫢

You can feed the three input frames in two ways. Option one: give three explicit filenames in order. Option two: give a single filename ending in a dot and a frame number, like anim.pix.5, and pix3filter derives and reads the preceding and following frames (anim.pix.4 and anim.pix.6). For the special case of frame number 1, if the preceding frame (anim.pix.0) cannot be opened, the named frame is reused as the preceding frame. Cute little fallback, no cap πŸŽ€

🚨 Bestie, redirect that output! The output must be redirected; pix3filter refuses to write image data to a terminal.

πŸ‘‘ OPTIONS πŸ‘‘

  • -f type β€” selects the convolution kernel. The recognized types are lo (low pass, and yes it's the default), hi (high pass), b (boxcar average), and s (animation smear). Each kernel has its own built-in divisor: 84, 1, 53, and 69 respectively, in that order.
  • -v β€” verbose mode, aka the yapper setting. It prints the kernel coefficients to standard error before filtering, warns about result values outside the 0-255 range, and reports the maximum and minimum computed values when it's done. Lowkey useful for choosing a divisor or offset πŸ’–
  • -d divisor β€” overrides the kernel's built-in divisor. The convolution sum gets divided by this value. It may not be zero. Like, seriously, not zero β€” don't do that πŸ™ˆ
  • -o offset β€” overrides the kernel's built-in offset, which is added to each result after division. The default offset is 0.
  • -w width β€” sets the width of the input images in pixels. Default is 512.
  • -n height β€” sets the height (number of scanlines) of the input images. Default is 512.
  • -s squaresize β€” sets both width and height to squaresize. One number, both dimensions, slay πŸ¦‹
  • -h, -? β€” prints a usage message, including the list of available filter types, and exits. Helpful icon behavior πŸ’…

🌈 EXAMPLES 🌈

πŸ“ Example 1. Smooth the middle frame of an animation

pix3filter frame.pix.15 > smoothed.pix.15

This reads frame.pix.14, frame.pix.15, and frame.pix.16 as 512x512 frames, applies the default low-pass kernel, and writes the temporally and spatially smoothed middle frame to smoothed.pix.15. Doing this for each frame in a render reduces aliasing flicker between frames. The glow-up is real πŸ”₯

🧚 Example 2. Boxcar average of three explicit high-resolution frames

pix3filter -f b -s 1024 a.pix b.pix c.pix | pix-png -s 1024 > avg.png

This reads three explicit 1024x1024 frames, applies the boxcar average kernel, and pipes the result through pix-png(1) to produce a viewable PNG of the averaged center frame. Chef's kiss πŸ‘‘

⭐ SEE ALSO ⭐

brlcad(1), pixfilter(1), pixdiff(1), pix-png(1), pix(5)

πŸ’œ 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.


That's the page, bestie 🫢 Source/version: BRL-CAD. Date: not shown on this page, so no date to steal. Mwah πŸ’‹

πŸ“¦ where this page comes from