none
Kinect SDK 1.0 C# Skeleton serialization only works for binary not XML

    Question

  • I was pleased to see serializable skeleton data in the new release of the Kinect SDK.

    However, I can only serialize to binary and not to XML as needed by my application.

    The error when using XML serialization is:

    There was an error reflecting type 'Microsoft.Kinect.Skeleton'

    "To be XML serializable, types which inherit from IEnumerable must have an implementation of Add(System.Object) at all levels of their inheritance hierarchy. Microsoft.Kinect.JointCollection does not implement Add(System.Object)."

    I have seen posts on this with the old version of the SDK so I presume it is a known issue.

    Please can someone confirm that version 1.0 of the SDK only supports binary serialization and not XML?

    Thursday, February 2, 2012 4:30 PM

Answers

  • That's correct. The Joints collection in Skeleton does not implement an Add method because it always must contain exactly 20 elements, corresponding to the 20 trackable body joints. You can't add (or remove) any.

    John
    K4W Dev

     

    • Marked as answer by VictoriaBloom Friday, February 3, 2012 9:29 AM
    Thursday, February 2, 2012 7:36 PM

All replies

  • That's correct. The Joints collection in Skeleton does not implement an Add method because it always must contain exactly 20 elements, corresponding to the 20 trackable body joints. You can't add (or remove) any.

    John
    K4W Dev

     

    • Marked as answer by VictoriaBloom Friday, February 3, 2012 9:29 AM
    Thursday, February 2, 2012 7:36 PM
  • hi,

     

    how can i serialize the skeleton animation and play it

     

    thank's

    Monday, February 6, 2012 10:18 AM