Autostereogram


An autostereogram is a two-dimensional image that can create the optical illusion of a three-dimensional scene. Autostereograms use only one image to accomplish the effect while normal stereograms require two. The 3D scene in an autostereogram is often unrecognizable until it is viewed properly, unlike typical stereograms. Viewing any kind of stereogram properly may cause the viewer to experience vergence-accommodation conflict.
The optical illusion of an autostereogram is one of depth perception and involves stereopsis: depth perception arising from the different perspective each eye has of a three-dimensional scene, called binocular parallax.
Individuals with disordered binocular vision and who cannot perceive depth may require a wiggle stereogram to achieve a similar effect.
The simplest type of autostereogram consists of a horizontally repeating pattern, with small changes throughout, that looks like wallpaper. When viewed with proper vergence, the repeating patterns appear to float above or below the background. The well-known Magic Eye books feature another type of autostereogram called a random-dot autostereogram, similar to the first example, above. In this type of autostereogram, every pixel in the image is computed from a pattern strip and a depth map. A hidden 3D scene emerges when the image is viewed with the correct vergence.
Unlike normal stereograms, autostereograms do not require the use of a stereoscope. A stereoscope presents 2D images of the same object from slightly different angles to the left eye and the right eye, allowing the viewer to reconstruct the original object via binocular disparity. When viewed with the proper vergence, an autostereogram does the same, the binocular disparity existing in adjacent parts of the repeating 2D patterns.
There are two ways an autostereogram can be viewed: wall-eyed and cross-eyed. Most autostereograms are designed to be viewed in only one way, which is usually wall-eyed. Wall-eyed viewing requires that the two eyes adopt a relatively parallel angle, while cross-eyed viewing requires a relatively convergent angle. An image designed for [|wall-eyed viewing] if viewed correctly will appear to pop out of the background, whereas if viewed cross-eyed it will instead appear as a cut-out behind the background and may be difficult to bring entirely into focus.

History

In 1593, Giambattista della Porta viewed one page of a book with one eye and another page with the other eye. He was able to read one of the pages, the other being invisible, and switch "the visual virtue" to read the other page, the first becoming invisible. This is an early example of dissociating vergence from accommodation—a necessary ability for seeing autostereograms. However, Porta saw competition between images viewed by the two eyes, binocular rivalry.
It was not until 1838 that the Charles Wheatstone published an example of cooperation between the images in the two eyes: stereopsis. He explained that the depth arose from differences in the horizontal positions of the images in the two eyes. He supported his explanation by showing flat, two-dimensional pictures with such horizontal differences, stereograms, separately to the left and right eyes through a stereoscope he invented based on mirrors. From such pairs of flat images, people experienced the illusion of depth.
In 1844, David Brewster discovered the "wallpaper effect". He noticed that when he stared at repeated patterns in wallpapers while varying his vergence, he could see them either behind the wall or in front of the wall. This is the basis of wallpaper-style autostereograms.
In 1939 Boris Kompaneysky published the first random-dot stereogram containing a hand-drawn image of the face of Venus, intended to be viewed with a device.
In 1959, Bela Julesz, vision scientist, psychologist, and MacArthur Fellow, invented random dot stereograms while working at Bell Laboratories on recognizing camouflaged objects from aerial pictures taken by spy planes. At the time, many vision scientists assumed that stereopsis required prior analysis of visible contours of images in each eye, but Julesz showed it occurs with images with no such visible contours in each of the eyes. The contours of the depth object become visible only after stereopsis had processed the differences in the horizontal positions of dots in the two eyes' images.
Japanese designer Masayuki Ito, following Julesz, created a single image stereogram in 1970 and Swiss painter Alfons Schilling created a handmade single-image stereogram in 1974, after creating more than one viewer and meeting with Julesz. Having experience with stereo imaging in holography, lenticular photography, and vectography, he developed a random-dot method based on closely spaced vertical lines in parallax.
In 1979, Christopher Tyler of Smith-Kettlewell Institute, a student of Julesz and a visual psychophysicist, combined the theories behind single-image wallpaper stereograms and random-dot stereograms to create the first black-and-white random-dot autostereogram with the assistance of computer programmer Maureen Clarke using Apple II and BASIC. Stork and Rocca published the first scholarly paper and provided software for generating random-dot stereograms. This type of autostereogram allows a person to see 3D shapes from a single 2D image without the aid of optical equipment. In 1991 computer programmer Tom Baccei and artist Cheri Smith created the first color random-dot autostereograms, later marketed as Magic Eye.
A computer procedure that extracts back the hidden geometry out of an autostereogram image was described by Ron Kimmel.
In addition to classical stereo it adds smoothness as an important assumption in the surface reconstruction.
In the late '90s many children's magazines featured autostereograms. Even gaming magazines like Nintendo Power had a section specifically made for these illusions. Since then several books were published with Magic Eye Beyond 3D: Improve Your Vision being one key publication that placed this intriguing illusion into the mainstream.

