Filling in cell area and counting cells
7 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Image Analyst
on 12 Feb 2020
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 Comments
See Also
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!