Part 1: Introduction to Color Imaging2
Capture and Reproduce Color
All types of color imaging, including film, print media, and modern digital cameras, reproduce color by gathering brightness data from a scene through different colored filters. The scene is then reproduced on paper, film, or screen by using this information to control the amounts of different colors of dyes, ink, or light.
- In most cases, the filters used in color imaging are Red, Green, and Blue (RGB) the so-called additive primary colors.
- Color film has the filters built right into the film, with layers of light-sensitive emulsions recording the scene in Red, Green, and Blue light. The picture is then reproduced on photographic paper or transparency film containing layers of colored dyes. (The dyes used are Cyan, Magenta, and Yellowthe subtractive primary colorsthe opposites of Red, Green, and Blue. In combinations, they produce all the colors we see. For example, Cyan and Magenta combine to make Blue.)
- Modern inkjet printers produce colored pictures using tiny dots of cyan, magenta, and yellow ink, with black ink added to produce deeper blacks and better contrast. This combination of inks is called CMYK.
- Offset printing presses, used to print magazines, newspapers, catalogs, posters, and similar items also produce colored pictures using a CMYK process, layering inks in patterns of small dots of cyan, magenta, yellow, and black ink.
- If you look at your computer monitor with a magnifying glass, you will see that each pixel on the screen is made up of a set of red, green, and blue bars or dots.
- The sensors in digital cameras have the red, green, and blue filters coated right on the surface of each light detector cell in an alternating pattern called a Bayer Pattern. Summary: Light-based (emitted) color uses the additive primary colors red, green, and blue. Print-based (reflected or transmitted) color uses the subtractive primary colors cyan, magenta, and yellow.
Multispectral and hyperspectral imaging
- Scientific satellites often carry multispectral instruments that produce images in different wavelength bands. On LANDSAT satellites, the Multispectral Scanner (MSS) instrument records 4 bands and the Thematic Mapper (TM and ETM+) instruments record 7 and 8 bands, respectively, including visible and infrared wavelengths.
- Newer instruments carried by satellites or aircraft can record images with hundreds of bands. This technology is called hyperspectral imaging. Examples are NASA/JPL's AVIRIS instrument (224 channels) and NASA/Goddard's EO-1/Hyperion instrument (220 channels).
Deconstruct a Color Image
ImageJ has the ability to separate a color image into its component bands, or channels.
Download a color image
- Click the image below to open a window containing a full size version.
- Right-click (Win) or control-click (Mac) on the larger image and download the image file to your Day 4 folder.
Deforestation in Bolivia
This image was taken by International Space Station astronauts on April 16, 2001. It shows deforestation patterns associated with the Tierras Bajas ("lowlands") project in eastern Bolivia. The spatial resolution is about 12 meters per pixel.
This area was originally dry tropical forest. As part of the Tierras Bajas project, people were resettled here from the Altiplano region to grow soybeans. The agricultural "pinwheels" are centered on small communities spaced 5 km apart. Roads connect the town centers.
Launch ImageJ and open the image
- Launch ImageJ , choose File > Open, navigate to the Day 4 folder, and open the deforestation image you downloaded.
- Look at the image window status bar. What type of image is this, and how much memory does it occupy?
Bit depth and color images
Most color images are 24-bit RGB images. 24 bits mean 3 separate 8-bit channelsrepresenting red, green, and blue light measurements across the scene. Since 8 bits allow us to encode 256 possible brightness values (from 0 to 255), this system is capable of producing any of 16.7 million different colors (256 x 256 x 256 = 16,777,216) for each pixel.
Color imaging systems can use any number of bits per pixel in each channel. Higher-end systems use 16 or more bits per pixel. ImageJ can work with 16-bit grayscale images, and can combine them into 48-bit color images. (You can do the math yourself, or peek at the answer belowover 281 trillion possible colors!)
- Mouse around the image and look at specific pixel values in the ImageJ window status bar.
- Recall from earlier in the week that the three values represent a color recipe for the pixelso many units of red light plus so many units of green light plus so many units of blue light. Your computer uses these numbers to control the brightness of the colored dots on your monitor at each location. (This applies to EVERYTHING you see on your computer - NOT just the digital images in ImageJ.)
Separate the color channels
- Choose a specific pixelzoom in on the image if you want.
- Write down the pixel's coordinates (X,Y) and color values (R,G,B).
- Choose Image > Color > Split Channels. Your RGB color image separates into three grayscale images, in three different windows.
- Note the (red), (green), and (blue) added to the image window title bars.
A memory puzzle explained
Note the size of the separate red, green, and blue channel images. Each is 1.5MB. Three of these add up to 4.5MB, but earlier you saw that the 24-bit RGB color image is about 6 MB. When ImageJ is working with 24-bit RGB images, it sets aside another "empty" channel in memory. In a program like Photoshop, this same image would occupy only 4.5 MB.
Inspect the RGB pixel values
- Activate the red channel image (from the bottom of the Window menu), go to the pixel with the XY coordinates you wrote down (pan and zoom if necessary) and examine the pixel value (now a single number). How does this value compare to the Red value you wrote down for the pixel at the same coordinates in the RGB image?
- Predict the pixel values at the same coordinates in the green and blue channel images, then examine the images to check your predictions.
Reconstruct a Color Image
ImageJ can also construct or reconstruct an RGB color image from the individual red, green, and blue channel images.
- Choose Image > Color > Merge Channels...
- Assign the red image to the red channel, the green image to the green channel, and the blue image to the blue channel. Nothing should be assigned to the Gray channel.
- Uncheck the Create Composite option and check the Keep Source Images option.
- Click OK. The resulting image should look exactly like the one you started with in this activity.
Bring Out Features Using False Color or Contrast Enhancement
This is cool and all, but why in the world would you want to deconstruct a color image? Here are a couple of ideas...
Make a false color image
What happens when you assign the images to the wrong channels?
- Close the reconstructed RGB color image you created in the previous section. The three grayscale color channel images should still be openif not, you'll have to open the RGB image and split the channels again.
- Choose Image > Color > Merge Channels...
- Assign different images to the red, green, and blue channels and create a new RGB image.
- Try assigning the SAME image to all three channels. Predict what you think it will look like, then test your prediction.
False color images are used to make specific features stand out so they are easier to see or interpret.
Pump up the contrast
Due to atmospheric haze, most images shot from the International Space Station have poor contrast and flat colors. What can we do in ImageJ to punch up the contrast? The idea is to split the channels, manipulate them separately, and then merge the channels back together.
- Close any RGB images that are open. You should still have the red, green, and blue channel images open. (If not, you know what to do!)
- For each of the three channel images:
- Choose Image > Adjust > Brightness / Contrast.
- Click the Auto button in the B&C window (or adjust the Minimum and Maximum sliders by hand)
- Click the Apply button.
- Choose Image > Color > Merge Channels...
- Assign the appropriate images to the red, green, and blue channels and click OK.
Your Assignment: Create Your Own False Color Reconstructed Image
- Use the color separation technique above on a remote sensed image of your choosing. Be sure to find a 24-bit RGB image.
- First split the image into its three RBG channels.
- Then reconstruct the image, assigning the RGB channels to different channels.
- Go to the Part 1: Share and Discuss page and post the image along with a sentence describing the order of channels that you used.
Source1Adapted from Earth Exploration Toolbook chapter instructions under Creative Commons license Attribution-NonCommercial-ShareAlike 1.0.
2Adapted from Eyes in the Sky II online course materials, Copyright 2010, TERC. All rights reserved.
3New material developed for Earth Analysis Techniques, Copyright 2011, TERC. All rights reserved.