How they work

Simple wallpaper

, or stereo vision, is the visual blending of two similar but not identical images into one, with resulting visual perception of solidity and depth. In the human brain, stereopsis results from complex mechanisms that form a three-dimensional impression by matching each point in one eye's view with the equivalent point in the other eye's view. Using binocular disparity, the brain derives the points' positions in the otherwise inscrutable z-axis.
When the brain is presented with a repeating pattern like wallpaper, it has difficulty matching the two eyes' views accurately. By looking at a horizontally repeating pattern, but converging the two eyes at a point behind the pattern, it is possible to trick the brain into matching one element of the pattern, as seen by the left eye, with another element, beside the first, as seen by the right eye. With the typical wall-eyed viewing, this gives the illusion of a plane bearing the same pattern but located behind the real wall. The distance at which this plane lies behind the wall depends only on the spacing between identical elements.
Autostereograms use this dependence of depth on spacing to create three-dimensional images. If, over some area of the picture, the pattern is repeated at smaller distances, that area will appear closer than the background plane. If the distance of repeats is longer over some area, then that area will appear more distant.
Image:Stereogram Tut Simple.png|thumb|350px|This autostereogram displays patterns on three different planes by repeating the patterns at different spacings.
People who have never been able to perceive 3D shapes hidden within an autostereogram find it hard to understand remarks such as, "the 3D image will just pop out of the background, after you stare at the picture long enough", or "the 3D objects will just emerge from the background". It helps to illustrate how 3D images "emerge" from the background from a second viewer's perspective. If the virtual 3D objects reconstructed by the autostereogram viewer's brain were real objects, a second viewer observing the scene from the side would see these objects floating in the air above the background image.
The 3D effects in the example autostereogram are created by repeating the tiger rider icons every 140 pixels on the background plane, the shark rider icons every 130 pixels on the second plane, and the tiger icons every 120 pixels on the highest plane. The closer a set of icons are packed horizontally, the higher they are lifted from the background plane. This repeat distance is referred to as the depth or z-axis value of a particular pattern in the autostereogram. The depth value is also known as Z-buffer value.
The brain is capable of almost instantly matching hundreds of patterns repeated at different intervals in order to recreate correct depth information for each pattern. An autostereogram may contain some 50 tigers of varying size, repeated at different intervals against a complex, repeated background. Yet, despite the apparent chaotic arrangement of patterns, the brain is able to place every tiger icon at its proper depth.

Depth maps

Autostereograms where patterns in a particular row are repeated horizontally with the same spacing can be read either cross-eyed or wall-eyed. In such autostereograms, both types of reading will produce similar depth interpretation, with the exception that the cross-eyed reading reverses the depth.
However, icons in a row do not need to be arranged at identical intervals. An autostereogram with varying intervals between icons across a row presents these icons at different depth planes to the viewer. The depth for each icon is computed from the distance between it and its neighbor at the left. These types of autostereograms are designed to be read in only one way, either cross-eyed or wall-eyed. All autostereograms in this article are encoded for wall-eyed viewing, unless specifically marked otherwise. An autostereogram encoded for wall-eyed viewing will produce inverse patterns when viewed cross-eyed, and vice versa.
The wall-eyed depth map example autostereogram to the right encodes 3 planes across the x-axis. The background plane is on the left side of the picture. The highest plane is shown on the right side of the picture. There is a narrow middle plane in the middle of the x-axis. Starting with a background plane where icons are spaced at 140 pixels, one can raise a particular icon by shifting it a certain number of pixels to the left. For instance, the middle plane is created by shifting an icon 10 pixels to the left, effectively creating a spacing consisting of 130 pixels. The brain does not rely on intelligible icons which represent objects or concepts. In this autostereogram, patterns become smaller and smaller down the y-axis, until they look like random dots. The brain is still able to match these random dot patterns.
The distance relationship between any pixel and its counterpart in the equivalent pattern to the left can be expressed in a depth map. A depth map is simply a grayscale image which represents the distance between a pixel and its left counterpart using a grayscale value between black and white. By convention, the closer the distance is, the brighter the color becomes.
Using this convention, a grayscale depth map for the example autostereogram can be created with black, gray and white representing shifts of 0 pixels, 10 pixels and 20 pixels, respectively as shown in the greyscale example autostereogram. A depth map is the key to creation of random-dot autostereograms.