필터 지우기
필터 지우기

How can i plot Histogram for this??

조회 수: 1 (최근 30일)
dp sb
dp sb 2015년 7월 21일
댓글: Steven Lord 2015년 7월 21일
How can i plot histogram for an image with 3 bins, where the bins holds the pixel values falling in the region 0-40, 41-90, 91-255. Also how can i write these stats, as in the number of pixels in each of those regions. Plz Help ?

채택된 답변

Image Analyst
Image Analyst 2015년 7월 21일
Try
edges = [0,41,91,255];
pixelCounts = histcounts(grayImage(:), edges);
  댓글 수: 4
dp sb
dp sb 2015년 7월 21일
It works. Thank You!
Steven Lord
Steven Lord 2015년 7월 21일
Or call HISTOGRAM instead of HISTCOUNTS. If you want both the counts and the graphics object, call HISTOGRAM with an output argument and take a look at the properties of that graphics object.

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

추가 답변 (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