Count centroids in an image

3 次查看(过去 30 天)
Adam Kelly
Adam Kelly 2019-11-9
评论: Adam Danz 2019-11-10
Hey I have this binary image, with the centroids detetced but I need a way to count them so I get an output as number of characters is 7. I haven't been able to find a function or any way to do this. CountImage.jpg
  5 个评论
Matt J
Matt J 2019-11-10
but I need a way to count them
Why not just
numel(s)
Adam Danz
Adam Danz 2019-11-10
@Adam Kelly, it looks like you've got several suggestions here. Let us know if you get stuck or if you're looking for something different.

请先登录,再进行评论。

回答(1 个)

Arash Rabbani
Arash Rabbani 2019-11-10
Why not simply label the binary image? and 'Num' would be the number of characters.
[Label, Num]=bwlabel(Image)

类别

Help CenterFile Exchange 中查找有关 Get Started with Image Processing Toolbox 的更多信息

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by