Number of spot in binary image

4 views (last 30 days)
how i can find the spot of binary imagr,
the result of binary image below must be = 4
how i can find it?????

Accepted Answer

Walter Roberson
Walter Roberson on 8 Jun 2019
bw = im2bw(imread('image.jpeg'));
[~, numspots] = bwlabel( imclearborder(~bw) );
  1 Comment
mohammed alany
mohammed alany on 8 Jun 2019
Many thanks dear Walter Roberson,
your answer is very fast and helpful

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by