diff options
-rw-r--r-- | directory.html | 6 | ||||
-rw-r--r-- | pamedge.html | 36 | ||||
-rw-r--r-- | pamsistoaglyph.html | 183 | ||||
-rw-r--r-- | pamstereogram.html | 2 |
4 files changed, 202 insertions, 25 deletions
diff --git a/directory.html b/directory.html index 98646d88..af157486 100644 --- a/directory.html +++ b/directory.html @@ -623,8 +623,10 @@ All of these generate Netpbm format output. create a Universal Product Code PBM image <DT><B><a href=pamstereogram.html>pamstereogram</a> </B> -<DD> - create a single image stereogram from a height map +<DD>create a single image stereogram from a height map + +<DT><B><a href=pamsistoaglyph.html>pamsistoaglyph</a> </B> +<DD>convert a single-image stereogram to a red/cyan anaglyphic image <DT><B><a href=ppmwheel.html>ppmwheel</a> </B> <DD> diff --git a/pamedge.html b/pamedge.html index e68960fb..18675a9a 100644 --- a/pamedge.html +++ b/pamedge.html @@ -7,17 +7,14 @@ Updated: 11 January 2003 <A HREF="#index">Table Of Contents</A> -<A NAME="lbAB"> </A> <H2>NAME</H2> pamedge - edge-detect an image -<A NAME="lbAC"> </A> -<H2>SYNOPSIS</H2> +<H2 id="synopsis">SYNOPSIS</H2> <B>pamedge</B> [<I>imagefile</I>] -<A NAME="lbAD"> </A> -<H2>DESCRIPTION</H2> +<H2 id="description">DESCRIPTION</H2> <p>This program is part of <a href="index.html">Netpbm</a>. @@ -36,12 +33,11 @@ two Sobel gradient operators at 90 degrees to each other. For more details see "Digital Image Processing" by Gonzalez and Wintz, chapter 7. -<P>The maxval of the output is the same as the maxval of the input. -The effect is better with larger maxvals, so you may want to increase -the maxval of the input by running it through <B>pamdepth</B> first. +<P>The maxval of the output is the same as the maxval of the input, except at +least 255. The effect is better with larger maxvals, so you may want to +increase the maxval of the input by running it through <B>pamdepth</B> first. -<A NAME="lbAE"> </A> -<H2>SEE ALSO</H2> +<H2 id="seealso">SEE ALSO</H2> <B><A HREF="pgmenhance.html">pgmenhance</A></B>, <B><A HREF="pamditherbw.html">pamditherbw</A></B>, @@ -52,31 +48,27 @@ the maxval of the input by running it through <B>pamdepth</B> first. <B><A HREF="pam.html">pam</A></B>, <B><A HREF="pnm.html">pnm</A></B> -<A NAME="history"></a> -<h2>HISTORY</h2> +<h2 id="history">HISTORY</h2> <p><b>pamedge</b> was added to Netpbm in Release 10.14 (March 2003). It replaced <b>pgmedge</b>, which was the same thing, but worked only on PGM and PBM images. -<A NAME="lbAF"> </A> -<H2>AUTHOR</H2> +<H2 id="author">AUTHOR</H2> Copyright (C) 1991 by Jef Poskanzer. Adapted to <b>pnmedge</b> Peter Kichgessner in 1995, and then to <b>pamedge</b> by Bryan Henderson in 2003. <HR> -<A NAME="index"> </A> -<H2>Table Of Contents</H2> +<H2 id="index">Table Of Contents</H2> <UL> -<LI><A HREF="#lbAB">NAME</A> -<LI><A HREF="#lbAC">SYNOPSIS</A> -<LI><A HREF="#lbAD">DESCRIPTION</A> -<LI><A HREF="#lbAE">SEE ALSO</A> -<LI><A HREF=#history>HISTORY</A> -<LI><A HREF="#lbAF">AUTHOR</A> +<LI><A HREF="#synopsis">SYNOPSIS</A> +<LI><A HREF="#description">DESCRIPTION</A> +<LI><A HREF="#seealso">SEE ALSO</A> +<LI><A HREF="#history">HISTORY</A> +<LI><A HREF="#author">AUTHOR</A> </UL> </BODY> </HTML> diff --git a/pamsistoaglyph.html b/pamsistoaglyph.html new file mode 100644 index 00000000..292e394b --- /dev/null +++ b/pamsistoaglyph.html @@ -0,0 +1,183 @@ +<?xml version="1.0"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Pamsistoaglyph User Manual</title> +<meta http-equiv="content-type" content="text/html; charset=us-ascii" /> +</head> + +<body> + +<h1>pamsistoaglyph</h1> + +<p>Updated: 5 April 2009 + +<p><a href="#index">Table Of Contents</a></p> + + +<h2 id="name">NAME</h2> + +<p>pamsistoaglyph - convert a single-image stereogram to a red/cyan +anaglyphic image</p> + + +<h2 id="synopsis">SYNOPSIS</h2> + +<p><b>pamsistoaglyph</b> +[--<b>invert</b>] +[--<b>sep</b>=<i>number</i>] +[--<b>minsep</b>=<i>number</i>] +[--<b>gray</b>=<i>number</i>] +[<i>in_netpbmfile</i> +[<i>out_netpbmfile</i>]]</p> + +<p>All options can be abbreviated to their shortest unique prefix. You +may use either white space or an equals sign between an option name +and its value.</p> + + +<h2 id="description">DESCRIPTION</h2> + +<p>This program is part of <a href="index.html">Netpbm</a>. + +<p><b>pamsistoaglyph</b> reads a Netpbm image as input and +produces a Netpbm image as output.</p> + +<p><b>pamsistoaglyph</b> takes a single-image stereogram +(SIS) such as those produced by <a href= +"http://netpbm.sourceforge.net/doc/pamstereogram.html">pamstereogram</a> +and converts it to a red/cyan anaglyphic image such as those produced +by <a href="http://netpbm.sourceforge.net/doc/ppm3d.html">ppm3d</a>. +Many people have trouble tricking their eyes into focusing beyond the +image in front of them and are therefore unable to perceive the 3-D +shape hidden within a single-image stereogram. Anaglyphic stereograms +are easier to perceive in 3-D but require a pair of red/cyan glasses +such as those often used to watch 3-D movies. The goal of +<b>pamsistoaglyph</b> is to help people who have trouble +viewing single-image stereograms see the intriguing 3-D effect.</p> + +<p><b>pamsistoaglyph</b> can convert single-image random-dot +stereograms (SIRDS), wallpaper stereograms, and even dual-image +stereograms to anaglyphic images.</p> + + +<h2 id="options">OPTIONS</h2> + +<p>For most images, no command-line options need to be specified. The +following options are available, however, for unusual +circumstances:</p> + +<dl> +<dt><b>--invert</b></dt> +<dd>Swap the left- and right-eye + images. <b>pamsistoaglyph</b> assumes that its input + represents a wall-eyed stereogram and generates the anaglyphic + image accordingly. If the generated image appears to recede into + the page where it should pop out of the page (and vice versa), + this typically implies that the input image represents a + cross-eyed stereogram. Use <b>--invert</b> to correct + the image depth.</dd> + +<dt><b>--sep</b>=<i>number</i></dt> +<dd>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 <b>--sep</b> + option should rarely be necessary + as <b>pamsistoaglyph</b> is fairly good at determining + automatically the eye-separation distance.</dd> + +<dt><b>--minsep</b>=<i>number</i></dt> +<dd>This option is similar to <b>--sep</b> but + constrains <b>pamsistoaglyph</b> only to + a <i>minimum</i> eye-separation distance. Any distance larger + than <i>number</i> is acceptable. The <b>--minsep</b> + option should rarely be necessary + as <b>pamsistoaglyph</b> is fairly good at determining + automatically the eye-separation distance. The default value for + the minimum eye-separation distance is 10% of the image width; + this value seems to work well in practice.</dd> + +<dt><b>--gray</b>=<i>number</i></dt> +<dd>Limit the number of gray levels to use when searching for the + optimal eye-separation + distance. Because <b>pamsistoaglyph</b> looks for + repeated patterns, it is vulnerable to being confused by slight + variations in color. By reducing the input image to grayscale and + capping the number of gray levels, + <b>pamsistoaglyph</b> ameliorates 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 <b>--gray</b> option should + rarely be necessary.</dd> +</dl> + + +<h2 id="notes">NOTES</h2> + +<p>The registration algorithm used by <b>pamsistoaglyph</b> +was developed specifically for this program. As far as the author +knows, there are no existing algorithms for converting stereograms to +anaglyphs. The algorithm works as follows:</p> + +<ol> +<li>Convert the image to grayscale to increase the ability to identify + matches.</li> + +<li>Count the number of pixels that match <i>N</i> pixels ahead in the + image for all <i>N</i> in [1, <i>width</i>/2].</li> + +<li>Maintain a running mean (μ) and standard deviation (σ) of + the number of matched pixels.</li> + +<li>Store the <i>N</i> corresponding 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.</li> + +<li>If a tally greater than μ+3σ was encountered, return the + corresponding <i>N</i>. If not, then if a tally greater than + μ+2σ was encountered, return the + corresponding <i>N</i>. If not, then if a tally greater than + μ+σ was encountered, return the + corresponding <i>N</i>. If not, then return the <i>N</i> that + produces the minimum average distance between matched pixels + (i.e., <i>#matches</i> divided by <i>#pixels</i>). If no + such <i>N</i> exceeds the minimum allowable eye-separation value, + return zero to indicate failure.</li> + +<li>If the algorithm returned zero, rerun the algorithm independently + on each row of the input image and return the median of + all <i>N</i> that exceed the minimum allowable eye-separation + value. If no such <i>N</i> exists, abort with an error + message.</li> +</ol> + + +<h2 id="author">AUTHOR</h2> + +<p>Copyright (C) 2009 Scott +Pakin, <a href="mailto:scott+pbm@pakin.org.">scott+pbm@pakin.org.</a></p> + + +<h2 id="seealso">SEE ALSO</h2> + +<p><b><a href="pamstereogram.html">pamstereogram</a></b>, +<b><a href="ppm3d.html">ppm3d</a></b>, +<<a href="http://en.wikipedia.org/wiki/Stereogram"> +http://en.wikipedia.org/wiki/Stereogram</a>></p> + + +<hr /> +<h2 id="index">Table Of Contents</h2> + +<ul> +<li><a href="#synopsis">SYNOPSIS</a></li> +<li><a href="#description">DESCRIPTION</a></li> +<li><a href="#options">OPTIONS</a></li> +<li><a href="#notes">NOTES</a></li> +<li><a href="#author">AUTHOR</a></li> +<li><a href="#seealso">SEE ALSO</a></li> +</ul> + +</body> +</html> + diff --git a/pamstereogram.html b/pamstereogram.html index 40836878..6cd571b7 100644 --- a/pamstereogram.html +++ b/pamstereogram.html @@ -202,7 +202,7 @@ every time you run <b>pamstereogram</b>. option), because there is no random element to <b>pamstereogram</b>'s behavior. -<p>This option was new in Netpbm 10.32 (Februrary 2006). +<p>This option was new in Netpbm 10.32 (February 2006). </dl> |