Simple 3D photos using any digital camera

To see something in 3D you need to present a different view to each eye. Modern 3D cinema uses polarised light to separate the images. 3D photos date back almost as far as photography itself. All you need to make your own is a way of separating the 2 images. The cheapest way is using colour. Special glasses with a red filter over one eye and a green or blue filter over the other can present each eye with a different image. You can buy these glasses on ebay.

This simple program, written in Python, uses the Python Image Library (PIL) to break 2 images into RGB, and then builds a new image using the red from one image and the green and blue from the other.

Obviously you need to view the image using the red-blue glasses. Make sure that you get the 2 images the right way round. If you swap the left and right eye's images it looks odd.

Simply take 2 photos of the same subject from slightly different angles. This is a bit hit and miss, but you can see if it has worked by flipping between the 2 images on the camera. Take one photo, then move the camera right by about the distance between your eyes, then, framing the photo on the same subject, take another photo.

I took this photo of an Iron age hillfort in Bluebell season in 2011.

Or how about Canova's statue "Psyche reviving Cupid with a kiss" in the Louvre, I took on a visit there in 2012.

The code looks like this :

#!/usr/bin/python

import sys
import os
import Image

opath = sys.argv[1]
lpath = sys.argv[2]
rpath = sys.argv[3]

if os.path.exists(opath):
    raise Exception("Path '%s' exists" % opath)

left = Image.open(lpath, 'r') 
left.load()
right = Image.open(rpath, 'r')
right.load()

r, x, x = left.split()
x, g, b = right.split()
stereo = Image.merge("RGB", (r, g, b))
stereo.save(opath)

You can even print the images on paper and make your own 3D cards.