Get Color histogram of an image
5 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Image Analyst
on 27 Mar 2017
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);
See Also
Categories
Find more on Convert Image Type in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!