700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > 用Matlab绘彩色图像的直方图

用Matlab绘彩色图像的直方图

时间:2023-09-20 20:55:02

相关推荐

用Matlab绘彩色图像的直方图

直方图是常用的图表,用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

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。