hi,

i added the missing video capture code from openframeworks to fluxus-video. i tested it on osx 10.5 and fedora 10. it requires quicktime on osx, and gstreamer, unicap and ffmpeg on linux.

functions:

(require fluxus-016/fluxus-video)
requires the module

(camera-list-devices)
lists the available devices

(define vt (camera-init 0 320 240))
initializes camera id0 in 320x240 resolution

(camera-tcoords vt)
gets the texture coordinates of the camera image, this is required because fluxus uses square textures, but camera and video images are
rectangular. the camera image is placed in a square texture.

(camera-update vt)
grabs a new frame from the camera

(camera-clear-cache)
camera textures are cached, cameras are not initialized every time the script is recompiled. this function clears the cache and closes all cameras.

example script:
addons/video/example/camera.scm

comments and suggestions are welcome as always.

best,
gabor

Reply via email to