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[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!