フィルターのクリア

how can i generate the histogram of an hsv image?

3 ビュー (過去 30 日間)
Josephine
Josephine 2013 年 12 月 17 日
コメント済み: Image Analyst 2013 年 12 月 17 日
hi i wanna generate the histogram of an hsv image without using the hist function of matlab. can someone give me an algorithm or a step-by-step process on this? thanks in advance.
  1 件のコメント
Image Analyst
Image Analyst 2013 年 12 月 17 日
Why? What do you have against hist? Is imhist or histc okay?

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

採用された回答

Walter Roberson
Walter Roberson 2013 年 12 月 17 日
counters = zeros(1,10);
Hpart = YourImageAsHSV(:,:,1);
for K = 1 : numel(Hpart)
if Hpart(K) < 255/10
counters(1) = counters(1) + 1;
elseif Hpart(K) < 2*255/10
counters(2) = counters(2) + 1;
elseif Hpart(K) < 3*255/10
counters(3) = counters(3) + 1;
elseif Hpart(K) < 4*255/10
....
else
counters(10) = counters(10) + 1;
end
end
counters is now the 10-bin histogram of the "H" part of the HSV image.

その他の回答 (0 件)

カテゴリ

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