A Discussion of Attempts to Introduce Coloring into Single Image Random Dot Stereograms

Kevin Beach and Mike Wade

Computer Science 766
May 11, 1999

Introduction:

A SIRDS (Single Image Random Dot Stereogram) is a single image which, when viewed appropriately, appears to display a 3-dimensional scene. We will refer to such images as SIRDS or as stereograms throughout this report. The popularity of these images has exploded recently and can be found on many web pages as well as in books and poster stores.

The appearance of depth in a stereogram is created through stereopsis. Both eyes actually see slightly different views of a scene due to the separation of the eyes. As they focus on a particular scene, the eyes receive slightly different images (stereo disparity). These two images are then fused into a single scene that appears to have a 3rd dimension.

While stereopsis is the way in which we perceive depth normally when viewing a 3D scene, it can only occur when viewing 2D objects if each eye receives different input, or different images. This technique has been used in the past using such devices as stereoscopes. SIRDS are generated using a technique that allows for the perception of depth through stereopsis while viewing a single 2D image. One of the limitations to the techniques currently used to generate stereograms is that they can only generate monochromatic objects.

We have implemented and attempted to extend the SIRDS generation algorithm as described in "Displaying 3D Images: Algorithms for Single Image Random Dot Stereograms" Thimbleby, Inglis, and Witten [1]. We introduced several simple automatic depth-generation techniques. But more interestingly we have attempted to introduce color objects into the algorithm. The objective was to create a stereogram that when the eyes correctly deconverge and fuse the images together, appears to have a colored or shaded object. One of the important considerations is that the image when viewed as a simple 2D picture still appears random so that not or little information about what the fused object will look like is apparent before the correct viewing.

Simple SIRDS:

Stereograms are generated by the careful placement of dots onto an image such that each dot serves as two parts of the image simultaneously. The following figure [from 1] illustrates the geometry upon which our SIRDS algorithm is based.

This figure shows that the 3D object which "occupies" the space between the near and far planes. The distance between those planes is equal to u. Thus, u constrains the maximum visible depth of the stereogram. The larger u is, the more difficult it be comes to obtain the correct convergence of the eyes. We define the depth to be in the range [0,1] where 0 is the far plane and 1 is the near plane. As can be seen, the depth of a point on the 3D object is defined by the separation of the 2 corresponding points on the image plane. Thus, it is the separation of those points that determines how far away the point appears to be. The following equation defines the separation of the 2 corresponding points for a given depth:

The basic algorithm begins by first constraining each pixel to be equal to itself. We then scan the picture row by row from left to right. At each pixel, the corresponding stereo pixels (left and right) are computed, using the depth map and the above equation. Then we simply constrain the left pixel to be equal to the right pixel. We proceed with this scan, each time constraining the left pixel to the right, until the position of the right pixel is no longer on the image plane. At this point, we leave left constrained to itself. Finally, we process the row from right to left. At each pixel, if it is constrained to itself we randomly set it equal to some value; otherwise we set it equal to the value of the pixel to which it is constrained. We have left out some of the detail, such as hidden surface removal, since it can be found in detail in [1].

We have included a sample black and white stereogram of 2 interlocking rings in Appendix B.

Auto Depth Generation Techniques:

For ease of testing we created several auto-depth generation methods. These include mapping, constant, triangle, sinusoidal, and ramp. Currently we scale all depth maps to occupy the entire space provided between the near and far planes. In other words, the pixel that is to appear closest to the view will always appear in the near plane, and the background always appears in the far plane.

For all the auto depth generation techniques, we assume that all pixels not in the object are black. The most straightforward depth technique is a constant mapping: all non-black pixels are drawn on the near plane. The next set of techniques involves finding the center of the image. This was determined by computing the distance transform using the approximate Euclidean-distance. In the triangular (or linear) mapping, all edge pixels of the object appear in the far plane, and linear decrease in depth until the center of the image has been reached, which is on the near plane. Next, we developed a technique for providing a sinusoidal decrease in depth from the edge to the center. And finally, the ramp method uses some previous depth mapping, and then truncates it above some level. Then it re-normalizes the depths. We also provide a means of inputting a hand-made depth map. This is simply a grayscale input-map where the higher the intensity of the pixel in the depth-map, the closer it is to the near plane. Appendix A shows a set of input maps and their resulting stereograms all performed on a simple rectangle.

Constraints for Color SIRDS:

There are several things to consider when trying to add color to stereograms. First, one of the most astonishing properties of SIRDS is the appearance of randomness and lack of shape in the 2D image. When introducing color we hope to maintain that apparent randomness and not reveal too much information regarding the object that will appear in 3D. Furthermore, we hope to prevent the colored dots from standing out too much. Ideally we would be able to hide all color details of the 3D object, or at the very least we hope to use color that blends into the picture in a "pleasant" way as not to detract from the image.

There are basically two possible variable involved in the addition of color. We can either try to alter the placement of the pixels or the color of individual pixels. However, we must adhere to the constraints regarding the placement of the pixels in the 2D image: it is these very constraints that create the 3D image. Without the careful placement of the dots, the mind will not be able to fuse the two views together. This means the only variable we can experiment with is the color of the pixels.

Related Work:

There is, unfortunately, very little research relating to SIRDS. There is a plethora of images and galleries, but a severe lack of explanation and description of techniques and experimentation. Thimbleby, Inglis, and Witten [1] do an excellent job of explaining the algorithm and describing some of the techniques used for improving viewing such as the removal of hidden surfaces. They continue and discuss limitation of the geometric model such as false fusion. Further work has been done by Bruckstein, Onn, and Richardson [3] on trying to improve the clarity and ease of visualization. Ease of visualization is the one area that seems to actually have been given some thought. There is some discussion of future work in devising some set of visual queues to aid in seeing the 3D-object easier.

