Help for HSTRETCH
PURPOSE
"hstretch" is a VICAR applications program used for the
production of binary masks and for modifying specific
DN values of images. Operation of the program is
similar to the table stretch option of STRETCH, however
the parameter structure is often simplified. The major
feature of "hstretch" is that only those DN values which
are to be modified need to be listed as parameters.
TAE COMMAND LINE FORMAT
hstretch INP=A OUT=B SIZE PARAMS
where
INP is an input file.
OUT is an output file.
SIZE is a standard VICAR size field.
PARAMS is a standard VICAR parameter field.
OPERATION
A stretch table is set up based upon parameters
specified via the QTABLE or TABLE keyword. All DN
values not specified either remain unchanged (TABLE
option) or are stretched to the background DN (QTABLE
option).
EXAMPLES
hstretch INP=A OUT=B HALF VALUE=100 BVALUE=0
QTABLE=(32 1 2067, 96 4 39)
In this example, a halfword dataset is input to yield a
halfword format binary mask. The primary value of the
mask will be 100 DN while the background value will be
0 DN. Only the values listed after QTABLE
(32,1,2067,96,4,39) will be stretched to 100 DN. All
other DN values of the input image will be stretched to
0 DN.
hstretch INP=A INP=B
TABLE=(24 1 38 0 117 1 25 3
36 2 50 3 51 4 52 5)
In this example both input and output datasets are byte
format and the table transfer mode has been specified.
Only the following values will be stretched, all other
will remain unchanged.
OLD DN NEW DN
24 1
38 0
117 1
. .
. .
. .
51 4
52 5
When using the table mode all values to be changed must
be specified. Consequently, if the primary purpose of
the stretch is to enhannce the contrast of an image,
VICAR program "stretch" will be easier to use, as only
the "posts" of the stretch must be specified. However,
when the purpose of the stretch is to compress a
dataset such as a land cover classification, or if only
a few DN values are to be changed while others are to
be unchanged, "hstretch" may be more useful.
RESTRICTIONS:
Both the QTABLE and TABLE parameters
may not appear in the same parameter
dataset.
WRITTEN BY: A. L. Zobrist 1 May 1978
COGNIZANT PROGRAMMER: N. D. Ritter
REVISION: 4 22 Jun 1994
REVISION SUMMARY:
Made portable for UNIX AMS (CRI) 5 Sep 1994
Added Test Proc NDR 22 Jun 1994
PARAMETERS:
INP
Input image
OUT
Output image
SIZE
Image Size
SL
Starting Line
SS
Starting Sample
NL
Number of Lines
NS
Number of Samples
VALUE
Primary DN of binary mask
BVALUE
Background DN of binary mask
QTABLE
Table to be stretched to VALUE
TABLE
Conventional stretch table
See Examples:
Cognizant Programmer: