summary refs log tree commit diff
path: root/pamstereogram.html
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2020-07-26 21:43:12 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2020-07-26 21:43:12 +0000
commit1a29632fcc0b7c095f116ad9a760acc80a7b0472 (patch)
tree17fec5ed1778a7b800faeb32a3efb0f3934ae98e /pamstereogram.html
parentfabc39e7f3bf78fbbc4e2923a0b9e53a829a9a26 (diff)
downloadnetpbm-mirror-1a29632fcc0b7c095f116ad9a760acc80a7b0472.tar.gz
netpbm-mirror-1a29632fcc0b7c095f116ad9a760acc80a7b0472.tar.xz
netpbm-mirror-1a29632fcc0b7c095f116ad9a760acc80a7b0472.zip
miscellaneous update
git-svn-id: http://svn.code.sf.net/p/netpbm/code/userguide@3901 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'pamstereogram.html')
-rw-r--r--pamstereogram.html230
1 files changed, 113 insertions, 117 deletions
diff --git a/pamstereogram.html b/pamstereogram.html
index d2a67f8e..759ca28d 100644
--- a/pamstereogram.html
+++ b/pamstereogram.html
@@ -1,22 +1,14 @@
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>Pamstereogram User Manual</title>
-</head>
-
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN">
+<html><head><title>Pamstereogram User Manual</title></head>
 <body>
-
 <h1>pamstereogram</h1>
+Updated: 10 May 2020
+<br>
+<a href="#index">Table Of Contents</a>
 
-<p>Updated: 10 May 2020</p>
-
-<p><a href="#contents">Table Of Contents</a></p>
-
+<h2>NAME</h2>
 
-<h2 id="name">NAME</h2>
-
-<p>pamstereogram - create a single-image stereogram from a PAM
-depth map</p>
+pamstereogram - create a single-image stereogram from a PAM depth map
 
 <h2 id="synopsis">SYNOPSIS</h2>
 
@@ -46,13 +38,13 @@ depth map</p>
 [<b>-randomseed=</b><i>integer</i>]
 [<b>-tileable</b>]
 [<i>infile</i>]
-</p>
+
 
 
 
 <h2 id="description">DESCRIPTION</h2>
 
-<p>This program is part of <a href="index.html">Netpbm</a>.</p>
+<p>This program is part of <a href="index.html">Netpbm</a>.
 
 <p><b>pamstereogram</b> inputs a depth map (a map of the distances
 from your eye of the points in a scene) and outputs a single-image
@@ -62,22 +54,22 @@ eyes. What's exciting about single-image stereograms is that they
 don't require special glasses to view, although it does require a bit
 of practice to train your eyes to unfocus properly.  The
 <b>pamstereogram</b> program provides a wealth of control over how the
-stereogram is generated, including the following:</p>
+stereogram is generated, including the following:
 
 <ul>
-<li>black and white, grayscale, or color output</li>
+<li>black and white, grayscale, or color output
 
 <li>single-image random-dot stereograms (SIRDS), single-image
 stereograms (SIS) using a tiled image, or mapped-texture stereograms
-(MTS)</li>
+(MTS)
 
-<li>images targeting a given device resolution and eye separation</li>
+<li>images targeting a given device resolution and eye separation
 
-<li>optional guide boxes to assist in focusing</li>
+<li>optional guide boxes to assist in focusing
 
-<li>the ability to trade off depth levels for easier viewing</li>
+<li>the ability to trade off depth levels for easier viewing
 
-<li>choice of wall-eyed or cross-eyed stereograms</li>
+<li>choice of wall-eyed or cross-eyed stereograms
 
 </ul>
 <p>The output is a PAM image on standard output.  Options control
@@ -87,48 +79,55 @@ if you will use the image as input to a current Netpbm program, but
 many other programs don't know what a PAM is.
 
 <p>To make a red/green type of stereogram (that you view with 3-D
-glasses) instead, see <b>ppm3d</b>.</p>
+glasses) instead, see <b>ppm3d</b>.
 
 
 <h2 id="options">OPTIONS</h2>
 
+<p>In addition to the options common to all programs based on libnetpbm
+(most notably <b>-quiet</b>, see <a href="index.html#commonoptions">
+Common Options</a>), <b>pamstereogram</b> recognizes the following
+command line options:
+
 <p>You may use either single or double hyphens to denote options.  You
 may use either whitespace or an equals sign to separate an option name
-from its value.</p>
+from its value.
 
 <dl>
 
-<dt><b>-verbose</b></dt>
+<dt><b>-verbose</b>
 <dd>Display messages about image sizes and formats and properties
-of the stereogram being generated.</dd>
+of the stereogram being generated.
 
-<dt><b>-blackandwhite</b></dt>
+<dt><b>-blackandwhite</b>
 <dd>Produce a single-image random-dot black-and-white stereogram.
-This is the default.</dd>
+This is the default.
 
-<dt><b>-grayscale</b></dt>
-<dd>Produce a single-image random-dot grayscale stereogram.</dd>
+<dt><b>-grayscale</b>
+<dd>Produce a single-image random-dot grayscale stereogram.
 
-<dt><b>-color</b></dt>
-<dd>Produce a single-image random-dot color stereogram.</dd>
+<dt><b>-color</b>
+<dd>Produce a single-image random-dot color stereogram.
 
-<dt><b>-maxval=</b><i>value</i></dt>
+<dt><b>-maxval=</b><i>value</i>
 <dd>Designate the maximum value of each gray/color component, i.e.
 the color resolution. Smaller values make the output image have
 smaller numbers of unique grays/colors. If you don't specify
 <b>-maxval</b>, <b>pamstereogram</b> uses the maxval of the input
-image. This option has no effect with <b>-blackandwhite</b>.</dd>
+image. This option has no effect with <b>-blackandwhite</b>.
 
-<dt><b>-patfile=</b><i>pamfile</i></dt>
+<dt><b>-patfile=</b><i>pamfile</i>
 <dd>Specify an image to use as a repeated background pattern for
 the stereogram instead of a random-dot pattern. Intricate images
 generally produce a crisper 3-D effect that simpler images. The
 output file will have the same maxval and format (black and white,
 grayscale or color) as the pattern file. You cannot specify the
 <b>-patfile</b> option along with <b>-blackandwhite</b>,
-<b>-grayscale</b>, <b>-color</b>, or <b>-maxval</b>.</dd>
+<b>-grayscale</b>, <b>-color</b>, or <b>-maxval</b>.  The
+<b>-verbose</b> option will give you information on the ideal
+dimensions of the pattern file.
 
-<dt><b>-xbegin=</b><i>pixels</i></dt>
+<dt><b>-xbegin=</b><i>pixels</i>
 <dd>Specify the horizontal coordinate at which to begin stereogram generation.
 The background pattern will be minimally distorted at this point and more
 distorted at greater distances.  Consider using this in conjunction
@@ -142,7 +141,7 @@ and <b>pamstereogram</b> actually ignores it with respect to <b>-texfile</b>
 
 <p>This option was new in Netpbm 10.71 (June 2015).
 
-<dt><b>-texfile=</b><i>pamfile</i></dt>
+<dt><b>-texfile=</b><i>pamfile</i>
 <dd>Specify an image to use as the texture for a mapped-texture
 stereogram.  The idea is that the depth-map image provides the depth
 values of the 3-D object/scene while the texture image provides the
@@ -151,10 +150,10 @@ the depth-map image.  (Note that it's required to have the same
 dimensions.)  The texture image's background color is ignored when
 blending colors.
 
-<p>This option was new in Netpbm 10.53 (December 2010).</p>
-</dd>
+<p>This option was new in Netpbm 10.53 (December 2010).
+
 
-<dt><b>-bgcolor=</b><i>color</i></dt>
+<dt><b>-bgcolor=</b><i>color</i>
 <dd>Use <i>color</i> as the texture image's background color instead
 of letting <b>pamstereogram</b> determine it automatically.  Specify
 the color as described for the
@@ -162,10 +161,10 @@ the color as described for the
 routine</a>.  The <b>-bgcolor</b> option is meaningful only in conjunction
 with <b>-texfile</b>.
 
