meta data for this page

Enhancement – Stretch

Stretch adjusts the contrast of the input image. Choose one of four operators: linear, sqrt, log or threshold.

Linear

Stretch with the linear operator A linear stretch computes the histogram of the image and stretches the contrast linearly between two percentage points, given in “limits” as min;max. The default is from the bottom 5% of the histogram to the top 95%. The limits are percentages between 0 and 100, and can be whole or decimal numbers.

If the luminance flag is checked, the histogram is computed from the luminance of a multiband image. For color images, the luminance is L = 0.3 R + 0.6 G + 0.1 B.

The linear operator works on 8-bit or 16-bit integer images, and its output is the same type as the input.

Square root and log

sqrt and log take the square root or the logarithm of the input pixel values. The output is floating point. The input values must not be negative.

Threshold

Stretch with the threshold operator threshold outputs an 8-bit unsigned integer image with pixel values of 255 or 0: 255 where the pixel value is greater than the threshold, and 0 where it is less than or equal to it.

You must enter the threshold values: either one value for each input band, or a single value that is applied to all bands.