I have a picture like that below. I would like to find groups of circles (their positions) in the image. In the following example there should be three groups. The background is white or will be whitish color.
(In the source image there will not be such rectangulars. I have just painted to show how groups should be like)
Is it possible to find it?
What about such picture:
Circles without rectangulars:
1 - Simply invert the image,
2 - then dilate the image so that all circles are joined together,
3 - Find the contours,
4 - find bounding box.
eg :