EXPLORE


JOINRENEWJOIN

Get Your 2009 Year in Space Calendar!
 

Space Topics: Space Imaging

Tutorial: Making RGB Color Images in Adobe Photoshop Elements

Tutorial: RGB images: final
This image of Rhea against Saturn's globe was created from three raw images downloaded from Cassini's raw images website. Credit: NASA / JPL / SSI / Emily Lakdawalla

One very common operation with spacecraft images is to make a color image from individual frames captured through different filters.  To make approximate true color images, an image of the same target needs to be captured through red, green, and blue filters at about the same time.  False color images can be made from any combination of three filters.

If you'd like to try this at home, you will need:

  • A copy of Adobe Photoshop Elements.  The screen caps in this tutorial are from Photoshop Elements 5.0, but earlier versions may also work. (Note: making RGB images is possible with many different image processing packages; this tutorial presently covers only Photoshop.)
  • Three images captured through different color filters (for the example on this page, download these three images: N00084955_red, N00084956_grn, N00084957_bl1)

Consider these three images taken from the Cassini raw images website.  They were taken by Cassini on June 15, 2007 and show the moon Rhea against Saturn's globe.  From left to right, they were taken through red, green, and blue filters. These images are courtesy of NASA, JPL, and the Space Science Institute.

Rhea against Saturn: Red filter
This image was taken from 1,197,115 kilometers away, using the RED and CL2 filters.
Rhea against Saturn: Green filter
This image was taken from 1,197,278 kilometers away, using the CL1 and GRN filters.
Rhea against Saturn: Blue filter
This image was taken from 1,197,277 kilometers away, using the BL1 and CL2 filters.

(For clarity, from here forward these images will be shown cropped more tightly around Rhea.)

This tutorial will show you how to convert three grayscale images into one color image.  However, if you go straight to that step, you will find that because Cassini is not a fixed platform but instead a moving orbiter, Rhea shifts from frame to frame.  If you do not align the frames before merging them, you will produce an image that looks like this, where each sharp edge is fringed with color:

Tutorial: RGB images: misalignment
If images captured through different filters are not aligned, color fringes will appear around sharp edges in the image. Credit: NASA / JPL / SSI / Emily Lakdawalla

Aligning the Frames

Begin by opening the three different-filter images of Rhea.

  1. Paste the three frames into layers on one image.
    1. Go to File > New > Photomerge™ Panorama ...
    2. Select "Normal", "Snap to Image" and "Keep as Layers". Click OK
Tutorial: RGB images: Photomerge
Tutorial: RGB images: Photomerge
Make sure to select "Normal", "Snap to Image" and "Keep as Layers." Credit: NASA / JPL / SSI / Eric Hartwell
    1. Photoshop Elements creates a new RGB image with each of the original images in a separate layer. Conveniently, it converts each image to RGB mode and gives each layer the name of the original file.
    2. Now would be a good time to save (Ctrl-S or File > Save).
Tutorial: RGB images: layers
Tutorial: RGB images: layers
The three images have now been stacked as layers in a single Photoshop document. In this example, the Blue filter image is Layer 1, the Red filter image is Layer 2, and the Green filter image is Layer 3. Credit: NASA / JPL / SSI / Eric Hartwell
  1. Increase the size of the image
    1. Go to Image > Image Size... and make the image 200% or 300% its original size.  This step will permit you to make finer adjustments to the alignment of the frames.
  2. Align the Green-filter image to the Blue-filter image
    1. In the Layers palette, turn off the top layer (Layer 2) by clicking the eye icon next to it.
    2. Make the middle layer (Layer 1) active by clicking the text "Layer 1."
    3. Set the blending mode for this layer to Difference by using the drop-down menu in the Layers palette.  This blending mode subtracts one of the layers from the other.  Since the two layers are very similar the image will now appear mostly black, because the two layers will nearly cancel each other out.  However, where they are poorly aligned, there will be white fringes.
Tutorial: RGB images: fringes
Tutorial: RGB images: fringes
With one layer set to the Difference blending mode, that layer's pixel values are subtracted from the ones below it. The result is an image that is nearly black (because the two images are largely similar), but there are bright fringes because the two layers are not perfectly aligned. Credit: NASA / JPL / SSI / Eric Hartwell
    1. Using the Move tool (Photoshop Move tool), move Layer 1 around until the white fringes disappear (or are minimized).  If the necessary adjustments are small, it may be easiest to use the arrow keys on your keyboard to nudge the layer back and forth.
    2. Set the blending mode to Screen.
  1. Align the Red-filter image to the Blue-filter image
    1. In the Layers palette, turn off Layer 1 and turn on Layer 2.
    2. Repeat steps 3b through 3e for Layer 2.
  2. Crop the image so that every layer reaches the edge of the canvas
    1. Because you moved layers around, there will be "blank" or "transparent" areas at the extreme edges of some layers.  These transparent areas can cause problems later when you paste the layers into a new document.  You want to crop these transparent areas away from the image.  You can do this either using the Crop tool (Photoshop Crop tool) or by shrinking the size of the canvas (Image > Canvas Size…)
    2. Now would be a good time to save.

Merging the aligned frames into an RGB image

  1. Make the background layer (the Blue-filter image) the active layer by clicking on its name in the Layers palette.
  2. Adjust the layer's levels so that its pixels have only blue information, and no red or green information.
    1. Go to the Levels dialog (Ctrl-L or Enhance > Adjust Lighing > Levels...)
    2. Select the Red channel from the dropdown menu and adjust the maximum output level to 0.
    3. Do the same for the Green channel.
    4. Click OK.
  3. The blue channel now contains the blue-filtered Cassini image.  You may notice that the combined image looks blue.
Tutorial: RGB images: levels
The color image now has the blue channel in blue. Credit: NASA / JPL / SSI / Eric Hartwell
  1. Make Layer 2 (the Green-filter image) active by clicking on its name in the Layers palette.
  2. Adjust the layer's levels so that its pixels have only green information, and no red or blue information.
    1. Go to the Levels dialog (Ctrl-L or Enhance > Adjust Lighing > Levels...)
    2. Select the Red channel from the dropdown menu and adjust the maximum output level to 0.
    3. Do the same for the Blue channel.
    4. Click OK.
  3. Repeat this step for the final layer, adjusting it to have only red information, no green or blue.
  4. Your image should now look like this, with a yellowish Saturn and a grayish Rhea.
Tutorial: RGB images: final
Tutorial: RGB images: final
The image now has gets its red, green, and blue channels from the separate images. Credit: NASA / JPL / SSI / Eric Hartwell
  1. To convert the image from a three-layered file to a single RGB image, select all, copy the layers merged (Shift-Ctrl-C or Edit > Copy Merged), create a new document, and paste.
  2. Finally, you may wish to play around with the image's brightness, contrast, hue, and saturation using the various controls available to you in the Image menu.
Tutorial: RGB images: final
Now that the layers have been properly aligned, the resulting color image of Rhea has no annoying color fringes. Credit: NASA / JPL / SSI / Emily Lakdawalla

Please

JavaScript required to view email.

with any comments or questions on this tutorial.