Autostereograms

Autosterogram Presentation

The human brain creates a 3D model of the world by using many clues such as lighting, overlapping of objects, and shading. 2D photographs have most of this information, but are missing one important component: different images for the left and right eyes. The brain uses these differing perspectives to judge depth in a process know as stereopsis. All techniques that create the illusion of 3D from a physically 2D image have to solve this problem of sending different images to the left and right eyes.

The anaglyph method uses a pair of blue and red glasses to filter the left view containing red, and the right view containing blue.

The active shutter method rapidly alternates left eye and right eye views. Glasses synced with the display let light through to the left eye only when the left eye image is being displayed and vice versa.

The polarization method emits images for the left eye as waves oriented differently from waves intended for the right eye. Polarized glasses allow only the waves oriented for each eye.

In contrast to the other methods, autosterograms do not require glasses to direct images to each eye. Your brain has learned how to judge depth by focusing and pointing, or converging, your eyes on an object at the same time. However, when you converge your eyes at one point and focus on another point, your brain can be tricked. When you point your eyes so they converge at a point in the distance while focusing on the autostereogram image on a computer screen, your brain interprets pairs in the autostereogram pattern as if they were on the way from the distant point. The left pattern is interpreted as the left eye’s view of the distant point and the right pattern is interpreted as the right eye’s view of the point. Your brain then combines the two patterns into a mental 3D model. The autostereogram effectively hijacks the sight lines on the way to the eye to make it appear as if something is behind it. The idea is represented here:

There are two types of autostereograms: wallpaper and random dot. In a wallpaper autostereogram, the repeating pattern is composed of small images. The perceived depth is determined by how close the images are repeated horizontally. In the image below, the top row of tigers is spaced closest together horizontally and is perceived as being the closest in depth as well. If you are seeing it correctly, you should count eight tigers. The 2D image only has seven. Your brain attempts to pair each 2D tiger with the one next to it to form a 3D tiger. For the two tigers on the end that do not have a pair, the brain imagines a pair for it and renders it in 3D as well.

A random dot autosterogram uses a small pattern of repeating horizontal dots. Because the pattern is much smaller than a full image, the depth can be perceived in much more detail. You can’t see what the shape will be by looking at the picture in 2D. The depth will only emerge once the convergence and focus are at the right distances. Here is an example.

The first step in generating an autosterogram is to make a depth map. A depth map is a grayscale image which represents the distance of each pixel from the camera as a color. White is close while black is far away. This is the depth map that created the above random dot autosterogram. This is also the shape that you should see emerge in 3D.

I created depth maps in two ways. I’ve made 3D models in Blender, a 3D modeling program. Using the compositor, I output the brightness of the image based on the z distance, which is measured from the camera. The second way is using an Android phone. The Camera app has a Lens Blur feature which captures a sequence of images as you move the the phone vertically a few inches. It uses the information to construct a depth map which it uses to blur areas in the photo that are far away. This makes for a professional looking portrait or closeup of an object. The depth map itself is not visible, only the end result. However, the depth map is contained inside the photo file metadata. Depthy can extract the depth map and produce a cool wobbling 3D effect from the information.

I used the depth maps as inputs to two programs. Easy Stereogram Maker uses a pattern and a depth map as the mask. The patterns are images but they contain small repeating patterns so they are more like the random dot type than wallpaper. To create a fully random dot autostereogram, I used the MagicEye.js webapp from Ian Pearce.

I’ve put together a presentation of autostereograms that I’ve created using these methods. You can follow this link or click the button at the top to see them. The images are in groups of three. The first image is the hybrid autostereograms from Easy Stereogram Maker. The second is the random dot autostereogram from MagicEye.js. The third image is the depth map, or the “answer”. I’ve found that the random dot ones are easier to see because your brain doesn’t get distracted into looking at the image patterns in 2D.

The recommended way to start seeing autostereograms in 3D is to hold it right up to your eyes to force your eyes to be converging behind the image. Then slowly move it back and you should start to see the background distinct from the foreground. After a while, you can move your eyes around and explore the image. Some people I know did not get it the first time and came back later and got it after several minutes of looking at the same image. Once you learn how to see one, you can see others in a few seconds.

If you’d like to read more about the interesting field of 3D vision, I recommend the Wikipedia article on Stereoscopy as a good place to start. It contains a list of subtopics in areas like perception and display technologies.

Leave a Reply

Your email address will not be published. Required fields are marked *