# Issues about quaternion and conversion

I an using the openni_tracker.cpp and the skeleton tracking. My questions are (A) how do I obtain the quaternion values of each join? (B) How do I convert each joint's rotation matrix (say 3 joints) to half space quaternion with respect to the torso in skeleton tracking. Thank you in advance.