问题描述
我正在使用Microsoft Kinect SDK从Kinect获取深度和颜色信息,然后将该信息转换为点云。我需要将深度信息放在以摄像机中心为原点的真实世界坐标中。
I'm using the Microsoft Kinect SDK to get the depth and color information from a Kinect and then convert that information into a point cloud. I need the depth information to be in real world coordinates with the centre of the camera as the origin.
我已经看到了许多转换函数,但这些函数显然是针对OpenNI而非微软司机。我已经读过来自Kinect的深度信息已经以毫米为单位,并且包含在11位......或者其他内容中。
I've seen a number of conversion functions but these are apparently for OpenNI and non-Microsoft drivers. I've read that the depth information coming from the Kinect is already in millimetres, and is contained in the 11bits... or something.
如何将这些位信息转换为现实世界我可以使用的坐标?
How do I convert this bit information into real world coordinates that I can use?
提前致谢!
推荐答案
private int GetDistanceWithPlayerIndex(byte firstFrame,byte secondFrame)
{
//在第一个字节中偏移3以获得玩家指数后的值
int distance =(int)(firstFrame>> 3 | secondFrame<< 5);
&NBSP;返回距离;
}
private int GetDistanceWithPlayerIndex(byte firstFrame, byte secondFrame)
{
//offset by 3 in first byte to get value after player index
int distance = (int)(firstFrame >> 3 | secondFrame << 5);
return distance;
}
这篇关于深度数据到真实世界坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!