1Pamsistoaglyph User Manual(0)                    Pamsistoaglyph User Manual(0)
2
3
4

NAME

6       pamsistoaglyph  -  convert  a  single-image  stereogram  to  a red/cyan
7       anaglyphic image
8
9
10

SYNOPSIS

12       pamsistoaglyph [--invert] [--sep=number] [--minsep=number] [--gray=num‐
13       ber] [in_netpbmfile
14
15
16       All options can be abbreviated to their shortest unique prefix. You may
17       use either white space or an equals sign between an option name and its
18       value.
19
20
21

DESCRIPTION

23       This program is part of Netpbm(1).
24
25       pamsistoaglyph  reads  a  Netpbm  image  as input and produces a Netpbm
26       image as output.
27
28       pamsistoaglyph takes a single-image stereogram (SIS) such as those pro‐
29       duced  by  pamstereogram(1)  and  converts  it to a red/cyan anaglyphic
30       image such as those produced by ppm3d(1).   Many  people  have  trouble
31       tricking their eyes into focusing beyond the image in front of them and
32       are therefore unable to perceive the 3-D shape hidden within a  single-
33       image stereogram.  Anaglyphic stereograms are easier to perceive in 3-D
34       but require a pair of red/cyan glasses such  as  those  often  used  to
35       watch 3-D movies. The goal of pamsistoaglyph is to help people who have
36       trouble viewing single-image stereograms see the intriguing 3-D effect.
37
38       pamsistoaglyph can convert single-image random-dot stereograms (SIRDS),
39       wallpaper  stereograms,  and  even dual-image stereograms to anaglyphic
40       images.
41
42
43

OPTIONS

45       In addition to the options common to all programs  based  on  libnetpbm
46       (most notably -quiet, see
47        Common Options ⟨index.html#commonoptions⟩ ), pamsistoaglyph recognizes
48       the following command line options:
49
50       For most images, no command-line options need  to  be  specified.   The
51       following options are available, however, for unusual circumstances.
52
53
54
55       --invert
56              Swap the left- and right-eye
57                  images. pamsistoaglyph assumes that its input
58                  represents   a   wall-eyed   stereogram  and  generates  the
59              anaglyphic
60                  image accordingly. If the generated image appears to  recede
61              into
62                  the  page  where  it  should  pop  out of the page (and vice
63              versa),
64                  this typically implies that the input image represents a
65                  cross-eyed stereogram. Use --invert to correct
66                  the image depth.
67
68
69       --sep=number
70              Specify the distance in pixels between the left- and right-eye
71                  images.  Essentially,  this  corresponds  to  the   distance
72              between
73                  repetitions of the background pattern.  The --sep
74                  option should rarely be necessary
75                  as pamsistoaglyph is fairly good at determining
76                  automatically the eye-separation distance.
77
78
79       --minsep=number
80              This option is similar to --sep but
81                  constrains pamsistoaglyph only to
82                  a minimum eye-separation distance. Any distance larger
83                  than number is acceptable.  The --minsep
84                  option should rarely be necessary
85                  as pamsistoaglyph is fairly good at determining
86                  automatically  the  eye-separation  distance.   The  default
87              value for
88                  the minimum eye-separation distance  is  10%  of  the  image
89              width;
90                  this value seems to work well in practice.
91
92
93       --gray=number
94              Limit the number of gray levels to use when searching for the
95                  optimal eye-separation
96                  distance.  Because pamsistoaglyph looks for
97                  repeated  patterns,  it  is  vulnerable to being confused by
98              slight
99                  variations  in  color.   By  reducing  the  input  image  to
100              grayscale and
101                  capping the number of gray levels,
102                  pamsistoaglyph ameliorates the effects of
103                  unintentional color variations (such as those caused by con‐
104              version
105                  from a low-quality JPEG image, for example). The default  of
106              63
107                  seems to work well so the --gray option should
108                  rarely be necessary.
109
110
111
112

NOTES

114       The registration algorithm used by pamsistoaglyph was developed specif‐
115       ically for this program. As far as  the  author  knows,  there  are  no
116       existing algorithms for converting stereograms to anaglyphs.  The algo‐
117       rithm works as follows:
118
119
120
121       ·      Convert the image to grayscale to increase the ability to  iden‐
122              tify
123                  matches.
124
125
126       ·      Count the number of pixels that match N pixels ahead in the
127                  image for all N in [1, width/2].
128
129
130       ·      Maintain a running mean (mu) and standard deviation (sigma) of
131                  the number of matched pixels.
132
133
134       ·      Store the N corresponding to each spike in the number of
135                  matched  pixels.  A spike is defined as a tally that exceeds
136              the
137                  mean plus one, two, or three standard deviations.  Only  the
138              first
139                  spike of a given standard-deviation multiplier is stored.
140
141
142       ·      If a tally greater than mu+3sigma was encountered, return the
143                  corresponding N. If not, then if a tally greater than
144                  mu+2sigma was encountered, return the
145                  corresponding N. If not, then if a tally greater than
146                  mu+sigma was encountered, return the
147                  corresponding N. If not, then return the N that
148                  produces the minimum average distance between matched pixels
149                  (i.e., #matches divided by #pixels). If no
150                  such N exceeds the minimum allowable eye-separation value,
151                  return zero to indicate failure.
152
153
154       ·      If  the  algorithm  returned  zero, rerun the algorithm indepen‐
155              dently
156                  on each row of the input image and return the median of
157                  all N that exceed the minimum allowable eye-separation
158                  value. If no such N exists, abort with an error
159                  message.
160
161
162

HISTORY

164       Scott Pakin wrote pamsistoaglyph in April 2009.  It first  appeared  in
165       Netpbm in Release 10.47 (June 2009).
166
167
168

AUTHOR

170       Copyright (C) 2009 Scott Pakin, scott+pbm@pakin.org.
171
172
173

SEE ALSO

175       ·
176
177              pamstereogram(1)
178
179       ·
180
181              ppm3d(1),
182
183       ·
184
185              http://en.wikipedia.org/wiki/Stereogram
186http://en.wikipedia.org/wiki/Stereogram
187

DOCUMENT SOURCE

189       This manual page was generated by the Netpbm tool 'makeman'  from  HTML
190       source.  The master documentation is at
191
192              http://netpbm.sourceforge.net/doc/pamsistoaglyph.html
193
194netpbm documentation             5 April 2009    Pamsistoaglyph User Manual(0)
Impressum