0
$\begingroup$

enter image description here

I reached there the last step is to count the circles. Please help me.

$\endgroup$
  • 1
    $\begingroup$ Please post the code as code and not as an image. You should also post the input to your code, img2, so that others can reproduce your result. $\endgroup$ – C. E. Jan 31 '18 at 10:18
2
$\begingroup$

Length[comps] will answer your question. If you only know the Graphics-object (pict=Show[...]) you can count as follows:

Length@Cases[pict, _Circle, Infinity]
|improve this answer|||||
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.