Computes the ratio of one band to the weighted sum of several bands
Computes the ratio of one image band to the weighted sum of all the bands in the denominator image. The two input images may be the same or different images, and the denominator image may be single or multiband.
- IN
- Input images. First image is the numerator image. It must be single band. Second image is the denominator image. It may be single or multiband and it may or may not be the same image as the first image. Acceptable data types are BYTE, INTEGER*2, INTEGER*4, and REAL*4.
- OUT
- Output ratio image. Its data type is always REAL*4.
- NUMERWT(1.0)
- Weight to be applied to the numerator image.
- DENOMWT(--)
- Weights to be applied to the corresponding bands of the denominator image. The default is 1.0 for all bands.
- DENOMVAL(1.0)
- Denominator value. Value to be used in the denominator in case of division by zero. When the ratio is computed, it is possible that the weighted sum of the bands in the denominator may become zero. In such a case, DENOMVAL will be used in the denominator.
The input image FG has seven bands with a particular window specified. BAND.OUT is the resultant ratio image. IN(1) is the fourth band of FG. Weight for the numerator NUMERWT is 2.0. Denominator weight values DENOMWT correspond to each band of the IN(2) image. A value of 0.001 is used for the denominator when division by 0 is attempted.
The input images FG1 and FG2 have a total of nine bands with the nine weights specified in DENOMWT. BAND.OUT is the resultant ratio image. Band 2 of image FG2 is the image band in the numerator.
The output image is computed on a pixel-by-pixel basis as follows:
NUMERWT * IN1 l,s OUT = -------------------------------- l,s tb SUM DENOMWT * IN2 i = 1 i i,l,s where NUMERWT is the weight factor for the numerator IN1 is the pixel value at line, sample position l,s l,s in the image band chosen as the numerator image tb is the total number of bands in the second input image DENOMWT is the i-th element in the weight array for i the denominator IN2 is the pixel value at line, sample position i,l,s l,s in the i-th band of the denominator image OUT is the pixel value at line, sample position l,s l,s in the output image Note: If the weighted denominator is 0, it is replaced by the value of DENOMVAL.
A nonfatal error was encountered during processing. The error message that is displayed preceding this message is the specific error that was encountered.
Specify a single band image for the numerator.
A fatal error was encountered during processing. Processing is terminated. The error message that is displayed immediately preceding this message is the specific error that was encountered.
An error occurred allocating memory. Rerun BANDRATIO and if the error reoccurs contact the system manager.
The denominator images are specified with different window sizes. Rerun BANDRATIO and respecify the window sizes.