From ca9d1542c6311b33006250e0845996b233cfc3d5 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Fri, 10 Apr 2009 02:47:40 +0000 Subject: "miscellaneous update" git-svn-id: http://svn.code.sf.net/p/netpbm/code/userguide@877 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- directory.html | 6 +- pamedge.html | 36 ++++------- pamsistoaglyph.html | 183 ++++++++++++++++++++++++++++++++++++++++++++++++++++ pamstereogram.html | 2 +- 4 files changed, 202 insertions(+), 25 deletions(-) create mode 100644 pamsistoaglyph.html 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
pamstereogram -
- create a single image stereogram from a height map +
create a single image stereogram from a height map + +
pamsistoaglyph +
convert a single-image stereogram to a red/cyan anaglyphic image
ppmwheel
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 Table Of Contents - 

NAME

pamedge - edge-detect an image -  -

SYNOPSIS

+

SYNOPSIS

pamedge [imagefile] -  -

DESCRIPTION

+

DESCRIPTION

This program is part of Netpbm. @@ -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. -

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 pamdepth first. +

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 pamdepth first. -  -

SEE ALSO

+

SEE ALSO

pgmenhance, pamditherbw, @@ -52,31 +48,27 @@ the maxval of the input by running it through pamdepth first. pam, pnm - -

HISTORY

+

HISTORY

pamedge was added to Netpbm in Release 10.14 (March 2003). It replaced pgmedge, which was the same thing, but worked only on PGM and PBM images. -  -

AUTHOR

+

AUTHOR

Copyright (C) 1991 by Jef Poskanzer. Adapted to pnmedge Peter Kichgessner in 1995, and then to pamedge by Bryan Henderson in 2003.
-  -

Table Of Contents

+

Table Of Contents

diff --git a/pamsistoaglyph.html b/pamsistoaglyph.html new file mode 100644 index 00000000..292e394b --- /dev/null +++ b/pamsistoaglyph.html @@ -0,0 +1,183 @@ + + + +Pamsistoaglyph User Manual + + + + + +

pamsistoaglyph

+ +

Updated: 5 April 2009 + +

Table Of Contents

+ + +

NAME

+ +

pamsistoaglyph - convert a single-image stereogram to a red/cyan +anaglyphic image

+ + +

SYNOPSIS

+ +

pamsistoaglyph +[--invert] +[--sep=number] +[--minsep=number] +[--gray=number] +[in_netpbmfile +[out_netpbmfile]]

+ +

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.

+ + +

DESCRIPTION

+ +

This program is part of Netpbm. + +

pamsistoaglyph reads a Netpbm image as input and +produces a Netpbm image as output.

+ +

pamsistoaglyph takes a single-image stereogram +(SIS) such as those produced by pamstereogram +and converts it to a red/cyan anaglyphic image such as those produced +by ppm3d. +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 +pamsistoaglyph is to help people who have trouble +viewing single-image stereograms see the intriguing 3-D effect.

+ +

pamsistoaglyph can convert single-image random-dot +stereograms (SIRDS), wallpaper stereograms, and even dual-image +stereograms to anaglyphic images.

+ + +

OPTIONS

+ +

For most images, no command-line options need to be specified. The +following options are available, however, for unusual +circumstances:

+ +
+
--invert
+
Swap the left- and right-eye + images. pamsistoaglyph 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 --invert to correct + the image depth.
+ +
--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 --sep + option should rarely be necessary + as pamsistoaglyph is fairly good at determining + automatically the eye-separation distance.
+ +
--minsep=number
+
This option is similar to --sep but + constrains pamsistoaglyph only to + a minimum eye-separation distance. Any distance larger + than number is acceptable. The --minsep + option should rarely be necessary + as pamsistoaglyph 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.
+ +
--gray=number
+
Limit the number of gray levels to use when searching for the + optimal eye-separation + distance. Because pamsistoaglyph 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, + pamsistoaglyph 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 --gray option should + rarely be necessary.
+
+ + +

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. The algorithm works as follows:

+ +
    +
  1. Convert the image to grayscale to increase the ability to identify + matches.
  2. + +
  3. Count the number of pixels that match N pixels ahead in the + image for all N in [1, width/2].
  4. + +
  5. Maintain a running mean (μ) and standard deviation (σ) of + the number of matched pixels.
  6. + +
  7. Store the N 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.
  8. + +
  9. If a tally greater than μ+3σ was encountered, return the + corresponding N. If not, then if a tally greater than + μ+2σ was encountered, return the + corresponding N. If not, then if a tally greater than + μ+σ was encountered, return the + corresponding N. If not, then return the N that + produces the minimum average distance between matched pixels + (i.e., #matches divided by #pixels). If no + such N exceeds the minimum allowable eye-separation value, + return zero to indicate failure.
  10. + +
  11. If the algorithm returned zero, rerun the algorithm independently + on each row of the input image and return the median of + all N that exceed the minimum allowable eye-separation + value. If no such N exists, abort with an error + message.
  12. +
+ + +

AUTHOR

+ +

Copyright (C) 2009 Scott +Pakin, scott+pbm@pakin.org.

+ + +

SEE ALSO

+ +

pamstereogram, +ppm3d, +< +http://en.wikipedia.org/wiki/Stereogram>

+ + +
+

Table Of Contents

+ + + + + + 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 pamstereogram. option), because there is no random element to pamstereogram's behavior. -

This option was new in Netpbm 10.32 (Februrary 2006). +

This option was new in Netpbm 10.32 (February 2006). -- cgit 1.4.1