Number of spot in binary image

4 visualizzazioni (ultimi 30 giorni)
how i can find the spot of binary imagr,
the result of binary image below must be = 4
how i can find it?????

Risposta accettata

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

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Loops and Conditional Statements in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by