This is an old revision of this page, as edited by Fred Hsu (talk | contribs) at 21:16, 12 March 2005 (I need to learn to use the preview button). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Revision as of 21:16, 12 March 2005 by Fred Hsu (talk | contribs) (I need to learn to use the preview button)(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)An autostereogram is a single-image stereogram (SIS), designed to trick human eyes (and brains) into seeing a three-dimensional scene in a two-dimensional image. The Magic Eye series of books featured a type of autostereogram called a random dot stereogram.
History
The first random-dot stereogram was created as an experiment in stereopsis by Dr. Bela Julesz in 1959.
How they work
Simple Wallpaper Autostereogram
The human brain accomplishes stereo vision by a complex set of mechanisms which attempt to relate the two slightly different two-dimensional images seen by the two eyes. The brain tries to assemble a three-dimensional impression by matching each point (or set of points) in one eye's view with the equivalent point (or set of points) in the other eye's view. It therefore assesses the points' positions in the otherwise inscrutable z-axis (depth).
When the brain is presented with a series of very similar points, such as in a repeating pattern like you might see on wallpaper, it has difficulty matching the two eye's 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 (similar looking) element, beside the first, as seen by the right eye. 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 (like a hole in the plane).
People who have never been able to see an autostereogram find it hard to understand remarks such as, "the 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." The following picture illustrates how virtual 3D objects perceived by a viewer of the autostereogram would look, when viewed from the side, if these virtual 3D objects existed in real world.
The 3D effects in the previous autostereogram were 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 stereogram. The depth value is also known as Z-buffer value.
The brain is capable of instantly matching hundreds of patterns repeated at different intervals in order to recreate correct depth information for each pattern. The following autostereogram contains some 50 tigers of varying size, repeated at different intervals against a complex, repeated background. Despite the apparent chaotic arrangement of patterns, the brain is able to place every tiger icon at its proper depth.
Following image illustrates how the previous autostereogram is perceived by a viewer.
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 stereograms, both type of reading will produce the similar depth interpretation, with the exception that the cross-eyed reading produces larger depth differences between planes.
However, icons in a row do not need to be arranged at identical intervals. By varying the interval between icons across the row, one can create different depth for each icon. The depth for each icon is computed from the interval between it and its neighbor at the left. These kinds of autostereograms are designed to be read in only one way, either cross-eyed or wall-eyed. All autostereograms in this wikipedia entry are encoded for wall-eyed viewing, unless specifically marked otherwise. A stereogram encoded for wall-eyed viewing will produce incoherent 3D patterns when viewed cross-eyed. Most MagicEye pictures are also designed to be viewed wall-eyed.
The following wall-eyed autostereogram 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 an icon by shifting it n 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 represents an object or a concept. In this autostereogram, patterns become smaller and smaller down the x-axis, until they become random dots. The brain is still able to matches these random dot patterns.
The relationship (distance interval) between any pixel and its counterpart pixel in the equivalent pattern to the left can be expressed in a depth map. A depth map is simply a greyscale image which represents the distance interval of a pixel using a greyscale value between black and white. By convention, the closer the distance, the brighter the color. In an 8-bit greyscale image, there are 256 possible values. Normally 0 represents black, while 255 represents white.
Using this convention, we can create a greyscale depth map for the above autostereogram using black, grey and white. We can use black, grey and white to represent shifts of 0-pixel, 10-pixels and 20-pixels, respectively. Given any depth map and a small background pattern, a software program can tile the small pattern horizontally at spacing intervals dictated by the depth map. The end result is a autostereogram.
For instance, a program can take the following depth map and the accompanying pattern to produce a autostereogram showing three raised rectangles.
The resulting autostereogram is shown below.
The following image that every pixel in the resulting autostereogram obeys the distance interval specified by the depth map.
Random Dot Stereogram
Subtle changes in spacing can create the illusion of smooth gradients in distance rather than the simpler-to-achieve jumps in depth. This fine-tuned gradient requires a pattern more complex than a standard repeating-pattern wallpaper, so typically a pattern consisting of repeated random dots is used. This forms what is called a random dot stereogram or single image randomg dot stereogram (SIRDS).
However, smooth gradients can also be achieved with an intelligible pattern, assuming that the pattern is complex enough and does not have big, monotonic patches. A big area painted with monotonic color without change in hue and brightness does not lend itself to pixel shifting, as the result of the shift is identical to the original patch. The following depth map of a shark with smooth gradient produces an perfectly readable autostereogram, even though the pattern contains small monotonic areas. The brain is able to recognize these small gaps and fill in the blanks.
How to see them
How the brain perceives objects in 3D
Much advice exists about 'seeing' an autostereogram (that is, seeing the intended three-dimensional image). While some people can simply see the 3D image in an autostereogram, others need to learn to train their eyes to decouple eye convergence from lens focusing. In order to understand how to accomplish this decoupling, one needs to first examine how the brain perceives objects in three-dimension in the real world.
When a person stares at an object, the two eyes converges so that the object appears at the center of the retina in both eyes. Other objects around the main object appear shifted in relation to the main object. The cube in the following example appears shifted to the right when it is captured by the left eye's retina. The same cube appears shifted to the left when it is captured by the right eye's retina.
The brain matches objects identified in both eyes to form a single, combined image. It also uses coordinate shift (also known as Parallax) of matched objects to identify depth of these objects. For instance, the cube shift significantly, compared to the main object (dolphin). As a result, it can be inferred that the cube is closer to the eyes than the dolphin. We can represent the depth level of each point in the combined image using a grayscale pixel. The closer the point to the eyes, the brighter it is painted. Based on the coordinate shift, we can thus produce a depth map to capture the way the brain perceives depth using on Binocular vision
Focusing distance and convergence angle
The eye operates like a photographic camera. It has an adjustable iris which can open (or close) to allow more (or less) light to enter the the eye. As with any camera except pinhole cameras, it needs to focus light rays entering through the iris (aperture in a camera) so that they focus on a single point on the retina in order to produce a sharp image. The eye achieves this goal by adjusting a lens behind the cornea to deflect light. To see an object close to it, the eye increases the refraction index of the lens by squeezing the lens to form a bulge. To see a distant object, the eye flattens the lens, as nearly parallel light rays from the object need only be slightly bent to a arrive at the same spot on the retina.
When a person stares at an object, the two eyeballs rotate sideways to point to the object, so that the object appears at the center of the image formed in each eye's retina. In order to look at a nearby object, the two eyeballs rotate towards each other so that their eyesight can converge on the object. This is generally referred to as cross-eyed viewing. To see a faraway object, the two eyeballs rotate outwards to become almost parallel to each other. This is known as wall-eyed viewing, where the convergence angle is much smaller than that in a cross-eyed viewing.How to trick the brain into seeing 3D images in an autostereogram
Normally, focusing operations of the eyes are coupled to the convergence operations. That is, when looking at a faraway object, the brain automatically flattens the lens and rotates the eyeballs for wall-eyed viewing. It is possible to to train the brain the decouple these two operations. This would have no useful purposes for the everyday life of a person, as it would not allow the brain to interpret objects in the world in a coherent matter. To see a man-made picture such as an autostereogram where patterns are repeated horizontally, however, decoupling of focusing and convergence is crucial.
By focusing the lens on a nearby autostereogram where patterns are repeated and by converging the eyeballs at a distant point behind the stereogram image, one can trick the brain into seeing 3D images. If the patterns picked up by by the two eyes are similar enough, the brain will consider these two patterns a match, and perceive them as images coming from the same imaginary object. This type of visualization is known as wall-eyed viewing, because the the eyeballs adopt a wall-eye convergence, even though the stereogram image is actually closer to the eyes. Because the two eyeballs converge on a plane farther away, the perceived location of the imaginary object is behind the autostereogram. The imaginary object also appears bigger than the patterns on the stereogram due to foreshortening.
The following stereogram shows 3 rows of repeated patterns. Each pattern is repeated at different intervals to convey different depth. While there are 6 dolphins in the stereogram, the brain should see 7 apparent dolphins behind the plane of the stereogram. The two non-repeating lines can be used to verify correct wall-eyed viewing. When the stereogram is correctly decrypted by the brain using wall-eyed viewing, the brain should see two sets of flickering lines as depicted in the second picture, when one stares at the dolphin in the middle of the visual field (the 4th apparent dolphin).
Following stereogram demonstrate the foreshortening caused by difference in convergence. While all cubes in the stereogram have the same physical 2D dimensions, the ones in the top row appear bigger, because their perceived location is farther away, compared to those in the second and third row.
Techniques for improved viewing experience
As with a photographic camera, it is easier to make the eye focus on an object, when there is intense ambient light. With intense lighting, the eye can close down the iris, yet allowing the enough light to hit the retina. The more the eye resembles a pinhole camera, the less it depends on focusing through lens. In other words, the degree of decoupling between focusing and convergence needed to visualize an autostereogram is reduced. This places less strain on the brain. Therefore, it may be easier for a first-time stereogram viewers to 'see' their first 3D images, if they attempt this feat under bright lighting conditions.
The key to seeing the 3D images is the eye convergence. Thus it may help to concentrate on converging/diverging the two eyes to shift images that reach the two eyes, instead of trying to see a clear, focused image. The brain by instinct tries to adjust the lenses to produce clear, focused images. One needs to fight this urge, and instead alternate between converging and diverging the two eyes, in the process seeing 'double images' typically seen when one is drunk or poisoned. Eventually the brain will successfully match a pair of patterns reported by the two eyes and lock onto this particular degree of convergence. Once this is done, the images around the matched patterns is quickly become clear as the brain matches additional patterns using the roughly the same degree of convergence.
When one moves one's attention from one depth plane to another (for instance, from the top row to the second row in the cube autostereogram), the eyes need to adjust their convergence to match the new repeating interval between patterns. If the level of change in convergence is too high during this shift, sometimes the brain can lose the hard-earned decoupling between focusing and convergence. For a first-time viewer, therefore, it may be easier to see the stereogram, if the two eyes rehearse the convergence exercise on a stereogram where the depth of patterns across a particular row remain constant (e.g. the cube autostereogram shown above).
In a random dot stereogram, the 3D image is usually shown in the middle of the stereogram (see the following shark autostereogram). It may help to rehearse convergence by staring at either the top or the bottom of the stereogram, where patterns are usually repeated at constant interval. Once the brain locks onto this depth plane, it has a reference convergence degree from which it can gradually match patterns at different depth levels in the middle of the image.
One way to help the brain concentrate on divergence instead of focusing is to hold the picture in front of the face, with the nose touching the picture. With the picture so close to their eyes, most people cannot focus on the picture. The brain may give up trying to move eye muscles in order to get a clear picture. If one slowly pulls back the picture away from the face, while refraining from focusing or rotating eyes, at some point the brain will lock onto a pair of patterns when the distance between them match the current convergence degree of the two eyeballs.
Another way is to stare at an object behind the picture in an attempt to establish proper convergence, while keeping part of the eyesight fixed on the picture to convince the brain to focus on the picture. A modified method has the viewer stare at his/her reflection on the shinny surface of the picture, which the brain perceives as being located twice as far away as the picture itself. This may help persuade the brain to adopt a wall-eyed convergence while focusing on a nearby picture.
This article analyzes autostereograms designed for wall-eyed viewing. For crossed-eyed autostereograms, a different approach needs to be taken. The viewer may hold one finger between his eyes and move it slowly towards the picture, maintaining his focus on the finger at all times, until he is correctly focused on the spot between him and the picture that will allow him to view the illusion.
It is estimated that some 2% of normally sighted people cannot see the illusion in autostereograms.
Reference
- Pinker, S. (1997). The Mind’s Eye. In How the Mind Works (pp. 211–298) ISBN 0140244913