cell counting Matlab code?
4 次查看(过去 30 天)
显示 更早的评论
hi
Could someone help with counting the number of cells that have been segmented in an image. i have segemented the cells and marked the outline of each cell. Now i need to count the number of cells present automatically.
0 个评论
回答(3 个)
Sean de Wolski
2013-5-23
CC = bwconncomp(BWImage)
CC.NumObjects
Where BWImage is the black and white image with each cell white.
0 个评论
Image Analyst
2013-5-23
Simply call bwlabel on your segmented image, and it will count them for you. You don't need the outlines that you got from bwboundaries() or bwperim() to do counting.
[labeledImage, numberOfBlobs] = bwlabel(binaryImage);
If you want other measurements (beyond the count), call regionprops():
measurements = regionprops(labeledImage);
0 个评论
chama
2013-5-24
1 个评论
Image Analyst
2013-5-24
Well then you didn't do the segmentation step in your process very effectively. What did you do?
另请参阅
类别
在 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!