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

2 ビュー (過去 30 日間)
shivam sahil
shivam sahil 2017 年 12 月 7 日
コメント済み: Image Analyst 2017 年 12 月 7 日
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 件のコメント
shivam sahil
shivam sahil 2017 年 12 月 7 日
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.

サインインしてコメントする。

採用された回答

Image Analyst
Image Analyst 2017 年 12 月 7 日
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 件のコメント
shivam sahil
shivam sahil 2017 年 12 月 7 日
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 2017 年 12 月 7 日
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.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeRed についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by