how to calculate the area of certain portion of an image ?
조회 수: 4 (최근 30일)
이전 댓글 표시
how to calculate the area of certain portion of an image ?
댓글 수: 0
채택된 답변
Image Analyst
2014년 1월 2일
편집: Image Analyst
2014년 1월 2일
Call regionprops(). See my Image Segmentation Tutorial. It goes over all of that:
For example with a simple thresholding:
binaryImage = grayImage > 90;
measurements = regionprops(binaryImage, 'Area');
allAreas = [measurements.Area];
댓글 수: 2
Image Analyst
2014년 1월 4일
Then just get it. For example to get the area of blob #42, do this
blob42area = allAreas(42);
blob42area = measurements(42).Area; % Same thing as above.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!