My histogram is like that not similar to above histo..is there any problem or it may be version difference i am using 2016 version
how to draw histogram of an RGB image
26 次查看(过去 30 天)
显示 更早的评论
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/232468/20190802_224455.jpg)
采纳的回答
KALYAN ACHARJYA
2019-8-3
编辑:KALYAN ACHARJYA
2019-8-3
image_test=imread('Baboon.jpeg');
red_plane=image_test(:,:,1);
green_plane=image_test(:,:,2);
blue_plane=image_test(:,:,3);
[red_data pixel_level]=imhist(red_plane);
[green_data pixel_level]=imhist(green_plane);
[blue_data pixel_level]=imhist(blue_plane);
bar(pixel_level, red_data,'r');
hold on;
bar(pixel_level, green_data,'g');
bar(pixel_level, blue_data,'b');
Note: You can plot all in single matlab line code.
![pic11.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/232477/pic11.png)
4 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Histograms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!