How to obtain value from histogram?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
nurul hafizah
am 4 Mai 2015
Kommentiert: Star Strider
am 5 Mai 2015
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 Kommentare
Akzeptierte Antwort
Star Strider
am 4 Mai 2015
You only need to ask imhist to output those data:
[counts,binLocations] = imhist(I)
4 Kommentare
Star Strider
am 5 Mai 2015
You need both ‘counts’ and ‘binLocations’:
image_mean = sum(counts.*binLocations)/sum(counts);
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Histograms finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!