We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 9 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
根据“等”到底是什么,解决方案介于简单和不可能之间。
如果您有完全校准的相机(内在参数+相对外在参数),则计算距离就是计算两条视线并使之相交。视线直接来自所有已知参数和像素位置。将它们相交就是求解具有 4 个方程和 3 个未知数的线性最小二乘问题。
如果您只有内部相机参数(最多 5 个自由度,通常是上三角 3x3 矩阵)和相机之间的距离,则需要首先重建两个相机相对位姿的剩余 5 个自由度。这可以通过计算一组点对应关系的“基本矩阵”F 并将其除以已知的摄像机矩阵来完成,从而得到“基本矩阵”E。该矩阵可以进一步分解为旋转和叉积矩阵。这会告诉您第二个摄像头相对于第一个摄像头的定位方式。将此与相机之间的已知距离相结合,您将能够计算“您看到的”事物的度量重建。
如果您甚至不知道所有内在参数,则无法计算度量重建,而只能计算某种“投影重建”。但这并不是您真正想要的。
建议阅读:Hartley 和 Zisserman 的多视图几何
Depending on what exactly "etc" is, the solution is somewhere between easy and impossible.
If you have fully calibrated cameras (intrinsic parameters + relative extrinsic parameters) computing the distance is a matter of computing and intersecting two lines of sight. The lines of sight directly follow from all the known parameters and the pixel positions. Intersecting them is a matter of solving a linear least squares problem with 4 equations and 3 unknowns.
If you only have intrinsic camera parameters (Up to five degrees of freedom, usually an upper triangular 3x3 matrix) and the distance between the cameras you need to first reconstruct the remaining 5 degrees of freedom for the relative pose of the two cameras. This can be done by computing the "fundamental matrix" F for a set of point correspondences and dividing it by the known kamera matrices so you get the "essential matrix" E. This matrix can be further factored into a rotation and a cross product matrix. This tells you how the second camera is positioned relative to the first. Combinind this with the known distance between cameras, you'll be able to compute a metric reconstruction of things "you see".
If you don't even know all the intrinsic parameters you can't compute a metric reconstruction but only some kind of "projective reconstruction". But that's not really what you want.
Suggested reading: Multiple View Geometry by Hartley and Zisserman