none
Best way to store recorded Kinect data RRS feed

  • Question

  • I'm working on an application in C++ which allows recording Kinect's depth and color stream and replaying it later for further processing. I came here because I'm impressed by how efficiently it is done by Kinect Studio and I wonder what kind of approach is used there.

    What I've come up with so far is a binary file format which uses a header to store some meta-data information, then a sequence of frames and at the and an array which serves as an index to map frame numbers to their locations in the file. When loading a file I only load the index and then use it to load the data for the frame I currently need. This works ok, however Kinect Studio seems to have some even faster solution. 1Gb file takes about 1-2 seconds to load in my application compared to pretty much an instant load in Kinect Studio.

    I'm looking for some hints on how my design could possibly be improved. Should I look at memory mapping?

    Thank you in advance.

    Sunday, November 25, 2012 3:49 AM

All replies

  • Not to diminish the work you are doing, but what features are missing in Kinect Studio that you require writing your own? The applicaiton is always under development so features will be added over time. If you have a particular feature it is missing please let us know.

    Is your index at the beginning or the end of the file? Streams are your friend, but be sure you are using a background thread as this will keep your UI responsive.

    Wednesday, November 28, 2012 7:55 PM
  • Not to diminish the work you are doing, but what features are missing in Kinect Studio that you require writing your own? The applicaiton is always under development so features will be added over time. If you have a particular feature it is missing please let us know.


    I can't say I find anything missing, I just prefer to have my own module for this which is going to give me more flexibility. I think with Kinect Studio you can't record without being connected to an application. Also I'd prefer to have direct access to binary data. Finally I may want to customize recording, e.g. record single frame, n-frames, 1 minute sequence or trigger recording by specific event etc.

    Is your index at the beginning or the end of the file? Streams are your friend, but be sure you are using a background thread as this will keep your UI responsive.


    I'm using a background thread for this, so I have no issues with blocking the GUI. My index is currently at the end of the file as this was easier to implement. I'll try putting it in the front and see if that makes any difference.
    Thursday, November 29, 2012 5:48 PM
  • I'm working on an application in C++ which allows recording Kinect's depth and color stream and replaying it later for further processing. I came here because I'm impressed by how efficiently it is done by Kinect Studio and I wonder what kind of approach is used there.

    What I've come up with so far is a binary file format which uses a header to store some meta-data information, then a sequence of frames and at the and an array which serves as an index to map frame numbers to their locations in the file. When loading a file I only load the index and then use it to load the data for the frame I currently need. This works ok, however Kinect Studio seems to have some even faster solution. 1Gb file takes about 1-2 seconds to load in my application compared to pretty much an instant load in Kinect Studio.

    I'm looking for some hints on how my design could possibly be improved. Should I look at memory mapping?

    Thank you in advance.

    Hi @jhabermas,

    I'm pretty curious about this too. Flat out saving the frames/pixel data has been okay so far for my use, the reason why I'm not using Kinect Studio is because I want the 'replayability' controls inside my application (i.e. I have my own slider for frames which I can use to control playback, etc..)

    What's missing with flat out saving the data is that I cannot use the Mapping functions of the KinectSensor because it has to be connected and being able to work without a sensor is one of my requirements. If you're interested you can check it out at my github, but I haven't had the time to clean it up or document it for other people's use.

    If you find more information please let me know! I'm interested in how Kinect Studio does it too! Thanks!

    Tuesday, December 11, 2012 3:48 PM
  • Since Kinect Studio requires a connection to the active app and for a Kinect to be connected "I believe" (hope a MS employe backs me up on this) that the studio does not record the depth / color streams 1-1 as we would inside the app instead it records the raw data from the Kinect itself and feeds that data back through the SDK. This is why your application doesn't know it's playing a recording. 
    Even though you record a flat file how are you feeding it back into the SDK? I don't think that is something we have access to and I assume you are feeding it to your individual feed handlers? This may be were your overhead is. Maybe some reflector work is in my future... :) 


    Thursday, December 13, 2012 5:52 AM
  • Gesture Studio (http://gesturestudio.ca/dev) will let you save RGB, Depth and IR frames to folders for later processing. Check it out. 

    Wednesday, December 19, 2012 3:19 PM
  • A nice application to get interested in is: reconstructme at http://reconstructme.net. It has a sdk for saving  3d data and exportation of it from a Kinect. $100 for their application that exports 3d models right now. The models that are exported are very good quality from looking at the ones modeled so far.

    Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to suffering - Yoda. Blog - http://www.computerprofessions.co.nr



    • Edited by The Thinker Friday, December 21, 2012 3:03 PM
    Friday, December 21, 2012 3:02 PM