Effacer les filtres
Effacer les filtres

Filling in cell area and counting cells

8 vues (au cours des 30 derniers jours)
Kate Heinzman
Kate Heinzman le 12 Fév 2020
binarycells.jpg
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?

Réponses (1)

Image Analyst
Image Analyst le 12 Fév 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.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by