ga.cameraPixelsRef()
Examplespix = 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
Descriptiontex = 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
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.
Syntaxga.cameraPixelsRef(cameraID)
Parameters| cameraID | the camera identifier |
of.pixels() or nil

sending...