ga.cameraPixelsRef()

Name

ga.cameraPixelsRef()

Examples

pix = of.pixels()
tex = of.texture()

function setup()
    pix:allocate(CAPTURE_W,CAPTURE_H,OF_PIXELS_RGB)
    tex:allocate(CAPTURE_W,CAPTURE_H,GL_RGB)
end

function update()
    pix = ga.cameraPixelsRef(0)
    tex:loadData(pix)
end

function draw()
    ga.background(0.0,0.2)
    of.setColor(255)
    tex:draw(ga.mouseX(),ga.mouseY())
end

Description

Loads the specified index camera image pixels, precisely into a of.pixel() object. The cameraID is related to the numbers of cameras connected and up and running in GAmuza; if you have 2 cameras connected and working the first one in the devices list (the first video tracking tab), will have cameraID = 0.

Syntax

ga.cameraPixelsRef(cameraID)

Parameters

cameraIDthe camera identifier

Returns
of.pixels() or nil