且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从视差图的OpenCv深度估计

更新时间:2022-11-29 19:52:36

当且仅当从左侧摄像机到右侧摄像机的运动是纯平移(特别是平行于水平图像轴)时,才是有效的。

The simple formula is valid if and only if the motion from left camera to right one is a pure translation (in particular, parallel to the horizontal image axis).

这种情况。例如,通常在更正后执行匹配。图像,即,在使用已知的基本矩阵扭曲它们之后,使得对应的像素被约束为属于同一行。一旦您在
上匹配已校正的图像,就可以使用校正翘曲的逆来将它们重映射到原始图像上,然后三角剖分到3D空间中以重建场景。 OpenCV有一个例程: reprojectImageTo3d

In practice this is hardly ever the case. It is common, for example, to perform the matching after rectifying the images, i.e. after warping them using a known Fundamental Matrix, so that corresponding pixels are constrained to belong to the same row. Once you have matches on the rectified images, you can remap them onto the original images using the inverse of the rectifying warp, and then triangulate into 3D space to reconstruct the scene. OpenCV has a routine to do that: reprojectImageTo3d