www.gusucode.com > images 案例代码 matlab源码程序 > images/IncreaseOrReduceLocalContrastOfImageExample.m
%% Increase or Reduce Local Contrast of Image % %% % Import an RGB image. A = imread('peppers.png'); %% % Increase the local contrast of the input image. edgeThreshold = 0.4; amount = 0.5; B = localcontrast(A, edgeThreshold, amount); %% % Display the results compared to the original image imshowpair(A, B, 'montage') %% % Reduce the local contrast of the input image. amount = -0.5; B = localcontrast(A, edgeThreshold, amount); %% % Display the new results again, compared to the original image. imshowpair(A, B, 'montage')