www.gusucode.com > images 案例代码 matlab源码程序 > images/AdjustContrastUsingAdaptiveHistogramEqualizationExample.m
%% Adjust Contrast using Adaptive Histogram Equalization % This example shows how to adjust the contrast in an image using adaptive % histogram equalization (CLAHE). Compared to the |histeq| function, which % operates on an entire image, |adapthisteq| operates on small regions of % the image. %% % Read image into the workspace. I = imread('pout.tif'); %% % View the histogram of the image. imhist(I) %% % Adjust the contrast of the image using adaptive histogram equalization % (|adapthisteq|). 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)