较小的重投影误差是否总是意味着更好的校准? [英] Does a smaller reprojection error always means better calibration?

查看:1192
本文介绍了较小的重投影误差是否总是意味着更好的校准?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在相机校准期间,通常的建议是使用许多姿态(或深度)等变化的图像(> 10). 但是我注意到通常我使用的图像越少,重投影误差就越小.例如,对于27张图像,cv :: calibrateCamera返回0.23,而只有3张,我得到0.11 这可能是由于以下事实:在校准过程中,我们正在解决超定系统的最小二乘问题.

During camera calibration, the usual advice is to use many images (>10) with variations in pose, depth, etc. However I notice that usually the fewer images I use, the smaller the reprojection error. For example with 27 images, cv::calibrateCamera returns 0.23 and with just 3 I get 0.11 This may be due to the the fact that during calibration we are solving a least squares problem for an overdetermined system.

问题:

  1. 我们实际上是否将重投影误差用作校准效果的绝对度量?例如,如果我用3张图像校准并获得0.11,然后用27张其他图像校准并获得0.23,我们真的可以说第一次校准更好"吗?

  1. Do we actually use the reprojection error as an absolute measure of how good a calibration is? For example, if I calibrate with 3 images and get 0.11, and then calibrate with 27 other images and get 0.23 can we really say that "the first calibration is better"?

OpenCV使用相同的图像进行校准和计算误差.那不是某种形式的过度拟合吗?如果我实际上使用了2套不同的设备(一套用于计算校准参数,另一套用于计算误差),那不是更正确吗?在那种情况下,我将使用相同的(测试)集来计算来自不同(训练)集的所有校准结果的误差.那不是更公平吗?

OpenCV uses the same images both for calibration and for calculating the error. Isn't that some form of overfitting? Wouldn't it be more correct if I actually used 2 different sets -one to compute the calibration parameters and one to compute the error-? In that case, I would use the same (test) set to calculate the error for all my calibration results from different (training) sets. Wouldn't that be more fair?

推荐答案

抱歉,为时已晚-只看到它了.

Sorry if this is too late - only just saw it.

错误是拟合的重新投影.因此,找到图像上的点,计算真实世界模型,重新计算给定模型的点在图像上的位置-报告差异.从某种程度上讲,这可能是一个循环,您可能有一个仅对少数几个图像正确的模型,然后会报告一个非常好的错误,而给它很多图像将使模型更正确,但模型会更大.错误,只是因为您试图拉伸它以适应更大的空间.

The error is the reprojection of the fit. So find points on an image, calculate the real world model, recalculate where those points would be on the image given the model - report the difference. In a way this is a bit circular, you might have a model that is only correct for those few images which would then report a very good error while giving it lots of images will make a much more generally correct model - but will have a larger error, just because you are trying to stretch it to fit a much bigger space.

确实存在一点,添加更多图像并不能改善拟合度,并且可能会增加噪点,因为永远无法完美检测到这些点.重要的是要提供更多的参数,更多的角度和位置,而不是等效的数据

There does come a point where adding more images doesn't improve the fit, and may add noise since points are never detected perfectly. What's important is to provide a bigger set of paramters, more angles and positions, rather than equivalent data

使用相同的图像集来预测误差并不是真正的问题,因为根据实际的实际晶状体参数,拟合的确具有真正的意义-这不像在相同的数据上训练/测试神经网络.

Using the same image set to predict the error isn't really a problem because the fit does have a real meaning in terms of actual physical lens parameters - it's not like training/testing a neural net on the same data.

3D-DIC 中包含比opencv更好的校准例程(尽管基于相同的概念)(免费但不是OSS,请注册该站点以获取下载链接),具体请参见校准手册.

edit: a better calibration routine than opencv (although based on the same concept) is included in 3D-DIC (free but not OSS, register for the site to get the download link) specifically see the calibration manual.

这篇关于较小的重投影误差是否总是意味着更好的校准?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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