Get Color histogram of an image
5 次查看(过去 30 天)
显示 更早的评论
Hi,
How can I get one color histogram of an image? I don't want three RGB histograms. I want one histogram. X-axis represents the color.
Thanks!
0 个评论
回答(1 个)
Image Analyst
2017-3-27
What's your definition of color? The hue? You can take the histogram of the hue channel if you want:
hsvImage = rgb2hsv(rgbImage);
hueImage = hsvImage(:,:,1);
histObject = histogram(hueImage);
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Convert Image Type 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!