深度数据到真实世界坐标 [英] Depth data to real world coordinates

查看:99
本文介绍了深度数据到真实世界坐标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在使用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?

提前致谢!

推荐答案

找到答案,有兴趣的人。你需要使用nui.SkeletonEngine.DepthImageToSkeleton。要获得深度值,请使用:

Found the answer, for anyone else interested. You need to use nui.SkeletonEngine.DepthImageToSkeleton. And to get the depth value 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;
        }


这篇关于深度数据到真实世界坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