在立体图像的相对旋转和固有矩阵的情况下,如何估算相机平移? [英] How to estimate camera translation given relative rotation and intrinsic matrix for stereo images?

查看:60
本文介绍了在立体图像的相对旋转和固有矩阵的情况下,如何估算相机平移?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个摄像机拍摄的2张图像(左右两张).我知道两个图像的固有矩阵 K_L K_R 以及两个摄像机之间的相对旋转 R .

I have 2 images (left and right) of a scene captured by a single camera. I know the intrinsic matrices K_L and K_R for both images and the relative rotation R between the two cameras.

如何计算两台摄像机之间的精确相对转换 t ?

How do I compute the precise relative translation t between the two cameras?

推荐答案

您只能按比例缩放,除非您有单独的方法来解析比例,例如通过观察已知大小的对象或通过传感器(例如激光雷达)为您提供距地平面或两个视图中可见物体的距离.

You can only do it up to scale, unless you have a separate means to resolve scale, for example by observing an object of known size, or by having a sensor (e.g. LIDAR) give you the distance from a ground plane or from an object visible in both views.

也就是说,解决方案非常容易.您可以通过计算然后分解基本矩阵来做到这一点,但这是一种更直观的方法.令xl和xr为同构图像坐标中两个视图中的两个匹配像素,令X为它们对应的3D世界点,以左摄像机坐标表示.令Kli和Kri分别为左和右相机矩阵Kl和Kr的逆.用R和t表示从右到左相机坐标的变换.然后是:

That said, the solution is quite easy. You could do it by calculating and then decomposing the essential matrix, but here is a more intuitive way. Let xl and xr be two matched pixels in the two views in homogeneous image coordinates, and let X be their corresponding 3D world point, expressed in left camera coordinates. Let Kli and Kri be respectively the inverse of the left and right camera matrices Kl and Kr. Denote with R and t the transform from the right to the left camera coordinates. It is then:

X = sl * Kli * xl = t + sr * R * Kri * xr

其中sl和sr分别是左右光线分别从左右摄像机反向投影到点X的比例.

where sl and sr are scales for the left and right rays back-projecting to point X from left and right camera respectively.

上面的第二个等式代表5个未知数中的3个标量方程:t,sl和sr的3个分量.根据您拥有的其他信息,您可以采用不同的方式解决它.

The second equality above represents 3 scalar equations in 5 unknowns: the 3 components of t, sl and sr. Depending on what additional information you have, you can solve it in different ways.

例如,如果您知道(例如,根据LIDAR测量)从摄像机到X的距离,则可以从上面的方程式中删除比例项并直接求解.如果在两个图像中都有一个已知长度[X1,X2]的线段,则可以像上面那样写两个方程,然后再次直接求解.

For example, if you know (e.g. from LIDAR measurements) the distance from the cameras to X, you can remove the scale terms from the equations above and solve directly. If there is a segment of known length [X1, X2] that is visible in both images, you can write two equations like above and again solve directly.

这篇关于在立体图像的相对旋转和固有矩阵的情况下,如何估算相机平移?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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