ga.camBlobW()
ExamplesrunningBlobs = 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
Descriptionfunction 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
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.
Syntaxga.camBlobW(device,blob)
Parameters| device | the camera device id |
| blob | the blob id |

sending...