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

 채택된 답변

Star Strider
Star Strider 2015년 5월 4일

0 개 추천

You only need to ask imhist to output those data:
[counts,binLocations] = imhist(I)

댓글 수: 4

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

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Histograms에 대해 자세히 알아보기

질문:

2015년 5월 4일

댓글:

2015년 5월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by