How to obtain value from histogram?
조회 수: 1 (최근 30일)
이전 댓글 표시
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
채택된 답변
Star Strider
2015년 5월 4일
You only need to ask imhist to output those data:
[counts,binLocations] = imhist(I)
댓글 수: 4
Star Strider
2015년 5월 5일
You need both ‘counts’ and ‘binLocations’:
image_mean = sum(counts.*binLocations)/sum(counts);
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Histograms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!