Creating Anaglyphs with Adobe Photoshop
I learned how to do this from Andrew J. Kelly's page which unfortunately has been deleted
by the University of Houston.
June 27, 1999: I added instructions for Photoshop 4 and 5.
February 6, 2005 comment:
All this goes much easier and with better results if you have a digital camera.
The instructions are still relevant, but obviously you can skip the scanning instructions.
Contents:
- A point and shoot camera
- A color flatbed scanner
- Adobe Photoshop (I have the Windows version).
- Get images of the same subject from two points of view that are separated horizontally by 2 1/2 inches.
- Remove the red component from the right image.
- Remove the green and blue components from the left image.
- Superimpose the images using a blending mode that combines the RGB color values from the two images.
- Move/rotate the images for the best effect.
- View with red-blue glasses (with the red filter on the left).
Using a normal 35mm camera, take a shot of a scene with objects at
approximately 6', 15', and 50'. This is to provide contrasting distances.
Take a second shot of the same scene but with the camera moved
2 1/2 inches to the right, keeping the focus line parallel to the original.
Get the images developed into prints.
Scan in both prints.
Position them both in the same place on the scanner bed and use the same clipping rectangle for both
so they will have the same pixel size.
Open both images in Photoshop.
I crank up the saturation on both images in an attempt to compensate for the washed-out appearance that the 3D glasses give:
- Activate the left image (click its title bar)
- Open the "Image" menu.
- Select "Adjust"
- Select "Hue/Saturation"
- Crank the (Master) saturation up to 60 and click "OK"
- Repeat for the right image.
Get rid of the Red component of the right image:
- Activate the right image (click its title bar)
- Open the "Image" menu.
- Select "Adjust"
- Select "Levels"
- Select the "Red" channel.
- Change the second Output Level to 0 (now both Output levels are 0)
- Click OK (now the right image is Blue-Green)
Get rid of the Green and Blue components of the left image:
- Activate the left image (click its title bar)
- Open the "Image" menu.
- Select "Adjust"
- Select "Levels"
- Select the "Green" channel.
- Change the second Output Level to 0 (now both Output levels are 0)
- Select the "Blue" channel.
- Change the second Output Level to 0 (now both Output levels are 0)
- Click OK (now the left image is entirely Red)
Put both images into a bigger window (as separate layers) to facilitate rotations:
- Copy the right image into the clipboard:
- Activate the right image (click its title bar)
- From the "Select" menu, choose "All".
- From the "Edit" menu, choose "Copy".
- From the "File" menu, choose "New".
The file size will default to the size of the image in the clipboard.
Choose units of "pixels" in the right-hand combo boxes
and add about 200 pixels to both dimensions. Choose "transparent" for
the "Contents".
Click "OK".
- From the "Edit" menu, choose "Paste". You should now see the right image
centered in a larger rectangle.
- Copy the left image into the clipboard:
- Activate the left image (click its title bar)
- From the "Select" menu, choose "All".
- From the "Edit" menu, choose "Copy".
- Paste the left image onto the big window:
- Activate the big image (click its title bar)
- From the "Edit" menu, choose "Paste". Now your "Layers palette"
shows two layers. "Layer 1" is the right image. "Layer 2" is the
left image. (You can rename them if you want.)
Change the Blending Mode for the Top Layer (the left image):
- In the "Layers palette", activate the top layer by clicking on its name.
- Change the Blending Mode from "Normal" to "Screen". (The Blending
Mode appears in a drop-down combo box in the "Layers palette".)
- Now the big window should show the colors of both images and you should be able
to see some results when viewing with red-blue glasses.
Rotate and move the two layers for the best effect (while viewing with your 3D glasses).
The 2 images should be offset horizontally but not vertically and they should not
be rotated relative to each other.
- To Move a Layer:
- Activate the layer by clicking on its name in the "Layers palette".
- Activate the "Move tool" on the "Tools palette".
- Use the arrow keys to move the layer around. Holding down the shift key while
arrowing produces bigger movements. Mouse-dragging also works but is less precise.
- To Correct the Angle:
- Activate the layer by clicking on its name in the "Layers palette".
- From the "Layer" menu, choose "Transform" and "Rotate".
- Use the mouse to grab one of the little corner handles of the image and drag it.
- When finished rotating, double-click the image.
From the "Layer" menu, choose "Flatten Image" to flatten it into a single layer.
Crop the image, excluding parts where the two original images don't completely overlap:
- Activate the "Crop tool" on the "Tools palette".
- Click and drag the "Crop tool" across the image to make a cropping rectangle.
- Adjust the cropping rectangle by dragging on the little mid-edge handles.
- You can move the entire rectangle by mouse-dragging on its middle.
- Double-click on the middle of the image to finalize the cropping.
Save It.
You are done.
(Photoshop LE is a reduced-functionality version of Photoshop that was bundled with some scanners a couple of years ago. It does not support layers.)
- Using a normal 35mm camera, take a shot of a scene with objects at
approximately 6', 15', and 50'. This is to provide contrasting distances.
- Take a second shot of the same scene but with the camera moved
2 1/2 inches to the right, keeping the focus line parallel to the original.
- Get the images developed into prints.
- Scan in both prints.
Position them both in the same place on the scanner bed and use the same clipping rectangle for both
so they will have the same pixel size.
- Open both images in Photoshop.
Position the left image on the left and the right image on the right.
Zoom them in or out (from the "Window" menu) so that they are a reasonable size to work with on the screen.
- I crank up the saturation on both images in an attempt to compensate for the washed-out appearance that the 3D glasses give:
- Activate the left image (click its title bar)
- Open the "Image" menu.
- Select "Adjust"
- Select "Hue/Saturation"
- Crank the (Master) saturation up to 60 and click "OK"
- Repeat for the right image.
- Get rid of the Red component of the right image:
- Activate the right image (click its title bar)
- Open the "Image" menu.
- Select "Adjust"
- Select "Levels"
- Select the "Red" channel.
- Change the second Output Level to 0 (now both Output levels are 0)
- Click OK (now the right image is Blue-Green)
- Get rid of the Green and Blue components of the left image:
- Activate the left image (click its title bar)
- Open the "Image" menu.
- Select "Adjust"
- Select "Levels"
- Select the "Green" channel.
- Change the second Output Level to 0 (now both Output levels are 0)
- Select the "Blue" channel.
- Change the second Output Level to 0 (now both Output levels are 0)
- Click OK (now the left image is entirely Red)
- Put the right image into a bigger window to facilitate rotations:
- Copy the right image into the clipboard:
- From the "Select" menu, choose "All".
- From the "Edit" menu, choose "Copy".
- From the "File" menu, choose "New".
The file size will default to the size of the image in the clipboard.
Choose units of "pixels" in the right-hand combo boxes
and add about 200 pixels to both dimensions.
Click "OK".
- From the "Edit" menu, choose "Paste". You should now see the right image
centered in a larger rectangle. From now on, I will refer to this new bigger window
as the "Right" image.
- Select the entire right image:
- Activate the right image (click its title bar)
- From the "Select" menu, choose "All".
- Copy the left image into the clipboard:
- Activate the left image (click its title bar)
- From the "Select" menu, choose "All".
- From the "Edit" menu, choose "Copy".
- Paste the left image "into" the right image:
- Activate the right image (click its title bar)
- From the "Edit" menu, choose "Paste Into". Now the right image has a floating selection border.
- Change the Compositing mode that determines how the 2 images are blended:
- From the "Edit" menu, choose "Composite Controls".
- Using the "Mode" drop-down combo box, choose "Screen".
- Click "OK". Now the right image should show the colors of both images.
- Rotate and move the floating Red (left) image around to try for
the best effect (while viewing with your 3D glasses).
The 2 images should be offset horizontally but not vertically and they should not
be rotated relative to each other.
- To Move:
- Use the arrow keys to move the images around. Holding down the shift key while
arrowing produces bigger movements.
- To Correct the Angle:
- From the "Image" menu, choose "Rotate" and "Free".
- Use the mouse to grab one of the little corner handles of the image and drag it.
- When finished rotating, move the mouse away from the handle so that the mouse cursor
becomes a gavel icon, then click.
- When everything is perfect, remove the floating selection border:
- From the "Select" menu, choose "None".
- Make a copy of the good part of the image,
excluding parts where the two original images don't completely overlap.
- Make sure your "toolbox" is showing.
- Click the "Rectangular marquee" tool. (The rectangle in the upper left of the toolbox.)
- Activate the (big) right image (click its title bar)
- Click and drag to make a rectangular selection around the part of the image you want to keep.
- Copy the image into the clipboard:
- From the "Select" menu, choose "All".
- From the "Edit" menu, choose "Copy".
- From the "File" menu, choose "New".
The file size will default to the size of the image in the clipboard.
Click "OK".
- From the "Edit" menu, choose "Paste".
- Save It.
- You are done.
- If your scanning software permits it, you should color-calibrate the scanner
using a preprinted calibration chart.
- You can take 3D pictures easily without a tripod
simply by taking a firm stance then snapping a shot with your left
eye on the viewfinder, then moving the camera to the right eye (without moving
your head) and snapping another shot. You have to do some angle-adjusting
in Photoshop, but you would probably have to do that even with a tripod.
- Obviously you don't want anything moving in the scene when you are taking the photos.
- The disadvantage of retaining the green color component is that it often produces
"ghost" images where left eye sees part of the right eye's image. My current preference
is to make a "monochrome" anaglyph which does not have any green. I convert both the left
and right images to grayscale before proceeding (Image menu, Mode).
Then I convert them back to RGB color (which now contains only shades of gray) so that
I can work with the color components, as described above.
- In Photoshop LE, you might want to initially save both of your original images as .bmp files
so you can revert to them if you get into trouble. In Photoshop 4 or 5, the preferred format
is .psd, Photoshop's native picture format.
- Red-green anaglyphs are the standard in Europe. These are technically inferior to red-blue
because the spectrum of a computer monitor's green color significantly overlaps the
spectrum of the red color, so the colors cannot be adequately separated by colored filters.
If the picture has a good, reliable
horizontal or vertical line (and if left has it, right will!)
-- the edge of a house or building roofline or
side, or a straight distant water horizon, anything you can think of --
then you can use the measure tool (above the paint box in 5.0). Click,
and hold, and drag line along straight edge (the longer the better),
then release. Go to IMAGE/ROTATE/ARBITRARY, and the proper angle, to the
nearest 1/100 of a degree, will already be inserted. Press OK,
and picture will be rotated for you! If you perform same function on
same place of both pictures, they will be perfectly aligned.
In pictures with people, but no buildings or horizon, I have used natural
symmetry of human body....
If a person in picture is standing straight, for instance, then a line
through tip of nose to middle of crotch or halfway between parted feet
will be the vertical!
<Dogfeathers Home Page>
<Mark's Page>
<Mark's 3D Stuff>
Email:
Mark Newbold
This page URL:
http://dogfeathers.com/3d/3dhowto.html