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??

 Réponse acceptée

Star Strider
Star Strider le 4 Mai 2015
You only need to ask imhist to output those data:
[counts,binLocations] = imhist(I)

4 commentaires

nurul hafizah
nurul hafizah le 5 Mai 2015
Thank you for your helps.
Star Strider
Star Strider le 5 Mai 2015
My pleasure.
nurul hafizah
nurul hafizah le 5 Mai 2015
do you know how to calculate mean using counts value?
You need both ‘counts’ and ‘binLocations’:
image_mean = sum(counts.*binLocations)/sum(counts);

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by