I am currently on a robotics team for my high school and my objective is to use our kinect to detect the balls in this year's game by using simplecv and openkinect. I am currently stuck on an issue that my mentors and I cannot seem to resolve. What the code does is it takes a live-depth map feed from the kinect and binarizes it, once it has done that it looks for blobs and tries to find the circular blobs. Finally it draws a circle over the circular blob. The issue is the code is able to find blobs no problem, but it's not able to find the circular ones. I am at a dead end and am hoping someone in the community will be able to please help me. Thank you, here's the code and an image of what is seen
from SimpleCV import *
cam = Kinect()
display = SimpleCV.Display()
while display.isNotDone():
depth = cam.getDepth().flipHorizontal()
img2 = cam.getImage().flipHorizontal()
filtered = depth.stretch(200,255)
segmented = filtered.binarize(200)
blobs = segmented.findBlobs()
if blobs:
circles = blobs.filter([b.isCircle() for b in blobs])
if circles:
img2.drawCircle((circles[-1].x, circles[-1].y), circles[-1].radius(),SimpleCV.Color.RED,3)
img2.drawText("FOUND A BALL", 50,50,color=Color.RED,fontsize=48)
img2.sideBySide(segmented).show()