相机校准MATLAB工具箱 [英] camera calibration MATLAB toolbox

查看:241
本文介绍了相机校准MATLAB工具箱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须对3D点进行重新投影(我已经有来自Bundler的数据).

I have to perform re-projection of my 3D points (I already have data from Bundler).

我正在使用MATLAB中的相机校准"工具箱来获取相机的固有参数.我从27张图像(棋盘;图像从不同角度拍摄)中得到了这样的输出.

I am using Camera Calibration toolbox in MATLAB to get the intrinsic camera parameters. I got output like this from 27 images (chess board; images are taken from different angles).

Calibration results after optimization (with uncertainties):

Focal Length:     fc = [ 2104.11696  2101.75357 ] ± [ 23.13283  22.92478 ]
Principal point:  cc = [  969.15779   771.30555 ] ± [ 21.98972  15.25166 ]
Skew:        alpha_c = [  0.00000 ] ± [ 0.00000  ]
Distortion:       kc = [  0.11555  -0.55754  -0.00100  -0.00275  0.00000 ] ± 
                       [ >0.05036   0.59076   0.00307   0.00440  0.00000 ]
Pixel error:     err = [  0.71656   0.63306 ]

注意:数值误差约为标准偏差的三倍(仅供参考).

Note: The numerical errors are approximately three times the standard deviations (for reference).

我想知道数值误差,即焦距误差+-[23.13283 22.92478],主点误差等.这些误差数实际上代表什么,它们的影响是什么?

I am wondering about the numerical errors i.e. Focal length error +- [23.13283 22.92478] , principal point error etc. What these error numbers actually represent and what are their impact??

像素错误确实更少.

到目前为止,我使用上述数据中的以下矩阵进行重新投影:

So far I use the following matrix from above data for my re-projection:

K=[ 2104.11696 0 969.15779; 0 2101.75357 771.30555;0 0 1]

上面的矩阵"K"对我来说似乎是正确的.如果我做错了什么,请纠正我...

The above matrix "K" seems right to me. Correct me if I am doing something wrong...

将等待您的回复.

推荐答案

这里有两种错误.

一个是重新投影错误.校准摄像机后,可以使用得到的摄像机参数将世界坐标中的棋盘格点投影到图像中.然后,再投影误差是那些投影点与检测棋盘格点之间的距离.投影误差的可接受值取决于您的应用程序,但是一个很好的经验法则是,平均投影误差应小于0.5像素.

One is the reprojection errors. Once you calibrate a camera, you use the resulting camera parameters to project the checkerboard points in world coordinates into the image. Then the reprojection erros are the distances between those projected points and the detect checkerboard points. The acceptable value for the reprojection errors depends on your application, but a good rule of thumb is that the mean reprojection error should be less than 0.5 of a pixel.

另一种错误是您为每个估计参数获得的+/-间隔.这些基于优化算法产生的标准错误. Bouguet的价值观 相机校准工具箱实际上为您提供标准误差的3倍,对应于99.73%的置信区间.换句话说,如果相机校准"工具箱报告的焦距误差为+-[23.13283 22.92478],则实际的焦距在您估计的间隔内,概率为99.73%.

The other kind of errors are those +/- intervals you get for each estimate parameter. Those are based on the standard errors resulting from the optimization algorithm. The values that the Bouguet's Camera Calibration Toolbox gives you are actually 3 times the standard error, which corresponds to 99.73% confidence interval. In other words, if the Camera Calibration toolbox reports the focal length error as +- [23.13283 22.92478], then the actual focal length is within that interval of your estimate with the probability of 99.73%.

重投影误差使您可以快速测量校准的准确性.标准错误-我们称其为估计错误-对于更仔细地分析结果很有用.例如,您应尝试排除平均投影误差较高的校准图像.另一方面,如果估计误差很大,则可以尝试添加更多的校准图像.

The reprojection errors give you a quick measure of the accuracy of your calibration. The standard errors - let's call them estimation errors - are useful for a more careful analysis of your results. For example, you should try excluding calibration images that have high mean reprojection error. On the other hand, if your estimation errors are high, you can try adding more calibration images.

顺便说一句,计算机视觉系统工具箱现在包含一个

By the way, the Computer Vision System Toolbox now includes a GUI Camera Calibrator app that makes camera calibration much easier. There is also a good explanation of the reprojection errors in the documentation.

这篇关于相机校准MATLAB工具箱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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