1. NodeBox 1
    1. Homepage
    2. NodeBox 3Node-based app for generative design and data visualization
    3. NodeBox OpenGLHardware-accelerated cross-platform graphics library
    4. NodeBox 1Generate 2D visuals using Python code (Mac OS X only)
  2. Gallery
  3. Documentation
  4. Forum
  5. Blog

iSight

Description

The iSight library allows you to grab still images from the iSight camera, which you can then display in NodeBox or manipulate with Core Image for example. The library is based on Axel Bauer's isightcapture command line tool.

Download

downloadisight.zip (20KB)
Last updated for NodeBox 1.9.0

 


Documentation

Put the isight folder in the same folder as your script so NodeBox can find the library. You can also put it in ~/Library/Application Support/NodeBox/.

Then you can grab an image from the camera with the following code:

isight = ximport("isight")
img = isight.grab(640, 480) # width and height are 320 x 240 by default

The return value is a path where the grabbed image is stored:

image(img, 0, 0)

isight1

 


So it's easy enough to start playing with image frames from the camera in Core Image:

coreimage = ximport("coreimage")
canvas = coreimage.canvas(320, 240)
l = canvas.layer(img)
l.filter_bumpdistortion(radius=115, scale=0.85, dx=8, dy=5)
l.filter_triangletile(angle=17.43, width=84)
canvas.draw()

isight2

isight3