Looking inside skeleton stream helpers

The SDK provides an ample amount of APIs to interact with the sensors and play around with skeleton data. There are several classes and structures associated with skeleton tracking. SkeletonFrame and SkeletonStream are the two classes that actually take care of skeleton data processing. They are the core of skeleton stream data. Unlike color and depth streams, these two classes are not derived from ImageFrame and ImageStream because the skeleton data is not an image frame. Let's focus on the individual class members and their uses.

The skeleton frame

The SkeletonFrame class is a sealed class and contains the individual skeleton information that is tracked by the sensor. This class defines the properties and methods for working with skeleton frames. Like ImageFrame for color and depth images, SkeletonFrame represents a single frame from SkeletonStream. The OpenSkeletonFrame() method of SkeletonFrameReadyEventArgs returns the current SkeletonFrame from SkeletonStream. You can also use OpenNextFrame() to get a skeleton frame while using the polling model instead of the event model. The following screenshot shows the class diagram for the SkeletonFrame class and its association:

The skeleton frame

The skeleton stream

The skeleton frame information is represented as SkeletonStream. The SkeletonStream class defines the properties and methods for working with skeleton data and enables us to take control over all the skeleton data. The SkeletonStream class also defines the properties for setting up TrackingMode for Skeleton and allows us to choose the right skeleton for the application using the AppChooseSkeletons() method. The following screenshot shows the overall class diagram of the Skeleton class along with its association:

The skeleton stream

As you can see from the previous screenshot, the skeleton stream consists of skeleton frames and every skeleton frame has the information about individual skeletons.

We have covered details of these properties and methods in a later part of this chapter.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.207.129