如何将Kinect2原始深度数据转换为以米为单位的距离 . 原始深度数据是由Windows Kinect2 SDK获得的 . 这是所有积分数据 . 要点:它是kinect2而不是kinect1 . 我已经得到了Kinect1的等式,但它不匹配 . 所以任何人都可以帮助我 . Kinect1的等式:
if (depthValue < 2047) { depthM = 1.0 / (depthValue*-0.0030711016 + 3.3309495161); }
Kinect API Overview (2)表示:
DepthFrame类表示一个帧,其中每个像素表示该像素看到的最近对象的距离 . 该帧的数据存储为16位无符号整数,其中每个值表示以毫米为单位的距离 . 尽管可靠性在4.5米左右开始降低,但最大深度距离为8米 . 在BodyFrame类不够的情况下,开发人员可以使用深度框架来构建自定义跟踪算法 .
另外V. Pterneas在他的博客中评论 Value 以米为单位,他指的是this code . 所以你可以从C#中的DepthFrame中检索它(部分从this code中提取):
public override void Update(DepthFrame frame) { ushort minDepth = frame.DepthMinReliableDistance; ushort maxDepth = frame.DepthMaxReliableDistance; //.. Width = frame.FrameDescription.Width; Height = frame.FrameDescription.Height; public ushort[] DepthData; //... frame.CopyFrameDataToArray(DepthData); // now Depthdata contains the depth }
最小和最大深度由函数DepthMinReliableDistance和DepthMaxReliableDistance给出,也以毫米为单位 .
1 回答
Kinect API Overview (2)表示:
另外V. Pterneas在他的博客中评论 Value 以米为单位,他指的是this code . 所以你可以从C#中的DepthFrame中检索它(部分从this code中提取):
最小和最大深度由函数DepthMinReliableDistance和DepthMaxReliableDistance给出,也以毫米为单位 .