Macos – 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?

Best Solution

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.