Image Processing Toolbox User's Guide |
Decorrelation Stretching
Decorrelation stretching enhances the color separation of an image with significant band-band correlation. The exaggerated colors improve visual interpretation and make feature discrimination easier. You apply decorrelation stretching with the decorrstretch
function. See Adding a Linear Contrast Stretch on how to add an optional linear contrast stretch to the decorrelation stretch.
The number of color bands, NBANDS, in the image is usually three. But you can apply decorrelation stretching regardless of the number of color bands.
The original color values of the image are mapped to a new set of color values with a wider range. The color intensities of each pixel are transformed into the color eigenspace of the NBANDS-by-NBANDS covariance or correlation matrix, stretched to equalize the band variances, then transformed back to the original color bands.
To define the bandwise statistics, you can use the entire original image or, with the subset
option, any selected subset of it. See the decorrstretch
reference page.
Simple Decorrelation Stretching
You can apply decorrelation and stretching operations on the library of images available in the imdemos
directory. The library includes a LANDSAT image of the Little Colorado River. In this example, you perform a simple decorrelation stretch on this image:
A = multibandread('littlecoriver.lan', [512, 512, 7], ... 'uint8=>uint8', 128, 'bil', 'ieee-le', ... {'Band','Direct',[3 2 1]});
Compare the two images. The original has a strong violet (red-bluish) tint, while the transformed image has a somewhat expanded color range.
Little Colorado River Before (left) and After (right) Decorrelation Stretch
A color band scatterplot of the images shows how the bands are decorrelated and equalized:
rA = A(:,:,1); gA = A(:,:,2); bA = A(:,:,3); figure, plot3(rA(:),gA(:),bA(:),'.'); grid('on') xlabel('Red (Band 3)'); ylabel('Green (Band 2)'); ... zlabel('Blue (Band 1)') rB = B(:,:,1); gB = B(:,:,2); bB = B(:,:,3); figure, plot3(rB(:),gB(:),bB(:),'.'); grid('on') xlabel('Red (Band 3)'); ylabel('Green (Band 2)'); ... zlabel('Blue (Band 1)')
Color Scatterplot Before (left) and After (right) Decorrelation Stretch
Adding a Linear Contrast Stretch
Now try the same transformation, but with a linear contrast stretch applied after the decorrelation stretch:
Compare the transformed image to the original.
Little Colorado River After Decorrelation Stretch Followed by Linear Contrast Stretch
Adding the linear contrast stretch enhances the resulting image by further expanding the color range. In this case, the transformed color range is mapped within each band to a normalized interval between 0.01 and 0.99, saturating 2%.
See the stretchlim
function reference page for more about Tol
. Without the Tol
option, decorrstretch
applies no linear contrast stretch.
Note
You can apply a linear contrast stretch as a separate operation after performing a decorrelation stretch, using stretchlim and imadjust . This alternative, however, often gives inferior results for uint8 and uint16 images, because the pixel values must be clamped to [0 255] (or [0 65535] ). The Tol option in decorrstretch circumvents this limitation.
|
Contrast-Limited Adaptive Histogram Equalization | Noise Removal |
© 1994-2005 The MathWorks, Inc.