1Pamstereogram User Manual(0)                      Pamstereogram User Manual(0)
2
3
4
5<meta http-equiv="Content-Type" content="text/html; charset=us-ascii"/>
6
7       Table Of Contents ⟨#contents⟩
8
9
10

NAME

12       pamstereogram - create a single-image stereogram from a PAM height map
13
14

SYNOPSIS

16       pamstereogram [-help] [-verbose] [-blackandwhite | -grayscale | -color]
17       [-maxval=value]  [-patfile=pamfile]  [-xshift=pixels]  [-yshift=pixels]
18       [-magnifypat=scale]  [-guidesize=pixels] [-dpi=resolution] [-crosseyed]
19       [-makemask]  [-eyesep=inches]  [-depth=fraction]  [-randomseed=integer]
20       [infile]
21
22
23
24
25

DESCRIPTION

27       This program is part of Netpbm(1).
28
29       pamstereogram inputs a height map (a map of the distances from your eye
30       of the points in a scene) and outputs a single-image stereogram  (SIS).
31       A  SIS  is  a  2-D image specially designed to appear three dimensional
32       when viewed with relaxed,  slightly  unfocused  eyes.  What's  exciting
33       about  single-image  stereograms  is  that  they  don't require special
34       glasses to view, although it does require a bit of  practice  to  train
35       your  eyes  to  unfocus properly.  The pamstereogram program provides a
36       wealth of control over how the stereogram is generated,  including  the
37       following:
38
39
40
41       ·      black and white, grayscale, or color output
42
43
44       ·      single-image  random-dot  stereograms  (SIRDS)  or  single-image
45              stereograms (SIS) using a tiled image
46
47
48       ·      images targeting a given device resolution and eye separation
49
50
51       ·      optional guide boxes to assist in focusing
52
53
54       ·      the ability to trade off depth levels for easier viewing
55
56
57       ·      choice of wall-eyed or cross-eyed stereograms
58
59
60
61       The output is a PAM image on  standard  output.   Options  control  the
62       exact  format  of the PAM.  If you want a PNM (PBM, PGM, or PPM) image,
63       use pamtopnm on the output.  There is no need to convert  if  you  will
64       use the image as input to a current Netpbm program, but many other pro‐
65       grams don't know what a PAM is.
66
67       To make a red/green type of stereogram (that you view with 3-D glasses)
68       instead, see ppm3d.
69
70
71

OPTIONS

73       You may use either single or double hyphens to denote options.  You may
74       use either whitespace or an equals sign to separate an option name from
75       its value.
76
77
78
79
80       -verbose
81              Display messages about image sizes and formats and properties of
82              the stereogram being generated.
83
84
85       -blackandwhite
86              Produce a single-image  random-dot  black-and-white  stereogram.
87              This is the default.
88
89
90       -grayscale
91              Produce a single-image random-dot grayscale stereogram.
92
93
94       -color Produce a single-image random-dot color stereogram.
95
96
97       -maxval=value
98              Designate  the  maximum value of each gray/color component, i.e.
99              the color resolution. Smaller values make the output image  have
100              smaller  numbers  of  unique  grays/colors. If you don't specify
101              -maxval, pamstereogram uses the maxval of the input image.  This
102              option has no effect with -blackandwhite.
103
104
105       -patfile=pnmfile
106              Specify an image to use as a repeated background pattern for the
107              stereogram instead of a  random-dot  pattern.  Intricate  images
108              generally  produce a crisper 3-D effect that simpler images. The
109              output file will have the same  maxval  and  format  (black  and
110              white, grayscale or color) as the pattern file. You cannot spec‐
111              ify the -patfile option along with  -blackandwhite,  -grayscale,
112              -color, or -maxval.
113
114
115       -xshift=pixels
116              Shift the pattern image (designated by -patfile) to the right by
117              pixels pixels (default: 0).  <!-- -xshift is helpful when creat‐
118              ing  "true-color"  stereograms.  -->  This  option is valid only
119              along with -patfile.
120
121
122       -yshift pixels
123              Shift the pattern image (designated by  -patfile)  downwards  by
124              pixels pixels (default: 0). This option is valid only along with
125              -patfile.
126
127
128       -magnifypat=scale
129              Magnify each pixel in the pattern file or  each  random  dot  by
130              integral  scaling  factor scale. Note that pamstereogram applies
131              the pattern magnification after pattern  shifting  (-xshift  and
132              -yshift).
133
134
135       -guidesize=pixels
136              Draw  a  pair of pixels by pixels black squares on a white back‐
137              ground underneath the stereogram proper. These squares help  you
138              guide  your  eyes  into proper focus to view the 3-D image.  The
139              trick is to focus your eyes  some  distance  behind  the  image,
140              causing  you  to  see four black squares, then continue altering
141              your focus distance until the middle two black squares fuse into
142              a  single  black  square. At that point, a crisp, 3-D image will
143              appear.
144
145              If pixels is negative, pamstereogram will draw the guide squares
146              above the stereogram instead of below it. If pixels is zero (the
147              default), pamstereogram will draw no guide squares.
148
149
150
151       -dpi=resolution
152              Specify the resolution of the output device in  dots  per  inch.
153              The  default  is  96 DPI, which represents a fairly crisp screen
154              resolution.
155
156
157       -crosseyed
158              Invert the gray levels in the height map (input image)  so  that
159              the 3-D image pops out of the page where it would otherwise sink
160              into the page and vice versa. Some people are unable to  diverge
161              their  eyes  and  can  only  cross  them.  The -crosseyed option
162              enables such people to see the 3-D image as intended.
163
164
165       -makemask
166              Instead of a stereogram, output a PAM mask image showing  color‐
167              ing  constraints. New pixels will be taken from the pattern file
168              where the mask is black. Copies of existing pixels will be taken
169              from  the  pattern  file  where the mask is white. The -makemask
170              option can be used to help  create  more  sophisticated  pattern
171              files (to use with -patfile) Note that -makemask ignores -magni‐
172              fypat; it always produces masks that assume a pattern magnifica‐
173              tion of 1.
174
175
176       -eyesep=inches
177              Specify the separation in inches between your eyes. The default,
178              2.5 inches (6.4 cm), should be sufficient for  most  people  and
179              probably doesn't need to be changed.
180
181
182       -depth=fraction
183              Specify  the  output  image's  depth of field. That is, fraction
184              represents the fractional distance of the near  plane  from  the
185              far plane. Smaller numbers make the 3-D image easier to perceive
186              but flatter. Larger numbers make the 3-D image more difficult to
187              perceive but deeper. The default, 0.3333, generally works fairly
188              well.
189
190
191       -randomseed=integer
192              Specify a seed to be used for the random number generator.   The
193              default is to use a seed based on the time of day, to one second
194              granularity.
195
196              It is useful to specify the seed if you want  to  create  repro‐
197              ducible  results.   With  the  same  random seed, you should get
198              identical results every time you run pamstereogram.
199
200              This is irrelevant if you use a pattern file (-patfile  option),
201              because there is no random element to pamstereogram's behavior.
202
203              This option was new in Netpbm 10.32 (Februrary 2006).
204
205
206
207
208

