双目视觉两步法内参标定及OpenCV实现外文翻译资料

 2022-05-18 08:05

Abstract

To binocular vision light pen measuring system, calibrating the camera fast and accurate, can improve the practicality of the system application. In the establishment of ideal camera imaging model, considering the lens radial distortion and tangential distortion factors, studies the practical imaging model parameters. Plane template calibration algorithm is improved. Using points which are near calibration template center and distortion smaller solve the initial model parameters. Application internal mapping Newton#39;s method of subspace confidence domain method solves global optimization model parameters. Designing plane calibration template and using coded identification method, identify the signs point in the calibration template. The calibration efficiency is improved. The experiments show that the calibration method can be achieved binocular stereo vision camera calibration.

To improve the accuracy of vision measuring system, high-precision camera calibration and distortion compensation are essential. A new CMM based method of camera calibration and distortion compensation, and a new index for evaluating the residual distortion after compensation are presented in this paper. A three-dimensional reference with a large number of feature points is provided by a high accurate CMM. Such a 3D reference is flexible in terms of the spacing and distribution of feature points and is able to cover the entire image plane of the camera. The internal and external parameters of the camera are obtained through nonlinear optimization. A distortion database is established based on the calibrated data to compensate the residual errors. Experiments show that the new method has higher accuracy and flexibility in comparison with commonly used methods, and can be applied for calibrating cameras in various vision measuring systems.

Introduction

Binocular vision, light pen measuring system is based on using two cameras to imaging, and through a series of coordinate transformation relationship to determine the spatial position and posture of light pen and then get space coordinate of measuring points.The mutual mapping relationship between space three-dimensional coordinates of the object surface some point and its corresponding 2 d coordinates in the image is determined by the camera imaging model. In general, the camera model parameters can be obtained through experiment and optimization calculation, and the process of solving camera model geometry and optical parameters is called camera calibration. At present, there is no universal calibration method that can be used for all kinds of situation, if the specific applications are different and the calibration method is also different. Here is a commonly used calibration method.

Direct linear transformation (DLT) method [1], its principle is simple and easy to implement, But the disadvantage is that calibration precision is not high and intermediate parameter has constraint each other. moreover, it is not easy to separate internal parameter values from external parameter values. In order to improve the calibration accuracy further, based on the DLT method, Tsai [2] first proposed two-step method based on radial alignment constraint (RAC), which has higher precision and is suitable for precision measurement, but only considering the radial distortion, it does not apply to simple calibration. In order to improve the calibration of flexibility, Zhang Zhengyou [3] first proposed plane template calibration method, which can obtain internal and external parameter values for the camera model by making the camera collect more than three images of the calibration board from different angles and use information of the known feature point location on the template and correspondence of the corresponding projection points in the image, because the calibration is simple, it is widely used. But because of only considering the radial distortion, it is not applicable with large distortion fisheye lens. In addition, camera self-calibration method [4-6] and the calibration method based on active vision [7].which have low calibration precision and complex calibration process, is not suitable for optical measurement system.

We adopt the improved plane model method for two camera calibration aiming at Light pen for binocular vision measurement system in this paper. For the calibration method in this paper, the camera radial distortion and tangential distortion are considered, calibrating part points of template center near is adopted in the solution process of model parametersrsquo; initial value, which improves the accuracy of the parameterrsquo;s initial value. For actual imaging model considering the distortion, all points on the template should be used to do the optimization algorithm for precise. At the same time, in order to improve the efficiency of calibration, the coding landmark to identify all the feature points on the calibration template is used. Camera calibration is essential in vision measuring systems. The accuracy of camera calibration and distortion compensation directly affects the accuracy of vision measuring system. The research on camera lens distortion can be traced back to 1919, when A. Conrady first introduced the decentering distortion, and afterwards many effective methods have been proposed. These methods can be roughly classified into three categories: linear methods, nonlinear methods and combined methods.

Linear methods involve the determination of transformation parameters by solving linear equations,whose main advantages are simple and fast in data processing. However lens distortion is not considered and the solution is noise sensitive . Direct linear transformation was introduced by Abdal-Aziz and Karara in 1970rsquo;s, nevertheless its accuracy is not high enough.

Nonlinear methods establish a nonlinear mathematical model with a large number of unknowns. These methods may achi

全文共21891字,剩余内容已隐藏,支付完成后下载完整资料


