# problem understanding jointposition and jointorientation [closed]

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, m, m,
m, m, m,
m, m, m);


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,m,m);
printf("orientation +Y :  %d %d %d \n",m,m,m);
printf("orientation +Z :  %d %d %d \n",m,m,m);


Greatly appreciate your interest and help!! Thank you!

edit retag reopen merge delete

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

Sort by » oldest newest most voted

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,

Guido

more