I recently started using the ofxOpenNI add-on to use the Kinect tracker device and currently facing a small doubt here.
ofxOpenNI as I see, has exposed two methods to get the positions of the tracked joints.
getWorldPosition() / getProjectivePosition()
I am trying to get the position of the head joint in the real world (which as far as I know comes in mm from the Kinect on using realWorld method). Using ofxOpenNI, I got the head position with the following code:
ofxOpenNIUser& trackedUser = openNIDevice.getTrackedUser(0); ofxOpenNIJoint trackedJoint = trackedUser.getJoint(JOINT_HEAD); headPosition = trackedJoint.getWorldPosition();
In my scenario, I am standing on a straight floor (currently have Kinect’s tilt angle as 0 and parallel to floor at a height of 1m above it) and as the skeleton gets tracked, I am extracting the y Position for the head joint. I am not moving down or sitting etc. and even though I am on the same plane, if I move further away from Kinect (z changes since I am moving farther), y coordinate of the head joint also starts changing (not the slight noise that occurs). I am not able to comprehend the reason behind y Coordinate getting changed since I am on the same plane (didn’t change my head height from the floor).
How do I get a steady y Position of the head joint in the real world?