-<p>This option was new in Netpbm 10.53 (December 2010).</p>
-</dd>
+<p>This option was new in Netpbm 10.53 (December 2010).
 
-<dt><b>-smoothing=</b><i>pixels</i></dt>
+
+<dt><b>-smoothing=</b><i>pixels</i>
 <dd>When used without <b>-texfile</b>, attempt to eliminate artifacts
 introduced by edges in the depth map if <i>pixels</i> is greater than zero.
 
@@ -176,29 +175,29 @@ by the stereogram's color constraints when producing a mapped-texture
 stereogram.  In this case, the <b>-smoothing</b> option is helpful
 when the texture image includes smooth color transitions (as in a
 photograph) but makes crisp texture images (as in a line drawing)
-appear blurry.</p>
+appear blurry.
 
 <p>This option was new in Netpbm 10.53 (December 2010).  Before
-Netpbm 10.61 (December 2012), it has no effect without <b>-texfile</b>.</p>
-</dd>
+Netpbm 10.61 (December 2012), it has no effect without <b>-texfile</b>.
+
 
-<dt><b>-xshift=</b><i>pixels</i></dt>
+<dt><b>-xshift=</b><i>pixels</i>
 <dd>Shift the pattern image (designated by <b>-patfile</b>) to the
 right by <i>pixels</i> pixels (default: 0).
-<!-- <b>-xshift</b> is helpful when creating "true-color" stereograms. -->
-This option is valid only along with <b>-patfile</b>.</dd>
+<!-- -xshift is helpful when creating "true-color" stereograms. -->
+This option is valid only along with <b>-patfile</b>.
 
-<dt><b>-yshift</b> <i>pixels</i></dt>
+<dt><b>-yshift</b> <i>pixels</i>
 <dd>Shift the pattern image (designated by <b>-patfile</b>)
 downwards by <i>pixels</i> pixels (default: 0). This option is
-valid only along with <b>-patfile</b>.</dd>
+valid only along with <b>-patfile</b>.
 
-<dt><b>-magnifypat=</b><i>scale</i></dt>
+<dt><b>-magnifypat=</b><i>scale</i>
 <dd>Magnify each pixel in the pattern file or each random dot by
 integral scaling factor <i>scale</i>. Note that
 <b>pamstereogram</b> applies the pattern magnification
 <em>after</em> pattern shifting (<b>-xshift</b> and
-<b>-yshift</b>).</dd>
+<b>-yshift</b>).
 
 <dt><b>-guidebottom</b>
 <dd>
@@ -212,7 +211,7 @@ square. At that point, a crisp, 3-D image will appear.
 <p>This option was new in Netpbm 10.61 (December 2012).  Before that,
 the presence of <b>-guidesize</b>, with a positive value, has the same
 effect.
-</dd>
+
 
 <dt><b>-guidetop</b>
 <dd>
@@ -222,7 +221,7 @@ Same as <b>-guidebottom</b>, except the guides go at the top of the image.
 the presence of <b>-guidesize</b>, with a negative value, has the same
 effect.
 
-<dt><b>-guidesize=</b><i>pixels</i></dt>
+<dt><b>-guidesize=</b><i>pixels</i>
 
 <dd>The size (width and height) of each guide box.
 
@@ -237,15 +236,15 @@ too, and if you specify it with a negative value, it behaves as if you
 specified <b>-guidetop</b> and specified <b>guidesize</b> with the absolute
 value of that negative value.
 
-<dt><b>-dpi=</b><i>resolution</i></dt>
+<dt><b>-dpi=</b><i>resolution</i>
 <dd>Specify the resolution of the output device in dots per inch.
 The default is 100 DPI, which represents a fairly crisp screen
 resolution.
 
-<p>Before Netpbm 10.53 (December 2010), the default was 96 DPI.</p>
-</dd>
+<p>Before Netpbm 10.53 (December 2010), the default was 96 DPI.
+
 
-<dt><b>-crosseyed</b></dt>
+<dt><b>-crosseyed</b>
 <dd>Invert the gray levels in the depth map (input image) so that the 3-D
 image pops out of the page where it would otherwise sink into the page and
 vice versa. Some people are unable to diverge their eyes and can only cross
