How to obtain value from histogram?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
nurul hafizah
il 4 Mag 2015
Commentato: Star Strider
il 5 Mag 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 Commenti
Risposta accettata
Star Strider
il 4 Mag 2015
You only need to ask imhist to output those data:
[counts,binLocations] = imhist(I)
4 Commenti
Star Strider
il 5 Mag 2015
You need both ‘counts’ and ‘binLocations’:
image_mean = sum(counts.*binLocations)/sum(counts);
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Histograms in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!