摘要

双目视觉光笔测量系统,可以快速准确地校准相机,提高系统应用的实用性。在建立理想相机成像模型时,考虑镜头的径向畸变和切向畸变因素,研究实际的成像模型参数。平面模板校准算法得到改进。使用靠近校准模板中心和失真的点解决初始模型参数。应用内部映射牛顿的子空间置信域方法解决了全局优化模型参数。设计平面校准模板并使用编码识别方法,确定校准模板中的符号点。校准效率得到改善。实验证明,该校准方法可以实现双目立体视觉摄像机的标定。

为了提高视觉测量系统的精度,高精度的摄像机标定和失真补偿是必不可少的。本文提出了一种基于CMM的摄像机标定和失真补偿方法,以及补偿后残余失真评估的新指标。具有大量特征点的三维参考由高精度坐标测量机提供。这样的3D参考在特征点的间隔和分布方面是灵活的并且能够覆盖相机的整个图像平面。摄像机的内部和外部参数通过非线性优化获得。基于校准的数据建立失真数据库以补偿残余误差。实验表明,与常用方法相比,新方法具有更高的精度和灵活性,可应用于各种视觉测量系统中的摄像机校准。

引言

双目视觉光笔测量系统是基于使用两个摄像头进行成像,并通过一系列坐标转换关系来确定光笔的空间位置和姿态,然后得到测量点的空间坐标。通过摄像机成像模型确定物体表面某点的空间三维坐标与图像中相应的二维坐标之间的相互映射关系。一般来说,摄像机模型参数可以通过实验和优化计算得到,摄像机模型几何和光学参数的求解过程称为摄像机标定。目前还没有适用于各种情况的通用校准方法,如果具体应用不同,校准方法也不同。这是一种常用的校准方法。

直接线性变换(DLT)方法[1],其原理简单易实现,但缺点是校准精度不高,中间参数相互制约。此外,将内部参数值与外部参数值分开并不容易。为进一步提高校准精度,Tsai [2]首先基于DLT方法提出了基于径向对准约束(RAC)的两步法,该方法精度较高,适用于精密测量,但仅考虑径向失真,它不适用于简单的校准。为了提高灵活性的校准,张正友[3]首先提出了平面模板校准方法,该方法通过使摄像机从不同角度收集三张以上的校准板图像,获取摄像机模型的内部和外部参数值,使用模板上已知特征点位置的信息以及图像中相应投影点的对应关系,因为校准简单,应用广泛。但由于仅考虑径向畸变,不适用于大畸变鱼眼镜头。另外,摄像机自标定方法[4-6]和基于主动视觉标定方法[7],校准精度低,标定过程复杂,不适用于光学测量系统。

本文采用针对双目视觉测量系统的光笔进行双摄像机标定的改进平面模型方法。对于本文的标定方法,考虑了摄像机的径向畸变和切向畸变,在模型参数初值的求解过程中采用了模板中心附近的标定点,提高了参数初始值的准确性。对于考虑失真的实际成像模型,应该使用模板上的所有点来执行精确的优化算法。同时,为了提高校准效率,使用编码界标来标识校准模板上的所有特征点。

在视觉测量系统中,摄像机标定是必不可少的。摄像机标定精度与畸变补偿直接影响视觉测量系统的精度。对镜头畸变的研究可追溯到1919年,A. Conrady首次引入偏心畸变,随后提出了许多行之有效的方法。这些方法大致可分为三类:线性方法、非线性方法和组合方法。

线性方法通过求解线性方程来确定变换参数,其主要优点是数据处理简单且快速。然而,镜头失真并未考虑在内,且解决方案对噪声敏感。1970年代Abdal-Aziz和Karara引入了直接线性变换,但其准确性不够高。

非线性方法建立了一个具有大量未知数的非线性数学模型。这些方法可以通过非线性优化实现高精度。但是,该算法很复杂,初始猜测不好可能会导致结果不稳定。参考文献[8],[9],[10],[15],[16]属于这些方法。自校准方法基于大量拍摄的照片之间的对应关系[12,13]。它们很灵活,可用于各种情况。但他们并不健壮。

