Matlab学习6-图像处理之直方图处理、灰度变换
1、直方图均衡化代码%直方图均衡化img=imread("img\rice.png");%显示subplot(2,2,1),imshow(img),xlabel("原图");subplot(2,2,2),imhist(img),xlabel("原图的灰度直方图");% 均衡化直方图转换J=histeq(img);subplot(2,2,3),imshow(J),xlabel("均衡化后的图像");subplot(2,2,4),imhist(J),xlabel("均衡化后的图像灰度直方图