Getting steady real world position of a joint [Kinect, ofxOpenNI]

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?

Hey ofPing,

Yes, you are on the same plane but the camera is 1m off the ground. If there was an invisible ray shooting out from the kinect it would hit you somewhere on the torso, as you move back the beam would move up your torso. The Y position of the head joint will always change as you move around because the world joint positions are relative to the camera xyz which is 0,0,0.

Good luck.