直方图是常用的图表,用MATLAB实现如下:Img=imread('football.jpg');BW = Img;R=BW(:,:,1);[REDcounts,x] = imhist(R);G=BW(:,:,2);[Greencounts,y] = imhist(R);B=BW(:,:,3);[Bluecounts,z] = imhist(R);figure;subplot(131);imhist(R);title('histogram of Red');subplot(132);imhist(G);title('histogram of Green');subplot(133);imhist(B);title('histogram of Blue');figure;Histcounts=REDcounts+Greencounts+Bluecounts;Histogramdata=Histcounts';plot(Histogramdata);
from /question/93505561