Skip to content

user thresholding/hot spot #42

@cindyloo

Description

@cindyloo

Gameover you mentioned updated hotspot code on GitHub? But I don't see any User/Threshold/Mask stuff (the Hand example doesn't seem to work the way I need) that can help the following situation:

Currently - I've set the DepthThreshold here:

ofxOpenNIDepthThreshold depthThreshold = ofxOpenNIDepthThreshold(0,3500, false, true, true, true, true);
openNIDevice.addDepthThreshold(depthThreshold);

and, I want the threshold to control whether the users are "seen"
numBodies = openNIDevice.getNumTrackedUsers();
if (numBodies >0){
// 'tracked' users are still found regardless of depth!!!
ofPushMatrix();
ofEnableBlendMode(OF_BLENDMODE_ALPHA);
// iterate through users
for (int i = 0; i < numBodies; i++){
ofxOpenNIUser & body = openNIDevice.getTrackedUser(i);
body.setUseMaskTexture(true);

                body.setUseMaskPixels(true);
                ofPixels p =  body.getMaskPixels();
                body.drawMask();
                //not working reliably b/c UserTracking event may not have fired yet
                //ofxOpenNIROI roi = depththreshold.getROI()
                //roi.inside(body.getCentroid())

...

however, getNumTrackedUsers() finds these users even if they are beyond the threshold.

What do I need to set to "register" the thresholding and control the viewport (ignoring users above z ==3500 for example)

I've tried the roi.inside() and a number of other possibilities but it doesn't work for users before they are technically "found" so I can't depend on the USER_TRACKED event.position. USER_CALIBRATION_REGISTERED doesn't have position info...

thanks for any ideas!!!
Cindy

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions