Help for STRETCH2B
PURPOSE:
Procedure STRETCH2B (STRetch TO BYTE) is a VICAR procedure that converts an
image (either single or multichannel) to byte, by means of an automatic
contrast stretch, based upon the input mean and standard deviation. The input
may be of any format excluding COMPLEX (but including BYTE itself), and
contain any number of channels. For multichannel inputs, the user may list
the desired band(s) to process, or request that all bands be processed,
without enumeration.
EXECUTION:
STRETCH2B uses the VICAR programs COPY, HIST, and C to extract the
requested band and subarea, compute the input mean and standard deviation,
the rescale to byte by forcing the input mean to map to the value or the
MEAN parameter (default = 127.5), and forcing the range of SIGMA (default = 2.5)
standard deviations to map to the 255 DN range about the MEAN.
If the input is multichannel, each requested channel is processed
one at a time, and each channel is output to a different file.
EXAMPLES:
STRETCH2B yuma.half yuma.byte
In this example, if the input contains one band, that band is
stretched, using the defaults, then output to yuma.byte. If the
input is multichannel, the first input band is stretched.
STRETCH2B dv12 (dv12.r,dv12.g,dv12.b) bands=(5,3,1) sigma=5
In this example, Band 5 is stretched to dv12.r
Band 3 is stretched to dv12.g and
Band 1 is stretched to dv12.b
with 0 to 255 spanning 5 standard deviations from the mean.
STRETCH2B sebass sebass 'all
In this example, all bands of the input are stretched. The outputs
will have the names sebass.1, sebass.2, sebass.3, ...
WRITTEN BY: Ron Alley 18 Feb 1998
COGNIZANT PROGRAMMER: Ron Alley 18 Feb 1998
REVISION: New 18 Feb 1988
PARAMETERS:
INP
Input file name
OUT
Output file name(s). Use
one name for the root output
name if keyword ALL is used;
otherwise one filename for
each band to be stretched.
SIZE
Vicar size field for input:
Same as (SL,SS,NL,NS)
By default, the entire input
image is used if these
parameters are not entered.
SL
Starting line of input
SS
Starting sample of input
NL
Number of lines from input
NS
Number of samples from input
DOALL
Use KEYWORD "ALL" if all
channels are desired.
BANDS
The band(s) to be stretched.
The number of bands must match
the number of output files.
MEAN
The desired mean of each output
SIGMA
The desired number of standard
deviations from mean in output
data range.
See Examples:
Cognizant Programmer: