필터 지우기
필터 지우기

How to obtain value from histogram?

조회 수: 1 (최근 30일)
nurul hafizah
nurul hafizah 2015년 5월 4일
댓글: Star Strider 2015년 5월 5일
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일
You only need to ask imhist to output those data:
[counts,binLocations] = imhist(I)
  댓글 수: 4
nurul hafizah
nurul hafizah 2015년 5월 5일
do you know how to calculate mean using counts value?
Star Strider
Star Strider 2015년 5월 5일
You need both ‘counts’ and ‘binLocations’:
image_mean = sum(counts.*binLocations)/sum(counts);

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Histograms에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by