您的位置:首页 > 编程语言 > MATLAB

matlab 标定箱错误:Disabling view 2 - Reason: the left and right images are found inconsistent (已解决)

2014-04-28 14:13 585 查看
问题描述:用matlab标定箱做双目标定时,出现:

Disabling view 2 - Reason: the left and right images are found inconsistent (try help calib_stereo for more information)

问题分析:用 help calib_stereo for more information查看错误原因,发现如下:

If the Warning message "Disabling view kk - Reason: the left and right images are found inconsistent" is encountered, that probably means
that for the kkth pair of images, the left and right images are found to have captured the calibration pattern at two different locations in space.
That means that the two views are not consistent, and therefore cannot be used for stereo calibration.

When capturing your images, make sure that you do not move the calibration pattern between capturing the left and the right images.

The pattwern can (and should) be moved in space only between two sets of (left,right) images.

Another reason for inconsistency is that you selected a different set of points on the pattern when running the separate calibrations

(leading to the two files Calib_Results_left.mat and Calib_Results_left.mat). Make sure that the same points are selected in the

two separate calibration. In other words, the points need to correspond.

处理:

按照上一个转载的博客里写的:追溯到go_calib_stereo.m文件中,就是标定点由棋盘的三维坐标反算到左相机照片的像素坐标以后和左相机照片的真实位置差值emax大于了系统指定的阈值。通过修改阈值可以强行让标定过程继续。

找到go_calib_stereo.m文件中的emax设置,它与一个阈值进行了比较,这个阈值的设置是:

if inconsistent_pairs_detection,

%- This threshold is used only to automatically identify non-consistant image pairs (set to Infinity to not reject pairs)

threshold = 50; %1.673; %1e10; %50;
(这里设的是50,可以直接把threshold设为Inf无穷大)

else

threshold = Inf;

end;



按照这个方式继续执行,结果出现“Main stereo calibration optimization procedure - Number of pairs of images: 10

Gradient descent iterations: 1...2...警告: 矩阵接近奇异值,或者缩放错误。结果可能不准确。RCOND = 2.364063e-18。

> In go_calib_stereo at 244

3...警告: 矩阵接近奇异值,或者缩放错误。结果可能不准确。RCOND = 5.959590e-19。 ”

Focal Length: fc_left = [ NaN NaN ] ?[ NaN NaN ]

Principal point: cc_left = [ NaN NaN ] ?[ NaN NaN ]

可能用单个相机左右的拍,这样拍摄的照片不能进行双目标定。

此外,用双目相机如果把几张左右图像搞反了,也会报这个错!

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