How to find the connected objects per unit area

4 ビュー (過去 30 日間)
Liyah
Liyah 2016 年 4 月 28 日
コメント済み: Image Analyst 2016 年 4 月 28 日
I have segmented an image of tubules (heart cells) and now need to extract some measurements. How would I go about finding the number of connected tubules in a unit area of the image?
Thanks in advance, I hope someone can help!
  1 件のコメント
Liyah
Liyah 2016 年 4 月 28 日
Perfect, thanks. I obtained the same value using another method, just wanted to double check that my answer was right. May I ask, is this value the same as the area per unit area? Or is it just the area of connected objects in the image? Thanks

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

採用された回答

Image Analyst
Image Analyst 2016 年 4 月 28 日
Simple. Just call bwlabel:
[labeledImage, numberOfRegions] = bwlabel(binaryImage);
  1 件のコメント
Image Analyst
Image Analyst 2016 年 4 月 28 日
Regarding your comment above "Perfect, thanks. I obtained the same value using another method, just wanted to double check that my answer was right. May I ask, is this value the same as the area per unit area? Or is it just the area of connected objects in the image? Thanks" ...
No, this line of code just labels the binary regions (assigns an ID number to each connected component) and counts them. To find the area you'd have to use regionprops
measurements = regionprops(labeledImage, 'Area');
But I don't know what the definition of "area per unit area" is. Wouldn't that be 1? Or do you mean area fraction, like the area divided by the area of the whole image?

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by