I have collected a bunch of videos using Kinect for windows 2 using the kinect studio with file extension .xef.
Now I want to write a program to load data from them and just playback or save as another format, but I have found little resource to doing so, is there any useful resource to do that?
Actually, you can use the Kinect Studio API to read and play .xef files since the last SDK release (KinectSDK-v2.0_1409). It is just not properly documented yet, but can be integrated into your code. Here is a short description to use it (tried in a VS 2013 C# Solution):
The API is described here.
And here is some sample code from Carmine from the Microsoft Kinect team.
what you can do is reading the xef file using the Kinect Studio, then going to Play (or Playback) tab and hit play, your program will start streaming. I think it's the only way to do that, doing like it's coming from the kinect.
There seems not having a way to parse XEF file to extract the images directly yet.
If you do not need all frames stored in XEF file, i.e., frame dropping is ok, an indirect way is to make a Kinect application to receive frames from XEF file via Kinect service.
A quick test is:
You can then modify the source code in ColorBasics or DepthBasics to save the images accordingly. You can modify KinectFusionExplorer-D2D if you care about aligning depth and color images.
This approach can only capture a subset of frames stored in the XEF because the playback and frame receiving via Kinect service is asynchronous. Therefore it will only work if frame dropping is not an issue in your program.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With