PARAMETERS

210       The  only  parameter,  infile,  is  the name of an input file that is a
211       height map image. If you don't specify infile, the input is from  stan‐
212       dard input.
213
214       The  input  is  a PAM image of depth 1. Each sample represents the dis‐
215       tance from the eye that the 3-D  image  at  that  location  should  be.
216       Higher numbers mean further from the eye.
217
218       pamstereogram  pays no attention the the image's tuple type and ignores
219       all planes other than plane 0.
220
221       Like any Netpbm program, pamstereogram will accept PNM input as  if  it
222       were the PAM equivalent.
223
224       A good initial test is to input an image consisting of a solid shape of
225       distance 0 within a large field of  maximum  distance  (e.g.,  a  black
226       square on a white background).
227
228
229
230

EXAMPLES

232       Generate  a SIRDS out of small, brightly colored squares and prepare it
233       for display on an 87 DPI monitor:
234          pamstereogram heightmap.pam                  -dpi 87 -verbose -color -maxval 1 -magnifypat 3                  >3d.pam
235
236       Generate a SIS by tiling a PPM file (a prior run  with  -verbose  indi‐
237       cates how wide the pattern file should be for seamless tiling, although
238       any width is acceptable for producing SISes):
239          pamstereogram myheights.pam -patfile mypattern.ppm >mysis.pam
240
241
242

SEE ALSO

244       ·
245
246              pam(1)
247
248
249       ·
250
251              ppm3d(1)
252
253
254       ·      Harold W. Thimbleby, Stuart Inglis, and Ian H. Witten.  Display‐
255              ing  3D  Images:  Algorithms  for Single Image Random Dot Stere‐
256              ograms. In  IEEE  Computer,  27(10):38-48,  October  1994.   DOI
257              10.1109/2.318576 ⟨http://dx.doi.org/10.1109/2.318576⟩ .
258
259
260
261
262

HISTORY

264       pamstereogram was new in Netpbm 10.22 (April 2004), but probably broken
265       beyond  usability  until  Netpbm  10.32  (Februrary  2006)  and  Netpbm
266       10.26.23 (January 2006).
267
268
269

AUTHOR

271       Copyright (C) 2006 Scott Pakin, scott+pbm@pakin.org.
272

Table Of Contents

274       ·
275
276              SYNOPSIS ⟨#synopsis⟩
277
278       ·
279
280              DESCRIPTION ⟨#description⟩
281
282       ·
283
284              OPTIONS ⟨#options⟩
285
286       ·
287
288              PARAMETERS ⟨#parameters⟩
289
290       ·
291
292              EXAMPLES ⟨#examples⟩
293
294       ·
295
296              SEE ALSO ⟨#seealso⟩
297
298       ·
299
300              HISTORY ⟨#history⟩
301
302       ·
303
304              AUTHOR ⟨#author⟩
305
306
307
308netpbm documentation            6 January 2006    Pamstereogram User Manual(0)
Impressum