ofxOpenNI 2.0b hand tracking shuts down after a while

I am using the new version (2.0b) of addon ofxOpenNI.
The handing tracking module always works well at the begining, and looks like this after a while.

After about 30 times testing of “tracking-missing … tracking-missing”, the app will get an error
" [ofxOpenNIDevice[0]:error] (CB) Hands Destroy called on non-existant hand:20",
after this error, it will work once more and then gets out of work(useless but no quit).

Anyone knows how to fix this or give me some tips? Thx guys.


What version of ofxOpenNI are you using?
I’m using gameover’s one, and I have a problem with hand tracking as well…
After I lost the tracked hand I can’t get the hand to be tracked again. I have to shutdown the application
and start over.
Any ideias?

Best regards,

i observed the same problem, but not consistently, so couldn’t pin down a reason… :frowning:

I have the same issue but the log shows:

[ofxOpenNIDevice[0]:verbose] Deleting hand6826404
[ofxOpenNIDevice[0]:verbose] Deleting hand6826404
[ofxOpenNIDevice[0]:verbose] Deleting hand6826404…

I was able to fix this by changing one line of ofxOpenNI.cpp:

from: handsToDelete.insert(hand.getID());
to: currentTrackedHands.erase(it);

This was changed in one of gameover’s commits…so use at your own risk.

I just wonder the ofxOpenNI can be applied on both Kinect and Xtion?
and I also have another questions:

  1. why I used openNIDevice.addHandsGenerator() to detect all guestures,
    it always detected ‘Raise Hand’?
  2. How to change the detection Range? I’ve tried to change ofxOpenNIDepthThreshold(0, 0, false, true, true, true, true) to ofxOpenNIDepthThreshold(0, 1000, false, true, true, true, true), but nothing different.