ga.camBlobW()

Name

ga.camBlobW()

Examples

runningBlobs = 0
function setup()

end

function update()
    runningBlobs = ga.camBlobs(0)  -- get the running blobs number on video device 0
end

function draw()
   
    ga.background(0.0,1.0)
    of.setColor(255,0,0)
    of.fill()

    for i=0, runningBlobs do
        of.rect(OUTPUT_W * ga.camBlobX(0,i), OUTPUT_H * ga.camBlobY(0,i), ga.camBlobW(0,i) * OUTPUT_W, 50)
    end

end

Description

Returns the requested id blob Width from blob detection, on specified camera device. GAmuza manage the blob's id in order of appereance, so the blob with id 0 will be the first one entered in camera frame until it goes out. If you have three cameras connected on your machine, then you can use this funtion with 0, 1 or 2 as specified camera device; the order will be the same order of openFrameworks console listing available devices, or instead the videoTracking tab order in GAmuza GUI.
Be sure to activate the video tracking module in the settingManager and have, at least, one camera connected and up&running, in order to have this function working.

Syntax

ga.camBlobW(device,blob)

Parameters

devicethe camera device id
blobthe blob id

Returns

Number, from the specified device, the requested id blob Width.