Displaying Raster Layers

Producer Field Guide

HGD_Product
Producer Field Guide
HGD_Portfolio_Suite
Producer

Image files (.img) are raster files in the ERDAS IMAGINE format. There are two types of raster layers:

  • continuous
  • thematic

Thematic raster layers require a different display process than continuous raster layers. This section explains how each raster layer type is displayed.

Continuous Raster Layers

An image file (.img) can contain several continuous raster layers; therefore, each pixel can have multiple data file values. When displaying an image file with continuous raster layers, it is possible to assign which layers (bands) are to be displayed with each of the three color guns. The data file values in each layer are input to the assigned color gun. The most useful color assignments are those that allow for an easy interpretation of the displayed image. For example:

  • A natural-color image approximates the colors that would appear to a human observer of the scene.
  • A color-infrared image shows the scene as it would appear on color-infrared film, which is familiar to many analysts.

Band assignments are often expressed in R,G,B order. For example, the assignment 4, 2, 1 means that band 4 is assigned to red, band 2 to green, and band 1 to blue. Below are some widely used band to color gun assignments (Faust, 1989):

  • Landsat TM—natural color: 3, 2, 1
    This is natural color because band 3 is red and is assigned to red color gun, band 2 is green and is assigned to green color gun, and band 1 is blue and is assigned to blue color gun.
  • Landsat TM—color-infrared: 4, 3, 2
    This is infrared because band 4 = infrared.
  • SPOT Multispectral—color-infrared: 3, 2, 1
    This is infrared because band 3 = infrared.

Contrast Table

When an image is displayed, ERDAS IMAGINE automatically creates a contrast table for continuous raster layers. Red, green, and blue brightness values for each band are stored in this table.

Since the data file values in continuous raster layers are quantitative and related, the brightness values in the colormap are also quantitative and related. The screen pixels represent the relationships between the values of the file pixels by their colors. For example, a screen pixel that is bright red has a high brightness value in the red color gun, and a high data file value in the layer assigned to red, relative to other data file values in that layer.

Brightness values often differ from the data file values, but they usually remain in the same order of lowest to highest. Some meaningful relationships between the values are usually maintained.

Contrast Stretch

Different displays have different ranges of possible brightness values. The range of most displays is 0 to 255 for each color gun.

Since the data file values in a continuous raster layer often represent raw data (such as elevation or an amount of reflected light), the range of data file values is often not the same as the range of brightness values of the display. Therefore, a contrast stretch is usually performed, which stretches the range of the values to fit the range of the display.

For example, the figure below shows a layer that has data file values from 30 to 40. When these values are used as brightness values, the contrast of the displayed image is poor. A contrast stretch simply stretches the range between the lower and higher data file values, so that the contrast of the displayed image is higher—that is, lower data file values are displayed with the lowest brightness values, and higher data file values are displayed with the highest brightness values.

The colormap stretches the range of colorcell values from 30 to 40, to the range 0 to 255. Because the output values are incremented at regular intervals, this stretch is a linear contrast stretch. The numbers in the figure below are approximations and do not show an exact linear relationship.

Contrast Stretch and Colorcell Values

image_display_contrast_stretch

See Enhancement for more information about contrast stretching. Contrast stretching is performed the same way for display purposes as it is for permanent image enhancement.

SHARED Tip A contrast stretch based on Percentage LUT with a clip of 2.5% from left and 1.0% from right end of the histogram is applied to stretch pixel values of all image files from 0 to 255 before they are displayed in the Viewer, unless a saved contrast stretch exists (the file is not changed). This often improves the initial appearance of the data in the Viewer.

Statistics Files

To perform a contrast stretch, certain statistics are necessary, such as the mean and the standard deviation of the data file values in each layer.

SHARED Tip Use Image Metadata dialog to create and view statistics for a raster layer.

Usually, not all data file values are used in contrast stretch calculations. Minimum and maximum data file values of each band are often too extreme to produce good results. When the minimum and maximum are extreme in relation to the rest of the data, then the majority of data file values are not stretched across a very wide range, and the displayed image has low contrast.

Stretching by Min/Max vs. Standard Deviation

image_display_statistics_files

The mean and standard deviation of the data file values for each band are used to locate the majority of the data file values. The number of standard deviations above and below the mean can be entered, which determines the range of data used in the stretch.

See Math Topics for more information on mean and standard deviation.

SHARED Tip Use Contrast Tools dialog to enter the number of standard deviations to be used in the contrast stretch.

24-bit DirectColor and TrueColor Displays

The figure below illustrates the general process of displaying three continuous raster layers on a 24-bit DirectColor display. The process is similar on a TrueColor display except that the colormap is not used.

Continuous Raster Layer Display Process

image_display_continuous_raster_process

8-bit PseudoColor Display

When displaying continuous raster layers on an 8-bit PseudoColor display, the data file values from red, green, and blue bands are combined and transformed to a colorcell value in the colormap. This colorcell then provides the red, green, and blue brightness values. Since there are only 256 colors available, a continuous raster layer looks different when it is displayed in an 8-bit display than a 24-bit display that offers 16 million different colors. However, the Viewer performs dithering with available colors in the colormap to let a smaller set of colors appear to be a larger set of colors.

See Dithering for more information.

Thematic Raster Layers

A thematic raster layer generally contains pixels that have been classified, or put into distinct categories. Each data file value is a class value, which is simply a number for a particular category. A thematic raster layer is stored in an image (.img) file. Only one data file value—class value—is stored for each pixel.

Since these class values are not necessarily related, gradations that are possible in true color mode are not usually useful in pseudo color. The class system gives the thematic layer a discrete look, in which each class can have its own color.

Color Table

When a thematic raster layer is displayed, ERDAS IMAGINE automatically creates a color table. Red, green, and blue brightness values for each class are stored in this table.

RGB Colors

Individual color schemes can be created by combining red, green, and blue in different combinations, and assigning colors to the classes of a thematic layer.

Colors can be expressed numerically, as brightness values for each color gun. Brightness values of a display generally range from 0 to 255, however, ERDAS IMAGINE translates the values from 0 to 1. The maximum brightness value for the display device is scaled to 1. The colors listed in the following table are based on the range that is used to assign brightness values in ERDAS IMAGINE.

The following table contains only a partial listing of commonly used colors. Over 16 million colors are possible on a 24-bit display.

Color

Red

Green

Blue

Red

1

0

0

Red-Orange

1

.392

0

Orange

.608

.588

0

Yellow

1

1

0

Yellow-Green

.490

1

0

Green

0

1

0

Cyan

0

1

1

Blue

0

0

1

Blue-Violet

.392

0

.471

Violet

.588

0

.588

Black

0

0

0

White

1

1

1

Gray

.498

.498

.498

Brown

.373

.227

0

Black is the absence of all color (0,0,0) and white is created from the highest values of all three colors (1, 1, 1).

To lighten a color, increase all three brightness values.

To darken a color, decrease all three brightness values.

SHARED Tip Use Raster Attribute CellArray or Editor to create your own color scheme.

24-bit DirectColor and TrueColor Displays

The figure below illustrates the general process of displaying thematic raster layers on a 24-bit DirectColor display. The process is similar on a TrueColor display except that the colormap is not used.

Thematic Raster Layer Display Process

image_display_thematic_raster_process

8-bit PseudoColor Display

The colormap is a limited resource that is shared among all of the applications that are running concurrently. Because of the limited resources, ERDAS IMAGINE does not typically have access to the entire colormap.