hue histogram color map
古いコメントを表示
Hi
I am trying to plot the hue histogram of my image. It currently looks like this.

I would like it to look like the one below.

Or at least just the bar below should be in color. I tried changing the colormap option but nothing changed. Help thanks !
回答 (2 件)
Walter Roberson
2016 年 1 月 26 日
[ind, map] = rgb2ind(YourRGBImage);
imhist(ind, map)
4 件のコメント
RuiQi
2016 年 1 月 27 日
Image Analyst
2016 年 1 月 27 日
What is the "hue histogram"? Is it the histogram of the hue channel after your image has been converted from red,green,blue to hue,saturation,value with rgb2hsv()? Or is it the histogram of a gray scale image where you just want the bars in the bar chart to appear with a certain color ordering applied to them?
Walter Roberson
2016 年 1 月 27 日
I don't think you can do it with imhist() then. You will probably need to bar() each different bar separately.
Image Analyst
2016 年 1 月 27 日
0 投票
See attached demo where I change each bar individually. Feel free to adapt.

カテゴリ
ヘルプ センター および File Exchange で Histograms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
