Create 3D stereo images using a digital camera

The idea behind creating 3D images is that you want to capture two seperate images. One image represents what the left eye would see. The other image represents what the right eye would see. If we then have a way to view the images so that the left eye sees only the left image and the right eye sees only the right image, we would perceive a 3D image. I use a red and blue filter to block the image meant for the opposite eye. One of the images must be colored blue, and the other must be colored red. The two images are added together to create one composite image. The composite image is then viewed with eyeglasses which have a red filter in front of one eye and a blue filter in front of the other. The example images should be viewed using a red filter on the left eye and blue on the right.
Capturing the left and right images is as simple as taking the left picture, moving a few inches to the right and taking another picture. The difficulty is keeping the camera movment such that the tilt and angle have not changed. Also the height should not change. The only movement you want is a left to right translation.

Below are some examples of images I have created, and some common problems.

These have poor alignment caused holding the camera by hand
Some of these also have too much distance between the camera locations when taking the left and right photos. The distance should be about the distance between your eyes (2 or 3 inches)
computerRoom1.jpg 97353 bytes
computerRoom2.jpg 79743 bytes
flower1.jpg 117135 bytes
livingRoom1.jpg 108951 bytes

This was taken holding the camera by hand. The alignment is good enough to get fair 3D imaging quality
jeremy.jpg 163787 bytes

Moving objects cause a poor image because the object does not appear the same in both left and right images. Notice how the movement of the anemone (behind the rocks) and snail (one on the left) destroys the 3D effect. Moving objects can be captured using two identical cameras which capture the image at the same time. This image was also taken holding the camera by hand.
fishTank.jpg 240672 bytes

These are fairly good I took holding the camera in a fixed position (i.e. on a tabletop)
couch.jpg 165510 bytes
flower2.jpg 71841 bytes
livingRoom2.jpg 274709 bytes

Here's the C-code I used to align these images. The software reqires input left and right images to be in pnm format. Use jpegtopnm and pnmtojpeg tools to convert. The software also requires the libpnm library. The software should compile and run easily on a linux machine (where it was developed). Your milage may vary on Windows or other platforms.