User's Guide

FACTOR

Performs linear transformations on images

Function:

Performs a linear transformation on a single- or multi-band image. If desired, the function will also weight the input bands by user-given values and/or rescale each output band according to user-specified gain and offset.

The input image may be any size and data type (except complex). The output image data type is real and consists of 1 to 14 bands, depending on the number of user-specified transformations.

Parameters:

IN
Input image. The input image may contain up to 14 bands.

OUT
Output image. The output image containing the transformed bands. The number of output bands is determined by the number of transformation vectors given in the parameters WEIGHT1 through WEIGHT14 and SCALE1 through SCALE14.

DENOMVAL(--)
Denominator values. A vector of constants used to alter the input values prior to application of the scale and offset. If this parameter is to be used, the number of divisors specified should equal the number of bands in the input image. Any extra divisors are ignored, but an insufficient number will generate an error message and cause FACTOR to apply a default value of 1.0.

WEIGHT1(--)
First transformation weights. Used to create the first linear transformation. Only the first N weights (where N is the number of input bands) will be used. All other weights given will be ignored.


NOTE:  If defaulted, a weight factor of one divided by 
       the number of input bands is applied to all bands.

SCALE1(--)
Gain and offset for first transformation. Used to specify the scale and offset for the linear transformation for output band 1. If defaulted, scale and offset are set to 1.0 and 0.0 respectively.

WEIGHT2(--)
Second weight vector. Used to create a second linear transformation. See detailed help for WEIGHT1.

SCALE2(--)
Gain and offset for second transformation. See detailed help for SCALE1 for more information.

WEIGHT3(--)
Third weight vector. Used to create a third linear transformation. See detailed help for WEIGHT1.

SCALE3(--)
Gain and offset for third transformation. See detailed help for SCALE1 for more information.

WEIGHT4(--)
Fourth weight vector. Used to create a fourth linear transformation. See detailed help for WEIGHT1.

SCALE4(--)
Gain and offset for fourth transformation. See detailed help for SCALE1 for more information.

WEIGHT5(--)
Fifth weight vector. Used to create a fifth linear transformation. See detailed help for WEIGHT1.

SCALE5(--)
Gain and offset for fifth transformation. See detailed help for SCALE1 for more information.

WEIGHT6(--)
Sixth weight vector. Used to create a sixth linear transformation. See detailed help for WEIGHT1.

SCALE6(--)
Gain and offset for sixth transformation. See detailed help for SCALE1 for more information.

WEIGHT7(--)
Seventh weight vector. Used to create a seventh linear transformation. See detailed help for WEIGHT1.

SCALE7(--)
Gain and offset for seventh transformation. See detailed help for SCALE1 for more information.

WEIGHT8(--)
Eighth weight vector. Used to create a eighth linear transformation. See detailed help for WEIGHT1.

SCALE8(--)
Gain and offset for eighth transformation. See detailed help for SCALE1 for more information.

WEIGHT9(--)
Ninth weight vector. Used to create a ninth linear transformation. See detailed help for WEIGHT1.

SCALE9(--)
Gain and offset for ninth transformation. See detailed help for SCALE1 for more information.

WEIGHT10(--)
Tenth weight vector. Used to create a tenth linear transformation. See detailed help for WEIGHT1.

SCALE10(--)
Gain and offset for tenth transformation. See detailed help for SCALE1 for more information.

WEIGHT11(--)
Eleventh weight vector. Used to create a eleventh linear transformation. See detailed help for WEIGHT1.

SCALE11(--)
Gain and offset for eleventh transformation. See detailed help for SCALE1 for more information.

WEIGHT12(--)
Twelfth weight vector. Used to create a twelfth linear transformation. See detailed help for WEIGHT1.

SCALE12(--)
Gain and offset for twelfth transformation. See detailed help for SCALE1 for more information.

WEIGHT13(--)
Thirteenth weight vector. Used to create a thirteenth linear transformation. See detailed help for WEIGHT1.

SCALE13(--)
Gain and offset for thirteenth transformation. See detailed help for SCALE1 for more information.

WEIGHT14(--)
Fourteenth weight vector. Used to create a fourteenth linear transformation. See detailed help for WEIGHT1.

SCALE14(--)
Gain and offset for fourteenth linear combination. See detailed help for SCALE1

for more information.

Examples:

    l. LAS> FACTOR IN=TEST OUT=TESTRAN.GRP

    In this example, FACTOR applies defaults for the DENOMVAL, WEIGHT, and SCALE parameters. This run creates an image that is the average of all the bands in the input image. Only one transformation occurs.

  1. LAS> factor in=test out=testran.im denomval=(l.0,2.0,3.0,4.0) weight1=(0.4,0.3,0.2,0.1) scale1=(2.0,0.5)

    The four bands in TEST are used to create one output band in TESTRAN.IM. The output image pixel values are determined as follows: 1. The values in bands 1 through 4 of TEST are divided by the respective values of DENOMVAL. 2. These intermediate values are multiplied by the respective values of WEIGHT1. 3. The resulting values from step 2 are then summed; the sum is multiplied by SCALE1(1), and the result is added to SCALE1(2).

Description/Algorithm:

The transformation is performed as follows:


  Let X  be an input pixel value from image band i and Y  be the
       i                                                j
  corresponding pixel value in output band j. 

           Then Y  is defined as 
                 j
   
                     X    
              N       i 
      Y  =   SUM  ----------- * WEIGHT (i)  SCALE (1) + SCALE (2) 
       j     i=1  DENOMVAL(i)         j          j           j  


  where N is the number of input image bands.

Nonfatal Error Messages:

  1. [factor_fstwind] Output image will be the size of first window specified

    If windows specified are different, first one will be used.

  2. [factor_lowdiv] Number of divides specified was less than number of bands

    A value of 1.0 is assumed for all missing values.

Fatal Error Messages:

  1. [factor_numbnd] Input image may not contain more than 14 bands

    The input image may contain a maximum of 14 bands. Respecify.

  2. [factor_zdiv] A value of zero was given for the parameter DENOMVAL

    DENOMVAL cannot have a value of zero since it is a divisor.

User Note:

  1. WEIGHTn and SCALEn are the nth transformation band weight vector and scale/offset factors, respectively. One WEIGHTn/SCALEn pair is required for each transformation requested. If no WEIGHTn/SCALEn pair is specified, one transformation results. This result is the average of the input bands. If the default band weight vector is used, the band weight factor for each band is 1 divided by the number of input bands. The number of output bands generated is equal to the number of transformations requested.