www.gusucode.com > images 案例代码 matlab源码程序 > images/AdjustContrastOfGrayscaleImageExample.m

    %% Adjust Contrast of Grayscale Image
% 
%%
% Read a low-contrast grayscale image into the workspace and display it.

% Copyright 2015 The MathWorks, Inc.

I = imread('pout.tif');
imshow(I);
%%
% Adjust the contrast of the image so that 1% of the data is saturated at
% low and high intensities, and display it.
J = imadjust(I);
figure
imshow(J)