本文介绍了3D 立体,错误的 3D 坐标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用立体视觉来获得 3D 重建.我正在使用 opencv 库.我以这种方式实现了我的代码:

I'm using stereo vision to obtain 3D reconstruction. I'm using opencv library.I've implemented my code this way:

1) 立体声校准

2) 图像对的失真和校正

2) undistort and Rectification of image pair

3) 视差图 - 使用 SGBM

3) disparity map - using SGBM

4) 3D 坐标计算深度图 - 取消 reprojectImageTo3D();

4) 3D coordinates calculating depht map - unsing reprojectImageTo3D();

结果:

-良好的视差图,良好的3D重建

-Good disparity map, and good 3D reconstruction

-错误的 3D 坐标值,距离与实际不符.

-Bad 3D coordinates values, the distances don't corresponde to the reality.

3D 距离,即相机与物体之间的距离,误差为 10 毫米,并随距离增加.我使用过各种基线,但总是出错.当我比较外部参数向量 T 时,stereoRectify"的输出与基线匹配.所以我不知道问题出在哪里.

The 3D distances, the distante between camera and object, have 10 mm error and increse with distance. I,ve used various baselines and i get always error.When i compare the extrinsic parameter, vector T, output of "stereoRectify" the baseline match.So i dont know where the problem is.

谁能帮帮我,先谢谢了

校准:

http://textuploader.com/ocxlhttp://textuploader.com/ocxm

推荐答案

十毫米误差对于立体视觉解决方案来说是合理的,当然这一切都取决于传感器灵敏度、分辨率、基线和到物体的距离.

Ten mm error can be reasonable for stereo vision solutions, all depending of course on the sensor sensitivity, resolution, baseline and the distance to the object.

相对于物体距离增加的误差也是该问题的典型特征 - 立体对应本质上是在两个视频传感器到物体之间进行三角测量,距离越大,视频传感器之间的角度导数为物体在深度轴上转化为更大的距离,这意味着更大的误差.一个很好的例子是当视频传感器与物体之间的角度几乎正确时,这意味着估计它的任何小的正误差都会将估计的深度推向无穷大.

The increasing error with respect to the object's distance is also typical to the problem - the stereo correspondence essentially performs triangulation between the two video sensors to the object, and the larger the distance is the derivative of the angle between the video sensors to the object translates to larger distance on the depth axis, which means larger error. Good example is when the angle between the video sensors to the object is almost right, which means that any small positive error in estimating it will throw the estimated depth to infinity.

您选择的架构看起来不错.您可以尝试提高传感器分辨率,或者深入研究校准过程,该过程在 openCV 库中有很大的调整空间 - 确保仅选择棋盘静止时拍摄的图像,选择更多种类的不同姿势棋盘,添加图像,直到两个图像之间的配准低于您可以允许的最大误差,等等.

The architecture you selected looks good. You can try increasing the sensors resolution, or maybe dig in to the calibration process which has a lot of room for tuning in the openCV library - making sure only images taken with the chessboard being static are selected, choose higher variety of the different poses of the chessboard, adding images until the registration between the two images drops below the maximal error you can allow, etc.

这篇关于3D 立体,错误的 3D 坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-23 07:23