PHSColograms and Rotated PHSColograms
by Stephan Meyers, Ellen Sandor, and Janine Fron
Computer & Graphics edited by Carl Machover
Volume 19, Number 4, July/August 1995
 Abstract
This paper discusses the computer-interleaving method of producing autostereoscopic imagery. This method is based in lenticular photography , but replaces the lenticular camera with a computer program and output on a high-resolution imaging device. We call these images PHSColograms . We present significant new research in improving the capabilities of computer interleaved autostereoscopic imagery in the form of rotated interleaved barrier strip autostereograms. This new advance removes the dependence of pitch and number of images on the resolution of the output device.

 1. Introduction

1.1 History

Stereo imaging has been understood since 280 A.D., and has been discussed thoroughly elsewhere. We will simply begin by noting that there are many cues for depth perception, and the most relevant and strongest one is binocular disparity. When a viewer is presented with a different view of a scene from a horizontally displaced viewpoint in each eye, there is a perception of depth.

Various means have been used to present multiple images to each eye, such as stereo viewers. Many of them trade some other image feature for stereo imaging, such as color (anaglyph), intensity (polarization), time (shutter systems), and spatial resolution (lenticular and parallax barrier imaging).
 1.2 Description of the barrier screen and the lenticular method
Barrier-strip technology, which uses a line screen, is the pinhole equivalent of the lenticular system, which is based on cylindrical lenses. In the former, the eye sees images through slits in a line screen; in the latter, the eye sees images refracted through the center of a series of lenses. All methodologies described in this paper apply equally to lenticular as well as barrier strip systems, except for the automatic generation of the line raster itself. For our purposes, the two are equivalent.

Most autostereographic 3D photographers to date have used Bonnet-style cameras, which have barrier-strip or lenticular screens in the back of the camera. In a one-step dedicated process, they photograph a scene -- the exposure process directly puts the lenticulation on the film. The photography can be either in the form of separate exposures or a single, continuous exposure.
 
 Figure 1. - Combining Process
Various combining processes have been used to create autostereographic images. These processes differ from the dedicated process in that multiple discrete images are photographically combined to create the lenticulation pattern. These discrete images may be exposed directly from life to the film, or photographed using other means, such as an ordinary camera mounted on a track system. Variations on this process include moving the lens and scene (Bernard system) versus moving the barrier screen (Cunnally system), and different media for the input images, such as a computer monitor (the Illusion system).

 2. The PHSCologram method

2.1 Creation of imagery

Input to the PHSCologram process, is in the form of a number of discrete images, similar to the combining processes noted above. However, instead of being in the form of transparencies or other photographic medium, the images are in digital form. These images could be photographed from life and scanned into the computer, or created by computer graphic means, which simulate photography. Computer graphics can also be intermingled with images from life, in the same manner used for computer generated special effects in motion pictures.

Once these images exist in digital form with proper registration, they are interleaved. The result of the interleaving process is a single image, which can be output on any imaging device with sufficient resolution and quality. Suitable imaging devices include the CrosfieldT line of digital prepress systems, the Kodak LVT and Premier systems, and the Iris color printers. An ideal imaging device would be a drum-based system, since lines going around the drum of such a system are guaranteed to be precisely vertical and straight. Non-drum imaging devices could be used, such as devices that expose film from a CRT, but the results would likely be much less precise.

Interleaving is the digital simulation of the photographic combining process, and follows a fairly simple algorithm. Consider each image to be composed of vertical strips, each strip being a single pixel wide. We number these columns starting from the left hand side. We take the first column from each image in order, then the second column, and so forth until we run out of data.
 
 Figure 2. - Computer Interleaving

If the images are stored in columnar format and are all the same size, the basic algorithm can be implemented in a few lines of code, as in this pseudo code example.

open all input files and the output file

For(each column in image X)
        for(each image I) {
                read column X from image I
                stretch column by a factor of N
                write column to output }

close all files

Due to the large volume of output data (a 30"x40" PHSCologram at 400 pixels per inch takes over 700 Mb), the output image is usually written directly to tape, rather than being stored on disk first. Ideally, we would like to connect the interleaving computer directly to the output device.

The barrier screen is constructed on the same output device and at the same output resolution as the image. The basic algorithm for an N-image barrier screen is to write N-1 opaque (black) lines followed by one clear line. Writing more clear lines with less black lines increases the amount of light permitted through the barrier, at the expense of reduced clarity.

 2. Rotated Interleaving

2.1 Limitations of normal interleaving

While the above method has broad reaching applications and presents numerous advantages over previous methods of creating autostereoscopic lenticular and parallax barrier images, it has a number of limitations, mostly related to inflexibilities of output devices.

Barrier screen and lenticular images created by photographic means are often discussed in units of pitch, or the number of lenses or lines per inch in the lenticular or barrier screen. The pitch is trivially related to the output resolution and the number of images in a digitally interleaved image by the following formula:

pitch=resolution/num_images
Where pitch is the number of lines per unit of the completed autostereogram, resolution is the number of pixels per unit available from the output imaging device, and images is the number of images in the autostereogram.

Since images must be an integer not less than 2, there are only a finite number of possible resolutions. For example, if our output imaging device has a resolution of 406.4 pixels per inch (from 16 pixels per mm), 13 images yields a pitch of 31.26 lines per inch. 12 images yields a pitch of 33.87 lines per inch. Other pitches, such as 32 lines per inch, are then unavailable without changing the resolution of the output imaging device. The following table shows some of the pitches available relative to the number of images:



Table 1. - Some Available Pitches
Number of
Images
Pitch
9

45.16
10 40.64
11 36.95
12 33.87
13 31.26
14 29.03


If an output device were available with infinitely variable resolution, this would not be a consideration, but most available imaging devices are only capable of certain resolutions, related to their gear or screw mechanism.

This is a severe limitation when working with lenticular material, which must be created to exactly match one of the pitches available on the desired output imaging device. This is far more expensive and time consuming than using available lenticular material, which is unlikely to match the available pitches.

Another limitation arises from the loss of resolution and light from the use of large numbers of images with a parallax barrier. the barrier screen blocks, ideally (N-1) of the N images. The more images used, the less light is transmitted. The percent of light transmitted by a barrier screen image is related number of images by the following formula:

percent=1/num_images ideal case
percent=open_cols/num_images real-world case


For 13 images, 7.7% of the light is transmitted by the barrier screen . While this is an acceptable amount of light for most applications, let us examine the result for 100 images with the resolution discussed above. The pitch for 100 images would be 4.064 lines per inch, and the amount of light transmitted would be 1%. This pitch and brightness are unacceptable, but we would still like to be able to use larger number of images for a variety of purposes.

 2.2 Rotated interleaving

In the method presented above, images are output so that the direction of lenticulation (e.g. the direction of the interleaving lines) is aligned with the rows and columns of the output device. While conceptually simple, both in understanding and implementation, research has shown this to be virtually the worst choice for many applications.

By rotating the image in the computer, we trade decreased vertical resolution for increased horizontal resolution. This is acceptable, since we lose so much resolution in the horizontal direction due to the linescreen or lenticular, that by comparison, we have resolution to spare in the vertical direction. This rotation may be accomplished by one of two means:

  • First, the rotation may be accomplished as a separate step from the interleaving. A computer would first interleave the images at a higher resolution than ultimately desired, storing the interleaved image for further processing. The interleaved image is then rotated, and scaled down to the desired size.
  • The second (and more efficient) method is to rotate the interleaved image implicitly as part of the interleaving step. The algorithm for this is significantly more general than the basic interleaving algorithm, and can automatically account for rescaling desired images, as well as interpolation, and even further image processing transformations, such as unsharp masking.

Postscript Diagram 1
Postscript Diagram 2
Given the desired output image size (Xs,Ys) and the desired angle of interleaving θ, compute the size of the output image (Xos,Yos) and allocate the needed storage. For each of the pixels desired in the output image, take the (X,Y) coordinate of that pixel and rotate it by q around the center (Xoc,Yoc). Test if the new location (X',Y') is in the active image area - that is, that it lies within the rectangle of size (Xs,Ys). If the pixel fails that test, set the color of the pixel to a color representing unused image area, such as black or white. If the test succeeds, determine the image to which that pixel belongs, by finding the horizontal position of that pixel relative to the edge of the nearest repetition of the pitch of interleaving. Further determine the position of a pixel in that image corresponding to the position in the output image. Set the pixel in the output image equal to the value of the pixel at the corresponding position in the selected planar input image. Continue this process for all of the pixels in the output image and output the finished product.

Two important variations on this algorithm should be noted:

  1. Antialiasing may be achieved by supersampling each pixel of the output image, computing an average of several subpixels within the output pixel. This increases the computation time for the algorithm, but may provide a better image, especially when combined with the use of a continuous tone output device.
  2. The value of a given pixel in the input planar images may be computed by interpolating values in-between the provided images. This latter change, while trivial, can greatly enhance the quality of the final image at a modest decrease in speed.

In actual practice, a much more optimal algorithm is used, which makes use of vector mathematics and the consistency in direction of computation due to the angle of interleaving. This alleviates the need for expensive computation of rotation, which must be otherwise computed using trigonometric functions.

The question is raised as to what the proper angle of interleaving should be. There are a variety of factors that come into play. For four color separations, the angle should be selected so as not to interfere with the printing angles of the offset colors, or there may be a moire with the lenticular or barrier screen . In general, this only applies when the pitch of interleaving is within roughly a factor of two of the line ruling of the output. In the case of other output methods, such as continuous tone output, the angle may be selected to allow a desired image to fit on the available output image size (rotating an image requires a larger available output image size, to accommodate space for the rotation). It may also be selected to provide an optimum tradeoff between horizontal and vertical resolution.

We have not yet discovered a means of computing an optimum angle for these purposes, since the horizontal and vertical resolutions vary discontinuously as a function of the angle of interleaving. We have empirically determined, however, that a wide variety of angles provide drastic improvements over the older computer interleaving method sufficient for our needs.

 2.2.3 Advantages of rotated interleaving
Rotated interleaving breaks the relationship shown earlier between the resolution of the output device, the pitch, and the number of images. Whereas earlier, each of these variables was dependent on the other two, each may now be changed independently. This provides for several improvements a new capabilities.
 3. 3.1 More images for 3D
For our previous, unrotated PHSColograms, we usually used 13 images, although other numbers were used, such as 9 and 16. In that system, when a feature in a scene has too much depth, it looks "jumpy." In an earlier paper , we proposed a simpler solution using motion blur to alleviate this problem. With rotated interleaving, however, more images can be used, thus smoothing the transition between multiple images. We have experimented with 32 and 64 images for this purpose.

There is, of course, a limit to the amount of depth which can be supported under rotated interleaving. Neither barrier screens nor lenticulars offer perfect extinction of unwanted images, and the barrier screen is actually permitting many more than one image to pass to each eye. For example, using our usual barrier screen , with 64 images instead of the usual 13, nearly ten images are visible to each eye. In spite of this, greater depth is possible with rotated interleaving, with a far smoother effect.
 3.3.2 More images for animation
While limited animation is possible with the unrotated interleaving system, rotated interleaving allows many more images, thus permitting more animation. We have experimented with as many as 100 images, or the equivalent of over 3 seconds of NTSC video.

Animation again has its caveats - too much motion appears blurry, for the same reasons noted above, and the use of the usual vertical barrier screen causes each eye to see a different animation time step, which can be disconcerting. In effect, 3D must be traded for animation, except under carefully controlled circumstances.
 3.3.3 Lenticular matching
As discussed in detail above, certain pitches are unattainable with unrotated interleaving, or are only obtainable by changing the resolution or other characteristics of the output device. With rotated interleaving, a precise pitch to match may be entered in the computer, and we are assured that exactly that pitch will be output, as long as the output device is calibrated properly.

It is an unfortunate artifact of the lenticular manufacturing process that, when a lenticular is made, the exact pitch is rarely known to a precision permitting a match on the first try. However, rotated barrier screens may be output and used to measure a given lenticular by interference. Counting the number of bands showing on barrier screen viewed through a lenticular gives a very precise account of the pitch of the lenticular material. The number of bands observed per unit length corresponds to the number of lines of error per unit length. For example, if we are using a barrier screen of pitch 80.00 lpi, and observe 5 bands across a 10 inch width of lenticular material, we know that the lenticular is either 80.5 or 79.5 lpi. A second barrier screen can determine the pitch to a precision of nearly the inverse of the sample pitch of a line per inch. For a 16 inch wide sample at roughly 100 lpi, for example, this equates to a precision of 1/16 lpi, or .0006 inch!
 3.3.4 Parallax correction
