Synthetic 3D Imaging - P.S. #5

Things to do before the next class, Monday Feb. 26

Parallax Barrier Autostereoscopic Hardcopy

Make an achromatic (black-and-white) hardcopy parallax barrier two-view image. This consists of 3 parts: (1) a semi-transparent parallax barrier, (2) a printed interdigitated image, and (3) a separator. Each is about 100mm in width. (The exact size is your own choice.)

[1]
Select the parameters of the system. The most important parameter is the pixel spacing, equal to the barrier period (called "b" in class). Choose b=0.5mm. Because it is a 2-view system, the width of the viewing zone is one interocular distance, IOD=65mm. Viewing distance will be about 650mm. Finally, choose a slit width of b/2. This means that the parallax barrier has a duty cycle of 50 percent.

[2]
Generate a parallax barrier. This consists of an array of thin black vertical stripes printed on transparency film. Horizontally, each stripe should be b-w=b/2 in width and separated by w=b/2. First, generate an appropriate pixel file. One reliable route is to write a small C program to generate black and white pixels. Then, convert this raw file to a Postscript file. (I have a program that does this.) Next, print the Postscript file. If you have a better route, use it. Before printing onto transparency, test your barrier on paper. Look closely: you should see clear black and white edges. If the barrier is dithered out, then find a better printer, or find a way to turn the dithering off.

[3]
Generate your interdigitated image. First, render a left and right view of a scene, observing the chosen parameters, and avoiding gross overshooting of the disparity budget. Because these images will be printed in black-and-white, you must generate achromats at some stage. You can render with all white and grey. Or, save the images as greyscale. Or, write a little C program that reads in the RGB pixel values and generates a Y value: Y=0.32*R+0.58*G+0.10*B.

Interdigitate the left-right pair. This requires access to pixels, so don't save rendered views in JPEG or GIF or any lossless format. Be sure to interdigitate in the correct order. (Think about why it won't fail catastrophically if you invert them.) One way to interdigitate is to write a C program that does the following:

  • read in two pixels from the Right view
  • averages them
  • output the average as the first subpixel
  • read in two pixels from the Left view
  • averages them
  • output the average as the next subpixel
  • repeat for all pixels...

    Vertically, pixels are independent. Each horizontal line of pixels is treated separately. (Notice that we are trading off horizontal resolution for multiple views.) There are other methods. Use what works for you. For example, the averaging step - essentially a horizontal subsampling - can be done in xv or Photoshop. Then interdigitate by doing a merge of every other pixel.

    [4]
    Print the interdigitated image (black and white is fine) on paper before committing to transparency. The paper one will give a reasonable though dim image. This is OK for debugging, experimenting, etc. Printing on transparency allows for backlighting of the whole assembly, and therefore a brighter image.

    [5]
    Find a separator. The separator must have the correct optical thickness according to the formula discussed in class. The optical thickness is the index of refraction times the physical thickness. Approximate indices of refraction: plastic has n=1.5; glass has n=1.4; air has n=1.0. Putting the interdigitated image and the barrier back-to-back gives a separation of 2 transparency thicknesses. (My 3M transparencies have a physical thickness of 0.1mm, optical thickness of 0.15mm.) You may need to stack a few clear transparencies as a separator. Or forage for something better: thin picture-frame glass, thin plexiglas, an old widowed CD jewel box or cassette case. Another alternative is to use an air-spacer: tape the image and barrier on separate pieces of glass, facing each other, and put spacers of proper thickness at 3 points around the edge.

    Assemble the image, separator, and barrier. Once aligned, clamp or tape (for that added feeling of permanence). Alignment should be do-able by eye. Vertical is not crucial. Horizontally, it repeats every b, so fine-tuning is needed to make the boundary between left and right exit pupils fall about normal to the image. Tilt is tough, but you should see moiree patterns (like looking through 2 chain-link fences) if there is any relative tilt. Gently rotate the barrier until the broad stripes disappear.

    One trick to aligning is to use an alignment strip in the interdigitated image. Simply force the extreme left vertical column of pixels to all "0" for the left-eye view and "255" for the right-eye view. Once printed, this column can make it clear when the barrier is correctly aligned. Use a couple alignment strips if you need them.

    Hints and comments:

  • If you chose to use a slide printer, great. This will produce a 35-mm image that is small but has superior quality. Choose a smaller b=0.2 to take advantage of the superior resolution. This also eliminates that need for a thick spacer.
  • Share code if you like. Post it, if you're feeling generous. Trade it if you are in a leveraging kind of mood.
  • Keep the image simple. You won't have a whole lot of resolution to play with.

    [6]
    Cardboarding question:
    This is an actual problem to be worked out on paper and handed in in class. Near the plane of the barrier, what is the smallest difference in depth that the human eye can see, given the parameters above? In other words, given image pixel spacing of b, what is the smallest (non-zero) binocular disparity, and what change in depth does this correspond to when viewing a reconstructed image point near the plane of the barrier? Find help in McKenna pp. 433-4 and McAllister pp. 54-55. [Send email if you need hints.] Draw a quick sketch, figure out a minimum depth. Give this to me in class. Please also include the parameters used for your parallax barrier system.


    Synthetic 3D Imaging / Mark Lucente / copyright 1996