This program stretchs or remaps pixels values in a cube. Note that the same
stretch is applied to all bands within the cube. The underlying method for
remapping pixels is defined by a set of stretch pairs and is best described
using an example:
0:0
255:1
A stretch pair is two numbers separated by a colon. In this case, 0:0 and
255:1 comprise two stretch pairs. A pair is used to identify the mapping
of input pixels to output pixels where the colon is a delimiter
(i.e., input:output). Our first pair indicates input pixel values
of 0 will be mapped to an output 0, while the second pair indicates input
pixel values of 255 will be mapped to 1. All inputs between 0 and 255 will
be mapped linearly (e.g., 127.5 will be mapped to 0.5). Therefore,
the output cube
will only have pixel values between 0 and 1. Those input pixels below
0 will be mapped to LRS and above 255 to HRS. This mapping to special pixels
can be overridden. Because multiple pairs are allowed,
many different types of remappings can be accomplished. For example:
If you are having difficulty visualizing these stretches simply plot the
input:output pairs on graph paper and connect the dots or see some
of the examples. Note that the
input value of each pair is in ascending order. As a reminder,
all input pixel values less
than the input value for the first pair are mapped to LRS. Likewise,
all pixel values greater than the input value for the last pair are mapped
to HRS.
A string must be entered in the form of
Where the input values are in ascending order (increasing). The is
no limit to the number of pairs although each pair must be separated
by a space. The stretch that is entered will be applied to all bands
in the cube. By default "No Stretch" is applied which allows users
to remap only special pixels if desired.
Double or alternate special pixel value used to replace all NULL
special pixels. For example all NULL pixels can be replaced with
-100.0. By default, the NULL special pixels will be left unchanged.
Double or alternate special pixel value used to replace all LIS special pixels. For example
all LIS pixels can be replaced with 0.0. By default, the LIS
special pixels will be left unchanged.
Double or alternate special pixel value used to replace all LRS special pixels. For example
all LRS pixels can be replaced with 0.0. By default, the LRS
special pixels will be left unchanged.
Double or alternate special pixel value used to replace all HIS special pixels. For example
all HIS pixels can be replaced with 500.0. By default, the HIS
special pixels will be left unchanged.
Double or alternate special pixel value used to replace all HRS special pixels. For example
all HRS pixels can be replaced with 500.0. By default, the HRS
special pixels will be left unchanged.
stretch a Terra image. Input non-double parameters.
GUI Screenshot
stretch Gui
Example Gui
Screenshot of GUI with non-double values filled in to
the special pixel parameters.
Input Image
Input image
Input image for stretch
Parameter Name:
FROM
This is the input image for the stretch examples.
Output Image
Output image showing results of the stretch application.
Output image for stretch
Parameter Name:
TO
This is the output image that results from swapping
special pixel values. Notice that there is no visible change since
all special pixel values have the same value.