Go to the USGS Home Page

USGS MIPS Picstr Documentation






This program automatically selects contrast stretch  parameters for an image . The stretch pairs  are computed by obtaining a histogram  of the images and searching for minimum and maximum DN  values based on user specified percentages. The selected stretch parameters will usually generate an acceptable overall image contrast image product.

  

Files

This program requires as input one unsigned 8-bit  or one signed 16-bit  image file. If an output file is entered, then it will contain the image with the contrast stretch applied. If an output file is not entered then the stretch pairs generated by the program will be written to the print file  which can be viewed and/or printed by the user.

           

Parameters

LINEAR and PIECEWISE

These parameters are used to control the type of stretch parameters calculated. The LINEAR stretch option will cause the minimum percentage to be stretched to lowest possible dn for the input image type and the maximum percentage to be stretched to largest possible dn(e.g., 0 and 255, respectively, for 8-bit data). In addition to the LINEAR stretch, the PIECEWISE stretch will cause the 50% dn to be stretched to the middle dn value of the output image type(e.g., 127 for 8-bit data). The default stretch option is PIECEWISE.

MINPER and MAXPER

These parameters control the minimum and maximum percentages values within the dn histogram of the input image that will be used as the values to be mapped to the minimum and maximum dn values of the given bit type. The dns are calculated by searching the input image dn histogram for the minimum and maximum percentages inside the valid bit type dn range. The default values for MINPER is 1.0 percent and 99.0 percent for MAXPER.

LINC and SINC

These parameters are used to subsample the input image in the line and/or sample directions, thus cutting down the required processing time for large images. LINC and SINC must be equal to or greater than one and integer values(e.g., 1, 2, 3, or 7). Both parameters have a default value of one.

VDNLOW, VDNHIGH, VLOWPER and VHIGHPER

These parameters are used to define the valid dn range to be used when searching for the low and high dn values. The minimum and maximum percentages will be computed starting and ending with these values. VDNLOW and VDNHIGH specify the valid dn range using dn values with default values of 1 and 254 for unsigned 8-bit data and -32767 and 32766 for signed 16-bit data; while VLOWPER and VHIGHPER are used to define the valid dn range using percentages rather than dns with the default values being 0.0 and 100.0, respectively.

Uses

PICSTR can be used to calculate a reasonably good overall contrast stretch for an image. This stretch can then be used to display or print the image. Note, if the input image file is 32-bit (floating point) image the program HISTDK can be used to extract/compute similar parameters for the data types. If a contrast stretch enhances one part of the dn dynamic range more than other parts, a histogram should be generated(using the program HISTDK) and used to visually select the stretch parameters.

Examples

From left to right, unstretched Landsat MSS Band 6 and the same image using the automatic contrast stretch parameters selected using PICSTR with the default values used for all the parameters.

[Example Image] [Example Image]


See Also

Stretch 
Applystr 
Gauss 
Histeq 
Decstr 
U.S. Department of the Interior | U.S. Geological Survey | Jobs
Home | Search | Disclaimers & Privacy Web Rings
Send comments to webman@TerraWeb.wr.usgs.gov
URL:
Last Modified: Thu Oct 31 15:08:24 MST 2002
FirstGov: Your First Click to the U.S. Gov ernment