In unrotated interleaving, the pitch of the barrier screen is ordinarily precisely identical to that of the image, since they are output on the same output device. In photographically combined barrier-screen images, on the other hand, the pitch of the barrier screen is slightly higher than the pitch of the image. This difference permits an individual image to converge itself at a finite viewing distance. This distance is usually equal to the distance from the lens to the film during the combining process. Photographically made images, therefore, look the best the same distance away from them as the lens-film distance during combining. A digitally interleaved image, on the other hand, is theoretically only viewable at infinity, since the strips corresponding to a particular image never converge. However, because the slit in the barrier screen is not infinitely small, the image is viewable at a distance equal to roughly 2-3 times its width.
 
 Figure 3. - Convergence Comparison
Ordinarily, we prefer to keep the barrier screen pitch and the image pitch identical, in order to maintain long distance viewing, which is particularly desirable for most advertising applications. After all, uncorrected parallax permits good viewing from some distance to infinity, while corrected parallax only permits proper viewing within a finite range between two distances. Generally, we will choose infinite usable viewing distance over finite usable viewing distances!

However, for some applications it may be desirable to use parallax correction, i.e. interleaving at a very slightly lower pitch than the barrier screen or lenticular . Any viewing distance may be selected for parallax correction, and the precision of rotated interleaving permits the microscopic changes in pitch required for effective control.
 3.4 Disadvantages of rotated interleaving
All of these advantages aside, we still use the unrotated interleaving technique for the bulk of our work at (Art)n Laboratory. The same algorithm is usable, of course, by using a rotation of 0° (or 90°), losing the advantages of rotated interleaving, but keeping some of the other benefits of the more general algorithm, such as resolution independence. There are, however, a number of disadvantages of this new technique, hence our continued use of the older technique.
 3.4.1 Increased computational complexity & overhead

 The original PHSCologram interleaving algorithm amounted to little more than file manipulation, reading scan lines alternately from each of the input images and writing them to the output image. The rotated algorithm is somewhat more complex, requiring a more powerful computer.

  • The scanning of the input proceeds at an angle, thus requiring at least vector mathematics instead of simple incrementation to find the correct pixel. The present algorithm is roughly 80% processor bound, with the remaining 20% going to I/O operations. The older algorithm, by contrast, was far more I/O bound.
  • Because of the angled scanning of the input images, it is impractical to leave them on disk, or even to use virtual memory. They should be read into physical memory, or else the non-linear file accesses cause disk thrashing.
  • More images means more memory. 32 images at 1024x1024 resolution, 32 bits per pixel is a total of 128 Mb of images. With the operating system, the interleaving program, various buffers, and extra color planes for special printing, memory requirements can rapidly exceed this value. This is beyond the upper limit of available memory for most desktop PC's, and is costly.
  • Output pixel centers will usually not fall on the input pixel centers. This virtually requires the use of some sort of interpolation at each pixel, further adding to overhead.
 3.4.2 Decreased image size
Rotation consumes space. For example, an 8"x10" image rotated 25° requires a box 11.5"x12.4". We are already limited by the size of the output device (30"x40" for our preferred device). If we wish to create an image at the limits of the size of the output device, we cannot use this method. Furthermore, the cost of various materials and services, such as film processing and outputs, is related to the area of the output image. In the above example, rotation nearly doubles the area of the image, from 80 in.
 4. Conclusions
Digitally interleaved barrier-strip autostereography provides a practical method of directly producing autostereographic images from digital imagery without the need for cumbersome photographic processes. The new technique of rotated interleaving permits greater control and larger numbers of images, by removing dependence on the resolution of the output device. This technique is extensible into many areas, including improved autostereoscopic video displays.
 5. Acknowledgments
(art)n Laboratory would like to thank the following individuals and organizations for their assistance in our research: Silicon Graphics, Inc.; The Electronic Visualization Lab at the University of Illinois at Chicago, Thomas A. DeFanti and Daniel J. Sandin, Co-Directors, Maxine D. Brown, Associate Director; The Interactive Computing Environments Laboratory at the University of Illinois at Chicago, Thomas G. Moher, Director; IPP Lithocolor; Ross-Ehlert Photo Labs; Craig Ahmer; William T. Cunnally; ACM SIGGRAPH; Dr. Richard Sandor.
 Special thanks to Carl Machover