______________________________________________________________________ ******** This document can be freely distributed ********** Disclaimer: ~~~~~~~~~~~ All the opinions and ideas presented in this document are mine's and are the result of my own reflections on the subject Purpose: ~~~~~~~~ This document wants to provide an easy understanding of the mechanism of 3-D perception related to stereograms. Due to the fact that it is the result of genuine thinking, I hope that this document provides a more intuitive approach to the subject. *********** What is a stereogram ? In this document I refer to stereogram (though, single image stereogram would be more correct) as being something like the image that follows: /=-- Y+-z-/=-- Y+-z-/=-- Y+-z-/=-- Y+-z-/=-- Y+-z-/=-- Y+-z-/=-- Y+-z-/=-- Y+-z *wm @m@w *wm @m@w *wm @m@w *wm @m@w *wm @m@w *wm @m@w *wm @m@w *wm @m@ O@=*+z @:/O@=*+z @:/O@=*+z @:/O@=*+z @:/O@=*+z @:/O@=*+z @:/O@=*+z @:/O@=*+z @: :*/- :m: *:*/- :m: *:*/- :m: *:*/- :m: *:*/- :m: *:*/- :m: *:*/- :m: *:*/- :m: )*/O@-Y|- )*/O@-Y)*/O@-Y)*/O@-Y)*/O@zO@)*/O@z zO@)*/O@zO@)*/O O@zO@*/O O@zwO@*/ *):O*zO((@*):O*zO*):O*zO*):O*zO*):O*mO*z):O*mO(O*z):O*(O*z):+:O*(O*):+:O*()O*): m))@z@-+m~m))@z@-m))@z@-m))@z@-m))@z*@z@-m@z*@z@@@-m*@z@@@m@-m*@z@@m@-m*@z @@m@ z:+*O-mm*Yz:+*O-mz:+*O-=O-mz:+*O-=O-mz:+*O--mz:+***-mz:+*)***-mz:+****-mz:-+*** m@: @:~+( m@: @:~m@: @: @:~m@: @: @:~m@: @: @m@: @: @m@/@: @: @m@/@ @: @m@+/@ @ -+(*m- o-)-+(*m- -+(*m-Om- -+(*m-Om- -+(*m-Om-+(*m-Om-+-+(*m-Om-+-+*m-Om-+|-+*m m*m |== *m*m |=m*m |=m*m |=m*m |=m*m |=m*m*m |=m*m*m |=m*m+*m + YY/ + ) + YY/ ++ YY/ ++ YY/*Y/ ++ YY/*Y/ ++ Y*Y/ ++-+ Y*Y/ ++-+ YY/ ++-+* YY/ zY=) w ~/YzY=) w zY=) w zY=) z) w zY=) z) w zY=z) w zmzY=z) w zmzY=) w zmz|Y=) + oY*:+:ow+ oY*:++ oY*:m*:++ oY*:m*:++ oY*:m*:+oY*:m* *:+oY*:m* *:+Y*:m* *z:+Y* @ z++ *zo)@ z++ *@ z++ w+ *@ z++ w+ *@ z++ w+ *z++ w+ + *z++ w+ + *++ w+ +* *++ ()=ww+ *O()=ww+ ()=ww+-w+ ()=ww+-w+ ()=ww+-w+ =ww+-w+w+ =ww+-w+w+ ww+-w+w=+ ww z +wO z +z + +z + +z + + + = + + = + + = ( + o +@~@= ozo +@~@=o +@~@+~@=o +@~@+~@=o +@~@+~@=+@~@+~@~@=+@~@+~@~@=@~@+~@~z@=@~ )(w=++ +~z)(w=++ +~z)(w=++ +~z)(w=++ +~z)(w=++ +~z)(w=++ +~z)(w=++ +~z)(w=++ +~ mz- O @ =mz- O @ =mz- O @ =mz- O @ =mz- O @ =mz- O @ =mz- O @ =mz- O @ If you stare at this image by trying to focus on something behind the image, you will be able to see, after some-time, a 3-D scene with the letters F Y I detaching from the background. (If you read this document on a monitor it is easier to focus on your image reflected on the screen in order to get the 3-D illusion. If you read this document on paper, try to put a glass in front of it and do the same thing.) To understand the mechanism which allows you to get this peculiar effect, we should take a look at the process of vision. The feeling of "depth" that you get by looking at a statue instead of looking at a photo of the same statue, is due to the fact that the human body has two eyes. ~~~ In the above example with the statue, we need just one eye to get the general shape of the statue. A humble photo does the same. It is the second eye that provides some "extra" information. This extra information is the "depth" of the various parts of the statue. In fact a "photo" gives just a bi-dimensional (x,y) representation, to get the third dimension (z) you need some "extra". y | |--------- | z | Photo | | / | | | / ---------| |/_______ x By having two pictures of the same object, taken by two different positions, which is the case of the human eyes, you can get the "z" coordinate to that object. It is a simple geometrical question. In fig.1 we assume that there are 2 objects, X and Y which are at the same height (y) and different depths (z) and positions (x) |--------------------------------------------------------------| | Fig.1 | | z | | y | | | Y \ | | | \|_____x | | | | | | | | | | | | X ^ | | | | | | | | | | | (o) (o) | | watching | | left-eye right-eye direction | | (depth) | |--------------------------------------------------------------| In fig.2 are shown the kind of "pictures" that each eye gets: (fig.2L -left eye, fig.2R -right eye; the '+' marks the center of each picture) |------------------------------------| |-------------------------------------| | Fig.2L | | Fig.2R | | | | | | | | | | | | | | X Y + | | X Y + | | | | | | | | | | | | | | | | | |------------------------------------| |-------------------------------------| As you can notice the 'X' shifts more than the 'Y' from one picture to another. This is an indication that the X object is 'closer' than Y. shift.X = d.hrz.right ( X, '+') - d.hrz.left ( X, '+') shift.Y = d.hrz.right ( Y, '+') - d.hrz.left ( Y, '+') where "dx.hrz.hhh ( A, '+')" means distance (on the horizontal axis) in the hhh picture from object A to origin/center. Furthermore, with good approximation we can say that any objects with the same 'shift' are at the same "depth" (z) In the same way, the eyes forward to the brain two slightly different pictures. It is the brain that must "compute" a 3-D representation of the scene. The difficulty is to know which pairs must be associated to "compute" the z-coordinate. In the example above it's easy to assume that the 'X' from each picture is associated to one 'X' object. The same goes for the two 'Y'. But the images that the brain gets to compute, can be quite complicated. What if there are more X-s and Y-s in each picture ? How does the brain establish the "couples" for which to calculate the shift/depth ? A clue is that each pair must be on the same height (y). Which means that the brain should not try to associate spots, patterns that are located at different heights. But that is not enough ! The 'brain' can make mistakes in this process of designation of pairs ! It is that which make possible the 3-D feeling that we get from stereograms. The simplest stereogram that we can get is something like-this: _____________________________________________________________________________ | * * * * * * * | | * * * * * * * | | * * * * * * * | | * * * * * * * | | * * * * * * * | | * * * * * * * | | * * * * * * * | | * * * * * * * | | * * * * * * * | | * * * * * * * | | * * * * * * * | | * * * * * * * | | * * * * * * * | | * * * * * * * | | * * * * * * * | | * * * * * * * | | * * * * * * * | | * * * * * * * | |----------------------------------------------------------------------------| Column: 1 2 3 4 5 6 7 Using the same procedure as in the beginning of this document you should be able to see the same '*' columns but "somewhere behind" this document. In fig.3 (Left/Right) I have represented the kind of pictures that the eyes forward to the brain when looking at the preceding stereogram. (notice '+', the center) |------------------------------------| |--------------------------------------| | : : : : : :Fig.3L | |: : : : : : Fig.3R | | : : : : : : : | |: : : : : : : | | : : : : : : : | |: : : : : : : | | : : : : : : : | |: : : : : : : | | : : : +: : : : | |: : : : + : : | | : : : : : : : | |: : : : : : : | | : : : : : : : | |: : : : : : : | | : : : : : : : | |: : : : : : : | | : : : : : : : | |: : : : : : : | |------------------------------------| |--------------------------------------| column: 1L 2L 3L 4L 5L 6L 7L 1R 2R 3R 4R 5R 6R 7R Normally the brain will associate the columns in the following way: 1L-1R, 2L-2R, 3L-3R, 4L-4R, 5L-5R, 6L-6R, 7L-7R but it can happen that the brain does the following association: 1L-2R, 2L-3R, 3L-4R, 4L-5R, 5L-6R, 6L-7R, ?-1R, 7L-? Remember: All columns look alike ! Of course it is possible that the brain makes other associations of these kinds: 1L-3R, 2L-4R, 3L-5R,... or 2L-1R, 3L-2R, 4L-3R,... etc. but in these cases the resulting 3-D representations makes no sense, or are very little alike. It can be noticed that by choosing a diferent association of columns the "shift" between the images of the objects changes. As a result the "depth" of the perceived objects changes. In the association 1L-2R, 2L-3R,... the shift is reduced -> the "depth" increases -> the columns seem somewhere behind. Is it possible to determine exactly the power of the brain in matching complicated images ? I thought, some time ago, what would happen if we put someone in front of a large panel situated at a convenient distance (so that the eyes are relaxed) and the panel is full of randomly disposed spots. The spots should be all alike and in very great number, very small but big enough to not became a uniform gray. The brain should be overwhelmed by the great number of matches that it must try. What will happen ? The person will get dizzy ? get a headache ? Or will the person be forced to see just a gray fog ? Finally, I recommend a very good FAQ (by Todd D. Hale) on the subject of single image stereogram and details on how to create such images: do ftp at: katz.anu.edu.au /pub/stereograms/SIRDS.FAQ techno.stanford.edu /pub/raves/visuals/graphics/info/stereogram.faq Cristian Alb C.P. 38-114 Bucharest, Romania e-mail to: lumiminita@poincare.mathappl.polymtl.ca _______________________________________________________________________________