finding the distance from the sensor. (z value of the coordinates) RRS feed

  • Question

  • how is it possible to measure the distance of a certain joint from the kinect sensor, i wanna find the distance as im interested in finding z-axis movement.

    any ideas,

    many thanks,

    Friday, February 17, 2012 5:47 PM


All replies

  • The value of the z-cocordinate of the joint is the distance from the sensor (or, more precisely, the plane of the sensor), measured in meters.

    K4W Dev

    Friday, February 17, 2012 6:18 PM
  • Is there any functions provided by the SDK to get the z-coordinate of the joint?
    Saturday, February 25, 2012 8:40 AM
  • You need to use the information from the Depth stream to get the distance from the camera of any point.  Each pixel in the depth stream has it's distance from the camera.
    Sunday, February 26, 2012 9:10 PM
  • Hi Rogerhk,

    If working with Skeleton Tracking, You can get the distance (in meters) of the specified joint from sensor using SkeletonFrameReady event. Here the "Z" value gives the distance of "Shoulder Center" in meters.

    SkeletonFrame allSkeleton = e.SkeletonFrame; SkeletonData data = (from s in allSkeleton.Skeletons where s.TrackingState == SkeletonTrackingState.Tracked select s).FirstOrDefault(); JointsCollection j = data.Joints; shoulderC = j[JointID.ShoulderCenter].Position.Z;



    • Edited by ykbharat Monday, February 27, 2012 6:14 AM improper format corrected
    Monday, February 27, 2012 6:12 AM
  • Hi,

    I was looking for information about how could I get the distance between kinect and an object. Here we explain how to calculate the distance between the sensor and the skeletons and I would like to know if I can use the same code to calculate the distance that I need. When I put an object in from the sensor, I can see the front side in blue. I suppose I can use this information to determinate the distance but I don't know why.

    I'm using Visual Studio 2010 Ultimate x86, Kinect for X360 and SDK 1.8.

    Thanks a lot. 

    • Edited by MouMRG Monday, November 11, 2013 7:00 PM
    Monday, November 11, 2013 6:58 PM