MATLAB的原图、原图直方图、变暗后的图、变暗后的直方图
A=imread('可爱.jpg')
B=rgb2gray(A)
subplot (1,4,1),imshow (A)
title('原图')
subplot (1,4,2),imhist(B)
title('原图直方图')
C=imadjust(A,[,],[0;0.5]);
subplot(1,4,3),imshow(C)
title('变暗后的图')
D=rgb2gray(C)
subplot(1,4,4),imhist(D)
title('变暗后的直方图')