none
Kinect depth data RRS feed

  • Question

  •  

    Hi all;

    I am trying to build an application using the depth data sensor. the problem that i need to use the full 11 bits raw data, but all the examples that I saw is based on  converting the 2byte data to an 1 byte data value to be displayed as a gray scale image,

    I need the real value of the depth data.( the raw data)

    Any body can help.

    Thanks in advanced

     

    Friday, August 5, 2011 3:42 PM

Answers

  • Both C# and C++ SkeletalViewer samples (installed to C:\Users\Public\Documents\Microsoft Research KinectSDK Samples\NUI\SkeletalViewer) store the full depth data from depth+index stream into a variable called realDepth (in function convertDepthFrame in C# sample, and in function Nui_ShortToQuad_Depth in C++ sample). That will contain 12 bits worth of depth data for the appropriate pixel.

    Hope this helps,
    Eddy


    I'm here to help
    Saturday, August 6, 2011 2:01 AM
  • You got it kinda wrong. What it does is take the second byte and shift them by 3 to take the 5 msbs of the byte (lsbs of the depth data), as you said, but in the 1st byte, it isnt taking 3 bits, its just shifting them to the left to "make space" for the 5 lsbs (Its shifting the 1st byte in an integer variable, so theres no lost data due overflow)

    Sunday, August 7, 2011 11:50 AM

All replies

  • Both C# and C++ SkeletalViewer samples (installed to C:\Users\Public\Documents\Microsoft Research KinectSDK Samples\NUI\SkeletalViewer) store the full depth data from depth+index stream into a variable called realDepth (in function convertDepthFrame in C# sample, and in function Nui_ShortToQuad_Depth in C++ sample). That will contain 12 bits worth of depth data for the appropriate pixel.

    Hope this helps,
    Eddy


    I'm here to help
    Saturday, August 6, 2011 2:01 AM
  • thank you for your help.

    yes I know that but all the examples i saw till now is takeing the second byte then shifteing and masking it to extarct 5 bits, then takeing the first byte and shifting and masking to take 3 bit then combining them to have an 8 bit. as i understand from you replay that i can use the remaining 12 bit after extracting the player index bit as it is.

    thanks for your help

     


    hytham alobydi
    Saturday, August 6, 2011 10:48 AM
  • You got it kinda wrong. What it does is take the second byte and shift them by 3 to take the 5 msbs of the byte (lsbs of the depth data), as you said, but in the 1st byte, it isnt taking 3 bits, its just shifting them to the left to "make space" for the 5 lsbs (Its shifting the 1st byte in an integer variable, so theres no lost data due overflow)

    Sunday, August 7, 2011 11:50 AM
  • ok,

    i understand thank you for your clarification.


    hytham alobydi
    Sunday, August 7, 2011 6:12 PM