Depth

Autostereograms ("Magic Eye" Images)

Hidden 3D shapes in a field of dots. Generate your own Magic Eye picture, with your own word hidden inside, and learn how to see it.

Look at the two dots above the picture and let your eyes relax, as if you're looking at something far behind the screen, until the two dots become three. Hold that, then let your gaze drift down into the pattern: the shape rises out of it. If it looks sunken instead, you've crossed your eyes rather than relaxed them. Every picture is generated fresh in your browser, and "Show the hidden shape" displays the depth map it was built from.

A shape hidden in noise

At first glance the demo is just a field of coloured dots. Let your eyes relax as if you're looking at something far behind the screen, and for many people a shape rises out of the pattern in convincing depth. You can choose the shape, or type your own word, and the "Show the hidden shape" button reveals the depth map each picture was built from.

There's no special ink or hidden image. The shape is made entirely of tiny sideways shifts in a repeating pattern. Looking at it normally, the shifts mean nothing. They only become depth when your eyes point at one place while your brain treats them as looking at another.

Your two eyes, fooled on purpose

Normal depth perception relies on binocular disparity. Your eyes are a few centimetres apart, so each sees a slightly different view, and the brain measures the small sideways offsets between the two views to work out distance. Near things produce a larger offset than far things.

An autostereogram is a pattern that repeats across the picture, with the repeat slightly narrower wherever something should stand out. When you relax your eyes so that each one lands on a different repeat, the brain pairs up dots that are one repeat apart. Where the repeat is narrower, the pairs are closer together, and the brain reads that exactly as it would read a nearer object. The mechanism is completely ordinary; the depth signal is just manufactured. The demo builds each picture with the algorithm published by Harold Thimbleby, Stuart Inglis and Ian Witten, which works out, row by row, which dots must match (Thimbleby, Inglis & Witten, 1994).

If you cross your eyes instead of relaxing them, the pairing reverses and the shape appears sunk into the page rather than standing out. Both are correct readings of the same picture.

Why some people can't see it

Some people never manage it, and it's usually not their fault. Anyone with reduced stereo vision, for example from a childhood squint or a "lazy eye", may find the depth faint or absent, because the effect depends entirely on the two eyes working together. For everyone else it's a knack that improves with practice. The two dots above the demo help: when your eyes are relaxed by the right amount, they appear as three, and that's the moment to let your gaze drift down into the pattern.

From Wheatstone to Magic Eye

Charles Wheatstone showed in 1838 that two flat drawings, one for each eye, could create a strong sense of depth, and invented the stereoscope to view them (Wheatstone, 1838). Béla Julesz, working at Bell Labs, took the idea further in 1960 with random-dot stereograms: pairs of computer-generated dot patterns that each looked like pure noise, yet showed a clear shape when viewed together. Because neither image contained any outline or shading, they proved that the brain can compute depth from disparity alone (Julesz, 1960).

Christopher Tyler and Maureen Clarke then folded both eyes' views into a single repeating image, the first single-image random-dot stereogram (Tyler & Clarke, 1990). The format became a craze in the early 1990s under the Magic Eye brand, created by Tom Baccei with the artist Cheri Smith, in bestselling books, posters and newspaper strips. Chromostereopsis also creates depth from a difference between the two eyes' images, but from colour and the optics of the eye rather than a pattern.

Sources and further reading

  1. Wheatstone, C. (1838). Contributions to the physiology of vision. Part the first. On some remarkable, and hitherto unobserved, phenomena of binocular vision. Philosophical Transactions of the Royal Society of London, 128, 371–394. Find this reference on Google Scholar
  2. Julesz, B. (1960). Binocular depth perception of computer-generated patterns. Bell System Technical Journal, 39(5), 1125–1162. Find this reference on Google Scholar
  3. Tyler, C. W., & Clarke, M. B. (1990). The autostereogram. Proceedings of SPIE: Stereoscopic Displays and Applications, 1256, 182–197. Find this reference on Google Scholar
  4. Thimbleby, H. W., Inglis, S., & Witten, I. H. (1994). Displaying 3D images: Algorithms for single-image random-dot stereograms. Computer, 27(10), 38–48. Find this reference on Google Scholar
Discovered / popularized by
Béla Julesz (random-dot stereograms); "Magic Eye" single-image format popularized by Tom Baccei
Year
1959
Category
Depth & Anamorphic Illusions

Read the science behind why this happens →