cell counting Matlab code?

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.

回答 (3 件)

Sean de Wolski
Sean de Wolski 2013 年 5 月 23 日

0 投票

CC = bwconncomp(BWImage)
CC.NumObjects
Where BWImage is the black and white image with each cell white.
Image Analyst
Image Analyst 2013 年 5 月 23 日

0 投票

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);
chama
chama 2013 年 5 月 24 日

0 投票

hi, thanks for the answer the output is always ans = 1 , even though I have for example 100 cell.

1 件のコメント

Image Analyst
Image Analyst 2013 年 5 月 24 日
Well then you didn't do the segmentation step in your process very effectively. What did you do?

サインインしてコメントする。

タグ

質問済み:

2013 年 5 月 23 日

Community Treasure Hunt

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

Start Hunting!

Translated by