简体   繁体   English

C ++ Kinect和OpenNI:将深度转换为真实世界

[英]c++ kinect & openni: convert depth to real world

I need to convert depth information aquired with a kinect sensor, to real world 3D coordinates. 我需要将使用kinect传感器获取的深度信息转换为真实世界的3D坐标。

I know that the way to do this is by using a DepthGenerator and call ConvertProjectiveToRealWorld but this requires the sensor to be connected.... 我知道执行此操作的方法是使用DepthGenerator并调用ConvertProjectiveToRealWorld但这需要连接传感器。

Does anyone knows a way to do it without the sensor connected? 没有人知道没有连接传感器的方法吗?

How is your depth information stored? 您的深度信息如何存储?

The easiest way would probably be initializing OpenNI from a depth recording (.oni file). 最简单的方法可能是从深度记录(.oni文件)初始化OpenNI。 You can create .oni files using the NiViewer sample bundled with OpenNI (press on '?' to see the list of commands, one of them should let you record). 您可以使用OpenNI随附的NiViewer示例创建.oni文件(按'?'查看命令列表,其中一个命令可以记录下来)。

If your data isn't stored in an oni file, you should be able to create a dummy file with a single depth frame in it. 如果您的数据未存储在oni文件中,则您应该能够创建一个具有单个深度框架的虚拟文件。 That should be enough to cause the sensor parameters to be stored in the oni file as well - the parameters that are used in the projective to real world conversion. 这应该足以使传感器参数也存储在oni文件中-在投影到真实世界转换中使用的参数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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