A FAQ on stereograms exists to answer many of the questions about where to get them, but there is also some technical discussion of the topic. It suggests that it may be possible to generate color stereograms, and provides a dead-link to a web page that supposedly hashes out some of those ideas. At this time no attempts have been made to track down the author of the now non-existent page.

Approaches:

We have made several assumptions in our approach. First, we assume that the object being used in the stereogram is a constant color. An object with more than one color is feasible, but in order to achieve the sharp lines or contrast necessary, it would likely be apparent what shape is going to result from the fusing.

Secondly, we quickly realized we must also make some assumptions about the background of the stereogram. If the background chosen is completely randomized colors, or a simple black and white, then any congregation of a solid color will stick out and ruin many of the desirable properties of the image. Thus, we have constrained the background of the image to contain mostly one or two colors. We will show that this varies somewhat in our results.

The naïve approach to color would be to simply color all the pixels that are part of the stereo projection. This gave pitiful results and simply creates a double image of the object. Therefore we next tried another poor technique that used the "echoes" (in the pixel constraints) of the image to extend the influence of the color. If a pixel A was constrained to be the same color as pixel B, and pixel B was part of the object's stereo projection, then we colored pixel A as well. This generated poor results, but also aided to identify one of the main problems we would encounter. In the following image we filled in all the pixels that were part of the object for demonstration purposes since a random dotting was just as unsuccessful. One can clearly see the double image as well as the echoes due to pixel color constraint:

Thus, the next approach was to use a muted version of the object by reducing the intensity of the color and constraining the background to be similar but perhaps even more muted than the object. We further noticed that the introduction of random colors vary sporadically and infrequently introduced as pixels in the image diverted attention away from the grouping of color that would fuse to form the object. An example of this technique can be found below:

One of the limitations of this technique is that it requires some user specification and knowledge of the object and how to chose the background color.

We did find that the sparser we made our image, the easier it was to hide the color within the image. This observation combined with ideas gleaned from one of the few examples of color SIRDS led us to attempt to use what we call "splotches" rather than pixels. Rather than using very tiny pixels, we carefully paint small balls of color onto a mostly black background. This alone basically creates a very sparse singular grouping of color that stands out and again disrupts the apparent randomness. Furthermore, if the intensity of the extreme edges of the image (those which define part of the object for only one eye when fusing) are the same as the rest of the object, there are strange shadow effects when fusing the object back together. For this reason, we actually blend (or fade out) the color of the object into the color of the background. An example of this type of rendering can be seen in the following image:

The blending distance is very specific. In order to avoid shadows in the 3D image resulting from parts of the colored object seeping into the background color, we blend over the separation distance of the image. Thus, the edges of the object in the fused image appear slightly darker than the center, but the color stops at the edge of the image. Furthermore, there are no echoes of the color in the pixels in the background that are constrained with pixels in the foreground.

This technique seems to work the best of our experiments for hiding color. The most significant limitation is that it is difficult to obtain differing layers of depth within close proximity of each other, due to the sparseness of the image. This can be alleviated by reducing the size of the splotches and increasing their frequency, but is a trade off in perception of color randomness and varying depths. We have included a more involved demonstration of our "splotch" and background-constrained approaches in Appendix B.

Conclusions and Future Work:

Our current applications seem to involve a reasonable amount of user specification and tweaking for different images. We have experimented with other techniques but have not successfully found a reasonable solution. There seems to be some inherent artistic input into the creation of color SIRDS. Trying to determine what looks best with the color blending and pixelation techniques.

One approach we would have liked to develop is an approach using additive colors. It is possible that we could generate reasonable SIRDS where the colors "add up" to the desired object color. This approach might be more successful in objects with multiple colors. However, this technique might also result in the background tending to be the same color as the foreground.

Another area of interest involves trying to create better depth to our splotched stereograms. One approach may be to alter the shape of a splotch based upon the surface gradient of the depth map. We could alter the intensity of a splotch in a similar manner: the higher a single splotch is in the depth map, the brighter that splotch should appear. Another option of interest may be to alter the size of a splotch within our splotch window. We could then move this sub-splotch about the window based upon where it should be placed to give depth.

Finally, there are other avenues of experimentation that we briefly explored but did not find any solid use or worthwhile results. First, we experimented with animating SIRDS by simply moving an object around on the screen to see how well the human eye could track it. We would like to further experiment with this animation by morphing its shape during the animation. Secondly, we experimented with viewing the stereogram along different axes. Because the pixels are constrained along one axis, it might be possible to constrain them in two dimensions such that viewing the image along either axis will result in some 3D object.

References:

  1. H.W. Thimbleby, S. Inglis, and I. H. Witten. "Displaying 3D Images: Algorithms for Single Image Random Dot Stereograms". IEEE Computer, 10/1994. 38-48.
  2. Robert Raymon, Mirages. "Stereogram FAQ." Moab, Utah.
  3. A.M. Bruckstein, R. Onn, and T.J. Richardson. "Improving the Vision of Magic Eyes: A guide to Better Autostereograms". Advances in Image Understanding. IEEE Computer Society Press, 1996. 158-176.

APPENDIX A

Triangular depth map and corresponding SIRDS


Sinusoidal Depth Map and corresponding SIRDS


Sinusoidal mapping with hole and corresponding SIRDS


APPENDIX B