Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Accessing iSight programmatically?

Is it possible to access the iSight camera on a macbook programmatically? By this I mean I would like to be able to just grab still frames from the iSight camera on command and then do something with them. If so, is it only accessible using objective c, or could other languages be used as well?

like image 514
Paul Wicks Avatar asked Aug 12 '08 15:08

Paul Wicks


2 Answers

You should check out the QTKit Capture documentation.

On Leopard, you can get at all of it over the RubyCocoa bridge:

require 'osx/cocoa'
OSX.require_framework("/System/Library/Frameworks/QTKit.framework")

OSX::QTCaptureDevice.inputDevices.each do |device|
    puts device.localizedDisplayName
end
like image 72
Nick Brosnahan Avatar answered Sep 28 '22 06:09

Nick Brosnahan


I don't have a Mac here, but there is some Documentation up here:

http://developer.apple.com/documentation/Hardware/Conceptual/iSightProgGuide/01introduction/chapter_1_section_1.html

It looks like you have to go through the QuickTime API. There is supposed to be a Sample Project called "MungGrab" which could be worth a look according to this thread.

like image 32
Michael Stum Avatar answered Sep 28 '22 07:09

Michael Stum