Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sample code for using mac camera in a program?

I'd like to use the camera in my Macbook in a program. I'm fairly language agnostic - C, Java, Python etc are all fine. Could anyone suggest the best place to look for documents or "Hello world" type code?

like image 824
Nick Fortescue Avatar asked Sep 11 '08 19:09

Nick Fortescue


1 Answers

The ImageKit framework in Leopard has an IKPictureTaker class that will let you run the standard picture-taking sheet or panel that you seen in iChat and other applications.

If you don't want to use the standard picture-taker panel/sheet interface, you an use the QTKit Capture functionality to get an image from the iSight.

Both of these will require writing some Cocoa code in Objective-C, but that shouldn't really be an obstacle these days.

like image 144
Chris Hanson Avatar answered Oct 13 '22 15:10

Chris Hanson