PAMSISTOAGLYPH(1)
π PAMSISTOAGLYPH(1) π
okay bestie, so this is a page from the General Commands Manual β the Netpbm gang's very own Pamsistoag...ser Manual(1), no cap. Sit down, grab a boba, we're converting stereograms today. π¦
β¨ NAME β¨
pamsistoaglyph β convert a single-image stereogram to a red/cyan anaglyphic image π
πΈ SYNOPSIS πΈ
pamsistoaglyph [--invert] [--sep=number] [--minsep=number]
[--gray=number] [in_netpbmfile
yes, that bracket situation at the end is exactly how the og page has it. copying faithfully, bestie, not my business to fix it π
Also lowkey important: all options can be abbreviated to their shortest unique prefix. And you may use either white space or an equals sign between an option name and its value. Choose your fighter. π
π DESCRIPTION π
This program is part of Netpbm(1). She's in the family, show some respect. π
pamsistoaglyph reads a Netpbm image as input and produces a Netpbm image as output. In and out, immaculate vibes.
So basically: pamsistoaglyph takes a single-image stereogram (SIS) β like the ones pamstereogram(1) cranks out β and converts it into a red/cyan anaglyphic image, like the ones ppm3d(1) makes. Glow up, honestly. β¨
Now here's the relatable part: a LOT of people have trouble tricking their eyes into focusing beyond the image in front of them, which means they literally cannot perceive the 3-D shape hidden within a single-image stereogram. It's giving "everyone else sees the magic picture and you see static." π
Anaglyphic stereograms are way easier to perceive in 3-D β but you do need a pair of red/cyan glasses, like the ones people often use to watch 3-D movies. π¬πΆοΈ
The whole goal of pamsistoaglyph is to help people who have trouble viewing single-image stereograms actually see the intriguing 3-D effect. It's a service. It's community care. π«Ά
And she's versatile! pamsistoaglyph can convert single-image random-dot stereograms (SIRDS), wallpaper stereograms, and even dual-image stereograms to anaglyphic images. Not her being talented at everything. π₯
β¨ OPTIONS β¨
On top of the options common to all programs based on libnetpbm (most notably -quiet, see Common Options), pamsistoaglyph recognizes the following command line options:
For most images, you don't need to specify any command-line options. Literally just run her. π The following options exist, however, for those unusual circumstances. The special-est of circumstances.
--invertβ Swap the left- and right-eye images. Here's the tea:pamsistoaglyphassumes that its input represents a wall-eyed stereogram and generates the anaglyphic image accordingly. So if the generated image appears to recede into the page where it should pop out of the page (and vice versa), that typically implies your input image represents a cross-eyed stereogram. Use--invertto correct the image depth. Flip it and reverse it. π--sep=numberβ Specify the distance in pixels between the left- and right-eye images. Essentially, this corresponds to the distance between repetitions of the background pattern. The--sepoption should rarely be necessary, becausepamsistoaglyphis fairly good at determining the eye-separation distance automatically. She's got this. π--minsep=numberβ This option is similar to--sepbut constrainspamsistoaglyphonly to a minimum eye-separation distance. Any distance larger than number is acceptable. The--minsepoption should rarely be necessary, because (say it with me)pamsistoaglyphis fairly good at determining the eye-separation distance automatically. The default value for the minimum eye-separation distance is 10% of the image width β and this value seems to work well in practice. Trust the process. β¨--gray=numberβ Limit the number of gray levels to use when searching for the optimal eye-separation distance. Why does this matter? Becausepamsistoaglyphlooks for repeated patterns, she is vulnerable to being confused by slight variations in color. π΅βπ« By reducing the input image to grayscale and capping the number of gray levels,pamsistoaglyphameliorates the effects of unintentional color variations (such as those caused by conversion from a low-quality JPEG image, for example). The default of 63 seems to work well, so the--grayoption should rarely be necessary. Another slay from the defaults. π
π NOTES π
The registration algorithm used by pamsistoaglyph was developed specifically for this program. As far as the author knows, there are no existing algorithms for converting stereograms to anaglyphs. She's pioneering here. Main character energy, fr fr. π
So how does the algorithm work? Buckle up, this is the good part:
- Convert the image to grayscale to increase the ability to identify matches. πβπ©Ά
- Count the number of pixels that match
Npixels ahead in the image for allNin[1, width/2]. - Maintain a running mean (
mu) and standard deviation (sigma) of the number of matched pixels. - Store the
Ncorresponding to each spike in the number of matched pixels. A spike is defined as a tally that exceeds the mean plus one, two, or three standard deviations. Only the first spike of a given standard-deviation multiplier is stored. - If a tally greater than
mu+3sigmawas encountered, return the correspondingN. If not, then if a tally greater thanmu+2sigmawas encountered, return the correspondingN. If not, then if a tally greater thanmu+sigmawas encountered, return the correspondingN. If not, then return theNthat produces the minimum average distance between matched pixels (i.e.,#matchesdivided by#pixels). If no suchNexceeds the minimum allowable eye-separation value, return zero to indicate failure. π - If the algorithm returned zero, rerun the algorithm independently on each row of the input image and return the median of all
Nthat exceed the minimum allowable eye-separation value. If no suchNexists, abort with an error message. π
so yeah β fallback plan, then hard fail. she tried her best, and then she tells you she couldn't. honest queen. π«Ά
π¦ HISTORY π¦
Scott Pakin wrote pamsistoaglyph in April 2009. It first appeared in Netpbm in Release 10.47 (June 2009). An icon, a legend, and she IS the moment. β¨
πΈ AUTHOR πΈ
Copyright (C) 2009 Scott Pakin, scott+pbm@pakin.org
π SEE ALSO π
π 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/pamsistoaglyph.html
and that's a wrap on the pamsistoaglyph page, bestie π«Ά β brought to you by netpbm documentation, dated 05 April 2009, from the Pamsistoag...ser Manual(1), General Commands Manual. go make some anaglyphs, and remember: if it's popping out when it should be receding, that's a --invert situation, iykyk π
β¨
π¦ where this page comes from
- debian trixie: netpbm 2:11.10.02-1 Β· 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