Physics 362 - Image Processing
Spring 2000
Westpfahl

Sean Hathaway, Christopher Rapson, Maggie Stauffer
3D Imaging Project

Our project involved making 3D images from two imported images using IDL.  Our photographs were taken using a digital camera along a stationary baseline.

To make the image appear 3D, it was necessary to mimic the behavior of the eye.  The brain combines two separate images - one image perceived by each eye.  The baseline in this case is the distance of eye separation.  Each image is taken from a different point of view; it is the parallax difference between objects that the brain interprets as distance in three dimensions.

In this project, we are combining the two images that the eyes would normally see, then selectively filtering portions of the picture to each eye using red-blue 3D glasses.

It is important that the images be taken from two different places, just as our eyes each make a separate image which is compiled into one image in our brains.  It is also important that an object be aligned in the background (to serve as an "infinity point."  In these images, the queen serves as the infinity point.

Here is the code we used to create these images:

pro make3d, image, path

left=imagel[2,*,*]                         ;extracts brightest layer of image
right=imager[2,*,*]                        ;assumes that images are named imagel (for left)
;and imager (for right)

r=intarr(256)                              ;makes red, green and blue vectors
b=r
g=r

for i=0,255 do r(i)=i                      ;assigns values to vectors
for i=0,255 do b(i)=i

image=bytarr(3,320,240)                    ;makes a byte array for final 3D image

image[0,*,*]=left                          ;puts left (red) image in first layer
image[2,*,*]=right                         ;puts right (blue) image in third layer

write_bmp, 'image.bmp', image, r,g,b       ;writes bitmap to directory

;now look at the image through 3D red-blue
;glasses to see the picture.
;the image must be viewed with a separate
;program such as Paint.

end

make3D.pro - the actual IDL program script
make3D.txt - IDL script in text format

Once we finally figured out the process, Dr. Westpfahl suggested that we image people:

Dr. Westpfahl sat very still for us, so he was the first guinea pig.  Unfortunately, the camera mount slipped and the pictures are not aligned in the z-direction.

Maggie found it very difficult to sit still.  However, after about 10 tries, we found two similar pictures.

Visit New Mexico Tech Physics