相机偏移|探戈计划 [英] Camera-Offset | Project Tango

查看:113
本文介绍了相机偏移|探戈计划的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Unity3d为Project Tango开发增强现实应用.

I am developing an augmented reality app for Project Tango using Unity3d.

由于我想让虚拟对象与现实世界互动,因此我以示例中的与物理网格化"场景为基础,并将Tango AR Camera预制件放置在Tango Delta Camera的内部(相对位置为(0, 0,0)).

Since I want to have virtual object interact with the real world, I use the Meshing with Physics scene from the examples as my basis and placed the Tango AR Camera prefab inside of the Tango Delta Camera (at the relative position (0,0,0)).

我发现,我必须将AR摄像机向上旋转约17度,因此动态网格物体与房间匹配,但是与摄像机的实时预览相比仍然存在很大的偏移.

I found out, that I have to rotate the AR Camera up by about 17deg, so the Dynamic mesh matches the room, however there is still a significant offset to the live preview from the camera.

我想知道,是否有任何以前必须处理此问题的人可以分享他的解决方案,以使Dynamic Mesh与现实世界保持一致.

I was wondering, if anyone who had to deal with this before could share his solution to aligning the Dynamic Mesh with the real world.

如何使虚拟世界与相机图像对齐?

How can I align the virtual world with the camera image?

推荐答案

我遇到了类似的问题.看来这与几个先前回答的问题有关:

I'm having similar issues. It looks like this is related to a couple of previously-answered questions:

仅部分渲染的点云

Point Cloud Unity该示例仅为显示的上半部分渲染点

您需要考虑彩色摄像机相对于设备原点的偏移量,这要求您获得彩色摄像机相对于设备的姿势.您不能直接执行此操作,但可以将设备放在IMU框架中,还可以将彩色摄像机放在IMU框架中,以在设备框架中得出彩色摄像机.上面的链接显示了示例代码.

You need to take into account the color camera offset from the device origin, which requires you to get the color camera pose relative to the device. You can't do this directly, but you can get the device in the IMU frame, and also the color camera in the IMU frame, to work out the color camera in the device frame. The links above show example code.

您应该看到(以统一坐标表示)偏移(0.061、0.004,-0.001)和围绕x轴向上旋转13度的东西.

You should be looking at something like (in unity coordinates) a (0.061, 0.004, -0.001) offset and a 13 degree rotation up around the x axis.

当我尝试使用示例时,旋转变得很混乱,因此请捏一些盐.我还看到围绕y和z的小旋转,这与我的预期不符.

When I try to use the examples, I get broken rotations, so take these numbers with a pinch of salt. I'm also seeing small rotations around y and z, which don't match with what I'd expect.

这篇关于相机偏移|探戈计划的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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