Filling in cell area and counting cells
조회 수: 7 (최근 30일)
이전 댓글 표시
What code could be used to fill in these arbitrarily shaped cells that also gets ride of the smaller cells that look like noise and then count the number of cells?
댓글 수: 0
답변 (1개)
Image Analyst
2020년 2월 12일
You can use imfill() and bwareafilt() or bwareaopen():
mask = imfill(mask, 'holes'); % Fill holes.
mask = bwareafilt(mask, [30, inf]); % Extract only blobs 30 pixels or larger.
[labeledImage, numberOfCells] = bwlabel(mask); % Count blobs.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!