CN111415391B - A Calibration Method for External Orientation Parameters of Multi-eye Cameras Using Mutual Shooting Method - Google Patents
A Calibration Method for External Orientation Parameters of Multi-eye Cameras Using Mutual Shooting Method Download PDFInfo
- Publication number
- CN111415391B CN111415391B CN202010131077.8A CN202010131077A CN111415391B CN 111415391 B CN111415391 B CN 111415391B CN 202010131077 A CN202010131077 A CN 202010131077A CN 111415391 B CN111415391 B CN 111415391B
- Authority
- CN
- China
- Prior art keywords
- camera
- measurement
- target
- measuring
- auxiliary
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 58
- 238000005259 measurement Methods 0.000 claims abstract description 89
- 239000011159 matrix material Substances 0.000 claims description 43
- 238000003384 imaging method Methods 0.000 claims description 10
- 238000005457 optimization Methods 0.000 claims description 9
- 238000006243 chemical reaction Methods 0.000 claims description 8
- 238000013519 translation Methods 0.000 claims description 7
- 230000009466 transformation Effects 0.000 claims description 6
- 238000004364 calculation method Methods 0.000 claims description 4
- 238000013507 mapping Methods 0.000 claims description 3
- 238000013178 mathematical model Methods 0.000 claims description 3
- 238000011161 development Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000004519 manufacturing process Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 238000000691 measurement method Methods 0.000 description 3
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 1
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000002945 steepest descent method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/80—Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T10/00—Road transport of goods or passengers
- Y02T10/10—Internal combustion engine [ICE] based vehicles
- Y02T10/40—Engine management systems
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
Description
技术领域Technical Field
本发明属于机器视觉三维空间坐标测量技术领域,具体涉及一种采用互拍法的多目相机外部方位参数标定方法。The invention belongs to the technical field of machine vision three-dimensional space coordinate measurement, and in particular relates to a method for calibrating external orientation parameters of a multi-eye camera using a mutual shooting method.
背景技术Background Art
随着我国机械制造、航空航天、机器人等领域的不断发展,尤其是国产大飞机生产技术水平的发展,对制造装配过程中的空间测量精度的要求也在不断提高。测量技术的准确性直接决定了工业制造和装配的精度。传统的三坐标测量机体积过大、计算效率较低,而且传统测量方法往往需要接触到被测物体,因此容易对被测物体造成损伤,早已不能满足现代工业对测量系统的精度和效率要求。With the continuous development of my country's machinery manufacturing, aerospace, robotics and other fields, especially the development of domestic large aircraft production technology, the requirements for spatial measurement accuracy in the manufacturing and assembly process are also increasing. The accuracy of measurement technology directly determines the accuracy of industrial manufacturing and assembly. Traditional three-dimensional coordinate measuring machines are too large and have low calculation efficiency. In addition, traditional measurement methods often require contact with the object being measured, so it is easy to cause damage to the object being measured. It has long been unable to meet the accuracy and efficiency requirements of modern industry for measurement systems.
随着硬件水平的提高,计算机的计算速度也得到了飞速的提高,使得计算机视觉和摄影测量技术可以广泛应用在各个行业中,极大地提高了测量系统的工作效率和精度,降低了人力成本和时间成本。在计算机视觉空间三坐标测量领域中,多相机视觉测量系统凭借其测量精度高、适应能力强、测量效率高和成本低等优点,得到了广泛的应用。与传统三坐标测量方法相比,具有精度高,对被测物体零损耗等优点。因此,研究多相机视觉测量系统具有重要的实际意义。With the improvement of hardware level, the computing speed of computers has also been rapidly improved, making computer vision and photogrammetry technology widely used in various industries, greatly improving the working efficiency and accuracy of the measurement system, and reducing labor costs and time costs. In the field of computer vision spatial three-dimensional coordinate measurement, multi-camera vision measurement systems have been widely used due to their high measurement accuracy, strong adaptability, high measurement efficiency and low cost. Compared with traditional three-dimensional coordinate measurement methods, it has the advantages of high accuracy and zero loss of the measured object. Therefore, the study of multi-camera vision measurement systems has important practical significance.
在多相机测量系统中,主要采用的测量方法为三角测量算法,在此算法中相机内外参数的标定精度会直接影响到空间坐标的测量精度,相机内参可以使用张氏标定法等成熟的标定工具进行精确标定。但是随着工作场景的变换,系统内相机间外参数也在改变,而且因为工作环境的限制往往不能使用传统的双目视觉外参数标定方法借助棋盘格标定。因此,研究快速、准确、灵活的相机外参数标定方法是多相机空间三坐标测量系统发展的重中之重。In multi-camera measurement systems, the main measurement method used is the triangulation algorithm. In this algorithm, the calibration accuracy of the camera's internal and external parameters will directly affect the measurement accuracy of the spatial coordinates. The camera's internal parameters can be accurately calibrated using mature calibration tools such as Zhang's calibration method. However, as the working scene changes, the external parameters between cameras in the system are also changing, and due to the limitations of the working environment, the traditional binocular vision external parameter calibration method with the help of chessboard calibration is often not possible. Therefore, the development of a fast, accurate, and flexible camera external parameter calibration method is of utmost importance in the development of a multi-camera spatial three-dimensional measurement system.
发明内容Summary of the invention
为了解决上述问题,本发明的目的在于提供一种采用互拍法的多目相机外部方位参数标定方法。In order to solve the above problems, the object of the present invention is to provide a method for calibrating the external orientation parameters of a multi-eye camera using a mutual shooting method.
为了达到上述目的,本发明提供的采用互拍法的多目相机外部方位参数标定方法包括按顺序进行的下列步骤:In order to achieve the above object, the method for calibrating the external orientation parameters of a multi-camera using the mutual shooting method provided by the present invention comprises the following steps performed in sequence:
步骤1)建立多相机空间测量系统标定系统:所述的系统包括第一测量相机、第二测量相机、靶标、辅助相机和精密旋转台;其中,第一测量相机、第二测量相机和辅助相机的下端分别设置一个精密旋转台,并且三个精密旋转台呈三角形布置;第一测量相机和第二测量相机上分别安装一个靶标;Step 1) Establishing a multi-camera spatial measurement system calibration system: the system comprises a first measuring camera, a second measuring camera, a target, an auxiliary camera and a precision rotating stage; wherein a precision rotating stage is respectively arranged at the lower end of the first measuring camera, the second measuring camera and the auxiliary camera, and the three precision rotating stages are arranged in a triangle; a target is respectively installed on the first measuring camera and the second measuring camera;
步骤2)单目相机内参数标定:根据小孔成像模型分别建立第一测量相机、第二测量相机和辅助相机的数学模型;根据单应矩阵映射原理和非线性优化原理借助棋盘格标定板对第一测量相机、第二测量相机和辅助相机进行内参矩阵和畸变参数标定;Step 2) Calibration of the internal parameters of the monocular camera: According to the pinhole imaging model, the mathematical models of the first measurement camera, the second measurement camera and the auxiliary camera are respectively established; according to the homography matrix mapping principle and the nonlinear optimization principle, the internal parameter matrix and distortion parameter of the first measurement camera, the second measurement camera and the auxiliary camera are calibrated with the help of a checkerboard calibration plate;
步骤3)辅助相机联合测量相机进行双目视觉系统外参数标定:由第一测量相机、第二测量相机分别与辅助相机构成一个双目视觉系统,然后根据双目视觉外参标定原理标定两个双目视觉系统的外参矩阵;Step 3) The auxiliary camera and the measuring camera are combined to calibrate the external parameters of the binocular vision system: the first measuring camera, the second measuring camera and the auxiliary camera respectively form a binocular vision system, and then the external parameter matrices of the two binocular vision systems are calibrated according to the binocular vision external parameter calibration principle;
步骤4)计算靶标在辅助相机坐标系下的位姿:将辅助相机旋转,并利用上述标定出来的双目视觉系统的外参矩阵而获得辅助相机旋转后与第一或第二测量相机间的外参矩阵:然后利用辅助相机拍摄靶标,并计算出靶标在辅助相机坐标系下的精确位姿;Step 4) Calculate the position and pose of the target in the auxiliary camera coordinate system: rotate the auxiliary camera, and use the extrinsic parameter matrix of the binocular vision system calibrated above to obtain the extrinsic parameter matrix between the auxiliary camera after rotation and the first or second measurement camera: then use the auxiliary camera to shoot the target, and calculate the precise position and pose of the target in the auxiliary camera coordinate system;
步骤5)计算靶标在自身测量相机坐标系下的位姿:利用步骤4)中获得的旋转后辅助相机与第一测量相机或第二测量相机之间的外参矩阵和计算出的靶标在辅助相机坐标系下的位姿,通过简单的坐标转换计算出靶标在自身测量相机坐标系下的位姿;Step 5) Calculate the pose of the target in the coordinate system of its own measurement camera: Utilize the external parameter matrix between the rotated auxiliary camera and the first measurement camera or the second measurement camera obtained in step 4) and the calculated pose of the target in the coordinate system of the auxiliary camera, and calculate the pose of the target in the coordinate system of its own measurement camera through simple coordinate transformation;
步骤6)互拍摄外参数标定:利用两个测量相机相互拍摄对方测量相机上的靶标,并计算出对方靶标的位姿,通过换算求出两个测量相机当前的外参数;Step 6) Mutual shooting extrinsic parameter calibration: Use two measuring cameras to shoot the target on each other's measuring camera, calculate the pose of the other target, and calculate the current extrinsic parameters of the two measuring cameras by conversion;
步骤7)使用精度旋转台将测量相机旋转到工作姿态并进行测量。Step 7) Use a precision rotation stage to rotate the measurement camera to the working posture and perform measurement.
在步骤2)中,所述的单目相机内参数标定采用Matlab中的标定工具箱或者OpenCV中的标定函数实现。In step 2), the monocular camera internal parameter calibration is implemented using the calibration toolbox in Matlab or the calibration function in OpenCV.
在步骤3)中,所述的辅助相机联合测量相机进行双目视觉系统外参数标定的方法是:首先由第一测量相机、第二测量相机分别与辅助相机构成一个双目视觉系统,然后利用第一测量相机和辅助相机以及第二测量相机和辅助相机同时对棋盘格标定板进行拍摄,拍摄后进行空间特征点匹配,获得配对的空间特征点后计算本质矩阵,通过本质矩阵即可分解出外参矩阵中的旋转矩阵R与平移向量T。In step 3), the method of calibrating the external parameters of the binocular vision system by combining the auxiliary camera with the measuring camera is: first, a binocular vision system is formed by the first measuring camera, the second measuring camera and the auxiliary camera respectively, and then the checkerboard calibration plate is photographed simultaneously by the first measuring camera and the auxiliary camera as well as the second measuring camera and the auxiliary camera, and spatial feature points are matched after the photographing, and the essential matrix is calculated after the paired spatial feature points are obtained, and the rotation matrix R and the translation vector T in the extrinsic parameter matrix can be decomposed through the essential matrix.
在步骤4)中,所述的计算靶标在辅助相机坐标系下的位姿的方法是:首先使用精密旋转台将辅助相机旋转到正对第一测量相机或第二测量相机上的靶标,然后利用辅助相机对靶标成像,获得图像后即可获得靶标的像素坐标,而靶标的世界坐标是已知的,因此使用靶标的世界坐标和像素坐标之间的关联即能够求出靶标在辅助相机坐标系下的位姿。In step 4), the method for calculating the position and pose of the target in the auxiliary camera coordinate system is: first, using a precision rotating table to rotate the auxiliary camera to face the target on the first measuring camera or the second measuring camera, and then using the auxiliary camera to image the target. After obtaining the image, the pixel coordinates of the target can be obtained, and the world coordinates of the target are known. Therefore, the position and pose of the target in the auxiliary camera coordinate system can be calculated using the relationship between the world coordinates and the pixel coordinates of the target.
在步骤5)中,所述的计算靶标在自身测量相机坐标系下的位姿的方法是:将步骤4)中获得的旋转后辅助相机与第一测量相机或第二测量相机之间的外参矩阵和计算出的靶标在辅助相机坐标系下的位姿相乘即能够求出靶标在自身测量相机坐标系下的坐标。In step 5), the method for calculating the position and posture of the target in the coordinate system of its own measurement camera is: multiplying the external parameter matrix between the rotated auxiliary camera and the first measurement camera or the second measurement camera obtained in step 4) and the calculated position and posture of the target in the auxiliary camera coordinate system to obtain the coordinates of the target in the coordinate system of its own measurement camera.
在步骤6)中,所述的互拍摄外参数标定的方法是:通过步骤5)已计算出靶标在自身测量相机坐标系下的位姿,利用第一测量相机拍摄第二测量相机上的靶标,或者使用第二测量相机拍摄第一测量相机上的靶标,然后使用PnP算法计算出对方靶标的位姿,通过换算求出两个测量相机当前的外参数。In step 6), the method for mutual shooting extrinsic parameter calibration is: the pose of the target in the coordinate system of its own measuring camera is calculated by step 5), the target on the second measuring camera is photographed by the first measuring camera, or the target on the first measuring camera is photographed by the second measuring camera, and then the pose of the other target is calculated by the PnP algorithm, and the current extrinsic parameters of the two measuring cameras are obtained by conversion.
在步骤7)中,所述的使用精度旋转台将测量相机旋转到工作姿态并进行测量的方法是:在进行测量工作前将第一测量相机和第二测量相机旋转到正对被测物体的角度;使用精密旋转台记录第一测量相机和第二测量相机从标定姿态到工作姿态的旋转角度,通过计算获得这两个测量相机在工作姿态下的外参数,这时就可进行测量工作。In step 7), the method of using a precision rotating table to rotate the measuring camera to a working posture and perform measurement is: before performing measurement work, the first measuring camera and the second measuring camera are rotated to an angle facing the object to be measured; the precision rotating table is used to record the rotation angle of the first measuring camera and the second measuring camera from the calibration posture to the working posture, and the external parameters of the two measuring cameras in the working posture are obtained by calculation, and then the measurement work can be performed.
本发明提供的采用互拍法的多目相机外部方位参数标定方法能够快速、准确地标定出多相机测量系统中每个测量相机之间的外参数,而且可以灵活适应各种工作环境,从而可以高效地进行测量工作。另外,可以快速标定出相机间的外参数,为后续的测量工作提供了精确的参数,不仅可以提高工作效率和精度,而且降低了测量成本。The multi-camera external orientation parameter calibration method using the mutual shooting method provided by the present invention can quickly and accurately calibrate the external parameters between each measuring camera in the multi-camera measurement system, and can flexibly adapt to various working environments, so that the measurement work can be carried out efficiently. In addition, the external parameters between cameras can be quickly calibrated, providing accurate parameters for subsequent measurement work, which can not only improve work efficiency and accuracy, but also reduce measurement costs.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本发明提供的采用互拍法的多目相机外部方位参数标定方法流程图。FIG1 is a flow chart of a method for calibrating external orientation parameters of a multi-camera using a mutual shooting method provided by the present invention.
图2为本发明中双目视觉系统外参数标定过程示意图。FIG. 2 is a schematic diagram of the external parameter calibration process of the binocular vision system in the present invention.
图3为本发明中坐标转换示意图。FIG. 3 is a schematic diagram of coordinate transformation in the present invention.
具体实施方式DETAILED DESCRIPTION
下面结合附图和具体实施例对本发明提供的采用互拍法的多目相机外部方位参数标定方法进行详细说明。附图仅供参考和说明使用,不构成对本发明专利保护范围的限制。The following is a detailed description of the method for calibrating the external orientation parameters of a multi-camera using the mutual shooting method provided by the present invention in conjunction with the accompanying drawings and specific embodiments. The accompanying drawings are for reference and illustration only and do not constitute a limitation on the scope of patent protection of the present invention.
如图1、2和3所示,本发明提供的采用互拍法的多目相机外部方位参数标定方法包括按顺序进行下列步骤:As shown in FIGS. 1, 2 and 3, the method for calibrating the external orientation parameters of a multi-camera using the mutual shooting method provided by the present invention comprises performing the following steps in sequence:
步骤1)建立多相机空间测量系统标定系统:所述的系统包括第一测量相机1、第二测量相机2、靶标L、辅助相机3和精密旋转台4;其中,第一测量相机1、第二测量相机2和辅助相机3的下端分别设置一个精密旋转台4,并且三个精密旋转台4呈三角形布置;第一测量相机1和第二测量相机2上分别安装一个靶标L;第一测量相机1和第二测量相机2为图像采集装置;靶标L为测量工作前实现快速外参数标定的互拍摄标定辅助工具;辅助相机3用来计算每个靶标L在测量相机坐标系下的坐标;精密旋转台4用于将其上的相机旋转到适宜的测量角度;Step 1) Establish a multi-camera space measurement system calibration system: the system includes a first measuring camera 1, a second measuring camera 2, a target L, an auxiliary camera 3 and a precision rotating table 4; wherein, a precision rotating table 4 is respectively arranged at the lower end of the first measuring camera 1, the second measuring camera 2 and the auxiliary camera 3, and the three precision rotating tables 4 are arranged in a triangle; a target L is respectively installed on the first measuring camera 1 and the second measuring camera 2; the first measuring camera 1 and the second measuring camera 2 are image acquisition devices; the target L is a mutual shooting calibration auxiliary tool for realizing rapid external parameter calibration before measurement; the auxiliary camera 3 is used to calculate the coordinates of each target L in the measuring camera coordinate system; the precision rotating table 4 is used to rotate the camera thereon to a suitable measurement angle;
步骤2)单目相机内参数标定:根据小孔成像模型分别建立第一测量相机1、第二测量相机2和辅助相机3的数学模型;根据单应矩阵映射原理和非线性优化原理借助棋盘格标定板对第一测量相机1、第二测量相机2和辅助相机3进行内参矩阵和畸变参数标定;Step 2) Calibration of the internal parameters of the monocular camera: According to the pinhole imaging model, the mathematical models of the first measuring camera 1, the second measuring camera 2 and the auxiliary camera 3 are respectively established; according to the homography matrix mapping principle and the nonlinear optimization principle, the internal parameter matrix and distortion parameter of the first measuring camera 1, the second measuring camera 2 and the auxiliary camera 3 are calibrated with the help of a checkerboard calibration plate;
所述的单目相机内参数标定采用Matlab中的标定工具箱或者OpenCV中的标定函数实现。The monocular camera internal parameter calibration is implemented using the calibration toolbox in Matlab or the calibration function in OpenCV.
步骤3)辅助相机联合测量相机进行双目视觉系统外参数标定:由第一测量相机1、第二测量相机2分别与辅助相机3构成一个双目视觉系统,然后根据双目视觉外参标定原理标定两个双目视觉系统的外参矩阵;Step 3) The auxiliary camera and the measuring camera are combined to calibrate the external parameters of the binocular vision system: the first measuring camera 1, the second measuring camera 2 and the auxiliary camera 3 respectively form a binocular vision system, and then the external parameter matrices of the two binocular vision systems are calibrated according to the binocular vision external parameter calibration principle;
图2为本发明中双目视觉系统外参数标定过程示意图。如图2所示,OLXLYLZL为测量相机坐标系,成像平面坐标系为olxlyl,光轴方向为ZL;同理,ORXRYRZR为辅助相机坐标系,成像平面坐标系为oRxRyR,光轴方向为ZR;PL,PR分别为空间特征点在测量相机、辅助相机像面成像点的像素坐标,图中两条射线的交点PW即为空间特征点在世界坐标系XWYWZW下的坐标。任意两个坐标系之间的坐标转换关系为:FIG2 is a schematic diagram of the external parameter calibration process of the binocular vision system in the present invention. As shown in FIG2, O L X L Y L Z L is the measurement camera coordinate system, the imaging plane coordinate system is o l x l y l , and the optical axis direction is Z L ; similarly, O R X R Y R Z R is the auxiliary camera coordinate system, the imaging plane coordinate system is o R x R y R , and the optical axis direction is Z R ; PL and PR are the pixel coordinates of the spatial feature point on the image plane of the measurement camera and the auxiliary camera, respectively. The intersection point P W of the two rays in the figure is the coordinate of the spatial feature point in the world coordinate system X W Y W Z W. The coordinate conversion relationship between any two coordinate systems is:
其中,表示坐标系ORXRYR到坐标系OLXLYL的旋转矩阵;in, Represents the rotation matrix from coordinate system ORXRYR to coordinate system OLXLYL ;
T=(t1 t2 t3)T,表示与上述旋转矩阵R相对应的平移向量。T = (t 1 t 2 t 3 ) T , represents the translation vector corresponding to the rotation matrix R above.
以图3中的测量相机坐标系O1X1Y1Z1和辅助相机坐标系O3X3Y3Z3为例,其坐标转换关系为:Taking the measurement camera coordinate system O 1 X 1 Y 1 Z 1 and the auxiliary camera coordinate system O 3 X 3 Y 3 Z 3 in Figure 3 as an example, their coordinate transformation relationship is:
其中,表示坐标系O1X1Y1到坐标系O3X3Y3的旋转矩阵;in, Represents the rotation matrix from coordinate system O 1 X 1 Y 1 to coordinate system O 3 X 3 Y 3 ;
T=(t1 t2 t3)T,表示与上述旋转矩阵R相对应的平移向量。T = (t 1 t 2 t 3 ) T , represents the translation vector corresponding to the rotation matrix R above.
上述旋转矩阵是标定出来的。双目视觉系统外参数标定就是求解旋转矩阵R与平移向量T的过程。标定出来的两个双目视觉系统的外参矩阵就是图3中的R13T13和R23T23。The above rotation matrix is calibrated. The external parameter calibration of the binocular vision system is the process of solving the rotation matrix R and the translation vector T. The two calibrated external parameter matrices of the binocular vision system are R 13 T 13 and R 23 T 23 in Figure 3.
步骤4)计算靶标在辅助相机坐标系下的位姿:将辅助相机旋转,并利用上述标定出来的双目视觉系统的外参矩阵而获得辅助相机旋转后与第一或第二测量相机间的外参矩阵:然后利用辅助相机拍摄靶标,并计算出靶标在辅助相机坐标系下的精确位姿;Step 4) Calculate the position and pose of the target in the auxiliary camera coordinate system: rotate the auxiliary camera, and use the extrinsic parameter matrix of the binocular vision system calibrated above to obtain the extrinsic parameter matrix between the auxiliary camera after rotation and the first or second measurement camera: then use the auxiliary camera to shoot the target, and calculate the precise position and pose of the target in the auxiliary camera coordinate system;
步骤3)中求出旋转矩阵R与平移向量T后需要使用精密旋转台4将辅助相机3旋转一定的角度,以便其可以拍摄到第一测量相机1或第二测量相机2上固定的靶标L,此次辅助相机3的旋转是绕测量相机坐标系的Z轴进行旋转,旋转角度θ与旋转矩阵Rz(θ)的转化关系为:After the rotation matrix R and the translation vector T are obtained in step 3), the auxiliary camera 3 needs to be rotated by a certain angle using a
将步骤3)中标定出来的旋转矩阵R与平移向量T和通过精密旋转台4旋转而得到的旋转矩阵Rz(θ)相乘即可得到当前辅助相机3旋转后其与第一测量相机1或第二测量相机2之间的外参矩阵。The external parameter matrix between the current auxiliary camera 3 and the first measuring camera 1 or the second measuring camera 2 after the rotation is obtained by multiplying the rotation matrix R calibrated in step 3) with the translation vector T and the rotation matrix R z (θ) obtained by rotating the
使辅助相机3下的精密旋转台4进行旋转,直至辅助相机3能够拍摄到第一测量相机1或第二测量相机2上的靶标L,然后对靶标L进行拍摄,之后根据PnP算法计算出靶标L在辅助相机坐标系下的位姿,然后使用非线性优化算法对靶标上的特征点的重投影误差进行优化,从而获得靶标L在辅助相机坐标系下的精确位姿;The precision rotating table 4 under the auxiliary camera 3 is rotated until the auxiliary camera 3 can capture the target L on the first measuring camera 1 or the second measuring camera 2, and then the target L is captured. After that, the pose of the target L in the auxiliary camera coordinate system is calculated according to the PnP algorithm, and then the reprojection error of the feature points on the target is optimized using a nonlinear optimization algorithm, so as to obtain the precise pose of the target L in the auxiliary camera coordinate system;
因为靶标L上特征点的世界坐标已知,成像平面上的像素坐标可以通过图像得到。利用辅助相机3拍摄靶标L是为了求解靶标L在其自身测量相机坐标系下的位姿做准备;Because the world coordinates of the feature points on the target L are known, the pixel coordinates on the imaging plane can be obtained through the image. The auxiliary camera 3 is used to shoot the target L in order to prepare for solving the position and posture of the target L in its own measurement camera coordinate system;
所述的PnP算法的原理如下:The principle of the PnP algorithm is as follows:
PNP(Perspective-n-Points)是根据3D到2D点对求解相机位姿的算法,其描述的是当有N对空间和图像匹配点的时候如何求解相机的姿态,本发明将这个PnP问题定义为一个在李代数上求解的非线性最小二乘问题,由于非线性优化中李代数求微分更加方便,因此使用李代数表示靶标L在辅助相机坐标系下的位姿,将位姿作为优化变量使用非线性优化方法最小化重投影误差进行优化求解。PNP (Perspective-n-Points) is an algorithm for solving camera pose based on 3D to 2D point pairs. It describes how to solve the camera pose when there are N pairs of space and image matching points. The present invention defines this PnP problem as a nonlinear least squares problem solved on Lie algebra. Since it is more convenient to differentiate Lie algebra in nonlinear optimization, Lie algebra is used to represent the pose of the target L in the auxiliary camera coordinate system. The pose is used as the optimization variable and a nonlinear optimization method is used to minimize the reprojection error for optimization and solution.
靶标上L有N个三维空间特征点P,在成像平面上有N个投影点p,需要计算的是靶标L的位姿R和T,记其李代数表示为ξ。假设靶标L上空间坐标点的坐标为Pi=[Xi Yi Zi]T,对应的在成像平面上的像素坐标为Ui=[ui vi]T,像素位置与空间特征点的位置关系如下:There are N three-dimensional spatial feature points P on the target L and N projection points p on the imaging plane. What needs to be calculated is the position R and T of the target L, and its Lie algebra is represented as ξ. Assume that the coordinates of the spatial coordinate point on the target L are Pi = [ Xi Yi Zi ] T , and the corresponding pixel coordinates on the imaging plane are Ui = [ uiv ] T. The relationship between the pixel position and the spatial feature point is as follows:
其中K为步骤1)中标定获得的相机的内参矩阵,ξ为李代数表示的靶标L的位姿,写成矩阵形式为:siUi=Kexp(ξ^)Pi,由于靶标L的位姿以及成像噪声等因素,该等式存在误差,所以本发明将所有的误差加起来构建成一个非线性最小二乘问题,迭代求解可获得精确的位姿: Where K is the intrinsic parameter matrix of the camera obtained by calibration in step 1), ξ is the pose of the target L represented by Lie algebra, which is written in matrix form as: s i U i =Kexp(ξ^)P i . Due to factors such as the pose of the target L and imaging noise, this equation has errors. Therefore, the present invention adds up all the errors to construct a nonlinear least squares problem, and iterative solution can obtain the accurate pose:
PnP问题中的误差项是将观测到的像素坐标与3D点按照当前估计的位姿投影到成像平面得到的位置进行比较得到的误差,所以叫做重投影误差。求解非线性最小二乘问题有很多方法,比如一阶的最速下降法、二阶的高斯牛顿法和列文伯格马夸尔法在内的非线性优化算法。The error term in the PnP problem is the error obtained by comparing the observed pixel coordinates with the position of the 3D point projected onto the imaging plane according to the current estimated pose, so it is called the reprojection error. There are many methods for solving nonlinear least squares problems, such as the first-order steepest descent method, the second-order Gauss-Newton method, and the Levenberg-Marquardt method, which are nonlinear optimization algorithms.
步骤5)计算靶标在自身测量相机坐标系下的位姿:利用步骤4)中获得的旋转后辅助相机与第一测量相机或第二测量相机之间的外参矩阵和计算出的靶标在辅助相机坐标系下的位姿,通过简单的坐标转换计算出靶标在自身测量相机坐标系下的位姿;Step 5) Calculate the pose of the target in the coordinate system of its own measurement camera: Utilize the external parameter matrix between the rotated auxiliary camera and the first measurement camera or the second measurement camera obtained in step 4) and the calculated pose of the target in the coordinate system of the auxiliary camera, and calculate the pose of the target in the coordinate system of its own measurement camera through simple coordinate transformation;
因为靶标L是固定安装在第一测量相机1和第二测量相机2上,即靶标L在自身测量相机坐标系下的位姿是不会发生变化的,所述的计算靶标在自身测量相机坐标系下的位姿示意图如图3所示。通过步骤3)的外参数标定可知两个双目视觉系统的外参矩阵R13T13和R23T23是已知的,而且步骤4)中已获得旋转后辅助相机3与第一测量相机1或第二测量相机2之间的外参矩阵和靶标L在辅助相机坐标系O3X3Y3Z3下的精确位姿,所以可以通过简单的坐标转换求出第一测量相机1上的靶标L在O1X1Y1Z1测量相机坐标系和第二测量相机2上的靶标L在O2X2Y2Z2测量相机坐标系下的位姿。Because the target L is fixedly mounted on the first measuring camera 1 and the second measuring camera 2, that is, the position and posture of the target L in the coordinate system of its own measuring camera will not change, the schematic diagram of the calculated position and posture of the target in the coordinate system of its own measuring camera is shown in Figure 3. Through the external parameter calibration of step 3), it can be known that the external parameter matrices R 13 T 13 and R 23 T 23 of the two binocular vision systems are known, and the external parameter matrix between the auxiliary camera 3 and the first measuring camera 1 or the second measuring camera 2 after rotation and the accurate position and posture of the target L in the auxiliary camera coordinate system O 3 X 3 Y 3 Z 3 have been obtained in step 4), so the position and posture of the target L on the first measuring camera 1 in the measuring camera coordinate system O 1 X 1 Y 1 Z 1 and the target L on the second measuring camera 2 in the measuring camera coordinate system O 2 X 2 Y 2 Z 2 can be obtained by simple coordinate transformation.
步骤6)互拍摄外参数标定:利用两个测量相机相互拍摄对方测量相机上的靶标,并计算出对方靶标的位姿,通过换算求出两个测量相机当前的外参数;Step 6) Mutual shooting extrinsic parameter calibration: Use two measuring cameras to shoot the target on each other's measuring camera, calculate the pose of the other target, and calculate the current extrinsic parameters of the two measuring cameras by conversion;
通过步骤5)已计算出靶标L在自身测量相机坐标系下的位姿,利用第一测量相机1拍摄第二测量相机2上的靶标L,或者使用第二测量相机2拍摄第一测量相机1上的靶标L,然后使用PnP算法计算出对方靶标L的位姿,通过换算即可求出两个测量相机当前的外参数;Through step 5), the position and posture of the target L in the coordinate system of its own measuring camera has been calculated. The first measuring camera 1 is used to photograph the target L on the second measuring camera 2, or the second measuring camera 2 is used to photograph the target L on the first measuring camera 1. Then, the position and posture of the other target L is calculated using the PnP algorithm. The current external parameters of the two measuring cameras can be obtained by conversion.
步骤7)使用精度旋转台将测量相机旋转到工作姿态并进行测量:Step 7) Use the precision rotation stage to rotate the measurement camera to the working posture and perform the measurement:
在步骤6)中第一测量相机1和第二测量相机2是相对的,但在进行测量工作时,这两个测量相机都需要面对被测物体,因此在进行测量工作前需要将这两个测量相机旋转到正对被测物体的角度。使用精密旋转台3记录第一测量相机1和第二测量相机2从标定姿态到工作姿态的旋转角度,通过计算即可获得这两个测量相机在工作姿态下的外参数,这时就可进行测量工作。In step 6), the first measuring camera 1 and the second measuring camera 2 are opposite to each other, but when performing measurement work, the two measuring cameras need to face the object to be measured, so the two measuring cameras need to be rotated to an angle facing the object to be measured before performing measurement work. The rotation angle of the first measuring camera 1 and the second measuring camera 2 from the calibration posture to the working posture is recorded using a precision rotating table 3. The external parameters of the two measuring cameras in the working posture can be obtained by calculation, and then the measurement work can be performed.
旋转后两个测量相机外参数中的旋转矩阵再次发生变化,需要将精密旋转台3旋转角度转化为旋转矩阵并更新外参矩阵,旋转角度与旋转矩阵之间的关系为:After the rotation, the rotation matrix in the external parameters of the two measurement cameras changes again. It is necessary to convert the rotation angle of the precision rotating stage 3 into a rotation matrix and update the external parameter matrix. The relationship between the rotation angle and the rotation matrix is:
若旋转角度为θ,旋转轴分别为X,Y和Z轴,则旋转矩阵分别为:If the rotation angle is θ, and the rotation axes are X, Y, and Z, then the rotation matrices are:
以上结合附图对本发明的具体实施方式作了说明,但这些说明不能被理解为限制了本发明的范围,本发明的保护范围由随附的权利要求书限定,任何在本发明权利要求基础上的改动都是本发明的保护范围。The specific implementation modes of the present invention are described above in conjunction with the accompanying drawings, but these descriptions cannot be understood as limiting the scope of the present invention. The protection scope of the present invention is defined by the attached claims, and any changes based on the claims of the present invention are within the protection scope of the present invention.
Claims (7)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010131077.8A CN111415391B (en) | 2020-02-28 | 2020-02-28 | A Calibration Method for External Orientation Parameters of Multi-eye Cameras Using Mutual Shooting Method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010131077.8A CN111415391B (en) | 2020-02-28 | 2020-02-28 | A Calibration Method for External Orientation Parameters of Multi-eye Cameras Using Mutual Shooting Method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111415391A CN111415391A (en) | 2020-07-14 |
CN111415391B true CN111415391B (en) | 2023-04-28 |
Family
ID=71491099
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010131077.8A Active CN111415391B (en) | 2020-02-28 | 2020-02-28 | A Calibration Method for External Orientation Parameters of Multi-eye Cameras Using Mutual Shooting Method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111415391B (en) |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111445537B (en) * | 2020-06-18 | 2020-09-29 | 浙江中控技术股份有限公司 | Calibration method and system of camera |
CN111964693B (en) * | 2020-07-21 | 2022-03-22 | 中国科学院长春光学精密机械与物理研究所 | A calibration method for high-precision inner and outer orientation elements of a surveying and mapping camera |
CN111862238B (en) * | 2020-07-23 | 2022-05-10 | 中国民航大学 | A full-space monocular vision measurement method |
CN112700501B (en) * | 2020-12-12 | 2024-03-05 | 西北工业大学 | Underwater monocular subpixel relative pose estimation method |
CN112837373B (en) * | 2021-03-03 | 2024-04-26 | 福州视驰科技有限公司 | Multi-camera pose estimation method without feature point matching |
CN113256742B (en) * | 2021-07-15 | 2021-10-15 | 禾多科技(北京)有限公司 | Interface display method and device, electronic equipment and computer readable medium |
CN115526941B (en) * | 2022-11-25 | 2023-03-10 | 海伯森技术(深圳)有限公司 | Calibration device and calibration method for telecentric camera |
CN116704045B (en) * | 2023-06-20 | 2024-01-26 | 北京控制工程研究所 | Calibration method of multi-camera system for monitoring starry sky background simulation system |
CN117197241B (en) * | 2023-09-14 | 2024-06-21 | 上海智能制造功能平台有限公司 | Robot tail end absolute pose high-precision tracking method based on multi-eye vision |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102831641A (en) * | 2012-08-08 | 2012-12-19 | 浙江华震数字化工程有限公司 | Method for shooting and three-dimensional reduction and reconstruction |
CN104807476A (en) * | 2015-04-23 | 2015-07-29 | 上海大学 | Pose estimation-based quick probe calibration device and method |
CN108663043A (en) * | 2018-05-16 | 2018-10-16 | 北京航空航天大学 | Distributed boss's POS node relative pose measurement method based on single camera auxiliary |
WO2019062291A1 (en) * | 2017-09-29 | 2019-04-04 | 歌尔股份有限公司 | Binocular vision positioning method, device, and system |
-
2020
- 2020-02-28 CN CN202010131077.8A patent/CN111415391B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102831641A (en) * | 2012-08-08 | 2012-12-19 | 浙江华震数字化工程有限公司 | Method for shooting and three-dimensional reduction and reconstruction |
CN104807476A (en) * | 2015-04-23 | 2015-07-29 | 上海大学 | Pose estimation-based quick probe calibration device and method |
WO2019062291A1 (en) * | 2017-09-29 | 2019-04-04 | 歌尔股份有限公司 | Binocular vision positioning method, device, and system |
CN108663043A (en) * | 2018-05-16 | 2018-10-16 | 北京航空航天大学 | Distributed boss's POS node relative pose measurement method based on single camera auxiliary |
Non-Patent Citations (2)
Title |
---|
吴军 ; 马凯 ; 徐海涛 ; 王志军 ; 于之靖 ; .采用虚拟立体视觉的航空发动机叶片点云测量方法.机械科学与技术.2018,(第11期),全文. * |
李鑫 ; .基于多目视觉的布匹瑕疵检测系统硬件部分设计.机械研究与应用.2011,(第05期),全文. * |
Also Published As
Publication number | Publication date |
---|---|
CN111415391A (en) | 2020-07-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111415391B (en) | A Calibration Method for External Orientation Parameters of Multi-eye Cameras Using Mutual Shooting Method | |
CN110378969B (en) | Convergent binocular camera calibration method based on 3D geometric constraint | |
CN108053450B (en) | A multi-constraint-based high-precision binocular camera calibration method | |
CN108734744B (en) | Long-distance large-view-field binocular calibration method based on total station | |
CN111121655B (en) | Visual detection method for pose and aperture of coplanar workpiece with equal large hole patterns | |
CN103278138B (en) | Method for measuring three-dimensional position and posture of thin component with complex structure | |
CN109163657B (en) | Round target pose detection method based on binocular vision three-dimensional reconstruction | |
CN108326850B (en) | A method and system for a robot to accurately move a manipulator to a designated position | |
CN106981083A (en) | The substep scaling method of Binocular Stereo Vision System camera parameters | |
WO2020199439A1 (en) | Single- and dual-camera hybrid measurement-based three-dimensional point cloud computing method | |
CN111862238B (en) | A full-space monocular vision measurement method | |
CN114705122B (en) | Large-view-field stereoscopic vision calibration method | |
CN112229323B (en) | Six-degree-of-freedom measurement method of checkerboard cooperative target based on monocular vision of mobile phone and application of six-degree-of-freedom measurement method | |
CN105066962A (en) | Multiresolution large visual field angle high precision photogrammetry apparatus | |
CN111879354A (en) | Unmanned aerial vehicle measurement system that becomes more meticulous | |
CN102693543A (en) | Method for automatically calibrating Pan-Tilt-Zoom in outdoor environments | |
CN113450416B (en) | TCSC method applied to three-dimensional calibration of three-dimensional camera | |
CN106643735A (en) | Indoor positioning method and device and mobile terminal | |
CN112857328B (en) | Calibration-free photogrammetry method | |
CN114998449A (en) | High-precision calibration method for zoom binocular vision measurement system | |
CN112665517B (en) | Multi-camera large-view-field surface shape measurement calibration method | |
CN114332247A (en) | Calibration method and device for multi-eye vision measurement, storage medium and camera device | |
Zhang et al. | Improved camera calibration method and accuracy analysis for binocular vision | |
CN113409395B (en) | High-precision detection and positioning method for catheter end | |
CN111028298B (en) | A converging binocular system for space transformation calibration of rigid body coordinate system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB03 | Change of inventor or designer information | ||
CB03 | Change of inventor or designer information |
Inventor after: Wu Jun Inventor after: Li Zechuan Inventor after: Guo Runxia Inventor after: Xu Jun Inventor after: Li Yanling Inventor after: Li Xin Inventor before: Wu Jun Inventor before: Li Zechuan Inventor before: Xu Jun Inventor before: Li Yanling Inventor before: Li Xin |
|
GR01 | Patent grant | ||
GR01 | Patent grant |