I = imread('F:\enhancement\images\pin\hsv.jpg');
% figure; imshow(I);
%% gamma增强方法
I_gamma = im2double(I).^0.4;
figure; imshow(I_gamma);
% imwrite(I_gamma, 'F:\enhancement\hsv_gamma.jpg');
%% 直方图均衡化增强方法
I_he(:,:,1) = histeq(I(:,:,1));
I_he(:,:,2) = histeq(I(:,:,2));
I_he(:,:,3) = histeq(I(:,:,3));
figure; imshow(I_he);
% imwrite(I_he, 'F:\enhancement\410_he.png');
%% 显示直方图
grayImage = rgb2gray(I_he);
figure; imhist(grayImage);
运行结果