PAMBAYER(1)
π pambayer β Pambayer User Manual(1) π
okay bestie, welcome to the Pambayer User Manual section (1), General Commands Manual energy, and we're about to make Bayer patterns make sense. no cap.
β¨ NAME β¨
pambayer β interpret Bayer patterns
π¦ SYNOPSIS π¦
pambayer -type={1|2|3|4} [-nointerpolate] [pamfile]
okay so a few lil house rules about how you type this, because the option parser is chill like that:
- Minimum unique abbreviation of option is acceptable. so like, you don't gotta spell the whole thing out, just enough that it's unmistakably that option. slay.
- You may use double hyphens instead of single hyphen to denote options.
--typeand-typeare both valid, she's flexible π - You may use white space in place of the equals sign to separate an option name from its value. so
-type=1and-type 1both hit the same.
πΈ DESCRIPTION πΈ
This program is part of Netpbm(1). (yes, the whole big Netpbm family, we're all connected π«Ά)
pambayer reads a Bayer pattern in a 1-deep Netpbm image and produces a color image in PAM RGB format as output.
so what even is a Bayer pattern? bestie. gather round. π§
A Bayer pattern is what you get from the optical sensor in some digital cameras. Such a camera doesn't have a red, green, and blue sensor in the exact same place for an individual pixel. Instead, it has red, green, and blue sensors laid out in a two dimensional array. The pattern in which they are laid out is the Bayer pattern. The input to pambayer is one sample value for each of those sensors, so some samples are red, some are green, and some are blue. it's literally a mosaic of vibes.
pambayer turns that into a regular visual image with one pixel per sensor. For the two components of each pixel that are missing in the corresponding Bayer input, pambayer averages the sample values from the adjacent pixels that do have that component. math, but make it fashion β¨
But you can have pambayer fill in black instead (see the -noninterpolate option), which gives you a simpler representation of what the camera saw, on which you might do further processing. Such an image still looks right, though considerably dimmer, if you stand far enough away and let your eyes do the interpolation. (your eyeballs are the real MVP of image processing, fr fr π)
The input image is a pseudo-PNM image (pseudo- because while the structure is the same, the sample values have different meanings) or PAM image of arbitrary tuple type. pambayer looks at only the first plane of the input. just the first one. don't @ her about the rest.
The output image is a PAM image of tuple type "RGB", i.e. a standard color image. You can convert this to PPM with pamtopnm(1). π
If you're interested in just one of the primary colors, use pamchannel on the output of pambayer to extract it. pick your fighter π
π OPTIONS π
In addition to the options common to all programs based on libnetpbm (most notably -quiet, see Common Options), pambayer recognizes the following command line options:
-type=nβ This tells which Bayer pattern the input is:GBG/RGR/GBGmatrixRGR/GBG/RGRmatrixBGB/GRG/BGBmatrixGRG/BGB/GRGmatrix
π¨ bestie this one is mandatory. you cannot skip it. she needs to know the pattern. periodt.
-nointerpolateβ Each output pixel position corresponds to one position in the input Bayer pattern, which means only one of the three color components is supplied by the input. For the other two, this option says to user zero. Without it,pambayerinstead interpolates from the adjacent pixels that do have that color component.
This option was new in Netpbm 10.49 (December 2009). β¨
π₯ SEE ALSO π₯
cameratopam(1)pam(1)
π HISTORY π
pambayer was new in Netpbm 10.30 (October 2005). a whole icon born in 2005, we love to see it π
π DOCUMENT SOURCE π
This manual page was generated by the Netpbm tool makeman from HTML source. The master documentation is at
http://netpbm.sourceforge.net/doc/pambayer.html
that's the whole page bestie, go forth and demosaic responsibly π
~ netpbm documentation, from way back on 18 August 2005, and this is the Pambayer User Manual(1) signing off ππ«π¦
π¦ where this page comes from
- debian bookworm: netpbm 2:11.01.00-2 Β· MIT
- debian trixie: netpbm 2:11.10.02-1 Β· MIT
- ubuntu noble: netpbm 2:11.05.02-1.1build1 Β· MIT
- ubuntu resolute: netpbm 2:11.10.02-1build1 Β· MIT
- ubuntu stonking: netpbm 2:11.13.03+ds-2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms