"Comparing MultiSourceFrameReader and XSourceFrameReader"

Tom Kerkhove, Kinect MVP, is back, this comparing two different Frame Readers...

Gen. II Kinect for Windows – Comparing MultiSourceFrameReader and XSourceFrameReader

In a previous post I talked about how you can implement the basic data streams into your application. Next to that I also explained the new streaming model they introduced with the frame readers for each type of stream, f.e. ColorSourceFrameReader.

image

With the new model came an equivalent to the AllFramesReady event called a MultiSourceFrameReader that is capable of reading on several different data streams at once.

In this post I will go deeper in the differences between the MultiSourceFrameReader and the single SourceFrameReaders.

Disclaimer

I am bound to the Kinect for Windows Developer Program and can not share the new SDK/DLL.

“This is preliminary software and/or hardware and APIs are preliminary and subject to change”.

MultiSourceFrameReader vs XSourceFrameReader

In my basics overview I visualized the camera with a Body overlay that showed a couple of joints by using code that is similar to the one below -

...

In the first generation each frame had a property FrameNumber that you could use to determine if both data frames are in sync. In the second generation this has been replaced with a RelativeTime that indicates the correlation between frames.

Kinect v1 offered a more efficient way that does this for use by using the AllFramesReady-event that includes all the enabled stream data, I’m glad to tell you that this concept is also available in the new source/reader concept by using a MultiSourceFrameReader.

...

We can easily replace our two XSourceFrameReader with one MultiSourceFrameReader where we specify the data streams by using the FrameSourceTypes-enumeration. The rest of the processing is pretty much the same – You listen to the MultiSourceFrameArrived-event, you retrieve the MultiSourceFrameReference and the MultiSourceFrame. Now with the MultiSourceFrame you are able to retrieve the corresponding frames for your selected FrameSourceTypes.

Here is an example on how you can use a MultiSourceFrameReader –

...

Conclusion

You should try to use the MultipleSourceFrameReader when your data should be synced or use the RelativeTime-property to check the correlation.

If this is not required you can still use the XSourceFrameReader for that specific data streams.

You can also use a combination of several MultiSourceFrameReader & XSourceFrameReaders depending on your requirements.

[Make sure you click through for the source and more]

Project Information URL: http://www.kinectingforwindows.com/2014/05/19/second-gen-kinect-comparing-multisourceframereader-and-xsourceframereader/

Contact Information:

Other posts from Tom you might also find interesting;

 



Tags:

Follow the Discussion

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.