Ask Your Question

problem understanding jointposition and jointorientation [closed]

asked 2011-06-28 10:44:26 -0500

leedison gravatar image

Hello Guys,

I'm working on a project that modify the current way to keep track of human joints' orientation.

So I looked up the openni_tracker.cpp file and have a few questions in my mind where it uses jointposition and jointorientation.

XnSkeletonJointPosition joint_position;
g_UserGenerator.GetSkeletonCap().GetSkeletonJointPosition(user, joint, joint_position);
double x = joint_position.position.X / 1000.0;
double y = joint_position.position.Y / 1000.0;
double z = joint_position.position.Z / 1000.0;

XnSkeletonJointOrientation joint_orientation;
g_UserGenerator.GetSkeletonCap().GetSkeletonJointOrientation(user, joint, joint_orientation);

XnFloat* m = joint_orientation.orientation.elements;
KDL::Rotation rotation(m[0], m[1], m[2],
                       m[3], m[4], m[5],
                       m[6], m[7], m[8]);

The first thing I did was to display x,y, and z value of each joint with the joint name.

However, the values of the x,y, and z were extremely huge even if jointposition.x, .y, and .z were divided by 1000 already.

In the NITE algorithm document, their units should be in 'mm'. but the actual results from the code does not make sense. x, y, and z values were 6 digits or even bigger.

Another question I have is about the jointorientation.

Again, NITE algorithm document says

"Joint orientations are given as a 3x3 rotation (orthonormal) matrix. This represents a rotation between the joint‟s local coordinates and the world coordinates. The first column is the direction of the joint‟s +X axis given as a 3-vector in the world coordinate system. The second column is the +Y axis direction, and the third column is the +Z axis direction."

If there is anybody understand this phrase, would you please rephrase it...? I specifically don't understand "The first column is the direction of the joint‟s +X axis given as a 3-vector in the world coordinate system." part.

This is how i display values

printf("Coordinates(X Y Z): %d %d %d \n",x, y, z);
printf("orientation +X :  %d %d %d \n",m[0],m[3],m[6]);
printf("orientation +Y :  %d %d %d \n",m[1],m[4],m[7]);
printf("orientation +Z :  %d %d %d \n",m[2],m[5],m[8]);

Greatly appreciate your interest and help!! Thank you!

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by kwc
close date 2012-02-29 07:52:39

1 Answer

Sort by » oldest newest most voted

answered 2011-09-07 22:40:31 -0500

Guido gravatar image

Hi leedison,

I can't help you much with the main problem.

But for the Nite documentation, I think you could rephrase it like:

Each joint has a three axis frame (X,Y,Z). The first column of the matrix is the direction of the X axis in the world coordinates. Second column for Y axis. Third column for Z axis.

I guess the "+" thing is about the sense.

Hope this helps,


edit flag offensive delete link more

Question Tools


Asked: 2011-06-28 10:44:26 -0500

Seen: 531 times

Last updated: Sep 07 '11