Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

user thresholding/hot spot #42

Open
cindyloo opened this issue Oct 2, 2013 · 0 comments
Open

user thresholding/hot spot #42

cindyloo opened this issue Oct 2, 2013 · 0 comments

Comments

@cindyloo
Copy link

cindyloo commented Oct 2, 2013

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant