Question

The following is code I have used to try to record skeleton frame data

using (SkeletonFrame skeletonFrame = e.OpenSkeletonFrame())
{
    if (skeletonFrame == null)
       return;
    this.Recorder.Record(skeletonFrame);
}

if the code above is run, what information is recorded? If I were to save this information to an external file, what would I see?

Would there be coordinate information and a specific timestamp associated with each coordinate information?

Was it helpful?

Solution

Are you looking at recording the X, Y, Z data of the skeleton into a text file? It is generally easier to record the information separately in readable format. If you are looking at doing the aforementioned then this may help:

//save the XYZ of the skeleton data, but also save the XZ of depth data
        private void saveCoordinates(Skeleton skeleton, string textFile)
        {
        StreamWriter coordinatesStream = new StreamWriter(newPath + "\\" + textFile);

            foreach (Joint joint in skeleton.Joints)
            {



                coordinatesStream.WriteLine(joint.JointType + ", " + joint.TrackingState + ", " + joint.Position.X + ", " + joint.Position.Y + ", " + joint.Position.Z);

            }
            coordinatesStream.Close();

        }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top