目前广泛使用结合线性和非线性变换的方法。Tsai [7]介绍的RAC方法是一种典型的方法。它的算法比较简单,每个参数都可以通过迭代优化来解决。然而,仅考虑径向失真并且在许多情况下导致失真补偿的结果不令人满意。Zhang提出了一种灵活的摄像机标定方法[14],其中基于不同态度的棋盘图像建立约束。它使用线性方程来求解失真系数和之后的非线性优化。后来,研究人员提出了不同的校准径向畸变,离心畸变,薄棱镜畸变等数学模型[1],[3],[5],[11],[14]。这些技术在一定程度上提高了失真补偿的准确性。然而,大型视觉测量系统要求更高的失真补偿精度。最常用的校准方法使用平面目标作为校准参考,特征点的图像通常只能覆盖图像平面的一部分。

为了进一步提高摄像机标定和失真补偿的准确性,本文提出了一种基于坐标测量机(CMM)的高精度摄像机标定和失真补偿方法。可以建立大量的三维参考特征点,并且它们的图像能够覆盖相机的整个图像平面。本文基于校准后的数据建立失真数据库,对残差进行补偿,提出了一种评估失真补偿结果的新指标。

相机校准模板

由于当前图像处理中对角点提取精度不高,棋盘格和网格标识难以实现编码识别,因此本文均匀使用圆形标识作为校准模板基元,如图1所示。在119个白色背景的黑色实心圆圈中,有四个实心圆圈采用编码[7]。校准模板中相邻信号点的圆心之间的距离为40 mm。通过使用图像处理技术和椭圆拟合方法可以获得校准模板中实心圆的像面中心亚像素坐标。在对图像进行校准时,通过图像处理技术得到模板的四个编码界标,并根据编码原理得到编码值,同时将提取的编码图像像素中心与其编码值进行匹配代码值。然后,利用四个编码点识别校准模板的其余标志点的种类,编号识别结果如图1所示。

建立世界坐标系如图1所示,其中原点Ow设置在模板编号1中的地标中心。Xw,Yw轴方向如图1所示。校准模板时,首先根据校准板尺寸的设计获取信号点的世界坐标,然后将编号为1〜99的地标图像坐标与相应的世界坐标进行匹配。通过使用前端算法,解决相机模型参数。

图1 平面校准模板中所有标记点的序号

相机校准结果

本文校准双目立体视觉系统的左右相机,相机和镜头型号分别为BASLERsc A1600-14gc和FUJINON HF50HA-B。

相机的成像失真模型

CCD读数的误差,图像误差和校准误差,由光学系统失真和环境条件引起的误差是相机系统的主要误差来源。本文只讨论光学系统的校准误差和失真。这两种类型的误差都可以认为是校准误差,因为由光学系统失真引起的误差可以通过很大程度上的精确校准来补偿。相机失真包括径向失真,离心失真,薄棱镜失真等。x和y方向的失真可以表示为[18]

在等式(1)中,k1、k2为径向畸变系数,p1、p2为离心畸变系数,s1、s2为薄棱镜畸变系数,delta;x和delta;y分别为x方向和y方向畸变,(xr,yr)为像点标称坐标。离心畸变和薄棱镜畸变通常可以分类为切向畸变[4]。此外,还应校准焦距f,主点坐标(cx,cy),外部摄像机参数以及图像在x方向的像素大小。形成镜头的误差,参考光轴的像面的矩形误差和参考光学主点的阵列中心的偏移,光轴与像平面的交点是导致相机失真的主要原因[5]。有些错误在一定程度上是不规则的。

图2真实和理想的成像模型

基于理想的针孔成像模型,建立了一个理想的坐标系,如图2中的黑色实线所示。实像平面和光轴用红线表示。真实图像平面与理想平面之间存在一定的旋转角度。通过角度theta;和phi;的旋转变换将实像平面坐标系转换为理想像平面坐标系。 切向畸变可以用这种旋转变换来表示[4]。可以基于在理想成像模型中直线上的所有校准点保持共线来确定theta;,phi;,k1,k2的值。通过知道旋转角theta;,phi;和径向畸变系数k1,理想图像点的k2坐标从校准数据中导出。大多数摄像机校准和失真补偿方法都基于此模型。

一种新的摄像机标定和失真补偿方法

收集校准数据

本文介绍了一种基于CMM的摄像机标定方法。新方法可以灵活地提供大量的三维控制点,并具有所需的范围和间距。它能够覆盖相机的整个图像平面并提供更全面的三维特征信息。用于控制CMM和相机的软件是我们自己开发的POSCOM。如图3所示,通过固定在CMM的冲头上的LED形成圆形的光点。

