summary refs log tree commit diff
path: root/ppm3d.html
blob: 738f3de1f62df5ada85eaed258039448be801d6c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN">
<html><head><title>Ppm3d User Manual</title></head>
<body>
<h1>ppm3d</h1>
Updated: 20 February 2007
<br>
<a href="#index">Table Of Contents</a>

<h2>NAME</h2>
ppm3d - convert two PPM images into an anaglyph (red/blue 3d glasses) PPM

<h2 id="synopsis">SYNOPSIS</h2>

<b>ppm3d</b>
[<b>-color</b>]
[<b>-offset=</b><i>horizontal_offset</i>]
<i>leftppmfile</i>
<i>rightppmfile</i>

<p>
Deprecated optional 3rd argument: <i>horizontal_offset</i>

<h2 id="description">DESCRIPTION</h2>

<p>This program is part of <a href="index.html">Netpbm</a>.

<p><b>ppm3d</b> reads two PPM images as input and produces a PPM as
output, with the images overlapping by the specified number of pixels
in blue-green/red format.  The idea is that if you look at the image with
3-D glasses (glasses that admit only red through one eye and only
green or blue through the other), you see an image with depth.  This
is called an anaglyph stereogram.

<p><b>ppm3d</b> can produce either of two kinds of anaglyph stereogram:
monochrome or color.  Use the <b>-color</b> option to choose.

<p>In the monochrome version, <b>ppm3d</b> ignores any color
(actually, chrominance) in the input images and produces a result
which is monochrome.  Viewed through red-green glasses it is yellow,
but without any other color in the field, your brain tends to see it
as grayscale.

<p>In the color version, <b>ppm3d</b> generates a result which is close to the
color of the original.  It's not great, though, because each eye necessarily
cannot see the entire spectrum.  Red and cyan don't work well, but most other
colors -- especially when heavily saturated -- come out quite well.

<p>To view a color anaglyph stereogram, you need glasses with a left
lens that admits only red light and a right lens that admits only blue
and green light.  (The right lens may be called a cyan lens because
that is its pigment in white light; don't be misled into thinking that
cyan is the only color that gets through it).  Your brain is wired so
that even though the components of light are coming in through
different eyes, they mix in your brain to form the same sensation as
if you were looking at the combined light with both eyes.

<p>The input PPMs must be the same dimensions.

<p>To make a different kind of stereogram, use <b>pamstereogram</b>.
That makes a stereogram that you view without special glasses, just by
letting your eyes unfocus so that each eye sees different parts of the
image.

<h2 id="arguments">ARGUMENTS</h2>

<p>The mandatory arguments are file names of the left and right input
images.

<p>An optional third argument specifies the same thing as the value of
the <b>-offset</b> argument, but is deprecated because -offset is easier
to use and read.  Before Netpbm 10.38 (March 2007), this third argument
is the only way to specify the offset.

<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>ppm3d</b> recognizes the following
command line options:

<dl>

<dt><b>-offset=</b><i>horizontal_offset</i>

<dd>This option indicates the amount, in pixels, by which the left and
image is offset to the right of the right image in the output.

<p>The effect of this option is to move the entire image forward
(positive numbers) or backward (negative numbers).  With a zero
offset, the main subject of the picture appears in the plane of the
picture (i.e. if the image is projected on a screen, the location of
the screen).  The main subject is the subject at the location where
the line of sight of the left camera intersects the line of sight of
the right camera -- the main subject appears at the same location in
both the left and right images.

<p>Default is zero.

<p>This option was new in Netpbm 10.38 (March 2007).  Before that, use
the third argument instead.  Also, before Netpbm 10.38 the default is
+30 pixels.

<dt><b>-color</b>

<dd>This option causes <b>ppm3d</b> to generate a color anaglyph
stereogram.  By default, it generates monochrome.

<p>This option was new in Netpbm 10.38 (March 2007).

</dl>

<h2 id="seealso">SEE ALSO</h2>

<a href="pamstereogram.html">pamstereogram</a>
<a href="ppm.html">ppm</a>

<h2 id="author">AUTHOR</h2>

Copyright (C) 1993 by David K. Drum.

<hr>
<h2 id="index">Table Of Contents</h2>
<ul>
<li><a href="#synopsis">SYNOPSIS</a>
<li><a href="#description">DESCRIPTION</a>
<li><a href="#arguments">ARGUMENTS</a>
<li><a href="#options">OPTIONS</a>
<li><a href="#seealso">SEE ALSO</a>
<li><a href="#author">AUTHOR</a>
</ul>
</body>
</html>