Main Content

Adaptive Histogram Equalization

As an alternative to using histeq, you can perform contrast-limited adaptive histogram equalization (CLAHE) using the adapthisteq function. While histeq works on the entire image, adapthisteq operates on small regions in the image, called tiles. adapthisteq enhances the contrast of each tile, so that the histogram of the output region approximately matches a specified histogram. After performing the equalization, adapthisteq combines neighboring tiles using bilinear interpolation to eliminate artificially induced boundaries.

To avoid amplifying any noise that might be present in the image, you can use adapthisteq optional parameters to limit the contrast, especially in homogeneous areas.

Adjust Contrast using Adaptive Histogram Equalization

This example shows how to adjust the contrast in an image using CLAHE.

Read image into the workspace.

I = imread('pout.tif');

View the original image and its histogram.

figure
subplot(1,2,1)
imshow(I)
subplot(1,2,2)
imhist(I,64)

Figure contains 3 axes objects. Axes object 1 contains an object of type stem. Axes object 2 contains 2 objects of type image, line. Hidden axes object 3 contains an object of type image.

Adjust the contrast of the image using adaptive histogram equalization.

J = adapthisteq(I);

Display the contrast-adjusted image with its histogram.

figure
subplot(1,2,1)
imshow(J)
subplot(1,2,2)
imhist(J,64)

Figure contains 3 axes objects. Axes object 1 contains an object of type stem. Axes object 2 contains 2 objects of type image, line. Hidden axes object 3 contains an object of type image.

See Also

|

Related Topics