为了获得更多的三维空间信息,数据在三个平行平面上采样,如图4所示。为了最大限度地减小温度变化的影响,校准在温控实验室进行。为了实现高精度并减少CMM和摄像机随温度漂移引起的误差,在平面b2上采样100times;100个点,在平面b1和b3上分别采样10times;10个点。收集10200个数据点约为2个小时。 在车间使用时,相机的内部参数保持有效。其外部参数应重新校准。

图3 实验装置

图4 数据收集空间的方案

失真数据库补偿

由于方程式所表示的畸变模型的不完善性,根据此模型补偿后会留下一些残留误差。建立用于补偿残余失真的失真数据库。残余畸变difx,dify是理想图像点的坐标(xi,yi)和由畸变模型补偿的相应坐标(xif,yif)之间的差异。 坐标(xi,yi)根据CMM提供的参考点的世界坐标(xw,yw,zw)和旋转矩阵R,平移向量T以及焦距f根据公式(13)。

首先,特定图像点的采样坐标由失真模型补偿。但是在大多数情况下,图像平面上的采样点pi不完全位于失真数据库的网格上。找到围绕采样点pi的四个最近的网格点A,B,C,D,如图4所示,并从数据库获得它们相应的残余变形difx,dify。对采样点pi进行线性插值。在图5中,坐标系o-xiyi是理想的像平面坐标系。垂直于平面o-xiyi的线的长度表示特定点的x方向上的残余变形。线段AA1,BB1,CC1,DD1的长度是相应网格点A,B,C,D的残余失真。线段EE1,FF1的长度是相应插值点E,F的长度。线段pipi1的长度是x方向上点pi的残余畸变difpx。所有他们可以根据公式(15)计算。y方向上的点pi的残余失真差可以以类似的方式确定。

图5 线性插值

实验

本实验使用的Basler pi A2400-17gm型CCD的分辨率为2448times;2050,像素尺寸为3.45mu;mtimes;3.45mu;m。PENTAXC1614-M型镜头的焦距为16mm。失真数据库基于10200个特征点,分布如图4所示。

图6 理想成像点与模型补偿后得到的距离

在图6中,uv是理想的图像平面。垂直轴dis表示理想图像像素坐标与基于失真模型的补偿之后的距离。从图6可以看出,当v接近于零时,有几条线数不超过1个像素。几次测试结果基本相同。可以得出结论,这些误差不是由相机的噪声引起的,而是由相机的失真和基于方程式(1)的模型在边界地区的不完善性造成的。

由参数dx,k1,k2,cx,cy引起的误差被认为是失真误差。由焦距f引起的误差是放大误差。本文提出了一种分离失真误差和放大误差的方法。

图7 失真误差评估

为了比较所提出的基于失真数据库的方法和基于失真模型的方法的效果,并分析各种因素对补偿精度的影响,进行了表2所示的六组测试。表2第三列中列出的参数是在失真模型补偿迭代过程中使用的参数。第四列给出的是在建立数据库过程中使用的参数。

在所有测试中,焦距f的初始值是照相机的标记值,主点的初始坐标(cx,cy)是图像平面的中心像素坐标,并且dx的初始值是相机手册。测试a0是没有任何摄像机校准和失真补偿的测试。在测试a1中,校准和补偿基于失真模型。所有摄像机参数R,T,f,cx,cy,k1,k2,theta;,phi;,dx被校准并根据等式(1)。不执行基于失真数据库的补偿。为了分析基于失真数据库的影响补偿精度的因素,执行四个测试a2至a5。在测试a2中,只有R和T被校准。采用f,cx,cy,dx和k1 = k2 =theta;=phi;= 0的初始值来计算dd。在测试a3中,与a2相比,焦距f被校准。在测试a4中,与a3相比,主点和dx的坐标(cx,cy)被额外校准。在测试a5中,与a4相比,校准了四个参数k1lt;

全文共5675字,剩余内容已隐藏,支付完成后下载完整资料


资料编号:[12150],资料为PDF文档或Word文档,PDF文档可免费转换为Word

原文和译文剩余内容已隐藏,您需要先支付 30元 才能查看原文和译文全部内容!立即支付

以上是毕业论文外文翻译,课题毕业论文、任务书、文献综述、开题报告、程序设计、图纸设计等资料可联系客服协助查找。