none
Export Kinect Depth Data to Text File RRS feed

  • Question

  • Thanks for the help. I am working on my first Kinect project and am looking for the best way to export 3D depth data for evaluation by another party who wants to analyze the depth of an image.

    I assumed I could just use the Depth WPF example and export a png. However, the png it exports is only 8bit when I believe it should be 16 bit for full depth information?

      // depth frame data is a 16 bit value
                ushort* frameData = (ushort*)depthFrameData;

    How do I modify the project to export full 16bit depth images?

    When  I just change this line:

     // create the bitmap to display
                this.depthBitmap = new WriteableBitmap(this.depthFrameDescription.Width, this.depthFrameDescription.Height, 96.0, 96.0, PixelFormats.Gray8, null);

    To Gray16, the build quits right away


    • Edited by TBoom1 Thursday, May 7, 2015 8:22 PM
    Thursday, May 7, 2015 8:14 PM

All replies

  • That would be a question for the WPF team if there is a 16bit encoder. You can always save uncompressed 16bit data with a binary writer since the depth frame is not an image. With any image format you are effectively compressing which is going to destroy the depth data since each pixel is unique and has no meaning to its neighbor.

    Carmine Sirignano - MSFT

    Friday, May 8, 2015 6:18 PM