@@ -256,10 +255,10 @@ colors are farther from the eye.
 
 <p>Before Netpbm 10.53 (December 2010), <b>pamstereogram</b> used higher
 (lighter) numbers for things closer to the eye <em>without</em>
-<b>-crosseyed</b> and vice versa.</p>
-</dd>
+<b>-crosseyed</b> and vice versa.
 
-<dt><b>-makemask</b></dt>
+
+<dt><b>-makemask</b>
 <dd>Instead of a stereogram, output a PAM mask image showing
 coloring constraints. New pixels will be taken from the pattern
 file where the mask is black. Copies of existing pixels will be
@@ -267,30 +266,30 @@ taken from the pattern file where the mask is white. The
 <b>-makemask</b> option can be used to help create more
 sophisticated pattern files (to use with <b>-patfile</b>) Note that
 <b>-makemask</b> ignores <b>-magnifypat</b>; it always produces
-masks that assume a pattern magnification of 1.</dd>
+masks that assume a pattern magnification of 1.
 
-<dt><b>-eyesep=</b><i>inches</i></dt>
+<dt><b>-eyesep=</b><i>inches</i>
 <dd>Specify the separation in inches between your eyes. The
 default, 2.5 inches (6.4 cm), should be sufficient for most people
-and probably doesn't need to be changed.</dd>
+and probably doesn't need to be changed.
 
-<dt><b>-depth=</b><i>fraction</i></dt>
+<dt><b>-depth=</b><i>fraction</i>
 <dd>Specify the output image's depth of field. That is,
 <i>fraction</i> represents the fractional distance of the near
 plane from the far plane. Smaller numbers make the 3-D image easier
 to perceive but flatter. Larger numbers make the 3-D image more
 difficult to perceive but deeper. The default, 0.3333, generally
-works fairly well.</dd>
+works fairly well.
 
-<dt><b>-planes=</b><i>near_pixels</i>,<i>far_pixels</i></dt>
+<dt><b>-planes=</b><i>near_pixels</i>,<i>far_pixels</i>
 <dd>Explicitly specify the distance between repeated pixels in the near plane
 and in the far plane.  This is an alternative to
 <b>-eyesep</b> and <b>-depth</b>.  The following equalities hold:
 
 <ul>
-  <li><i>eyesep</i> = 2 * <i>far</i></li>
+  <li><i>eyesep</i> = 2 * <i>far</i>
   <li><i>depth</i> = 2 * (<i>far</i> &minus; <i>near</i>) /
-      (2 * <i>far</i> &minus; <i>near</i>)</li>
+      (2 * <i>far</i> &minus; <i>near</i>)
 </ul>
 
 <p>The number of distinct 3-D depths is <i>far</i>
@@ -300,26 +299,25 @@ parameters (distance between eyes and tradeoff between perceptibility
 and depth) while <b>-planes</b> is a more computer-centric way (pixel
 distances in the resulting stereogram).
 
-<p>This option was new in Netpbm 10.59 (June 2012).</p>
-</dd>
+<p>This option was new in Netpbm 10.59 (June 2012).
+
 
-<dt><b>-randomseed=</b><i>integer</i></dt>
+<dt><b>-randomseed=</b><i>integer</i>
 <dd>Specify a seed to be used for the random number generator.
 The default is to use a seed based on the time of day, to one second
 granularity.
 
 <p>It is useful to specify the seed if you want to create reproducible
 results.  With the same random seed, you should get identical results
-every time you run <b>pamstereogram</b>.</p>
+every time you run <b>pamstereogram</b>.
 
 <p>This is irrelevant if you use a pattern file (<b>-patfile</b>
 option), because there is no random element to <b>pamstereogram</b>'s
-behavior.</p>
+behavior.
 
-<p>This option was new in Netpbm 10.32 (February 2006).</p>
-</dd>
+<p>This option was new in Netpbm 10.32 (February 2006).
 
