counting number of white objects in BW image

1 次查看(过去 30 天)
I have an image, (see the attachment)
I want to count those white objects. I tried eroding and then tried to convert it to circular shaped looking objects (in order to count the number of circles)but after erosion, they don't actually convert exactly to a circular shape.
Is there any other simple way to count those objects?

采纳的回答

Yuvaraj Venkataswamy
Use this commands where Num is the number of white objects in the image.
BW=your_binary_image;
[L,Num] = bwlabel(BW);
  3 个评论
udi ibgui
udi ibgui 2019-12-5
编辑:udi ibgui 2019-12-5
HI, I just tried testinf this method on the provided image, and I am getting Num=27. Should it not be 25? Where am I going wrong?

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Convert Image Type 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by