Matlab实现直方图均衡化

G=imread('aini555.jpg');
I=rgb2gray(G);
J=histeq(I);  %直方图均衡化,这一个函数就可以做到均衡化的效果
figure,
subplot(121),imshow(uint8(I));
title('原图')
subplot(122),imshow(uint8(J));
title('均衡化后')
figure,
subplot(121),imhist(I,64);
title('原图像直方图');
subplot(122),imhist(J,64);
title('均衡化后的直方图');

matlab程序如上,结果如下:

 

posted @ 2019-06-17 09:31  Geeksongs  阅读(24920)  评论(0编辑  收藏  举报

Coded by Geeksongs on Linux

All rights reserved, no one is allowed to pirate or use the document for other purposes.