Simple algorithms for creating random-element stereograms on the Macintosh

  • PDF / 1,200,365 Bytes
  • 11 Pages / 558 x 756 pts Page_size
  • 59 Downloads / 167 Views

DOWNLOAD

REPORT


Simple algorithms for creating random-element stereograms on the Macintosh JOHN A. BARO

Wheeling Jesuit University, Wheeling, West Virginia Traditionally, the creation of random-element stereograms is a computation-intensive process. However, by taking advantage ofroutines built into the Macintosh operating system, multiple-depth stereogram anaglyphs can be easily created from any black-and-white or grayscale image. Any complex shape can be selected from the pattern and offset in one eye's view relative to the other's to create the illusion of depth, without the need to calculate offsets on an element-by-element basis.

Random-element stereograms, first described by Julesz (1971), are a special type of stereogram made up of two sets ofsmall, randomly placed elements. For many of these elements, there is an exact match in the images seen by the two eyes. There are, however,other elements in one image shifted either to the right or left relative to the positions of the matching elements in the other image. This shift in position of some of the elements creates a difference, or disparity, between the images seen by the two eyes. Those areas that contain a disparity are perceived to be in depth, relative to those that have no disparity. This type of pattern is especially interesting to vision scientists because each of the two images alone contains no apparent organization or form. The form is "created" by the visual system, which performs the complex calculations needed to match up the elements viewed by each eye and create the perception of form and depth. One means of viewing these stereograms is to place the two images side by side and view them through prisms, so that, visually, they appear to occupy the same position in space. An alternative method is to tint one ofthe images red and the other green (any dissimilar colors will do), then physically superimpose the two images. This type of stereogram is called an "anaglyph" and is viewed through red and green lensesin this way, each "half" of the combined image is seen by only one eye. The creation of random-element stereograms is traditionally a very computation-intensive process. The positions of thousands of elements (i.e., typically dots) need to be calculated and offset, based on algorithms, to create

Apple and Macintosh are trademarks of Apple Computer, lnc., registered in the United States and other countries. QuickDraw, Mac, and Mac OS are trademarks of Apple Computer, Inc. PowerPC is a trademark of International Business Machines Corporation. Code Warrior is a trademark of Metrowerks, Inc. All other trademarks are the property of their respective owners. Correspondence should be addressed to 1. A. Baro, NASA Classroom of the Future, Wheeling Jesuit University, Wheeling, WV 26003 (e-mail: [email protected]).

regions of disparity between two sets of otherwise identical elements. Fortunately, the Macintosh Toolbox (the set of routines that make up the Macintosh Operating System, or Mac OS) contains function calls that can greatly simplify this process of cre