Force onLostUser to quit faster / with onVisibleUser?

a_la_l
edited February 2014 in Kinect

Hi, i have setup with a kinect where it is neccessary, to change quickly between different users. so i first thought to use the onVisibleUser method and track only if a user is in front of the kinect, and if not to kill the current instance of SimpleOpenNi. To quit the instance i tried to set to null and stopTrackingSekeleton.

    void onVisibleUser(SimpleOpenNI curContext, int userId) {
        visibleUser = true;
    }

    void onNewUser(SimpleOpenNI curContext, int userId) {
        if (visibleUser) {
            curContext.startTrackingSkeleton(userId);
        } else {
          //curContext = null;
          //curContext.stopTrackingSkeleton(userId);
          visibleUser = false;
        }
    }

void onLostUser(SimpleOpenNI curContext, int userId) {
    println("onLostUser - userId: " + userId);
}

It works that a new user is immediately recognized but it don´t starts to track before the old user is removed by the onLostUser function.

so does anybody has a solution for this topic or any suggestions?

Thanks in advance, Andreas

Answers

  • In the old Open ni sdk you could change the parameter ;ServerNoClientsTimeout=10000 but there´s no such parameter in sdk 2

Sign In or Register to comment.