matlab直方图均衡

 1 clear all;
 2 i=imread('cameraman.tif');
 3 figure;
 4 subplot(2,2,1);
 5 imshow(i);
 6 title('原始图像');
 7 subplot(2,2,2);
 8 imhist(i);
 9 title('直方图');
10 
11 hi =histeq(i);
12 subplot(2,2,3);
13 imshow(hi);
14 title('均衡过后图像');
15 subplot(2,2,4);
16 imhist(hi);
17 title('均衡过后直方图');

原文地址:https://www.cnblogs.com/zhaopengcheng/p/5386005.html