Real-time blob/circle detection from camera

asked 2014-04-26 23:08:40 -0500

anonymous user

Anonymous

Hi I'm trying to get a camera feed, find blobs/circles and have them drawn on the display, the code I have right now leads to python crashing.

I am eventually trying to get eyetracking and hopefully eyegaze tracking working with SImpleCV, and would appreciate any pointers. I considered using findHaarFeatures() to detect the general eye area, crop it, and then using binarize() to make it easier to detect the pupils. However I found that to be too laggy.

My current code looks like this:

from SimpleCV import *

cam = Camera()
disp = Display(cam.getImage().size())

while disp.isNotDone():
    video = cam.getImage()
    blobs = video.findBlobs()
    blobs.draw()

    video.save(disp)
edit retag flag offensive close merge delete

Comments

I'm currently running Ubuntu 14.04 w/ python 2.7.6, and simplecv 1.3 installed straight from the github repo. No crashes here running your code as is. I am getting some error messages when the image window is closed, but that is a simplecv/pygame issue, not related to your code specifically.

memilanuk gravatar imagememilanuk ( 2014-05-08 12:54:41 -0500 )edit