Kinect V2 - 如何将 kinect v2 坐标转换为现实生活中的测量值?

Kinect V2 - How to transform kinect v2 coordinate to real life measurements?

我正在使用kinect v2。我想将 kinect 骨架坐标转换为现实生活中的测量值。我在这里阅读:Understanding Kinect V2 Joints and Coordinate System

据我了解,如果坐标为0.3124103X,0.5384778Y,2.244482Z,则表示我在左侧0.3米,上方0.5米,前方2.24米。这些坐标是我头部的坐标,传感器距离地面 0.5 米。我的身高是1米?或者我做错了什么?是否有最佳位置或高度来更好地计算它?也许有不同的方法来计算它?有人知道怎么做吗?谢谢:)

您需要考虑传感器的倾斜度。

在您的示例中,如果传感器正好面向前方,则您的计算是正确的。如果Kinect向上倾斜,你的身高会更高。

您可以使用BodyFrame.FloorClipPlane计算传感器的倾斜度和传感器的高度。

然后你需要将关节坐标从 Kinect 的相机 space 转换为 real-world xyz 坐标。

参见 Eddy Escardo-Raffo [MSFT]the marked answer at this post "FloorClipPlane & Joint Data correlation"

What you need to do is a coordinate transform from the cartesian space defined by the basis vectors of the Kinect's point of view (let's call them KV) into the cartesian space defined by the desired basis vectors (let's call these DV).

When camera is not tilted at all, KV and DV are exactly the same so, since this is the desired vector space, for simplicity we can use the standard unit vectors to represent the axes:

x: [1, 0, 0]

y: [0, 1, 0]

z: [0, 0, 1]

Now, when you tilt camera upwards by an angle A, x axis stays the same but y-z plane rotates by A (i.e.: it corresponds exactly to a counter-clockwise rotation about X axis), so the basis vectors for KV (in terms of the basis vectors for DV) are now

x: [1, 0, 0]

y: [0, cos A, -sin A]

z: [0, sin A, cos A]

to convert coordinates relative to KV into coordinates relative to DV, you have to perform a matrix multiplication between the transformation matrix defined by these basis vectors for KV (http://en.wikipedia.org/wiki/Transformation_matrix) and a joint position vector that you receive from kinect API. This will result in a joint position vector relative to DV.


您可能还会发现此答案有帮助:Sergio's answer to "Transform world space using Kinect FloorClipPlane to move origin to floor while keeping orientation"