フィルターのクリア

hue histogram color map

3 ビュー (過去 30 日間)
RuiQi
RuiQi 2016 年 1 月 26 日
回答済み: Image Analyst 2016 年 1 月 27 日
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
Walter Roberson 2016 年 1 月 26 日
[ind, map] = rgb2ind(YourRGBImage);
imhist(ind, map)
  4 件のコメント
RuiQi
RuiQi 2016 年 1 月 27 日
編集済み: RuiQi 2016 年 1 月 27 日
Hi,
Thanks for the reply. Id like to plot a histogram of the hue channel of my image after it has been converted from RGB to HSV. In my first plot, the bar below is gray in color and I have no idea how to change its color to represent the hue like the 2nd image from wikipedia.
EDIT: My first plot is a plot of the hue of the image. I just need to change the bar from gray to color(hue).
Walter Roberson
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
Image Analyst 2016 年 1 月 27 日
See attached demo where I change each bar individually. Feel free to adapt.

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by