Capturing frames from macbook isight with PIL

261 views Asked by At

I'm trying to write an app using python and PIL that involves processing frames from my macbook camera. Is there an easy way to capture frames from the iSight for use with PIL without installing too many libraries?

I've seen a few questions on SO about doing this with OpenCV, which I don't want to do. Can I do this without using OpenCV as I've had trouble installing that?

1

There are 1 answers

0
Specas On BEST ANSWER

Maybe you can try using the SimpleCV library. After installing it, the following code should work:

from SimpleCV import Camera
from SimpleCV import Image

webcam_camera = Camera()
webcam_image = webcam_camera.getImage()
webcam_image.save("frame.jpg")

Although OpenCV would be a much better option. If you follow the instructions on their website, it wouldn't be too hard to get it up and running.