# How to precisely locate every circles in a image using simpleCV

I am trying to solve a image processing problem with SimpleCV. I need to know the number of the circles and also which one is missing when someone cover it. How to precisely locate every circles ? Now I can only detect the number of the circles, which is 24(4lines and 6columns), like following pattern. Then I need to give each circle a number, A1...A6, B1...B6, C1...C6, D1...D6 like this.

1   2   3   4    5   6
o   o   o   o    o   o A
o   o   o   o    o   o B
o   o   o   o    o   o C
o   o   o   o    o   o D


Next, When I cover 2 circles in the next pattern, how to identify A2 and C3 are covered or disappeared. when covering more, it can also tell what the numbers of the disappeared circles.

 1   2   3   4   5   6
o       o   o   o   o A
o   o   o   o   o   o B
o   o       o   o   o C
o   o   o   o   o   o D


Can anyone give me some brief instruction? Thank you very much!

from SimpleCV import Image, Camera, Display

cam = Camera()

display = Display()

img = Image("circles.jpg") circles = img.findCircle (canny=70, thresh=200)

circles.show()

print(len(circles))

edit retag close merge delete