Linear stretching of interval:
The specified interval range per band is linearly divided into 6 classes of equal length with numbers 0 to 5. Since this is done for three bands, the number of possible combinations is 6´6´6 = 216. This is the number of different colors that will appear in the color composite.
Histogram equalization:
The specified interval range (lower and upper boundary) per band is divided into 6 classes with numbers 0 to 5, in which each class has an equal area under the histogram. As for linear stretching, the number of different output colors is 6´6´6 = 216.
Output colors:
Each output color obtains an internal number of the system picture domain ColorCmp; the value is calculated as:
output = 36*red + 6*green + blue.
This implies that the output map will contain internal values between 0 and 215 (since 215 = 5 * 36 + 5 * 6 + 5). The values of this ColorCmp domain are always linked to system representation ColorCmp.
A dynamic color composite is calculated using the Heckbert Quantization Algorithm. The Heckbert algorithm produces a color composite on the basis of the amount of variation in pixel values in the three input maps.
This algorithm first builds a three dimensional histogram, indicating how 'popular' any given value is in the images. All values fall in one box or cube. This histogram is then subdivided into smaller boxes or cubes: a division is made in the middle of the axis which has the largest variation. This process continues until as many boxes are created as there are output colors (number defined by the user, maximum 255). This algorithm attempts to create boxes which have approximately equal popularity in the image. Then, colors are assigned to represent each box.
An example of the first and second division is given in Figures 1, 2 and 3 below.
Example Heckbert algorithm:
Three 1% histograms are calculated before the first division, see Figure 1:
Figure1:
Figure 1 shows that the pixel values range:
Thus, the largest variation is found in the second input map. The total number of pixels on this band is divided in 2 so-called 'boxes': the first division is at pixel value 65 of band 2.
The result of the first division is represented in Figures 2 and 3. Figure 2 shows the histograms of one box; Figure 3 the histograms of the other. Enlarge the Help window by dragging its borders when you cannot see both figures next to each other.
Figure 2: |
Figure 3: |
Figure 2 shows that the pixel values range in box 1:
Figure 3 shows that the pixel values range in box 2:
The next largest variation is found in the first input map in box 1. The total number of pixels on this band divided into 2 parts: the next division takes place at pixel value 66.
Output domain for dynamic composites:
The operation creates a new domain (type Picture) for the output color composite and a new representation for this domain. This output domain and representation are always stored by the output map (internal domain and internal representation).
Linear stretching of interval:
Each input band is stretched to values between 0 and 255 using linear stretching using the user-defined intervals of the histograms.
Histogram equalization:
Each input band is stretched to values between 0 and 255 using histogram equalization using the user-defined intervals of the histograms.
Output colors:
The results are combined in a map with 4 bytes per pixel (4 bytes is 32 bits, thus 8 bits are not used). Each pixel in this map contains the red, green, and blue intensities of values between 0 and 255. It means that the possible number of output colors is 256 x 256 x 256 = ± 16 million.
In this case no stretching is performed. In the output map, for each pixel the hue, saturation and intensity is converted to red, green, and blue intensities. The following relations exist:
Hue |
= |
255/2p * arctan2 ( 1/2 * Ö3 * (Green-Blue) , Red - (Green+Blue) / 2 ) * 240/255 |
Saturation |
= |
Ö (Red2 + Green2 + Blue2 - Red*Green - Red*Blue - Green*Blue) * 240/255 |
Intensity |
= |
1/3 * (Red + Green + Blue) * 240/255 |
Red, green, and blue values range from 0 to 255. Hue, saturation, and intensity values however range from 0 to 240; this range complies with the Windows color scheme definition. In the formulas above, multiplication factor 240/255 is used to obtain that range.
References:
Heckbert, P., 1982. Color image quantization for frame buffer display. SIGGRAPH '82 Proceedings, p. 297.
See also: