Algorithms for Single-Image Random-Dot Stereograms
Total Page:16
File Type:pdf, Size:1020Kb
Displaying 3D Images: Algorithms for Single-Image Random-Dot Stereograms Harold W. Thimbleby, University of Stirling Stuart Inglis and Ian H. Witten, University of Waikato e perceive depth in various ways: perspective, shadows, color and in- tensity effects, hazing, and changes in size. Artists know these effects well W and can manipulate them in pictures to give an impression of depth - indeed, pictures of solid objects drawn without perspective look odd. In three dimensions, additional methods are available for perceiving depth. Because our eyes are separated, each has a slightly different view of a distant object. and the angular difference varies with distance. When both eyes look at an object, they turn toward it (convergence) and the retinas receive slightly different images (stereo dis- parity). Also, the eyes focus differently for objects at different distances. The fusing of the two eyes’ images to produce the effect of depth is called stereop- sis. Stereopsis requires the cooperation of both eyes to construct a single mental pic- ture. This article discusses how to use stereopsis to re-create the appearance of depth from a purely flat picture. To understand how this is done, we need only consider the geometry of stereo vision, not its physiological or psychological basis. Stereopsis occurs naturally when viewing solid objects with both eyes. It is possi- ble with two-dimensional pictures only when each eye receives a separate image, A new, simple, and corresponding to the view it would have of the actual 3D object depicted. There are symmetric algorithm various ways to produce stereo images; special equipment is normally required. ei- ther for making the image or for viewing it. In a stereoscope,‘.?an optical instrument can be implemented similar to binoculars, each eye views a different picture and thereby receives the spe- cific image that would have arisen naturally. An early suggestion for a color stereo that results nn higher computer display involved a rotating filter wheel held in front of the eyes.3 levels of detail in solid In contrast. this article describes a method for viewing on paper or on an ordinary computer screen without special equipment, although it is limited to the display of 3D objects than previously monochromatic objects. (The image can be colored, say, for artistic reasons, but the possible with method we describe does not allow colors to be allocated in a way that corresponds to an arbitrary coloring of the solid object depicted.) The image can easily be con- autostereograms. structed by computer from any 3D scene or solid object description. 38 Authorized licensed use limited to: SIMON FRASER UNIVERSITY. Downloaded on January 26, 2009 at 14:22 from IEEE Xplore. Restrictions apply. Solid Background and overview Julesz and Miller4 were the first to show clearly that a sense of depth could arise purely from stereopsis, without re- lying on other cues such as perspective or contours. They used random patterns of dots that were meaningless when viewed by a single eye but nevertheless created an impression of depth when Figure 1. A solid viewed in a stereoscope. object can be Normal It might seem that stereopsis necessar- simulated on a / :: - - -convergence on ily requires two separate pictures, or at 2D image plane to happlane least some method of splitting a single for stereoscopic Lines of -convergence on picture to give each eye a separate view viewing. to SQlUplane (using, for instance, red/green filters, po- larized light, or interference, as in holo- grams). Recently, however, Tyler and Clarke’ realized that a pair of random- of the visual processes involved in inter- three black images on the plane, two of dot stereograms can be combined, re- preting random-dot stereograms. Gulick the images coinciding.Notice that the dis- sulting in a “single-image random-dot and Lawsony offer an excellent general tance between each pair of dots is differ- stereogram” or, more generally, an au- survey of the psychologicalprocesses and ent: The farther the corresponding point tostereogram. Essentially, this is an over- history of stereopsis. Such background is on the object is behind the image plane, lay of the two separate random-dot pat- useful, though it does not bear directly the farther apart are its two image points. terns, with the dots carefully placed so on the technique described in this article. The central dot shown on the image that each serves simultaneously for two plane in the figure represents two sepa- parts of the image. All that is necessary is rate locations on the object. Therefore, to suitably constrain the dot pattern. Or- these two locations must have the same dinary stereograms, such as photographs Stereo vision and color. In turn, then, the other two dots or wireframe models, cannot be com- autostereograms shown in the image plane must be the bined into a single image, since the result same color. Overall, of course, some dots is merely a double picture. (An effect Figure 1 shows an image plane placed must be of different colors, or else the im- called the “wallpaper illusion” occurs between the eyes and a solid object. Imag- age plane would appear uniform and not when lines of horizontally repeating pat- ine that it is a sheet of glass. (In fact, it present any useful information about the terns are perceived to lie at different could be a computer screen or a piece of object lying behind it. Such considera- depths; however, since the patterns re- paper.) Light rays coming from the ob- tions constrain the surface coloring of the peat monotonously in wallpaper, they ject pass through the image plane and en- object. It is sufficient to use only two col- convey no useful information.) ter each eye. As far as the eyes are con- ors (for example, black and white), but It turns out that very convincing images cerned, two rays pass through each point gray levels and a full spread of colors can with a vivid effect of depth can be con- in the image plane, one for each eye. If be used too. There is considerable flexi- structed in this way, and the advantage of both rays are the same color and inten- bility in choosing the palette, and colors this ingenious approach is that no special sity, they can be conveniently reproduced may be chosen for artistic impact. viewing equipment is required. It takes a by a single light source in the image plane. Figure 1also illustrates the task of view- little practice to see depth in the pictures, Hence, although the object can be seen ing autostereograms. of seeing depth in but once experienced it is very satisfying. stereoscopically, there need be only one the initially meaningless arrangement of Tyler and Clarke5 described a simple image in the image plane, not two, and it random dots. Suppose the image plane is but asymmetric algorithm, which meant can be shared by both eyes. This solves transferred to a sheet of opaque paper. If that some people could see the intended the problem of seeing a stereoscopic pic- the eyes converge ioview the paper in the effect only when the picture was held up- ture without any special equipment. normal way, they dre not converged in a side down. This article presents a new, The problem of generating the au- way that allows reconstruction of the solid simple, and symmetric algorithm for gen- tostereogram amounts to illuminating the image. The same effect occurs when you erating single-image stereograms from screen in such a way that it simulates a look at a mark on a window: Objects be- any solid model. It also avoids several mi- pattern of light that could have come hind the window appear double. In the nor problems with the original algorithm. from a solid object lying behind the case of random-dot stereograms, seeing Further background on stereograms and screen. In general, each point of the ob- the solid image “double” is tantamount to the development of our work is available ject will map into two points on the image not seeing it at all. To view it correctly, in Thimbleby and Neeshan6 plane. Now, if two locations on the solid one must deliberately deconverge the The literature on the psychology of object are chosen carefully, as shown in eyes, as explained in the sidebar “View- stereopsis is vast. For example, Marr and Figure 1, and both are black dots, then it ing a single-image random-dot stereo- Poggi~~.~discuss computational models can be arranged that they generate just gram.” October 1994 39 Authorized licensed use limited to: SIMON FRASER UNIVERSITY. Downloaded on January 26, 2009 at 14:22 from IEEE Xplore. Restrictions apply. An algorithm for Viewing a single-image random-dot stereogram generating single- Figure A1 is a random-dot stereogram of a large annulus, exactly the same size image random-dot and texture as that of Figure A2, floating above the middle of the picture. The stereograms challenge of successful viewing is that the viewer must decouple the eyes’ con- vergence from their focusing. Since this is never done in normal circumstances (except perhaps when tired), it may be difficult to achieve a successful 3D effect In Figure 1 we can see that constraints at first. The trick is to converge the eyes at a distance well beyond the paper on affect only points along a line that lies in which the dots lie, yet focus them on the dots themselves. Working in bright light the same plane as the two eyes. This pro- can help, as contraction of the iris causes the eyes’ depth of field to increase, and vides a clue to making the algorithm effi- as a result they rely less on focusing.