Applying an enhancement to data added to an image service definition

For almost all raster types, when you are adding data, you are presented with the Enhancement tab on the raster type dialog box or through one of the wizards. This allows you to specify a method of stretching the values in the histogram to enhance or improve the contrast in the displayed image. An enhancement often makes the features in the image easier to distinguish.

Enhancement tab or parameters

Below is an example of a stretch: Histogram A represents the pixel values in image A. By stretching the values (shown in histogram B) across the entire range, you can alter and visually enhance the appearance of the image (image B).

A linear histogram stretch

By applying the enhancement when the data is added, the application will obtain histogram values from the data, add the stretch process to the raster process definition, and enter the necessary values.

Learn more about using the Stretching process

Stretch methods

The stretch method defines the type of histogram stretching that will be applied to the raster datasets to visually enhance their appearance. There are five stretch methods: min-max, standard deviation, percentile, fixed value, and None. If this is None, no stretch method will be applied. Stretching improves the appearance of the data by spreading the pixel values along an 8-bit histogram from 0 to 255. Different stretches will produce different results in the raster display.

Unless using the Fixed value stretch method, applying a stretch method when adding raster datasets to an image service definition can substantially increase the add-time, because pixel values need to be read to determine the histogram values.

Min-max

Each band in the raster dataset is examined as it is being added to determine the minimum and maximum values. These values are then used as the end points for the histogram. For example, in an 8-bit dataset, the minimum and maximum values could be 33 and 206. A linear stretch is used to distribute the values across 256 values, from 0 to 255. Features in the imagery are easier to distinguish as the pixel values are distributed across the entire histogram range, brightening and increasing the contrast of the image. Without a stretch, the values from 0 to 32 and 205 to 255 would not be used by the display.

Fixed value

The fixed value works like min-max; however, when the data is added, it won't be examined to determine the pixel values. Instead, you define what the lower and upper values are. This is entered in the Lower bin value and Upper bin value text boxes.

Standard deviation or percentile

In many cases, you can assume that the majority of the pixel values fall within an upper and lower limit. Therefore, it's reasonable to trim off the extreme values. You can do this statistically by defining either a standard deviation or percentile. When you define a standard deviation, all the values in the histogram falling outside that value will be pushed to the ends. Likewise, when you define a percentile, all the values within that percentile will be pushed to the ends, for example, if your histogram has the same range of values as above—33 to 206—and you've defined a percentile of 2. If 2 percent at the low end is values 2 to 12, and 2 percent at the high end is 198 to 106, the histogram will be redistributed to spread the values from 0 to 255, all values 2 to 12 becoming 0, all values 198 to 206 becoming 255, and all others being spread in between. Typically, the percentages for clipping are within 0.01 to 1 and 1.5 to 4 when using standard deviation.

Gamma methods

When preparing imagery for computer display, gamma is the degree of contrast between the midlevel gray values of an image. Gamma does not affect the black or white values in an image, only the middle values. By applying a gamma correction, you can control the overall brightness of an image. If the gamma value is set too high, middle tones appear too dark; however, if the gamma value is set too low, middle tones appear too light, and the image looks bleached out. Gamma changes not only the brightness but also the ratios of red to green to blue.

The gamma value represents a nonlinear curve that has a form similar to the power function of light. A gamma value of 1 is a straight line. Gamma values lower than 1 result in an increase of the contrast in the darker areas and a decrease of the contrast in the lighter areas. This darkens the image but without saturation of the dark or light areas of the image. Additionally, you can define a target color so the gamma is computed based on the present average color of the raster and user-specified target color.

注意注意:

It is recommended that you adjust the Stretch parameters in Raster Properties when a service created with 16-bit imagery appears black.

関連項目


7/10/2012