简体   繁体   中英

Kinect: getting the joint coordinates (x,y) in meters

Hi I understand that under the official documentation from Microsoft is that the cameraspacepoints obtained are already expressed in meters. However, I'm still uncertain if the values are in meters as the values are varying in 9 digits or more and positive and negative at times.

Can anybody explain to me what these values are and are they already in meters?

Function to process body (placed the output of the joint[j].position in it

在此处输入图片说明

Results

在此处输入图片说明

Do let me know if you all require additional information. I apologize as I'm new to kinect. Btw, this is kinect v2!

Each Joint has a Position property, which is a CameraSpecePoint . A CameraSpacePoint object has three properties, X , Y and Z , which are float32 and are expressed in meters .

As explained in the documentation :

Camera space refers to the 3D coordinate system used by Kinect. The coordinate system is defined as follows:

  • The origin (x=0, y=0, z=0) is located at the center of the IR sensor on Kinect
  • X grows to the sensor's left
  • Y grows up (note that this direction is based on the sensor's tilt)
  • Z grows out in the direction the sensor is facing 1 unit = 1 meter

Note also that you have used a %d in the sprintf method to print a float value, while %d should be only used for signed decimal integer (see the table in this page ). If you want to print X, Y and Z values, you must use %f ; so your sprintf should become like this:

sprint(abc, "Head is at %f on X-axis\n", joints[j].Position.X);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM