msavva / pigraphs

PiGraphs: Learning Interaction Snapshots from Observations
http://graphics.stanford.edu/projects/pigraphs
Other
46 stars 5 forks source link

Draw Skeleton #2

Open mohamedhassanmus opened 6 years ago

mohamedhassanmus commented 6 years ago

Hi Manolis, I have some questions regarding the skeleton format. I am trying to build a skeleton viewer where the input is the joints' orientation angles and the output is the skeleton in 3D space. So can you please point me to the relevant segments of the code, and also can you elaborate on these questions:

  1. What is the kinematic tree used? can you point to that as well.
  2. For each joint, is the given orientation angle relative to the parent or is it with respect to a fixed reference frame.
  3. How was the orientation angles computed in the first place?
  4. Are you following the right hand rule>?is the positive Z axes up or down?
msavva commented 6 years ago

Hi, It's great to see that you are making use of the PiGraphs codebase!

The relevant parts of the code are in Skeleton.h and Skeleton.cpp. This skeleton format is directly adapted from the Kinect One SDK so you can look over the documentation for the SDK to get more information: https://msdn.microsoft.com/en-us/library/jj131025.aspx

  1. The kinematic tree is specified at https://github.com/msavva/pigraphs/blob/master/libsg/core/Skeleton.cpp#L16
  2. The joint orientations are with respect to a fixed reference frame. See https://social.msdn.microsoft.com/Forums/en-US/31c9aff6-7dab-433d-9af9-59942dfd3d69/kinect-v20-preview-sdk-jointorientation-vs-boneorientation?forum=kinectv2sdk for an explanation of how the values can be interpreted. The pigraphs codebase contains functions that convert between these absolute reference frame orientations and hierarchical joint angles relative to parents in the kinematic chain (see the makeHierarchical and makeAbsolute functions declared in https://github.com/msavva/pigraphs/blob/master/libsg/core/SkelState.h)
  3. The original orientations are part of the skeletal tracking data in the Kinect SDK.
  4. The positive Z axis is up for the world space describing the scenes -- but note that the joint orientation is specified differently (refer to above link)