modernmicroscopy : articles

Assembling Stereo Anaglyph Images with Photoshop
by  John C. Russ, Materials Science and Engineering Department,
North Carolina State University, Raleigh, NC
J. Christian Russ, Reindeer Graphics, Inc., Asheville, NC

6/27/20051 | 2 | NEXT>> 

A recent article that appeared in Microscopy Today showed a flawed and very awkward procedure for using Adobe Photoshop® to combine stereo pair images into a color anaglyph that can be viewed through colored glasses. The correct procedure is quite simple and straightforward, as described below. The specific commands and functions shown correspond to all recent versions of Photoshop, on either a Macintosh or Windows PC.

 

The starting point is, of course, a pair of stereo images. Whether these are acquired with an electron microscope, a macro camera or by aerial photography, the basic requirements are that they be taken at the same magnification, be the same size, and that they include as much common area of the specimen as possible. If the two images are taken by shifting the camera or specimen laterally, which is the method often used at low magnifications or in aerial photos, the horizontal shift should not be more than about 15% of the image width. If tilting the specimen is used, angles in the 5 to 10 degree range produce good results. Using too large a shift or tilt may still produce images that are suitable for measurement of vertical heights, but the anaglyph image will usually have too much displacement of features (parallax) for comfortable viewing. In either case, the images must be viewed so that the shifts produced by tilt or rotation are horizontal, corresponding to a vertical orientation for the tilt axis or a horizontal shift for the displacement method.

 

As shown in Figure 1, stereo viewing produces information about the relative depth of features in the image when the viewer’s eyes rotate inward in their sockets to focus on an object. It is only by rapidly shifting the point of focus among many locations in a scene that we build up a general mental map of the relative distances of objects by stereopsis. In most scenes it is other clues - relative size or position, rate of motion in the visual field, shading, the obscuring of one object by another, etc. - that provide most of the information on distance, which is why people with one eye, or who for various reasons cannot fuse stereo images, can still function well, drive cars, even play sports. When different images are provided to each eye, vision must select the same object in both images. If the points are displaced vertically, it becomes very difficult for the eyes to find them in the two different images. Also, large differences in contrast or brightness should be avoided.

 


Figure 1. Exaggerated diagram of stereo viewing. An angle of
about 5-10 degrees corresponds to typical reading distances.

 

To assemble the stereo images into an anaglyph, open both of them in Photoshop. The example shown in Figure 2 is a stereo pair of a small fossil (an ammonite) using a macro camera, stopped down to get enough depth of field to keep the surface in focus. The fossil was mounted on modeling clay and tilted to get the required two views. The object was shifted to bring a recognizable location near the center to approximately the center of the field of view.

 


Figure 2. Stereo pair images of an ammonite fossil.

 

All colored stereo viewing glasses use the convention that the left eye has a red filter while the right eye uses blue or green. In case you didn’t save the cheap cardboard glasses they handed out when your local theater showed its most recent stereo thrill-a-rama (the enthusiasm for stereo movies seems to revive about every 10 years), you can purchase them easily. SPI Supplies sells good quality ones with real frames (Figure 3) for about $10, and both they and many other suppliers (don’t forget eBay) will sell you a dozen of the cardboard kind for that amount.

 


Figure 3. The SPI Supplies plastic-framed stereo viewing glasses.

 

If the original images are in color, rather than gray scale, they must first be converted. This method of stereo viewing presents a monochrome image to each eye. (To view colored stereo images, other methods are used such as projectors and glasses with polarizing filters, or LCD lenses that can flicker on and off at a rate that corresponds to the screen display, or an optical viewer that directs different images to each eye.) Some people with experience in viewing stereo can just stare at the side-by-side images and achieve fusion. This article is directed toward the anaglyph method, which practically speaking restricts the images to monochrome. In Photoshop, selecting Image->Mode->Grayscale will remove any color information from the image and leave just the brightness or luminance information.

 


6/27/20051 | 2 | NEXT>>