0
$\begingroup$

This question already has an answer here:

enter image description here

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

$\endgroup$

marked as duplicate by Niki Estner, Sektor, Michael E2, C. E., m_goldberg Jan 31 '18 at 21:16

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 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]
$\endgroup$

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