下载后可任意编辑基于直方图均衡化的彩色图像增强讨论报告Matlab 程序如下:clc;RGB=imread('fruit.jpg'); %输入彩色图像,得到三维数组R=RGB(:,:,1); %分别取三维数组的一维,得到红绿蓝三个重量G=RGB(:,:,2); %为 R G B。B=RGB(:,:,3);subplot(4,2,1),imshow(RGB); %绘制各重量的图像及其直方图title('原始真彩色图像'); %subplot(4,2,3),imshow(R);title('真彩色图像的红色重量');subplot(4,2,4), imhist(R);title('真彩色图像的红色重量直方图');subplot(4,2,5),imshow(G);title('真彩色图像的绿色重量');subplot(4,2,6), imhist(G);title('真彩色图像的绿色重量直方图');subplot(4,2,7),imshow(B);title('真彩色图像的蓝色重量');subplot(4,2,8), imhist(B);title('真彩色图像的蓝色重量直方图');r=histeq(R); %对个重量直方图均衡化,得到个重量均衡化图像g=histeq(G); b=histeq(B); figure,subplot(3,2,1),imshow(r);title('红色重量均衡化后图像');subplot(3,2,2), imhist(r);title('红色重量均衡化后图像直方图');subplot(3,2,3),imshow(g);title('绿色重量均衡化后图像');subplot(3,2,4), imhist(g);title('绿色重量均衡化后图像直方图');subplot(3,2,5), imshow(b);title('蓝色重量均衡化后图像');subplot(3,2,6), imhist(b);title('蓝色重量均衡化后图像直方图');figure, %通过均衡化后的图像还原输出原图像下载后可任意编辑newimg = cat(3,r,g,b); %imshow(newimg,[]);title('均衡化后重量图像还原输出原图');程序运行结果:下载后可任意编辑通过 matlab 仿真,比较均衡化后的还原图像与输入原始真彩色图像,输出图像轮廓更清楚 ,亮度明显增强。