Get Color histogram of an image

5 visualizaciones (últimos 30 días)
Chen Zhu
Chen Zhu el 27 de Mzo. de 2017
Comentada: Chen Zhu el 27 de Mzo. de 2017
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!

Respuestas (1)

Image Analyst
Image Analyst el 27 de Mzo. de 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);
  1 comentario
Chen Zhu
Chen Zhu el 27 de Mzo. de 2017
Thanks! I am not sure how hue works. What value represent blue?
I am confused after reading https://en.wikipedia.org/wiki/Hue
They use degree to represent color, but matlab uses 0-1.
Thanks!

Iniciar sesión para comentar.

Categorías

Más información sobre Convert Image Type en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by