Effacer les filtres
Effacer les filtres

How to get a plot value of colour rather than rgb in Histogram plot?

1 vue (au cours des 30 derniers jours)
shivam sahil
shivam sahil le 7 Déc 2017
Commenté : Image Analyst le 7 Déc 2017
Using the function imhist() we could easily plot rgb profile of a given image, I was just wondering whether there is a y method in MATLAB to access other color plots and information too or not. For example, I want to see yellow color pixel distribution, Is it possible to plot such pixel variations or not.
  1 commentaire
shivam sahil
shivam sahil le 7 Déc 2017
Hey there! First of thanks a lot for the answer. Further, I wanted to add that after completing my analysis on a particular image I came out with these two results one by the code you mentioned and the other using color cloud, can you please explain what these variations actually mean, I found that pixels are being represented in y-axis and what is this hsv value being represented in y-axis. I have attached my result
. Just wanted to be more clear with the physical significance.

Connectez-vous pour commenter.

Réponse acceptée

Image Analyst
Image Analyst le 7 Déc 2017
You can use rgb2hsv and look at the histogram of the hue channel
hsvImage = rgb2hsv(rgbImage);
histogram(hsvImage(:,:,1));
You might also like to use the colorcloud() function.
  2 commentaires
shivam sahil
shivam sahil le 7 Déc 2017
Hey there! First of thanks a lot for the answer. Further, I wanted to add that after completing my analysis on a particular image I came out with these two results one by the code you mentioned and the other using color cloud, can you please explain what these variations actually mean, I found that pixels are being represented in y-axis and what is this hsv value being represented in y-axis. I have attached both my results.
<<
<<
>>
>>
Image Analyst
Image Analyst le 7 Déc 2017
You only attached one thing - a histogram - not two. If that's the histogram of the hue channel, then you apparently have 5 colors, since you have 5 bars that are non-zero. You have 2 red colors, an orange color, and a yellowish-green color, and a greenish blue color. The vertical height of the bar is the number of pixels with that hue.

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by