Number of spot in binary image

1 view (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)

Categories

Find more on Images in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!