Introduction: Create 3D Images Using Your Cell Phone, a Stick, and Gimp

How to make anaglyph 3D pictures using your cell phone, a wooden stick, and Gimp.

I have longed to take 3D pictures with my digital camera but I have found that most methods are pretty complicated and expensive. After doing some reading I found that there are relatively simple methods that involve taking two identical pictures, side by side, that are roughly two inches apart. When the images are filtered through the red and blue colors used by standard red and blue 3D glasses, you can create and share your own 3D pictures pretty easily.

There are definitely better, and more professional methods to pulling this off (some are on this site if you search around). What I am giving you is the highly portable, and nearly free method. ;-)

For this activity you will need:
1) A cell phone with a camera, or a digital camera.
2) Some double-sided foam tape, and a small piece of plastic.
3) A wooden stick (or a level).
4) The Gimp image editor (free at http://www.gimp.org).
5) The "make anaglyph" script-fu plugin for Gimp (also free at http://registry.gimp.org/node/6527).
6) Some red/blue 3D glasses (you can buy these from http://www.dealextreme.com, http://www.ebay.com, or from a comic book store - make sure you are getting the correct colors, RED and BLUE!).

Step 1: Prepare a Suitable Camera

The method:
Your goal is to prepare something that you can hold steady, which your camera can slide back and forth on. This is traditionally done by creating a "slide" out of metal or plastic, with holes drilled in it to attach your tripod-mount to. We will instead use a piece of wood with hand-drawn markers, and we will affix something directly to your phone (or camera) that will allow it to glide back and forth.

I have several digital cameras laying around that vary in age and quality. But I never carry them with me. I do however, always carry my cell phone for work purposes. I have an LG brand EnV2 with a 2.0 mega-pixel camera. All of the sample photos you see were using my cell phone.

You will need to find something that you can stick to the camera which will keep it level on your stick. I went through my bin of recycled plastics and pulled out an old lunch meat container. I was able to chop down the lip of the container and fit a piece of double-sided tape into it. Then it was placed right onto the phone. Surely someone will scorn me for using permanent tape. Just know that this comes off really easily with orange juice and a blunt scraper.

Step 2: Prepare a Stick

You will need something to hold your camera onto for two reasons. One, to line up your shot and keep the camera level. Secondly, you need to measure the distance between your two photos. Your pictures need to be two inches apart. To accomplish this, I pulled a length of scrap wood out of a pile, and drew on 2 inch straight lines with a yardstick. You may choose to use a level if you have one, or don't mind spending a couple of dollars for one. You will need to keep your photos as horizontally level as possible. That is, if your hand slips up or down between the first and second picture you take, there will be a little work involved later to get things lined back up.

Step 3: Take Your Pictures

This is fun, and also a little maddening. You will find that your best pictures are the ones with very little 3D dimension. If you put something right in front of the camera, then you will end up cross-eyed trying to look at it. Before you head back to your computer and start manipulating your photos you should take several sets and experiment.

You are going to take two pictures in this process. Start by holding the stick out in front of you with your right hand wrapped firmly around it. If there is something nearby that you can rest it on, use your environment to steady your hand. With your left hand out-stretched, place the plastic lip on the camera onto the stick. You should be able to slide it freely back and forth. Line your camera up with one of your markers and snap your first photo.

WITHOUT MOVING YOUR STICK - slide the camera to the RIGHT and line it up on the next two inch mark - then snap another picture.

While taking pictures, your subject(s) must remain perfectly still between photos. If the wind is blowing, animals are moving, or cars are driving by - these are going to ruin your shot (see my bad examples later).

Step 4: Create 3D Magic

Get Gimp and the Plug-In:
Download and install The Gimp fromwww.gimp.org. This is a free program and it runs on Windows, Linux, and even OS X. When your installation is complete, go out and download the "make analyph" script-fu plugin from here: http://registry.gimp.org/node/6527. This will take a lot of the guess work out of the tricky coloring process.

Install the Plug-In:
To install the script, first check to see where the script should go. Open up Gimp. Do not close any of the windows. There are several of them, and you will need them. In Gimp, you can click Edit (from the menu bar) > Preferences. This will pop up a window. Expand "Folders" in the left pane, then scroll down to and select "Plug-Ins". Note the location of where your script should go. There is usually one for just you, and then another for everybody that uses the system. Copy the script-fu-make-anaglyph.scm file into one of these folders, and then restart Gimp. You should now see a new menu option called "Stereo".

Open Image #1:
Copy the pictures you took onto your computer now. Right click on the first image in a set and open it with Gimp. If you need to rotate it, you can click Image > Transform > and then Rotate the direction you need it to go.

Open Image #2:
Keeping the first image open, open your second one. Rotate it if you need to. Copy the second image to your clipboard by clicking Edit > Copy. Then go back to your first image and click Edit > Paste As > New Layer.

Make Anaglyph:
You should have a Toolbar floating around that shows your Layers. One will be labeled as Background, and the other will be labeled as Clipboard. Select the Background layer by clicking on it. Now click "Stereo" from the menu bar and select "Make Anaglyph". You will get a popup with two colored buttons. With Background still selected, click the red button. You will get a window that allows you to adjust the colors. Just click OK.

Now select the "Clipboard" layer, and click the blue button in the "Make Anaglyph" window. Again, do not change the colors. Just click OK. Now click "OK" to the Make Anaglyph window, and your images should appear stacked in their 3D form.

Make corrections:
Get out your 3D glasses and put them on now. How does it look? If you feel a little cross-eyed, then you may need to make some adjustments. Make sure your layers are lined up horizontally. If they don't match, you can click down on the image with your mouse, and move the top layer around. You will find that if you slide it side-to-side you can actually change the depth of your picture (for better or worse). If it looks like the sky is falling, and your subjects are floating away from you - then you probably got your red and blue mixed up, or your first and second pictures were swapped.

Finalize the image:
Once your picture looks good, and the 3D doesn't leave your brain aching - click Image > Flatten Image. This will merge the layers together and leave you will an image you can share. Click File > Save As - and select a name and location for your new photo. It's a good idea to keep your original photos as well as the 3D result so that you can experiment or make adjustments with them later.

Step 5: Share Your Creations!

Now you can share your 3D creations with friends and family by uploading them to a free image hosting site. If you all ready have a Gmail account, you can use Googles' Picasa. Check out my gallery here for some samples, experiments, and bad examples: http://picasaweb.google.com/steve.ballantyne/3DExperimentation#

If you should decide to attempt this, and you create some nifty 3D pictures - drop me a comment and let me know where I can see them.

Happy 3D'ing!