Help for GAINOFF
GAINOFF is a program to apply differing gains and offsets to the various
channels of multispectral data. It accepts as input images of BSQ or BIL
format, and data types BYTE, HALF, FULL, or REAL. Regardless of input format,
the output will be in BIL format.
The gains and offsets for each channel are supplied through a second
input dataset, which is an ASCII (non-VICAR) file. This ASCII file should be a
table of numbers at least 3 columns wide, and have one row of numbers for each
band to be processed. The gain values are taken from column 2 and the offset
values are taken from column 3. All other columns and any headers or annotation
in the file is ignored. Row 1 of the file provides the gain and offset for the
first band processed, Row 2 provides for the second band and so on.
In addition, the parameters INGAIN and OUTGAIN may be used to adjust the
values of all pixels, regardless of band. INGAIN is multiplied to all input
pixels prior to the spectral gain, and may be used to compensate for mismatched
units. OUTGAIN is multiplied to all pixels just prior to output, and may be
used to rescale the data over the desired output range.
PARAMETERS:
INP
Input image, gain/offset file
OUT
Output image file name
SIZE
Window into input
BANDS
Window into input
in band dimension
SL
Starting line
= size(1)
SS
Starting sample
= size(2)
SB
Starting band
= bands(1)
NL
Number of lines
= size(3)
NS
Number of samples
= size(4)
NB
Number of bands
= bands(2)
INGAIN
Gain applied prior to
spectral gains/offsets
OUTGAIN
Gain applied after
spectral gains/offsets
See Examples:
Cognizant Programmer: