Graphics Programs Reference
In-Depth Information
The transformation for the right eye is similarly
1 000
0 100
000 r
= T right .
e
001
It projects P to P right .
The stereo pair is created by transforming each point P on the original image twice,
to the two points P left = PT left and P right = PT right . The value selected for e depends
on how the picture is to be viewed. For the dual-color method mentioned earlier, 2 e
should equal the distance between the eyes (about 60-70 mm). This is a small value, so
there is not much difference between P right and P left . The two images highly overlap.
For a general point P =( x, y, z ), the projections for both eyes are
x + e
zr +1 ,
,
y
zr +1
P left =( x, y, z, 1) T left =( x + e, y, 0 ,zr +1)
x
.
e
zr +1 ,
y
zr +1
P right =( x, y, z, 1) T right =( x
e, y, 0 ,zr +1)
This means that the smaller z is (i.e., the closer the point is to the viewer), the greater
the difference between what the two eyes see. A good way to visualize this is to imagine
an object sliding past the viewer. The front of the object slides faster than the back,
an effect known as parallax .
As an example, consider the two points P =(5 , 0 , 1) and Q =(5 , 0 , 2). They differ
only in their z coordinate. Assuming that e =2and r = 3, their projections are
P left = 5+2
3+1 , 0 = 7
4 , 0 ,
P right = 5
3+1 , 0 = 3
4 , 0 ,
2
Q left = 5+2
2 · 3+1 , 0 = 7
7 , 0 ,
Q right = 5
2 · 3+1 , 0 = 3
7 , 0 .
2
The difference between P left and P right is 7 / 4
3 / 4 = 1, whereas the difference between
Q left and Q right is only 7 / 7 3 / 7=4 / 7.
Figure 3.42 is an example of a stereo pair of a polyline connecting the eight corners
of a cube. The Mathematica code that did the computations is also listed. Figure 3.43
shows the complete cubes.
A more sophisticated approach to generating a stereo image is shown in Fig-
ure 3.44a. The two eyes are located at ( e, 0 ,
k ), and they view the
general point P =( x, y, z ) from different directions. Point P is projected twice on the
projection plane, at points P L and P R , using the general rule for perspective projec-
tions. Assuming that the distance between the eyes is 2 e , Figure 3.44c,d shows how to
calculate the x coordinates of points P L and P R , respectively. Using similar triangles,
k )and(
e, 0 ,
Search WWH ::




Custom Search