1Pamstereogram User Manual(0) Pamstereogram User Manual(0)
2
3
4
5 Table Of Contents ⟨#contents⟩
6
7
8
10 pamstereogram - create a single-image stereogram from a PAM height map
11
12
14 pamstereogram [-help] [-verbose] [-blackandwhite | -grayscale | -color]
15 [-maxval=value] [-patfile=pamfile] [-xshift=pixels] [-yshift=pixels]
16 [-magnifypat=scale] [-guidesize=pixels] [-dpi=resolution] [-crosseyed]
17 [-makemask] [-eyesep=inches] [-depth=fraction] [-randomseed=integer]
18 [infile]
19
20
21
22
23
25 This program is part of Netpbm(1).
26
27 pamstereogram inputs a height map (a map of the distances from your eye
28 of the points in a scene) and outputs a single-image stereogram (SIS).
29 A SIS is a 2-D image specially designed to appear three dimensional
30 when viewed with relaxed, slightly unfocused eyes. What's exciting
31 about single-image stereograms is that they don't require special
32 glasses to view, although it does require a bit of practice to train
33 your eyes to unfocus properly. The pamstereogram program provides a
34 wealth of control over how the stereogram is generated, including the
35 following:
36
37
38
39 · black and white, grayscale, or color output
40
41
42 · single-image random-dot stereograms (SIRDS) or single-image
43 stereograms (SIS) using a tiled image
44
45
46 · images targeting a given device resolution and eye separation
47
48
49 · optional guide boxes to assist in focusing
50
51
52 · the ability to trade off depth levels for easier viewing
53
54
55 · choice of wall-eyed or cross-eyed stereograms
56
57
58
59 The output is a PAM image on standard output. Options control the
60 exact format of the PAM. If you want a PNM (PBM, PGM, or PPM) image,
61 use pamtopnm on the output. There is no need to convert if you will
62 use the image as input to a current Netpbm program, but many other pro‐
63 grams don't know what a PAM is.
64
65 To make a red/green type of stereogram (that you view with 3-D glasses)
66 instead, see ppm3d.
67
68
69
71 You may use either single or double hyphens to denote options. You may
72 use either whitespace or an equals sign to separate an option name from
73 its value.
74
75
76
77
78 -verbose
79 Display messages about image sizes and formats and properties of
80 the stereogram being generated.
81
82
83 -blackandwhite
84 Produce a single-image random-dot black-and-white stereogram.
85 This is the default.
86
87
88 -grayscale
89 Produce a single-image random-dot grayscale stereogram.
90
91
92 -color Produce a single-image random-dot color stereogram.
93
94
95 -maxval=value
96 Designate the maximum value of each gray/color component, i.e.
97 the color resolution. Smaller values make the output image have
98 smaller numbers of unique grays/colors. If you don't specify
99 -maxval, pamstereogram uses the maxval of the input image. This
100 option has no effect with -blackandwhite.
101
102
103 -patfile=pnmfile
104 Specify an image to use as a repeated background pattern for the
105 stereogram instead of a random-dot pattern. Intricate images
106 generally produce a crisper 3-D effect that simpler images. The
107 output file will have the same maxval and format (black and
108 white, grayscale or color) as the pattern file. You cannot spec‐
109 ify the -patfile option along with -blackandwhite, -grayscale,
110 -color, or -maxval.
111
112
113 -xshift=pixels
114 Shift the pattern image (designated by -patfile) to the right by
115 pixels pixels (default: 0). This option is valid only along
116 with -patfile.
117
118
119 -yshift pixels
120 Shift the pattern image (designated by -patfile) downwards by
121 pixels pixels (default: 0). This option is valid only along with
122 -patfile.
123
124
125 -magnifypat=scale
126 Magnify each pixel in the pattern file or each random dot by
127 integral scaling factor scale. Note that pamstereogram applies
128 the pattern magnification after pattern shifting (-xshift and
129 -yshift).
130
131
132 -guidesize=pixels
133 Draw a pair of pixels by pixels black squares on a white back‐
134 ground underneath the stereogram proper. These squares help you
135 guide your eyes into proper focus to view the 3-D image. The
136 trick is to focus your eyes some distance behind the image,
137 causing you to see four black squares, then continue altering
138 your focus distance until the middle two black squares fuse into
139 a single black square. At that point, a crisp, 3-D image will
140 appear.
141
142 If pixels is negative, pamstereogram will draw the guide squares
143 above the stereogram instead of below it. If pixels is zero (the
144 default), pamstereogram will draw no guide squares.
145
146
147
148 -dpi=resolution
149 Specify the resolution of the output device in dots per inch.
150 The default is 96 DPI, which represents a fairly crisp screen
151 resolution.
152
153
154 -crosseyed
155 Invert the gray levels in the height map (input image) so that
156 the 3-D image pops out of the page where it would otherwise sink
157 into the page and vice versa. Some people are unable to diverge
158 their eyes and can only cross them. The -crosseyed option
159 enables such people to see the 3-D image as intended.
160
161
162 -makemask
163 Instead of a stereogram, output a PAM mask image showing color‐
164 ing constraints. New pixels will be taken from the pattern file
165 where the mask is black. Copies of existing pixels will be taken
166 from the pattern file where the mask is white. The -makemask
167 option can be used to help create more sophisticated pattern
168 files (to use with -patfile) Note that -makemask ignores -magni‐
169 fypat; it always produces masks that assume a pattern magnifica‐
170 tion of 1.
171
172
173 -eyesep=inches
174 Specify the separation in inches between your eyes. The default,
175 2.5 inches (6.4 cm), should be sufficient for most people and
176 probably doesn't need to be changed.
177
178
179 -depth=fraction
180 Specify the output image's depth of field. That is, fraction
181 represents the fractional distance of the near plane from the
182 far plane. Smaller numbers make the 3-D image easier to perceive
183 but flatter. Larger numbers make the 3-D image more difficult to
184 perceive but deeper. The default, 0.3333, generally works fairly
185 well.
186
187
188 -randomseed=integer
189 Specify a seed to be used for the random number generator. The
190 default is to use a seed based on the time of day, to one second
191 granularity.
192
193 It is useful to specify the seed if you want to create repro‐
194 ducible results. With the same random seed, you should get
195 identical results every time you run pamstereogram.
196
197 This is irrelevant if you use a pattern file (-patfile option),
198 because there is no random element to pamstereogram's behavior.
199
200 This option was new in Netpbm 10.32 (February 2006).
201
202
203
204
205
207 The only parameter, infile, is the name of an input file that is a
208 height map image. If you don't specify infile, the input is from stan‐
209 dard input.
210
211 The input is a PAM image of depth 1. Each sample represents the dis‐
212 tance from the eye that the 3-D image at that location should be.
213 Higher numbers mean further from the eye.
214
215 pamstereogram pays no attention the the image's tuple type and ignores
216 all planes other than plane 0.
217
218 Like any Netpbm program, pamstereogram will accept PNM input as if it
219 were the PAM equivalent.
220
221 A good initial test is to input an image consisting of a solid shape of
222 distance 0 within a large field of maximum distance (e.g., a black
223 square on a white background).
224
225
226
227
229 Generate a SIRDS out of small, brightly colored squares and prepare it
230 for display on an 87 DPI monitor:
231 pamstereogram heightmap.pam \
232 -dpi 87 -verbose -color -maxval 1 -magnifypat 3 \
233 >3d.pam
234
235 Generate a SIS by tiling a PPM file (a prior run with -verbose indi‐
236 cates how wide the pattern file should be for seamless tiling, although
237 any width is acceptable for producing SISes):
238 pamstereogram myheights.pam -patfile mypattern.ppm >mysis.pam
239
240
241
243 ·
244
245 pam(1)
246
247
248 ·
249
250 pamsistoaglyph(1)
251
252
253 ·
254
255 ppm3d(1)
256
257
258
259 · Harold W. Thimbleby, Stuart Inglis, and Ian H. Witten. Display‐
260 ing 3D Images: Algorithms for Single Image Random Dot Stere‐
261 ograms. In IEEE Computer, 27(10):38-48, October 1994. DOI
262 10.1109/2.318576 ⟨http://dx.doi.org/10.1109/2.318576⟩ .
263
264
265
266
267
269 pamstereogram was new in Netpbm 10.22 (April 2004), but probably broken
270 beyond usability until Netpbm 10.32 (Februrary 2006) and Netpbm
271 10.26.23 (January 2006).
272
273
274
276 Copyright (C) 2006 Scott Pakin, scott+pbm@pakin.org.
277
279 ·
280
281 SYNOPSIS ⟨#synopsis⟩
282
283 ·
284
285 DESCRIPTION ⟨#description⟩
286
287 ·
288
289 OPTIONS ⟨#options⟩
290
291 ·
292
293 PARAMETERS ⟨#parameters⟩
294
295 ·
296
297 EXAMPLES ⟨#examples⟩
298
299 ·
300
301 SEE ALSO ⟨#seealso⟩
302
303 ·
304
305 HISTORY ⟨#history⟩
306
307 ·
308
309 AUTHOR ⟨#author⟩
310
311
312
313netpbm documentation 6 January 2006 Pamstereogram User Manual(0)