-<dt><b>-tileable</b></dt>
+<dt><b>-tileable</b>
 
 <dd>Make the generated image horizontally tileable.  This works by
 blending a left-to-right rendering (the equivalent
@@ -327,7 +325,6 @@ of <b>-xbegin</b>=0) with a right-to-left rendering (the equivalent
 of <b>-xbegin</b>=<i>width&minus;1</i>).
 
 <p>This option was new in Netpbm 10.91 (June 2020).
-</dd>
 
 </dl>
 
@@ -336,7 +333,7 @@ of <b>-xbegin</b>=<i>width&minus;1</i>).
 
 <p>The only parameter, <i>infile</i>, is the name of an input file
 that is a depth map image. If you don't specify <i>infile</i>, the
-input is from standard input.</p>
+input is from standard input.
 
 <p>The input is a PAM image of depth 1. Each sample represents the
 distance from the eye that the 3-D image at that location should
@@ -347,10 +344,10 @@ be.  Lower (darker) numbers mean further from the eye.
 <h3 id="inputimages">Input Images</h3>
 
 <p><b>pamstereogram</b> pays no attention to the image's tuple type and
-ignores all planes other than plane 0.</p>
+ignores all planes other than plane 0.
 
 <p>Like any Netpbm program, <b>pamstereogram</b> will accept PNM
-input as if it were the PAM equivalent.</p>
+input as if it were the PAM equivalent.
 
 <h3 id="mappedtexture">Mapped-texture Stereograms</h3>
 
@@ -358,12 +355,12 @@ input as if it were the PAM equivalent.</p>
 drawn with true colors.  Unlike a SIRDS or tiled-image SIS, however,
 the image portrayed by an MTS is apparent in normal 2-D viewing.  It
 appears repeated multiple times and overlapped with itself, but it is
-not hidden.</p>
+not hidden.
 
 <p>You create an MTS with <b>pamstereogram</b> by passing the filename
 of a PAM "texture image" with a <b>-texfile</b> option.  A
 texture image portrays the same 3-D object as the depth-map image but
-indicates the colors that the program should apply to the object.</p>
+indicates the colors that the program should apply to the object.
 
 <p><b>pamstereogram</b> ignores the texture image's background color when it
 overlaps copies of the 3-D object.  This prevents, for example, a bright-red
@@ -373,32 +370,32 @@ object remains bright red.  A consequence of this feature is that an MTS looks
 best when the objects in the texture image have a crisp outline.  Smooth
 transitions to the background color result in unwanted color artifacts around
 edges because the program ignores only <em>exact</em> matches with the
-background color.</p>
+background color.
 
 <p>You should specify a larger-than-normal value for <b>-eyesep</b>
 (and/or <b>-dpi</b>) when producing an MTS.  Otherwise, the 3-D object will
 repeat so many times that most colored pixels will overlap other colored
-pixels, reducing the number of true-colored pixels that remain.</p>
+pixels, reducing the number of true-colored pixels that remain.
 
 <p>An MTS can employ a background pattern (<b>-patfile</b>).  In this
 case, <b>pamstereogram</b> replaces background pixels with pattern pixels in
-the final step of generating the image.</p>
+the final step of generating the image.
 
 
 <h3 id="notes_misc">Miscellaneous</h3>
 
 <p>A good initial test is to input an image consisting of a solid
 shape of distance 0 within a large field of maximum distance (e.g., a
-white square on a black background).</p>
+white square on a black background).
 
 <p>With the default values for <b>-dpi</b> and <b>-eyesep</b>, pattern
-images that are 128 pixels wide can tile seamlessly.</p>
+images that are 128 pixels wide can tile seamlessly.
 
 
 <h2 id="examples">EXAMPLES</h2>
 
 <p>Generate a SIRDS out of small, brightly colored squares and
-prepare it for display on an 87 DPI monitor:</p>
+prepare it for display on an 87 DPI monitor:
 
 <pre>
     pamstereogram depthmap.pam \
@@ -409,7 +406,7 @@ prepare it for display on an 87 DPI monitor:</p>
 <p>Generate a SIS by tiling a PPM file (a prior run with
 <b>-verbose</b> indicates how wide the pattern file should be for
 seamless tiling, although any width is acceptable for producing
-SISes):</p>
+SISes):
 
 <pre>
     pamstereogram depthmap.pam -patfile mypattern.ppm &gt;3d.pam
