How to obtain value from histogram?
1 回表示 (過去 30 日間)
古いコメントを表示
I am using imhist to create histogram from an image. Now I want to know the value of each bar from Y-axis in the histogram. Can I know how to do that??
0 件のコメント
採用された回答
Star Strider
2015 年 5 月 4 日
You only need to ask imhist to output those data:
[counts,binLocations] = imhist(I)
4 件のコメント
Star Strider
2015 年 5 月 5 日
You need both ‘counts’ and ‘binLocations’:
image_mean = sum(counts.*binLocations)/sum(counts);
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Histograms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!