Image Processing Toolbox    
stretchlim

Find limits to contrast stretch an image

Syntax

Description

LOW_HIGH = stretchlim(I,TOL) returns a pair of intensities that can be used by imadjust to increase the contrast of an image.

TOL = [LOW_FRACT HIGH_FRACT] specifies the fraction of the image to saturate at low and high intensities.

If TOL is a scalar, TOL = LOW_FRACT, and HIGH_FRACT = 1 - LOW_FRACT, which saturates equal fractions at low and high intensities.

If you omit the argument, TOL defaults to [0.01 0.99], saturating 2%.

If TOL = 0, LOW_HIGH = [min(I(:)) max(I(:))].

LOW_HIGH = stretchlim(RGB,TOL) returns a 2-by-3 matrix of intensity pairs to saturate each plane of the RGB image. TOL specifies the same fractions of saturation for each plane.

Class Support

The input image can be of class uint8, uint16, or double. The output intensities returned, LOW_HIGH, are of class double and have values between 0 and 1.

Example

See Also

brighten, histeq, imadjust


  strel subimage