@@ -419,7 +416,7 @@ SISes):</p>
 <p>Generate an MTS by associating colors with a depth-mapped object
 (using a large eye separation to reduce the number of repetitions of
 the texture image) and twice smoothing over background-colored
-speckles:</p>
+speckles:
 
 <pre>
     pamstereogram depthmap.pam \
@@ -430,25 +427,25 @@ speckles:</p>
 
 <h2 id="seealso">SEE ALSO</h2>
 <ul>
-<li><a href="pam.html">pam</a></li>
+<li><a href="pam.html">pam</a>
 
-<li><a href="pamsistoaglyph.html">pamsistoaglyph</a></li>
+<li><a href="pamsistoaglyph.html">pamsistoaglyph</a>
 
-<li><a href="ppm3d.html">ppm3d</a></li>
+<li><a href="ppm3d.html">ppm3d</a>
 
 <li>Harold W. Thimbleby, Stuart Inglis, and Ian H. Witten.
 <em>Displaying 3D Images: Algorithms for Single Image Random Dot
 Stereograms</em>. In IEEE Computer, <strong>27</strong>(10):38-48,
 October 1994.  DOI: <a
-href="http://dx.doi.org/10.1109/2.318576">10.1109/2.318576</a>.</li>
+href="http://dx.doi.org/10.1109/2.318576">10.1109/2.318576</a>.
 
 <li>W. A. Steer.
 <em>Stereograms: Technical Details</em>.
-URL: <a href="http://www.techmind.org/stereo/stech.html">http://www.techmind.org/stereo/stech.html</a>.</li>
+URL: <a href="http://www.techmind.org/stereo/stech.html">http://www.techmind.org/stereo/stech.html</a>.
 </ul>
 
 
-<h2><a id="history">HISTORY</a></h2>
+<h2 id="history">HISTORY</h2>
 
 <p><b>pamstereogram</b> was new in Netpbm 10.22 (April 2004), but probably
 broken beyond usability until Netpbm 10.32 (February 2006) and Netpbm 10.26.23
@@ -459,26 +456,25 @@ broken beyond usability until Netpbm 10.32 (February 2006) and Netpbm 10.26.23
 Netpbm 10.61 (December 2012).
 
 
-<h2><a id="author">AUTHOR</a></h2>
-<p>Copyright &copy; 2006-2020 Scott Pakin, <a href="mailto:scott+pbm@pakin.org">scott+pbm@pakin.org</a>.</p>
+<h2 id="author">AUTHOR</h2>
+<p>Copyright &copy; 2006-2020 Scott Pakin, <a href="mailto:scott+pbm@pakin.org">scott+pbm@pakin.org</a>.
 
-<h2><a id="contents">Table Of Contents</a></h2>
+<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="#parameters">PARAMETERS</a></li>
+<li><a href="#synopsis">SYNOPSIS</a>
+<li><a href="#description">DESCRIPTION</a>
+<li><a href="#options">OPTIONS</a>
+<li><a href="#parameters">PARAMETERS</a>
 <li><a href="#notes">NOTES</a>
-<ul>
-  <li><a href="#inputimages">Input Images</a></li>
-  <li><a href="#mappedtexture">Mapped-texture Stereograms</a></li>
-  <li><a href="#notes_misc">Miscellaneous</a></li>
+  <ul>
+  <li><a href="#inputimages">Input Images</a>
+  <li><a href="#mappedtexture">Mapped-texture Stereograms</a>
+  <li><a href="#notes_misc">Miscellaneous</a>
   </ul>
-</li>
-<li><a href="#examples">EXAMPLES</a></li>
-<li><a href="#seealso">SEE ALSO</a></li>
-<li><a href="#history">HISTORY</a></li>
-<li><a href="#author">AUTHOR</a></li>
+<li><a href="#examples">EXAMPLES</a>
+<li><a href="#seealso">SEE ALSO</a>
+<li><a href="#history">HISTORY</a>
+<li><a href="#author">AUTHOR</a>
 </ul>
 </body>
 </html>