I have been using SimpleCV for find blobs to be used with a self-driving robot. The problem is when I call the findBlobs command in SimpleCV. When I completely block the lens of the Kinect Camera, PyGame crashes giving me this error:
Fatal Python error: (pygame parachute) Segmentation Fault
Sometimes it works and other times it just crashes, even when the lens is unblocked. It will almost always crash when i run it for longer than about thirty seconds. I have re-installed and fixed many problems in SimpleCV and tried re-installing Pygame and it doesn't seem to help at all. Also, I am using the X-Box kinect as my camera source. I'm using Ubuntu 11.04.
Here is my exact code:
from SimpleCV import *
from SimpleCV.Display import *
from time import sleep
k = Kinect()
dis = Display()
while 1:
depth = k.getDepth()
depth = depth.invert()
depth = depth.erode()
blobs = depth.findBlobs(threshval=127, minsize=10, maxsize=0)
if blobs:
blobs.draw()
depth.save(dis)
sleep(0)