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!