none
Using kinect for distance sensing for robotic application RRS feed

  • Question

  • Hey,

    Was wondering if there is a way to get a distance (in millimeters) measurement from the kinect to a static object and display it. If this is possible, how would we go about programming this because we are relatively new to C#. 

    Monday, August 8, 2011 12:14 AM

Answers

  • In the depth only mode, the 12 least significant bits contains the depth data in milimeters. The raw data stream sent by the kinect (coded in 11 bits) is not accesible in this SDK, but since you need the data in milimeters, you shouldnt worry about it. The 12 bits per pixel takes values from 0 to 4095 milimeters. No conversion to float (decimal?) is made or needed to do what you need.

    Tuesday, August 9, 2011 10:24 AM

All replies

  • The depth map is already in milimeters, all you would have ro do is find some way to detect the object, either in the depth or color image. The skeletalviewer sample is quite simple in c#, check that.
    Monday, August 8, 2011 5:30 AM
  • Just for my own understanding, the distance is calculated from converting the raw data stream from the depth camera (which is a binary number containing 16 bits for each pixel, the first 13 giving the distance) and this data is in millimeters when converted to decimal? Sorry for the noob questions but I think i just need a more detailed explanation.
    Tuesday, August 9, 2011 3:22 AM
  • In the depth only mode, the 12 least significant bits contains the depth data in milimeters. The raw data stream sent by the kinect (coded in 11 bits) is not accesible in this SDK, but since you need the data in milimeters, you shouldnt worry about it. The 12 bits per pixel takes values from 0 to 4095 milimeters. No conversion to float (decimal?) is made or needed to do what you need.

    Tuesday, August 9, 2011 10:24 AM
  • ralbert2011,

    this topic is covered in page 18 of programming guide (http://research.microsoft.com/en-us/um/redmond/projects/kinectsdk/docs/ProgrammingGuide_KinectSDK.pdf), under "Depth Data" section.

    Eddy


    I'm here to help
    Tuesday, August 9, 2011 11:29 PM