CN107633536A - A kind of camera calibration method and system based on two-dimensional planar template - Google Patents
A kind of camera calibration method and system based on two-dimensional planar template Download PDFInfo
- Publication number
- CN107633536A CN107633536A CN201710674279.5A CN201710674279A CN107633536A CN 107633536 A CN107633536 A CN 107633536A CN 201710674279 A CN201710674279 A CN 201710674279A CN 107633536 A CN107633536 A CN 107633536A
- Authority
- CN
- China
- Prior art keywords
- target
- corner points
- homography matrix
- coordinates
- camera
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 95
- 239000011159 matrix material Substances 0.000 claims abstract description 144
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 54
- 238000005070 sampling Methods 0.000 claims abstract description 51
- 238000007476 Maximum Likelihood Methods 0.000 claims abstract description 18
- 238000004590 computer program Methods 0.000 claims description 6
- 238000012986 modification Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000000605 extraction Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000010845 search algorithm Methods 0.000 description 3
- 238000013500 data storage Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000003384 imaging method Methods 0.000 description 2
- 238000005259 measurement Methods 0.000 description 2
- 238000010295 mobile communication Methods 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
- 238000013519 translation Methods 0.000 description 2
- 239000013598 vector Substances 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Landscapes
- Studio Devices (AREA)
Abstract
本发明公开了一种基于二维平面模板的相机标定方法及系统,其中的方法包括:获取棋盘格标定图像,所述标定图像包含多个角点;采用随机抽样一致性算法剔除所述多个角点中角点第一误差值大于第一预设值的角点,获得目标角点;根据所述目标角点的坐标和对应的世界坐标,获得单应性矩阵;采用随机抽样一致性算法剔除第二误差值大于第二预设值的单应性矩阵,获得目标单应性矩阵;根据所述目标单应性矩阵,获得目标二次曲线模型,并根据所述目标二次曲线模型获得相机的初始参数;采用最大似然估计的方法对所述初始参数进行估计,获得目标参数,利用所述目标参数对相机进行标定。本发明解决了张正友标定方法存在相机标定的准确性不高的技术问题。
The invention discloses a camera calibration method and system based on a two-dimensional plane template, wherein the method includes: obtaining a checkerboard calibration image, the calibration image contains a plurality of corner points; Among the corner points, the first error value of the corner point is greater than the first preset value, and the target corner point is obtained; according to the coordinates of the target corner point and the corresponding world coordinates, a homography matrix is obtained; a random sampling consensus algorithm is used Eliminate the homography matrix whose second error value is greater than the second preset value to obtain the target homography matrix; obtain the target conic curve model according to the target homography matrix, and obtain the target conic curve model according to the target conic curve model The initial parameters of the camera; the initial parameters are estimated by a maximum likelihood estimation method to obtain target parameters, and the camera is calibrated by using the target parameters. The invention solves the technical problem that the accuracy of camera calibration is not high in Zhang Zhengyou's calibration method.
Description
技术领域technical field
本发明涉及视觉测量技术领域,尤其涉及一种基于二维平面模板的相机标定方法及系统。The invention relates to the technical field of visual measurement, in particular to a camera calibration method and system based on a two-dimensional plane template.
背景技术Background technique
视觉测量中,相机参数的标定是非常关键的环节,标定精度以及标定算法的稳定性直接影响相机工作产生结果的准确性。相机标定的目的是估计相机镜头和图像传感器的参数,包括内参、外参以及镜头畸变系数,这些参数广泛应用到计算机视觉领域,比如纠正镜头失真、测量物体的实际尺寸、确定相机在场景中的位置等。相机标定还广泛应用于机器人学、导航系统和三维重建等。In visual measurement, the calibration of camera parameters is a very critical link. The calibration accuracy and the stability of the calibration algorithm directly affect the accuracy of the results produced by the camera. The purpose of camera calibration is to estimate the parameters of the camera lens and image sensor, including internal parameters, external parameters, and lens distortion coefficients. These parameters are widely used in the field of computer vision, such as correcting lens distortion, measuring the actual size of objects, and determining the camera in the scene. location etc. Camera calibration is also widely used in robotics, navigation systems, and 3D reconstruction.
目前,相机标定的方法大致分为两类:传统的标定方法和相机自标定方法。传统的标定方法是利用已知尺寸的标定块,建立物体坐标与图像坐标的对应关系,再通过相应的算法获取相机内外参数,标定精度较高但三维标定块的加工和维护困难,成本很高;相机自标定主要是利用相机运动约束或者场景的约束估计参数,灵活性较强,但自标定方法对相机运动以及场景约束条件太强,在实际使用时鲁棒性较差,精度较低,这些因素也就限制了自标定的使用范围。At present, camera calibration methods are roughly divided into two categories: traditional calibration methods and camera self-calibration methods. The traditional calibration method is to use a calibration block of known size to establish the corresponding relationship between object coordinates and image coordinates, and then obtain the internal and external parameters of the camera through the corresponding algorithm. The calibration accuracy is high, but the processing and maintenance of the three-dimensional calibration block is difficult and the cost is high. ; Camera self-calibration mainly uses camera motion constraints or scene constraints to estimate parameters, which is more flexible, but the self-calibration method is too strong for camera motion and scene constraints, and is less robust and less accurate in actual use. These factors also limit the scope of use of self-calibration.
为了解决上述技术问题,张正友提出了一种灵活的平面标定方法,该方法介于传统的标定与相机自标定方法之间,不需要特定的标定物,只需要打印一张棋盘格,可以避免传统的标定方法设备要求高,以及自标定方法精度低的问题。但是,张正友的标定法使用多幅棋盘格图像,利用角点的对应关系,算出每幅图像对应的单应性矩阵,然后使用封闭解求出相机内参、外参,最后考虑镜头畸变,用前面得到的封闭解作为初值,采用非线性搜索算法估计所有参数,包括内参、外参以及畸变系数。但是,非线性搜索算法对给定初值的精度要求很严格,由于相机参数是耦合的,如果提供的初值精度不高,那么非线性优化表现会很差,还会陷入局部最优解,因而导致求解相机参数及畸变系数的准确性和鲁棒性不够。In order to solve the above technical problems, Zhang Zhengyou proposed a flexible planar calibration method, which is between the traditional calibration and the camera self-calibration method. The calibration method requires high equipment requirements, and the self-calibration method has low precision. However, Zhang Zhengyou’s calibration method uses multiple checkerboard images, and uses the corresponding relationship of corner points to calculate the corresponding homography matrix of each image, and then uses the closed solution to find the internal and external parameters of the camera, and finally considers the lens distortion. The obtained closed solution is used as the initial value, and a nonlinear search algorithm is used to estimate all parameters, including internal parameters, external parameters and distortion coefficients. However, the nonlinear search algorithm has strict requirements on the accuracy of the given initial value. Since the camera parameters are coupled, if the accuracy of the initial value provided is not high, the performance of nonlinear optimization will be poor, and it will fall into a local optimal solution. As a result, the accuracy and robustness of solving camera parameters and distortion coefficients are not enough.
可见,现有的张正友标定方法存在相机标定的准确性不高的技术问题。It can be seen that the existing Zhang Zhengyou calibration method has the technical problem of low camera calibration accuracy.
发明内容Contents of the invention
本发明实施例提供一种基于二维平面模板的相机标定方法及系统,用以解决现有张正友标定方法存在相机标定的准确性不高的技术问题。Embodiments of the present invention provide a camera calibration method and system based on a two-dimensional plane template to solve the technical problem of low camera calibration accuracy in the existing Zhang Zhengyou calibration method.
本发明公开了一种基于二维平面模板的相机标定方法,所述方法包括:The invention discloses a camera calibration method based on a two-dimensional plane template. The method includes:
获取棋盘格标定图像,所述标定图像包含多个角点;Obtain a checkerboard calibration image, the calibration image includes a plurality of corner points;
采用随机抽样一致性算法剔除所述多个角点中角点第一误差值大于第一预设值的角点,获得目标角点;Using a random sampling consensus algorithm to eliminate the corner points whose first error value of the corner point is greater than the first preset value among the plurality of corner points, to obtain the target corner point;
根据所述目标角点的坐标和对应的世界坐标,获得所述棋盘格标定图像所在的世界坐标系到像素坐标系的单应性矩阵;Obtain a homography matrix from the world coordinate system where the checkerboard calibration image is located to the pixel coordinate system according to the coordinates of the target corner points and the corresponding world coordinates;
采用随机抽样一致性算法剔除第二误差值大于第二预设值的单应性矩阵,获得目标单应性矩阵;Using a random sampling consensus algorithm to eliminate homography matrices whose second error value is greater than a second preset value to obtain a target homography matrix;
根据所述目标单应性矩阵,获得目标二次曲线模型,并根据所述目标二次曲线模型获得相机的初始参数,所述初始参数包括第一内参、第一外参和第一畸变系数;Obtain a target conic model according to the target homography matrix, and obtain initial parameters of the camera according to the target conic model, where the initial parameters include a first internal parameter, a first external parameter, and a first distortion coefficient;
采用最大似然估计的方法对所述初始参数进行估计,获得目标参数,所述目标参数包括第二内参、第二外参和第二畸变系数,利用所述目标参数对相机进行标定。The initial parameters are estimated by a maximum likelihood estimation method to obtain target parameters, the target parameters include a second internal parameter, a second external parameter and a second distortion coefficient, and the camera is calibrated using the target parameters.
本发明提供的方法中,所述采用随机抽样一致性算法剔除所述多个角点中角点第一误差值大于第一预设值的角点,获得目标角点,包括:In the method provided by the present invention, said adopting the random sampling consensus algorithm to eliminate the corner points whose first error value of the corner point is greater than the first preset value among the plurality of corner points to obtain the target corner point includes:
获取角点的重投影坐标;Get the reprojected coordinates of the corner points;
获取所述角点的重投影坐标与所述角点的初始坐标之间的第一距离;Obtaining a first distance between the reprojected coordinates of the corner point and the initial coordinates of the corner point;
采用随机抽样一致性算法剔除所述第一距离大于第一预设值所对应的角点,从而获得目标角点。A random sampling consensus algorithm is used to eliminate the corner points corresponding to the first distance greater than the first preset value, so as to obtain the target corner points.
本发明提供的方法中,所述根据所述目标角点的坐标和对应的世界坐标,获得所述棋盘格标定图像所在的世界坐标系到像素坐标系的单应性矩阵,包括:In the method provided by the present invention, according to the coordinates of the target corners and the corresponding world coordinates, obtaining the homography matrix from the world coordinate system where the checkerboard calibration image is located to the pixel coordinate system includes:
从所述棋盘格标定图像中随机选取四个角点,并获取所述四个角点的坐标;Randomly select four corner points from the checkerboard calibration image, and obtain the coordinates of the four corner points;
根据所述四个角点的坐标和四个角点对应的世界坐标,获得所述棋盘格标定图像所在的世界坐标系到像素坐标系的单应性矩阵。According to the coordinates of the four corner points and the world coordinates corresponding to the four corner points, a homography matrix from the world coordinate system where the checkerboard calibration image is located to the pixel coordinate system is obtained.
本发明提供的方法中,所述采用随机抽样一致性算法剔除第二误差值大于第二预设值的单应性矩阵,获得目标单应性矩阵,包括:In the method provided by the present invention, the random sampling consensus algorithm is used to eliminate the homography matrix whose second error value is greater than the second preset value, and obtain the target homography matrix, including:
根据单应性矩阵,获得预设二次曲线模型;Obtain a preset quadratic curve model according to the homography matrix;
获得所述单应性矩阵与所述二次曲线模型的第二距离,将所述第二距离作为差值;Obtaining a second distance between the homography matrix and the conic model, using the second distance as a difference;
如果所述差值大于所述第二预设值,则为不符合条件的单应性矩阵;If the difference is greater than the second preset value, it is an unqualified homography matrix;
从原始单应性矩阵中剔除所述不符合条件的单应性矩阵,获得目标单应性矩阵。The unqualified homography matrix is eliminated from the original homography matrix to obtain a target homography matrix.
本发明提供的方法中,所述棋盘格标定图像包括多张,且不同的标定图像与标定相机的角度不相同。In the method provided by the present invention, the checkerboard calibration images include multiple pieces, and different calibration images have different angles from calibration cameras.
基于同样的发明构思,本发明第二方面提供了一种基于二维平面模板的相机标定系统,所述系统包括:获取模块,用于获取棋盘格标定图像,所述标定图像包含多个角点;Based on the same inventive concept, the second aspect of the present invention provides a camera calibration system based on a two-dimensional planar template, the system includes: an acquisition module, used to acquire a checkerboard calibration image, the calibration image contains a plurality of corner points ;
第一获得模块,用于采用随机抽样一致性算法剔除所述多个角点中角点第一误差值大于第一预设值的角点,获得目标角点;The first obtaining module is configured to use a random sampling consensus algorithm to eliminate the corner points whose first error value of the corner point is greater than the first preset value among the plurality of corner points, and obtain the target corner point;
第二获得模块,用于根据所述目标角点的坐标和对应的世界坐标,获得所述棋盘格标定图像所在的世界坐标系到像素坐标系的单应性矩阵;The second obtaining module is used to obtain a homography matrix from the world coordinate system where the checkerboard calibration image is located to the pixel coordinate system according to the coordinates of the target corner points and the corresponding world coordinates;
第三获得模块,用于采用随机抽样一致性算法剔除第二误差值大于第二预设值的单应性矩阵,获得目标单应性矩阵;The third obtaining module is used to eliminate the homography matrix whose second error value is greater than the second preset value by adopting the random sampling consensus algorithm to obtain the target homography matrix;
第四获得模块,用于根据所述目标单应性矩阵,获得目标二次曲线模型,并根据所述目标二次曲线模型获得相机的初始参数,所述初始参数包括第一内参、第一外参和第一畸变系数;The fourth obtaining module is used to obtain the target conic curve model according to the target homography matrix, and obtain the initial parameters of the camera according to the target conic curve model, and the initial parameters include the first internal parameter, the first external parameter Parameter and the first distortion coefficient;
标定模块,用于采用最大似然估计的方法对所述初始参数进行估计,获得目标参数,所述目标参数包括第二内参、第二外参和第二畸变系数,利用所述目标参数对相机进行标定。A calibration module, configured to estimate the initial parameters using a maximum likelihood estimation method to obtain target parameters, the target parameters include a second internal parameter, a second external parameter, and a second distortion coefficient, and use the target parameters to estimate the camera Calibrate.
本发明提供的系统中,所述第一获得模块,还用于:In the system provided by the present invention, the first obtaining module is also used for:
获取角点的重投影坐标;Get the reprojected coordinates of the corner points;
获取所述角点的重投影坐标与所述角点的初始坐标之间的第一距离;Obtaining a first distance between the reprojected coordinates of the corner point and the initial coordinates of the corner point;
采用随机抽样一致性算法剔除所述第一距离大于第一预设值所对应的角点,从而获得目标角点。A random sampling consensus algorithm is used to eliminate the corner points corresponding to the first distance greater than the first preset value, so as to obtain the target corner points.
本发明提供的系统中,所述第二获得模块,还用于:In the system provided by the present invention, the second obtaining module is also used for:
从所述棋盘格标定图像中随机选取四个角点,并获取所述四个角点的坐标;Randomly select four corner points from the checkerboard calibration image, and obtain the coordinates of the four corner points;
根据所述四个角点的坐标和四个角点对应的世界坐标,获得所述棋盘格标定图像所在的世界坐标系到像素坐标系的单应性矩阵。According to the coordinates of the four corner points and the world coordinates corresponding to the four corner points, a homography matrix from the world coordinate system where the checkerboard calibration image is located to the pixel coordinate system is obtained.
本发明提供的系统中,所述第三获得模块,还用于:In the system provided by the present invention, the third obtaining module is also used for:
根据单应性矩阵,获得预设二次曲线模型;Obtain a preset quadratic curve model according to the homography matrix;
获得所述单应性矩阵与所述二次曲线模型的第二距离,将所述第二距离作为差值;Obtaining a second distance between the homography matrix and the conic model, using the second distance as a difference;
如果所述差值大于所述第二预设值,则为不符合条件的单应性矩阵;If the difference is greater than the second preset value, it is an unqualified homography matrix;
从原始单应性矩阵中剔除所述不符合条件的单应性矩阵,获得目标单应性矩阵Eliminate the unqualified homography matrix from the original homography matrix to obtain the target homography matrix
本发明提供的系统中,所述棋盘格标定图像包括多张,且不同的标定图像与标定相机的角度不相同。In the system provided by the present invention, the checkerboard calibration images include multiple pieces, and different calibration images have different angles from calibration cameras.
基于同样的发明构思,本发明第三方面还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现以下步骤:Based on the same inventive concept, the third aspect of the present invention also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the following steps are implemented:
获取棋盘格标定图像,所述标定图像包含多个角点;Obtain a checkerboard calibration image, the calibration image includes a plurality of corner points;
采用随机抽样一致性算法剔除所述多个角点中角点第一误差值大于第一预设值的角点,获得目标角点;Using a random sampling consensus algorithm to eliminate the corner points whose first error value of the corner point is greater than the first preset value among the plurality of corner points, to obtain the target corner point;
根据所述目标角点的坐标和对应的世界坐标,获得所述棋盘格标定图像所在的世界坐标系到像素坐标系的单应性矩阵;Obtain a homography matrix from the world coordinate system where the checkerboard calibration image is located to the pixel coordinate system according to the coordinates of the target corner points and the corresponding world coordinates;
采用随机抽样一致性算法剔除第二误差值大于第二预设值的单应性矩阵,获得目标单应性矩阵;Using a random sampling consensus algorithm to eliminate homography matrices whose second error value is greater than a second preset value to obtain a target homography matrix;
根据所述目标单应性矩阵,获得目标二次曲线模型,并根据所述目标二次曲线模型获得相机的初始参数,所述初始参数包括第一内参、第一外参和第一畸变系数;Obtain a target conic model according to the target homography matrix, and obtain initial parameters of the camera according to the target conic model, where the initial parameters include a first internal parameter, a first external parameter, and a first distortion coefficient;
采用最大似然估计的方法对所述初始参数进行估计,获得目标参数,所述目标参数包括第二内参、第二外参和第二畸变系数,利用所述目标参数对相机进行标定。The initial parameters are estimated by a maximum likelihood estimation method to obtain target parameters, the target parameters include a second internal parameter, a second external parameter and a second distortion coefficient, and the camera is calibrated using the target parameters.
基于同样的发明构思,本发明第四方面还提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现以下步骤:Based on the same inventive concept, the fourth aspect of the present invention also provides a computer device, including a memory, a processor, and a computer program stored on the memory and operable on the processor, and the processor implements the program when executing the program. The following steps:
获取棋盘格标定图像,所述标定图像包含多个角点;Obtain a checkerboard calibration image, the calibration image includes a plurality of corner points;
采用随机抽样一致性算法剔除所述多个角点中角点第一误差值大于第一预设值的角点,获得目标角点;Using a random sampling consensus algorithm to eliminate the corner points whose first error value of the corner point is greater than the first preset value among the plurality of corner points, to obtain the target corner point;
根据所述目标角点的坐标和对应的世界坐标,获得所述棋盘格标定图像所在的世界坐标系到像素坐标系的单应性矩阵;Obtain a homography matrix from the world coordinate system where the checkerboard calibration image is located to the pixel coordinate system according to the coordinates of the target corner points and the corresponding world coordinates;
采用随机抽样一致性算法剔除第二误差值大于第二预设值的单应性矩阵,获得目标单应性矩阵;Using a random sampling consensus algorithm to eliminate homography matrices whose second error value is greater than a second preset value to obtain a target homography matrix;
根据所述目标单应性矩阵,获得目标二次曲线模型,并根据所述目标二次曲线模型获得相机的初始参数,所述初始参数包括第一内参、第一外参和第一畸变系数;Obtain a target conic model according to the target homography matrix, and obtain initial parameters of the camera according to the target conic model, where the initial parameters include a first internal parameter, a first external parameter, and a first distortion coefficient;
采用最大似然估计的方法对所述初始参数进行估计,获得目标参数,所述目标参数包括第二内参、第二外参和第二畸变系数,利用所述目标参数对相机进行标定。The initial parameters are estimated by a maximum likelihood estimation method to obtain target parameters, the target parameters include a second internal parameter, a second external parameter and a second distortion coefficient, and the camera is calibrated using the target parameters.
本发明实施例中提供的一个或多个技术方案,至少具有如下技术效果或优点:One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages:
本申请实施例提供了一种基于二维平面模板的相机标定方法,所述方法包括:获取棋盘格标定图像,所述标定图像包含多个角点;采用随机抽样一致性算法剔除所述多个角点中角点第一误差值大于第一预设值的角点,获得目标角点;根据所述目标角点的坐标和对应的世界坐标,获得所述棋盘格标定图像所在的世界坐标系到像素坐标系的单应性矩阵;采用随机抽样一致性算法剔除第二误差值大于第二预设值的单应性矩阵,获得目标单应性矩阵;根据所述目标单应性矩阵,获得目标二次曲线模型,并根据所述目标二次曲线模型获得相机的初始参数,所述初始参数包括第一内参、第一外参和第一畸变系数;采用最大似然估计的方法对所述初始参数进行估计,获得目标参数,所述目标参数包括第二内参、第二外参和第二畸变系数,利用所述目标参数对相机进行标定。本发明提供的上述方法中,一方面,在获取初值时,采用随机抽样一致性算法剔除了多个角点中角点误差值大于第一预设值的角点,从而获得目标角点,然后再根据目标角点计算单应性矩阵,由于剔除了精度较低的角点,从而可以提高单应性矩阵计算的准确性,从而提高标定精度,另一方面,采用随机抽样一致性算法剔除了误差值大于第二预设值的单应性矩阵,从而获得目标单应性矩阵,然后再根据所述目标单应性矩阵对标定参数进行求解,由于剔除了低质量的标定图像,从而可以进一步提高标定的精度,解决了现有张正友标定方法存在相机标定的准确性和鲁棒性不高的技术问题。An embodiment of the present application provides a camera calibration method based on a two-dimensional plane template, the method comprising: acquiring a checkerboard calibration image, the calibration image contains multiple corner points; Among the corner points, the first error value of the corner point is greater than the first preset value, and the target corner point is obtained; according to the coordinates of the target corner point and the corresponding world coordinates, the world coordinate system where the checkerboard calibration image is located is obtained. To the homography matrix of the pixel coordinate system; using the random sampling consensus algorithm to eliminate the homography matrix whose second error value is greater than the second preset value, and obtain the target homography matrix; according to the target homography matrix, obtain The target quadratic curve model, and obtain the initial parameters of the camera according to the target quadratic curve model, the initial parameters include the first internal parameter, the first external parameter and the first distortion coefficient; the method of maximum likelihood estimation is used for the The initial parameters are estimated to obtain target parameters, the target parameters include a second internal parameter, a second external parameter and a second distortion coefficient, and the camera is calibrated by using the target parameters. In the above method provided by the present invention, on the one hand, when obtaining the initial value, the random sampling consensus algorithm is used to eliminate the corner points whose corner point error value is greater than the first preset value among the multiple corner points, thereby obtaining the target corner point, Then calculate the homography matrix according to the target corner points. Since the corner points with low precision are eliminated, the accuracy of the homography matrix calculation can be improved, thereby improving the calibration accuracy. On the other hand, the random sampling consistency algorithm is used to eliminate The homography matrix whose error value is greater than the second preset value is obtained to obtain the target homography matrix, and then the calibration parameters are solved according to the target homography matrix. Since the low-quality calibration image is eliminated, it can be The accuracy of the calibration is further improved, and the technical problem of low camera calibration accuracy and robustness in the existing Zhang Zhengyou calibration method is solved.
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, it can be implemented according to the contents of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable , the specific embodiments of the present invention are enumerated below.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1为本发明实施例中一种基于二维平面模板的相机标定方法的流程图;Fig. 1 is a flow chart of a camera calibration method based on a two-dimensional plane template in an embodiment of the present invention;
图2为本发明实施例中一种基于二维平面模板的相机标定系统的结构图;2 is a structural diagram of a camera calibration system based on a two-dimensional plane template in an embodiment of the present invention;
图3为本发明实施例中一种计算机可读介质的结构图;FIG. 3 is a structural diagram of a computer-readable medium in an embodiment of the present invention;
图4为本发明实施例中一种计算机设备的结构图。Fig. 4 is a structural diagram of a computer device in an embodiment of the present invention.
具体实施方式detailed description
本发明实施例提供了一种基于二维平面模板的相机标定方法及系统,用以解决现有张正友标定方法存在相机标定的准确性不高的技术问题。Embodiments of the present invention provide a camera calibration method and system based on a two-dimensional planar template to solve the technical problem of low camera calibration accuracy in the existing Zhang Zhengyou calibration method.
本申请实施例中的技术方案,总体思路如下:The general idea of the technical solution in the embodiment of the application is as follows:
一种基于二维平面模板的相机标定方法,所述方法包括:获取棋盘格标定图像,所述标定图像包含多个角点;采用随机抽样一致性算法剔除所述多个角点中角点第一误差值大于第一预设值的角点,获得目标角点;根据所述目标角点的坐标和对应的世界坐标,获得所述棋盘格标定图像所在的世界坐标系到像素坐标系的单应性矩阵;采用随机抽样一致性算法剔除第二误差值大于第二预设值的单应性矩阵,获得目标单应性矩阵;根据所述目标单应性矩阵,获得目标二次曲线模型,并根据所述目标二次曲线模型获得相机的初始参数,所述初始参数包括第一内参、第一外参和第一畸变系数;采用最大似然估计的方法对所述初始参数进行估计,获得目标参数,所述目标参数包括第二内参、第二外参和第二畸变系数,利用所述目标参数对相机进行标定。A camera calibration method based on a two-dimensional plane template, the method comprising: obtaining a checkerboard calibration image, the calibration image including a plurality of corner points; using a random sampling consensus algorithm to eliminate the first corner point among the plurality of corner points A corner point whose error value is greater than the first preset value is obtained to obtain the target corner point; according to the coordinates of the target corner point and the corresponding world coordinates, the unitary distance from the world coordinate system where the checkerboard calibration image is located to the pixel coordinate system is obtained a corresponding matrix; a random sampling consistency algorithm is used to eliminate a homography matrix whose second error value is greater than a second preset value to obtain a target homography matrix; according to the target homography matrix, a target quadratic curve model is obtained, And obtain the initial parameters of the camera according to the target quadratic curve model, the initial parameters include the first internal parameter, the first external parameter and the first distortion coefficient; adopt the method of maximum likelihood estimation to estimate the initial parameter, obtain Target parameters, where the target parameters include a second internal parameter, a second external parameter, and a second distortion coefficient, and the camera is calibrated by using the target parameters.
在上述方法中,一方面,在获取初值时,采用随机抽样一致性算法剔除了多个角点中角点误差值大于第一预设值的角点,从而获得目标角点,然后再根据目标角点计算单应性矩阵,由于剔除了精度较低的角点,从而可以提高单应性矩阵计算的准确性,从而提高标定精度,另一方面,采用随机抽样一致性算法剔除了误差值大于第二预设值的单应性矩阵,从而获得目标单应性矩阵,然后再根据所述目标单应性矩阵对标定参数进行求解,由于剔除了低质量的标定图像,从而可以进一步提高标定的精度,解决了现有张正友标定方法存在相机标定的准确性和鲁棒性不高的技术问题。In the above method, on the one hand, when obtaining the initial value, the random sampling consensus algorithm is used to eliminate the corner points whose corner point error value is greater than the first preset value among the multiple corner points, so as to obtain the target corner point, and then according to The homography matrix is calculated by the target corner point. Since the corner points with low precision are eliminated, the accuracy of the homography matrix calculation can be improved, thereby improving the calibration accuracy. On the other hand, the random sampling consistency algorithm is used to eliminate the error value A homography matrix greater than the second preset value, so as to obtain the target homography matrix, and then solve the calibration parameters according to the target homography matrix, because the low-quality calibration images are eliminated, which can further improve the calibration It solves the technical problem that the accuracy and robustness of camera calibration in the existing Zhang Zhengyou calibration method are not high.
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
实施例一Embodiment one
本实施例提供了一种基于二维平面模板的相机标定方法,请参见图1,所述方法包括:This embodiment provides a camera calibration method based on a two-dimensional plane template, please refer to FIG. 1, the method includes:
步骤S101:获取棋盘格标定图像,所述标定图像包含多个角点;Step S101: Obtain a checkerboard calibration image, the calibration image includes a plurality of corner points;
步骤S102:采用随机抽样一致性算法剔除所述多个角点中角点第一误差值大于第一预设值的角点,获得目标角点。Step S102: Use the random sampling consensus algorithm to eliminate the corner points whose first error value of the corner point is greater than the first preset value among the plurality of corner points, to obtain the target corner point.
步骤S103:根据所述目标角点的坐标和对应的世界坐标,获得所述棋盘格标定图像所在的世界坐标系到像素坐标系的单应性矩阵。Step S103: Obtain a homography matrix from the world coordinate system where the checkerboard calibration image is located to the pixel coordinate system according to the coordinates of the target corner points and the corresponding world coordinates.
步骤S104:采用随机抽样一致性算法剔除第二误差值大于第二预设值的单应性矩阵,获得目标单应性矩阵。Step S104: Using a random sampling consensus algorithm to eliminate homography matrices whose second error value is greater than a second preset value to obtain a target homography matrix.
步骤S105:根据所述目标单应性矩阵,获得目标二次曲线模型,并根据所述目标二次曲线模型获得相机的初始参数,所述初始参数包括第一内参、第一外参和第一畸变系数;Step S105: According to the target homography matrix, obtain the target conic curve model, and obtain the initial parameters of the camera according to the target conic curve model, the initial parameters include the first internal parameter, the first external parameter and the first Distortion coefficient;
步骤S106:采用最大似然估计的方法对所述初始参数进行估计,获得目标参数,所述目标参数包括第二内参、第二外参和第二畸变系数,利用所述目标参数对相机进行标定。Step S106: Estimate the initial parameters using the method of maximum likelihood estimation to obtain target parameters, the target parameters include the second internal parameters, the second external parameters and the second distortion coefficient, and use the target parameters to calibrate the camera .
需要说明的是,本发明申请人通过长期的实践发现,张正友的基于平面标定的方法中,求解初值的精度主要与下两个方面有关,第一,棋盘格角点的提取精度,第二,采集的标定图像的质量。而在实际应用中,相机标定过程会受噪声、图像模糊、光照变化以及棋盘格视角等影响,导致棋盘格角点的提取精度较低。另外,符合规范的高质量的标定图像才能对相机参数进行准确标定,例如:棋盘格平面与相机像平面的夹角大于45度会降低标定精度,棋盘格在图像中的比例以及棋盘格距离相机光心的远近都会对求解初值的精度产生影响。本申请的方法基于上面的认识,提出了一种基于二维平面模板的相机标定方法,本发明采用双-随机抽样一致性算法(D-RANSAC),从影响初值求解精度的两个方面入手,通过剔除低精度的角点和不合规范的低质量图像,从而提高初值的求解精度。具体为:利用每幅棋盘格角点的重投影误差大小,并运用随机抽样一致性算法,剔除误差较大的角点,然后重新计算每幅图像的单应性矩阵。并基于预设二次曲线模型在单个相机中不变的理论,对每幅图像对应的单应性矩阵再次运用随机抽样一致性算法,剔除不符合规范的低质量标定图像。最后采用封闭解求得较为准确的初值,即相机的初始内外参(即第一内参和第二内参),并结合到镜头畸变因素,采用非线性搜索的算法求得精确的相机的第二内参、第二外参和第二畸变系数,并对相机进行标定,从而提高了标定的准确性和精度。It should be noted that the applicant of the present invention has found through long-term practice that in Zhang Zhengyou's method based on plane calibration, the accuracy of solving the initial value is mainly related to the following two aspects, first, the extraction accuracy of the checkerboard corner points, and second , the quality of the collected calibration image. However, in practical applications, the camera calibration process will be affected by noise, image blur, illumination changes, and checkerboard viewing angles, etc., resulting in low extraction accuracy of checkerboard corners. In addition, only high-quality calibration images that meet the specifications can accurately calibrate the camera parameters. For example, if the angle between the checkerboard plane and the camera image plane is greater than 45 degrees, the calibration accuracy will be reduced, the ratio of the checkerboard in the image and the distance between the checkerboard and the camera The distance of the optical center will affect the accuracy of solving the initial value. Based on the above knowledge, the method of this application proposes a camera calibration method based on a two-dimensional plane template. The present invention uses a double-random sampling consensus algorithm (D-RANSAC) to start with two aspects that affect the accuracy of the initial value solution , by eliminating low-precision corner points and substandard low-quality images, thereby improving the solution accuracy of the initial value. Specifically: use the reprojection error size of the corner points of each checkerboard, and use the random sampling consistency algorithm to eliminate the corner points with large errors, and then recalculate the homography matrix of each image. And based on the theory that the preset quadratic curve model is invariant in a single camera, the random sampling consistency algorithm is used again for the homography matrix corresponding to each image to eliminate low-quality calibration images that do not meet the specifications. Finally, the closed solution is used to obtain a relatively accurate initial value, that is, the initial internal and external parameters of the camera (namely the first internal reference and the second internal reference), and combined with the lens distortion factor, the nonlinear search algorithm is used to obtain the precise second value of the camera. The internal reference, the second external reference and the second distortion coefficient are used to calibrate the camera, thereby improving the accuracy and precision of the calibration.
下面,结合图1对本申请提供的一种基于二维平面模板的相机标定方法进行详细介绍:Below, a camera calibration method based on a two-dimensional plane template provided by the present application is introduced in detail in conjunction with FIG. 1:
首先执行步骤S101:获取棋盘格标定图像,所述标定图像包含多个角点;First perform step S101: acquire a checkerboard calibration image, the calibration image includes a plurality of corner points;
在具体的实施过程中,可以利用相机拍摄多张棋盘格标定图像,其中每张棋盘格标定图像包含多个角点。作为优选,不同标定图像与标定相机的角度不相同,例如标定图像可以多角度地拍摄,保证标定图像相对相机有足够的角度变化,从而保证标定的精度,标定图像的数量可以根据实际情况拍摄,例如可以为20、25、30等等。In a specific implementation process, multiple checkerboard calibration images can be taken by the camera, where each checkerboard calibration image contains multiple corner points. Preferably, different calibration images have different angles from the calibration camera. For example, the calibration images can be taken from multiple angles to ensure that the calibration images have sufficient angle changes relative to the camera, thereby ensuring the calibration accuracy. The number of calibration images can be taken according to actual conditions. For example, it can be 20, 25, 30 and so on.
然后执行步骤S102:采用随机抽样一致性算法剔除所述多个角点中角点第一误差值大于第一预设值的角点,获得目标角点。Then step S102 is executed: using the random sampling consensus algorithm to eliminate the corner points whose first error value of the corner point is greater than the first preset value among the plurality of corner points, to obtain the target corner point.
在具体的实施过程中,由于棋盘格角点的精度影响最终的标定精度,需要剔除低精度的角点,本实施例中采用随机抽样一致性算法剔除所述多个角点中角点第一误差值大于第一预设值的角点,从而获得目标角点。In the specific implementation process, since the accuracy of the corner points of the checkerboard affects the final calibration accuracy, it is necessary to remove the corner points with low precision. The corner points whose error value is larger than the first preset value are obtained to obtain the target corner points.
剔除低精度角点的方法可以通过下述步骤来实现:The method of removing low-precision corner points can be achieved through the following steps:
获取角点的重投影坐标;Get the reprojected coordinates of the corner points;
获取所述角点的重投影坐标与所述角点的初始坐标之间的第一距离;Obtaining a first distance between the reprojected coordinates of the corner point and the initial coordinates of the corner point;
采用随机抽样一致性算法剔除所述第一距离大于第一预设值所对应的角点,从而获得目标角点。A random sampling consensus algorithm is used to eliminate the corner points corresponding to the first distance greater than the first preset value, so as to obtain the target corner points.
在具体的实施过程中,首先介绍相机模型,相机模型分为线性模型和非线性模型,其中基于二维平面模板的线性模型如下:In the specific implementation process, the camera model is first introduced. The camera model is divided into linear model and nonlinear model. The linear model based on the two-dimensional plane template is as follows:
其中 in
上述公式中,s表示尺度因子,(u,v)为棋盘格图像角点对应的相机成像点的像素坐标(即角点坐标),(X,Y)为棋盘格图像角点的世界坐标,K为相机的内参数,r1,r2为相机外参数旋转矩阵R3×3的列向量,t表示相机外参数平移矩阵,R3×3和t表示棋盘格标定板所在的世界坐标系到相机坐标系的旋转和平移矩阵。In the above formula, s represents the scale factor, (u, v) is the pixel coordinate of the camera imaging point corresponding to the corner point of the checkerboard image (that is, the corner point coordinate), (X, Y) is the world coordinate of the corner point of the checkerboard image, K is the internal parameters of the camera, r 1 and r 2 are the column vectors of the camera external parameter rotation matrix R 3×3 , t represents the camera external parameter translation matrix, R 3×3 and t represent the world coordinate system where the checkerboard calibration board is located Rotation and translation matrices to the camera coordinate system.
接下来介绍单应性矩阵,例如已知每幅标定图像和相机成像中的四对映射点(u,v)和(X,Y),则可以通过公式(2)求出棋盘格标定板所在的世界坐标到像素坐标的单应性矩阵H,对于每幅标定图像都可以得到一个单应性矩阵,如下:Next, the homography matrix is introduced. For example, if the four pairs of mapping points (u, v) and (X, Y) in each calibration image and camera imaging are known, the position of the checkerboard calibration board can be obtained by formula (2). The homography matrix H from world coordinates to pixel coordinates, a homography matrix can be obtained for each calibration image, as follows:
其中 in
其中,单应性矩阵H有8个自由度。Among them, the homography matrix H has 8 degrees of freedom.
对获取的棋盘格图像可以提取其角点坐标(u,v),然后利用其对应的世界坐标(X,Y)以及公式(2)计算该棋盘格图像的单应性矩阵H,由于噪声、图像模糊、光照变化等影响会导致提取的角点坐标并不精确,因而上述得出的计算的矩阵也不精确,因此可以通过公式(2)获得角点重投影的坐标并与所述角点的初始坐标(u,v)进行比较,两者之间的欧氏距离即为重投影误差d1的值越小,表明角点的提取精度越高,如果该误差值大于第一预设值,则表明该角点的精度不高,从而剔除。举例来说,将第一预设值设置为δ1,若d1<δ1,则该角点符合模型要求,称为内角点,并记录符合标定要求的角点数量t1;否则该角点不符合模型要求,称为外角点。为了保证准确性,重复上述过程多次,重复的次数由下述公式确定:For the acquired checkerboard image, its corner coordinates (u, v) can be extracted, and then its corresponding world coordinates (X, Y) and formula (2) can be used to calculate the homography matrix H of the checkerboard image. Due to noise, image Effects such as blurring and lighting changes will cause the extracted corner coordinates to be inaccurate, so the calculated matrix obtained above is not accurate, so the coordinates of the corner reprojection can be obtained by formula (2) And compared with the initial coordinates (u, v) of the corner point, the Euclidean distance between the two is the reprojection error The smaller the value of d 1 is, the higher the extraction accuracy of the corner point is, and if the error value is greater than the first preset value, it indicates that the corner point is not high in accuracy, and thus the corner point is eliminated. For example, set the first preset value to δ 1 , if d 1 <δ 1 , then the corner meets the requirements of the model, called an interior corner, and record the number t 1 of corners that meet the calibration requirements; otherwise, the corner Points that do not meet the model requirements are called exterior corner points. In order to ensure the accuracy, the above process is repeated many times, and the number of repetitions is determined by the following formula:
N=log(1-p)/log(1-ws)(4)N=log(1-p)/log(1-w s )(4)
上式表示N次迭代中,每次随机选择最小样本数为s,那么至少有一次没有外点的概率为p,p取值0.99,w表示任意选择的样本为内点的概率。然后保留t1最大时对应的符合模型的所有角点,然后利用这些角点通过最小二乘法重新估计单应性矩阵从而得到最优模型。The above formula means that in N iterations, the minimum number of samples is randomly selected each time as s, then the probability that there is no outlier at least once is p, and the value of p is 0.99, and w represents the probability that any selected sample is an inlier. Then retain all the corner points corresponding to the model when t 1 is the largest, and then use these corner points to re-estimate the homography matrix by the least square method to get the optimal model.
接下来执行步骤S103:根据所述目标角点的坐标和对应的世界坐标,获得所述棋盘格标定图像所在的世界坐标系到像素坐标系的单应性矩阵。Next, step S103 is executed: according to the coordinates of the target corners and the corresponding world coordinates, a homography matrix from the world coordinate system where the checkerboard calibration image is located to the pixel coordinate system is obtained.
在具体的实施过程中,可以通过公式(2)获得所述棋盘格标定图像所在的世界坐标系到像素坐标系的单应性矩阵。In a specific implementation process, the homography matrix from the world coordinate system where the checkerboard calibration image is located to the pixel coordinate system can be obtained by formula (2).
具体地,所述根据所述目标角点的坐标和对应的世界坐标,获得所述棋盘格标定图像所在的世界坐标系到像素坐标系的单应性矩阵,包括:Specifically, according to the coordinates of the target corner points and the corresponding world coordinates, obtaining the homography matrix from the world coordinate system where the checkerboard calibration image is located to the pixel coordinate system includes:
从所述棋盘格标定图像中随机选取四个角点,并获取所述四个角点的坐标;Randomly select four corner points from the checkerboard calibration image, and obtain the coordinates of the four corner points;
根据所述四个角点的坐标和四个角点对应的世界坐标,获得所述棋盘格标定图像所在的世界坐标系到像素坐标系的单应性矩阵。According to the coordinates of the four corner points and the world coordinates corresponding to the four corner points, a homography matrix from the world coordinate system where the checkerboard calibration image is located to the pixel coordinate system is obtained.
在具体的实施过程中,在每幅标定图像中随机选择4个角点坐标(u,v),通过公式(2)和与之对应的世界坐标(X,Y),从而得出与标定图像对应的单应性矩阵 In the specific implementation process, four corner coordinates (u, v) are randomly selected in each calibration image, and the formula (2) and the corresponding world coordinates (X, Y) are used to obtain the calibration image The corresponding homography matrix
然后执行步骤S104:采用随机抽样一致性算法剔除第二误差值大于第二预设值的单应性矩阵,获得目标单应性矩阵。Then step S104 is executed: using a random sampling consensus algorithm to eliminate homography matrices whose second error value is greater than a second preset value, to obtain a target homography matrix.
具体来说,所述采用随机抽样一致性算法剔除第二误差值大于第二预设值的单应性矩阵,获得目标单应性矩阵,包括:Specifically, the random sampling consensus algorithm is used to eliminate the homography matrix whose second error value is greater than the second preset value, and obtain the target homography matrix, including:
根据单应性矩阵,获得预设二次曲线模型;Obtain a preset quadratic curve model according to the homography matrix;
获得所述单应性矩阵与所述二次曲线模型的第二距离,将所述第二距离作为差值;Obtaining a second distance between the homography matrix and the conic model, using the second distance as a difference;
如果所述差值大于所述第二预设值,则为不符合条件的单应性矩阵;If the difference is greater than the second preset value, it is an unqualified homography matrix;
从原始单应性矩阵中剔除所述不符合条件的单应性矩阵,获得目标单应性矩阵。The unqualified homography matrix is eliminated from the original homography matrix to obtain a target homography matrix.
在具体的实施过程中,首先介绍内参矩阵K与预设二次曲线曲线模型B,张正友标定法中,利用r1,r2单位正交这一已知条件,可以得到以下两个约束:In the specific implementation process, the internal parameter matrix K and the preset conic curve model B are firstly introduced. In the Zhang Zhengyou calibration method, using the known condition that r 1 and r 2 are unit orthogonal, the following two constraints can be obtained:
h1 TK-TK-1h2=0h 1 T K -T K -1 h 2 =0
h1 TK-TK-1h1=h2 TK-TK-1h2(5)h 1 T K -T K -1 h 1 =h 2 T K -T K -1 h 2 (5)
其中,h1,h2为单应性矩阵H的列向量,K为相机内参矩阵,B=K-TK-1为预设二次曲线曲线模型(简称ICA),由B的表达式可知,B只与相机的内参矩阵K有关,而与相机的方向与位置无关。Among them, h 1 , h 2 are the column vectors of the homography matrix H, K is the internal reference matrix of the camera, B=K -T K -1 is the preset conic curve model (abbreviated as ICA), from the expression of B, we can know , B is only related to the internal parameter matrix K of the camera, but has nothing to do with the direction and position of the camera.
获得目标单应性矩阵的方法可以通过下述步骤来首先,首先随机选取两个单应性矩阵,通过公式(5)计算ICA,即B=K-TK-1,然后分别计算每个单应性矩阵与ICA的距离d2,其中d2=(h1 TK-TK-1h2)2+(h1 TK-TK-1h1-1)2+(h2 TK-TK-1h2-1)2(6);第二预设值为δ2,如果d2<δ2,则该单应性矩阵符合模型要求,称为内单应性矩阵,并记下符合模型的单应性矩阵个数t2;否则该单应矩阵不符合模型,称为外单应性矩阵。为了保证准确性,重复上述过程N2次(N2由公式4确定),保留t2最大时对应符合模型的所有单应性矩阵将这些单应性矩阵作为目标单应性矩阵。The method of obtaining the target homography matrix can be achieved through the following steps. First, two homography matrices are randomly selected , calculate ICA by formula (5), that is, B=K -T K -1 , and then calculate each homography matrix separately Distance d 2 from ICA, where d 2 =(h 1 T K -T K -1 h 2 ) 2 +(h 1 T K -T K -1 h 1 -1) 2 +(h 2 T K -T K - 1h 2 -1) 2 (6); the second preset value is δ 2 , if d 2 <δ 2 , the homography matrix meets the requirements of the model, it is called the inner homography matrix, and it is recorded that The number t 2 of the homography matrix of the model; otherwise, the homography matrix does not conform to the model, which is called the outer homography matrix. In order to ensure accuracy, repeat the above process N 2 times (N 2 is determined by formula 4), and retain all homography matrices corresponding to the model when t 2 is the largest Let these homography matrices be the target homography matrices.
接下来执行步骤S105:根据所述目标单应性矩阵,获得目标二次曲线模型,并根据所述目标二次曲线模型获得相机的初始参数,所述初始参数包括第一内参和第一外参。Next, step S105 is performed: according to the target homography matrix, the target conic curve model is obtained, and the initial parameters of the camera are obtained according to the target conic curve model, and the initial parameters include the first internal parameter and the first external parameter .
在具体的实施过程中,利用前述步骤得到的目标单应性矩阵,并采用最小二乘法重新估计模型得到精确的ICA模型,然后线性计算得到相机的初始参数。In the specific implementation process, the target homography matrix obtained in the previous steps is used, and the least square method is used to re-estimate the model to obtain an accurate ICA model, and then the initial parameters of the camera are obtained by linear calculation.
最后来执行步骤S106:采用最大似然估计的方法对所述初始参数进行估计,获得目标参数,所述目标参数包括第二内参、第二外参和第二畸变系数,利用所述目标参数对相机进行标定。Finally, step S106 is executed: using the method of maximum likelihood estimation to estimate the initial parameters to obtain the target parameters, the target parameters include the second internal parameter, the second external parameter and the second distortion coefficient, and use the target parameter to The camera is calibrated.
在具体的实施过程中,利用步骤S105得到的初始参数作为封闭解,并将这些封闭解作为初值,然后通过最大似然估计的方法对所有初始参数进行估计,包括第一内参、第一外参和第一畸变系数。并将第一畸变系数k1,k2初值设置为零。利用公式(7)优化得到精确的内参A,外参k1,k2,第二畸变系数Ri,ti In the specific implementation process, the initial parameters obtained in step S105 are used as closed solutions, and these closed solutions are used as initial values, and then all initial parameters are estimated by the method of maximum likelihood estimation, including the first internal parameter, the first external parameter and the first distortion coefficient. And the initial values of the first distortion coefficients k 1 and k 2 are set to zero. Use formula (7) to optimize and obtain accurate internal reference A, external reference k 1 , k 2 , second distortion coefficient R i , t i
其中,n表示剔除低质量标定图像后最终用于标定的图像数量,mi表示第i幅标定图像中剔除低精度角点后用于计算单应性矩阵角点的数量,mij表示第i幅图像中第j个角点的坐标,Mj表示mij对应的已知世界坐标,表示Mj的重投影坐标。利用前述步骤得到的封闭解A,Ri和k1=0,k2=0作为初值,通过Levenberg-Marquarat迭代优化算法对公式(7)进行求解,从而得到精确的目标参数,所述目标参数包括A,Ri,ti,k1,k2,即相机的第二内参、第二外参和第二畸变系数,再通过上述目标参数对相机进行标定,完成相机的高精度标定。Among them, n represents the number of images finally used for calibration after removing low-quality calibration images, m i represents the number of corner points used to calculate the homography matrix after eliminating low-precision corner points in the i-th calibration image, m ij represents the number of corner points in the i-th calibration image The coordinates of the jth corner point in the image, M j represents the known world coordinates corresponding to m ij , denote the reprojected coordinates of Mj . Using the closed solution A, R i and k 1 =0, k 2 =0 obtained in the previous steps as initial values, the formula (7) is solved by the Levenberg-Marquarat iterative optimization algorithm, so as to obtain accurate target parameters, and the target The parameters include A, R i , t i , k 1 , k 2 , namely the second internal parameter, the second external parameter and the second distortion coefficient of the camera, and then the camera is calibrated through the above target parameters to complete the high-precision calibration of the camera.
基于同样的发明构思,本发明实施例还提供了一种与基于二维平面模板的相机标定方法相对应的系统,具体参见实施例二。Based on the same inventive concept, an embodiment of the present invention also provides a system corresponding to a camera calibration method based on a two-dimensional plane template, see Embodiment 2 for details.
实施例二Embodiment two
本发明实施例二提供了一种基于二维平面模板的相机标定系统,请参见图2,所述系统包括:Embodiment 2 of the present invention provides a camera calibration system based on a two-dimensional plane template, please refer to FIG. 2 , the system includes:
获取模块201,用于获取棋盘格标定图像,所述标定图像包含多个角点;An acquisition module 201, configured to acquire a checkerboard calibration image, the calibration image including a plurality of corner points;
第一获得模块202,用于采用随机抽样一致性算法剔除所述多个角点中角点第一误差值大于第一预设值的角点,获得目标角点;The first obtaining module 202 is configured to use a random sampling consensus algorithm to eliminate the corner points whose first error value of the corner point is greater than the first preset value among the plurality of corner points, and obtain the target corner point;
第二获得模块203,用于根据所述目标角点的坐标和对应的世界坐标,获得所述棋盘格标定图像所在的世界坐标系到像素坐标系的单应性矩阵;The second obtaining module 203 is configured to obtain a homography matrix from the world coordinate system where the checkerboard calibration image is located to the pixel coordinate system according to the coordinates of the target corner point and the corresponding world coordinates;
第三获得模块204,用于采用随机抽样一致性算法剔除第二误差值大于第二预设值的单应性矩阵,获得目标单应性矩阵;The third obtaining module 204 is configured to use a random sampling consensus algorithm to eliminate homography matrices whose second error value is greater than a second preset value, so as to obtain a target homography matrix;
第四获得模块205,用于根据所述目标单应性矩阵,获得目标二次曲线模型,并根据所述目标二次曲线模型获得相机的初始参数,所述初始参数包括第一内参、第一外参和第一畸变系数;The fourth obtaining module 205 is used to obtain the target conic curve model according to the target homography matrix, and obtain the initial parameters of the camera according to the target conic curve model, and the initial parameters include the first internal parameter, the first External parameters and the first distortion coefficient;
标定模块206,用于采用最大似然估计的方法对所述初始参数进行估计,获得目标参数,所述目标参数包括第二内参、第二外参和第二畸变系数,利用所述目标参数对相机进行标定。The calibration module 206 is configured to estimate the initial parameters by means of maximum likelihood estimation to obtain target parameters, the target parameters include a second internal parameter, a second external parameter and a second distortion coefficient, and use the target parameters to The camera is calibrated.
在本实施例提供的系统中,所述第一获得模202,还用于:In the system provided in this embodiment, the first obtaining module 202 is also used for:
获取角点的重投影坐标;Get the reprojected coordinates of the corner points;
获取所述角点的重投影坐标与所述角点的初始坐标之间的第一距离;Obtaining a first distance between the reprojected coordinates of the corner point and the initial coordinates of the corner point;
采用随机抽样一致性算法剔除所述第一距离大于第一预设值所对应的角点,从而获得目标角点。A random sampling consensus algorithm is used to eliminate the corner points corresponding to the first distance greater than the first preset value, so as to obtain the target corner points.
在本实施例提供的系统中,所述第二获得模块203,还用于:In the system provided in this embodiment, the second obtaining module 203 is further configured to:
从所述棋盘格标定图像中随机选取四个角点,并获取所述四个角点的坐标;Randomly select four corner points from the checkerboard calibration image, and obtain the coordinates of the four corner points;
根据所述四个角点的坐标和四个角点对应的世界坐标,获得所述棋盘格标定图像所在的世界坐标系到像素坐标系的单应性矩阵。According to the coordinates of the four corner points and the world coordinates corresponding to the four corner points, a homography matrix from the world coordinate system where the checkerboard calibration image is located to the pixel coordinate system is obtained.
在本实施例提供的系统中,所述第三获得模块204还用于:In the system provided in this embodiment, the third obtaining module 204 is also used for:
根据单应性矩阵,获得预设二次曲线模型;Obtain a preset quadratic curve model according to the homography matrix;
获得所述单应性矩阵与所述二次曲线模型的第二距离,将所述第二距离作为差值;Obtaining a second distance between the homography matrix and the conic model, using the second distance as a difference;
如果所述差值大于所述第二预设值,则为不符合条件的单应性矩阵;If the difference is greater than the second preset value, it is an unqualified homography matrix;
从原始单应性矩阵中剔除所述不符合条件的单应性矩阵,获得目标单应性矩阵。The unqualified homography matrix is eliminated from the original homography matrix to obtain a target homography matrix.
在本实施例提供的系统中,所述棋盘格标定图像包括多张,且不同的标定图像与标定相机的角度不相同。In the system provided in this embodiment, the checkerboard calibration image includes multiple pieces, and different calibration images have different angles from the calibration camera.
实施例一中的基于的各种变化方式和具体实例同样适用于本实施例的系统,通过前述对的详细描述,本领域技术人员可以清楚的知道本实施例中的,所以为了说明书的简洁,在此不再详述。The various variations and specific examples based on the first embodiment are also applicable to the system of this embodiment. Those skilled in the art can clearly understand the above-mentioned detailed descriptions in this embodiment. Therefore, for the sake of brevity in the description, It will not be described in detail here.
基于同样的发明构思,本发明实施例还提供了一种与基于二维平面模板的相机标定方法相对应的计算机可读介质,具体参见实施例三。Based on the same inventive concept, an embodiment of the present invention also provides a computer-readable medium corresponding to a camera calibration method based on a two-dimensional planar template, see Embodiment 3 for details.
实施例三Embodiment three
本发明实施例三提供了一种计算机可读存储介质300,请参见图3,其上存储有计算机程序301,该程序被处理器执行时实现以下步骤:Embodiment 3 of the present invention provides a computer-readable storage medium 300, referring to FIG. 3 , on which a computer program 301 is stored. When the program is executed by a processor, the following steps are implemented:
获取棋盘格标定图像,所述标定图像包含多个角点;Obtain a checkerboard calibration image, the calibration image includes a plurality of corner points;
采用随机抽样一致性算法剔除所述多个角点中角点第一误差值大于第一预设值的角点,获得目标角点;Using a random sampling consensus algorithm to eliminate the corner points whose first error value of the corner point is greater than the first preset value among the plurality of corner points, to obtain the target corner point;
根据所述目标角点的坐标和对应的世界坐标,获得所述棋盘格标定图像所在的世界坐标系到像素坐标系的单应性矩阵;Obtain a homography matrix from the world coordinate system where the checkerboard calibration image is located to the pixel coordinate system according to the coordinates of the target corner points and the corresponding world coordinates;
采用随机抽样一致性算法剔除第二误差值大于第二预设值的单应性矩阵,获得目标单应性矩阵;Using a random sampling consensus algorithm to eliminate homography matrices whose second error value is greater than a second preset value to obtain a target homography matrix;
根据所述目标单应性矩阵,获得目标二次曲线模型,并根据所述目标二次曲线模型获得相机的初始参数,所述初始参数包括第一内参、第一外参和第一畸变系数;Obtain a target conic model according to the target homography matrix, and obtain initial parameters of the camera according to the target conic model, where the initial parameters include a first internal parameter, a first external parameter, and a first distortion coefficient;
采用最大似然估计的方法对所述初始参数进行估计,获得目标参数,所述目标参数包括第二内参、第二外参和第二畸变系数,利用所述目标参数对相机进行标定。The initial parameters are estimated by a maximum likelihood estimation method to obtain target parameters, the target parameters include a second internal parameter, a second external parameter and a second distortion coefficient, and the camera is calibrated using the target parameters.
实施例一中的标定方法的各种变化方式和具体实例同样适用于本实施例的计算机可读介质,通过前述对相机标定方法的详细描述,本领域技术人员可以清楚的知道本实施例中的计算机可读介质,所以为了说明书的简洁,在此不再详述。Various variations and specific examples of the calibration method in Embodiment 1 are also applicable to the computer-readable medium of this embodiment. Through the foregoing detailed description of the camera calibration method, those skilled in the art can clearly know the computer-readable medium, so for the sake of brevity of the description, it will not be described in detail here.
基于同样的发明构思,本发明实施例还提供了一种与基于二维平面模板的相机标定方法相对应的计算机设备,具体参见实施例四。Based on the same inventive concept, an embodiment of the present invention also provides a computer device corresponding to a camera calibration method based on a two-dimensional plane template, see Embodiment 4 for details.
实施例四Embodiment four
本发明实施例三提供了一种计算机设备,请参见图4,包括存储器401、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现以下步骤:Embodiment 3 of the present invention provides a computer device, please refer to FIG. 4 , which includes a memory 401, a processor, and a computer program stored in the memory and operable on the processor. When the processor executes the program, it implements the following step:
获取棋盘格标定图像,所述标定图像包含多个角点;Obtain a checkerboard calibration image, the calibration image includes a plurality of corner points;
采用随机抽样一致性算法剔除所述多个角点中角点第一误差值大于第一预设值的角点,获得目标角点;Using a random sampling consensus algorithm to eliminate the corner points whose first error value of the corner point is greater than the first preset value among the plurality of corner points, to obtain the target corner point;
根据所述目标角点的坐标和对应的世界坐标,获得所述棋盘格标定图像所在的世界坐标系到像素坐标系的单应性矩阵;Obtain a homography matrix from the world coordinate system where the checkerboard calibration image is located to the pixel coordinate system according to the coordinates of the target corner points and the corresponding world coordinates;
采用随机抽样一致性算法剔除第二误差值大于第二预设值的单应性矩阵,获得目标单应性矩阵;Using a random sampling consensus algorithm to eliminate homography matrices whose second error value is greater than a second preset value to obtain a target homography matrix;
根据所述目标单应性矩阵,获得目标二次曲线模型,并根据所述目标二次曲线模型获得相机的初始参数,所述初始参数包括第一内参、第一外参和第一畸变系数;Obtain a target conic model according to the target homography matrix, and obtain initial parameters of the camera according to the target conic model, where the initial parameters include a first internal parameter, a first external parameter, and a first distortion coefficient;
采用最大似然估计的方法对所述初始参数进行估计,获得目标参数,所述目标参数包括第二内参、第二外参和第二畸变系数,利用所述目标参数对相机进行标定。The initial parameters are estimated by a maximum likelihood estimation method to obtain target parameters, the target parameters include a second internal parameter, a second external parameter and a second distortion coefficient, and the camera is calibrated using the target parameters.
为了便于说明,图4仅示出了与本发明实施例相关的部分,具体技术细节未揭示的,请参照本发明实施例方法部分。其中,存储器401可用于存储软件程序以及模块,处理器402通过运行执行存储在存储器401的软件程序以及模块,从而执行移动终端的各种功能应用以及数据处理。For ease of description, FIG. 4 only shows the parts related to the embodiment of the present invention. For specific technical details not disclosed, please refer to the method part of the embodiment of the present invention. Wherein, the memory 401 can be used to store software programs and modules, and the processor 402 executes various functional applications and data processing of the mobile terminal by running and executing the software programs and modules stored in the memory 401 .
存储器401可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等;存储数据区可存储根据计算机设备的使用所创建的数据等。处理器402移动通信终端的控制中心,利用各种接口和线路连接整个移动通信终端的各个部分,通过运行或执行存储在存储器401内的软件程序和/或模块,以及调用存储在存储器401内的数据,执行移动终端机的各种功能和处理数据,从而对移动终端机进行整体监控。可选的,处理器402可包括一个或多个处理单元。The memory 401 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function, etc.; the data storage area may store data created according to the use of the computer device, etc. The processor 402 is the control center of the mobile communication terminal, which uses various interfaces and lines to connect various parts of the entire mobile communication terminal, and runs or executes software programs and/or modules stored in the memory 401, and calls stored in the memory 401. Data, execute various functions of the mobile terminal and process data, so as to monitor the mobile terminal as a whole. Optionally, the processor 402 may include one or more processing units.
实施例一中的标定方法的各种变化方式和具体实例同样适用于本实施例的计算机设备,通过前述对相机标定方法的详细描述,本领域技术人员可以清楚的知道本实施例中的计算机设备,所以为了说明书的简洁,在此不再详述。Various variations and specific examples of the calibration method in Embodiment 1 are also applicable to the computer device in this embodiment. Through the foregoing detailed description of the camera calibration method, those skilled in the art can clearly know that the computer device in this embodiment , so for the sake of brevity of the description, it will not be described in detail here.
本发明实施例中提供的一个或多个技术方案,至少具有如下技术效果或优点:One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages:
本申请实施例提供了一种基于二维平面模板的相机标定方法,所述方法包括:获取棋盘格标定图像,所述标定图像包含多个角点;采用随机抽样一致性算法剔除所述多个角点中角点第一误差值大于第一预设值的角点,获得目标角点;根据所述目标角点的坐标和对应的世界坐标,获得所述棋盘格标定图像所在的世界坐标系到像素坐标系的单应性矩阵;采用随机抽样一致性算法剔除第二误差值大于第二预设值的单应性矩阵,获得目标单应性矩阵;根据所述目标单应性矩阵,获得目标二次曲线模型,并根据所述目标二次曲线模型获得相机的初始参数,所述初始参数包括第一内参和第一外参;采用最大似然估计的方法对所述初始参数进行估计,获得目标参数,所述目标参数包括第二内参、第二外参和畸变系数,利用所述目标参数对相机进行标定。本发明提供的上述方法中,一方面,在获取初值时,采用随机抽样一致性算法剔除了多个角点中角点误差值大于第一预设值的角点,从而获得目标角点,然后再根据目标角点计算单应性矩阵,由于剔除了精度较低的角点,从而可以提高单应性矩阵计算的准确性,从而提高标定精度,另一方面,采用随机抽样一致性算法剔除了误差值大于第二预设值的单应性矩阵,从而获得目标单应性矩阵,然后再根据所述目标单应性矩阵对标定参数进行求解,由于剔除了低质量的标定图像,从而可以进一步提高标定的精度,解决了现有张正友标定方法存在相机标定的准确性和鲁棒性不高的技术问题。An embodiment of the present application provides a camera calibration method based on a two-dimensional plane template, the method comprising: acquiring a checkerboard calibration image, the calibration image contains multiple corner points; Among the corner points, the first error value of the corner point is greater than the first preset value, and the target corner point is obtained; according to the coordinates of the target corner point and the corresponding world coordinates, the world coordinate system where the checkerboard calibration image is located is obtained. To the homography matrix of the pixel coordinate system; using the random sampling consensus algorithm to eliminate the homography matrix whose second error value is greater than the second preset value, and obtain the target homography matrix; according to the target homography matrix, obtain A target quadratic curve model, and obtain initial parameters of the camera according to the target quadratic curve model, the initial parameters include a first internal parameter and a first external parameter; the initial parameters are estimated by a method of maximum likelihood estimation, A target parameter is obtained, the target parameter includes a second internal parameter, a second external parameter and a distortion coefficient, and the camera is calibrated by using the target parameter. In the above method provided by the present invention, on the one hand, when obtaining the initial value, the random sampling consensus algorithm is used to eliminate the corner points whose corner point error value is greater than the first preset value among the multiple corner points, thereby obtaining the target corner point, Then calculate the homography matrix according to the target corner points. Since the corner points with low precision are eliminated, the accuracy of the homography matrix calculation can be improved, thereby improving the calibration accuracy. On the other hand, the random sampling consistency algorithm is used to eliminate The homography matrix whose error value is greater than the second preset value is obtained to obtain the target homography matrix, and then the calibration parameters are solved according to the target homography matrix. Since the low-quality calibration image is eliminated, it can be The accuracy of the calibration is further improved, and the technical problem of low camera calibration accuracy and robustness in the existing Zhang Zhengyou calibration method is solved.
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。While preferred embodiments of the invention have been described, additional changes and modifications to these embodiments can be made by those skilled in the art once the basic inventive concept is appreciated. Therefore, it is intended that the appended claims be construed to cover the preferred embodiment as well as all changes and modifications which fall within the scope of the invention.
显然,本领域的技术人员可以对本发明实施例进行各种改动和变型而不脱离本发明实施例的精神和范围。这样,倘若本发明实施例的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。Apparently, those skilled in the art can make various changes and modifications to the embodiments of the present invention without departing from the spirit and scope of the embodiments of the present invention. In this way, if the modifications and variations of the embodiments of the present invention fall within the scope of the claims of the present invention and equivalent technologies, the present invention also intends to include these modifications and variations.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710674279.5A CN107633536B (en) | 2017-08-09 | 2017-08-09 | Camera calibration method and system based on two-dimensional plane template |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710674279.5A CN107633536B (en) | 2017-08-09 | 2017-08-09 | Camera calibration method and system based on two-dimensional plane template |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN107633536A true CN107633536A (en) | 2018-01-26 |
| CN107633536B CN107633536B (en) | 2020-04-17 |
Family
ID=61099131
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710674279.5A Expired - Fee Related CN107633536B (en) | 2017-08-09 | 2017-08-09 | Camera calibration method and system based on two-dimensional plane template |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN107633536B (en) |
Cited By (47)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108447095A (en) * | 2018-01-31 | 2018-08-24 | 潍坊歌尔电子有限公司 | A kind of fisheye camera scaling method and device |
| CN108510551A (en) * | 2018-04-25 | 2018-09-07 | 上海大学 | Method and system for calibrating camera parameters under long-distance and large field of view conditions |
| CN108682037A (en) * | 2018-04-27 | 2018-10-19 | 腾讯科技(深圳)有限公司 | Method for relocating, device, equipment and the storage medium of camera posture tracing process |
| CN108734744A (en) * | 2018-04-28 | 2018-11-02 | 国网山西省电力公司电力科学研究院 | A kind of remote big field-of-view binocular scaling method based on total powerstation |
| CN108876854A (en) * | 2018-04-27 | 2018-11-23 | 腾讯科技(深圳)有限公司 | Method for relocating, device, equipment and the storage medium of camera posture tracing process |
| CN108895959A (en) * | 2018-04-27 | 2018-11-27 | 电子科技大学 | A kind of camera calibration plate angle point calculating method based on sub-pix |
| CN109003312A (en) * | 2018-08-24 | 2018-12-14 | 重庆邮电大学 | A kind of camera calibration method based on nonlinear optimization |
| CN109146932A (en) * | 2018-07-17 | 2019-01-04 | 北京旷视科技有限公司 | Determine the methods, devices and systems of the world coordinates of target point in image |
| CN109242910A (en) * | 2018-08-21 | 2019-01-18 | 电子科技大学 | A kind of monocular camera self-calibrating method based on any known flat shape |
| CN109521781A (en) * | 2018-10-30 | 2019-03-26 | 普宙飞行器科技(深圳)有限公司 | Unmanned plane positioning system, unmanned plane and unmanned plane localization method |
| CN109658465A (en) * | 2018-12-07 | 2019-04-19 | 广州华端科技有限公司 | Data processing, image rebuilding method and device in image reconstruction process |
| CN109753930A (en) * | 2019-01-03 | 2019-05-14 | 京东方科技集团股份有限公司 | Method for detecting human face and face detection system |
| CN110298892A (en) * | 2019-07-05 | 2019-10-01 | 河南科技大学 | A kind of single line array camera inside and outside parameter scaling method |
| CN110345875A (en) * | 2018-04-04 | 2019-10-18 | 灵动科技(北京)有限公司 | Calibration and distance measuring method, device, electronic equipment and computer readable storage medium |
| CN110728714A (en) * | 2018-07-16 | 2020-01-24 | Oppo广东移动通信有限公司 | Image processing method and device, storage medium and electronic equipment |
| CN110866956A (en) * | 2019-10-28 | 2020-03-06 | 中国科学院深圳先进技术研究院 | Robot calibration method and terminal |
| CN111047614A (en) * | 2019-10-10 | 2020-04-21 | 南昌市微轲联信息技术有限公司 | Feature extraction-based method for extracting target corner of complex scene image |
| CN111311491A (en) * | 2020-01-20 | 2020-06-19 | 当家移动绿色互联网技术集团有限公司 | Image processing method and device, storage medium and electronic equipment |
| CN111429532A (en) * | 2020-04-30 | 2020-07-17 | 南京大学 | Method for improving camera calibration accuracy by utilizing multi-plane calibration plate |
| CN111566701A (en) * | 2020-04-02 | 2020-08-21 | 深圳市瑞立视多媒体科技有限公司 | Method, device, equipment and storage medium for edge-scanning calibration in large space environment |
| CN111652937A (en) * | 2019-03-04 | 2020-09-11 | 广州汽车集团股份有限公司 | Vehicle camera calibration method and device |
| CN111833404A (en) * | 2019-04-23 | 2020-10-27 | 鸿富锦精密电子(天津)有限公司 | Camera calibration system and camera calibration method |
| CN111951335A (en) * | 2020-08-13 | 2020-11-17 | 珠海格力电器股份有限公司 | Method, device, processor and image acquisition system for determining camera calibration parameters |
| CN112541950A (en) * | 2019-09-20 | 2021-03-23 | 杭州海康机器人技术有限公司 | Method and device for calibrating external parameter of depth camera |
| CN112634375A (en) * | 2020-12-21 | 2021-04-09 | 杭州东信北邮信息技术有限公司 | Plane calibration and three-dimensional reconstruction method in AI intelligent detection |
| CN112907674A (en) * | 2019-11-19 | 2021-06-04 | 初速度(苏州)科技有限公司 | Camera calibration method and device for unmanned vehicle |
| CN112907677A (en) * | 2019-12-04 | 2021-06-04 | 杭州海康威视数字技术股份有限公司 | Camera calibration method and device for single-frame image and storage medium |
| CN113192145A (en) * | 2021-05-08 | 2021-07-30 | 深圳市商汤科技有限公司 | Equipment calibration method and device, electronic equipment and storage medium |
| CN113256725A (en) * | 2020-02-10 | 2021-08-13 | 武汉Tcl集团工业研究院有限公司 | Camera calibration method and device and storage medium |
| CN113284190A (en) * | 2021-06-09 | 2021-08-20 | 上海商汤临港智能科技有限公司 | Calibration method, calibration device, calibration equipment, storage medium and product |
| CN113516719A (en) * | 2021-04-21 | 2021-10-19 | 深圳臻像科技有限公司 | Camera calibration method, system and storage medium based on multiple homography matrixes |
| CN113706632A (en) * | 2021-08-31 | 2021-11-26 | 上海景吾智能科技有限公司 | Calibration method and system based on three-dimensional visual calibration plate |
| CN114511640A (en) * | 2020-11-17 | 2022-05-17 | 北京四维图新科技股份有限公司 | A method, device and storage medium for camera calibration using map |
| CN114549658A (en) * | 2022-02-18 | 2022-05-27 | 北京达佳互联信息技术有限公司 | Camera calibration method and device and electronic equipment |
| CN114549652A (en) * | 2022-01-13 | 2022-05-27 | 湖南视比特机器人有限公司 | Camera calibration method, device, equipment and computer readable medium |
| CN114663533A (en) * | 2022-04-15 | 2022-06-24 | 南京大学 | Multi-view camera calibration method and system based on nonlinear optimization |
| CN115439550A (en) * | 2021-11-01 | 2022-12-06 | 天津五八驾考信息技术有限公司 | Camera calibration method, distance measurement method, equipment and storage medium |
| CN115880374A (en) * | 2022-12-29 | 2023-03-31 | 深圳市识渊科技有限公司 | Tensor parallel computation accelerated camera checkerboard calibration method, device and equipment |
| CN116128973A (en) * | 2023-01-04 | 2023-05-16 | 浙江零跑科技股份有限公司 | Calibration method for multiple vehicle-mounted cameras and intelligent automobile |
| CN116403156A (en) * | 2023-03-15 | 2023-07-07 | 上海仙工智能科技有限公司 | A method and system for managing warehouse locations based on visual recognition |
| CN116912324A (en) * | 2023-07-07 | 2023-10-20 | 珠海一微半导体股份有限公司 | A camera internal parameter calibration method |
| CN117226853A (en) * | 2023-11-13 | 2023-12-15 | 之江实验室 | A method, device, storage medium and equipment for robot kinematics calibration |
| WO2024011764A1 (en) * | 2022-07-11 | 2024-01-18 | 深圳思谋信息科技有限公司 | Calibration parameter determination method and apparatus, hybrid calibration board, device, and medium |
| CN118247360A (en) * | 2024-04-18 | 2024-06-25 | 镁佳(北京)科技有限公司 | Calibration method, device, equipment, storage medium and program product for camera internal and external parameters |
| CN118238148A (en) * | 2024-05-13 | 2024-06-25 | 北京迁移科技有限公司 | Hand-eye calibration system, method, readable storage medium and computer program product |
| CN118505816A (en) * | 2024-05-21 | 2024-08-16 | 中国汽车工程研究院股份有限公司 | Visual calibration and parameter correction method and system |
| CN120070600A (en) * | 2025-04-28 | 2025-05-30 | 北京思谋智能科技有限公司 | Camera calibration method, device, equipment and computer readable storage medium |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20090245690A1 (en) * | 2008-03-26 | 2009-10-01 | City University Of Hong Kong | Auto-calibration method for a projector-camera system |
| CN101673397A (en) * | 2009-09-30 | 2010-03-17 | 青岛大学 | Digital camera nonlinear calibration method based on LCDs |
| CN104851104A (en) * | 2015-05-29 | 2015-08-19 | 大连理工大学 | Flexible-target-based close-range large-field-of-view calibrate method of high-speed camera |
| CN105100640A (en) * | 2015-01-23 | 2015-11-25 | 武汉智源泉信息科技有限公司 | Local registration parallel video stitching method and local registration parallel video stitching system |
| CN105488810A (en) * | 2016-01-20 | 2016-04-13 | 东南大学 | Focused light field camera internal and external parameter calibration method |
-
2017
- 2017-08-09 CN CN201710674279.5A patent/CN107633536B/en not_active Expired - Fee Related
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20090245690A1 (en) * | 2008-03-26 | 2009-10-01 | City University Of Hong Kong | Auto-calibration method for a projector-camera system |
| CN101673397A (en) * | 2009-09-30 | 2010-03-17 | 青岛大学 | Digital camera nonlinear calibration method based on LCDs |
| CN105100640A (en) * | 2015-01-23 | 2015-11-25 | 武汉智源泉信息科技有限公司 | Local registration parallel video stitching method and local registration parallel video stitching system |
| CN104851104A (en) * | 2015-05-29 | 2015-08-19 | 大连理工大学 | Flexible-target-based close-range large-field-of-view calibrate method of high-speed camera |
| CN105488810A (en) * | 2016-01-20 | 2016-04-13 | 东南大学 | Focused light field camera internal and external parameter calibration method |
Non-Patent Citations (4)
| Title |
|---|
| ZUWHAN KIM等: "Camera calibration from orthogonally projected coordinates with noisy-RANSAC", 《IEEE》 * |
| 周剑军等: "基于RANSAC的图像拼接方法", 《计算机工程与设计》 * |
| 杨超等: "基于Harris角点和改进SURF描述子的图像快速拼接", 《现代电子技术》 * |
| 黄春燕: "双目立体相机标定算法研究与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (74)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108447095A (en) * | 2018-01-31 | 2018-08-24 | 潍坊歌尔电子有限公司 | A kind of fisheye camera scaling method and device |
| CN110345875A (en) * | 2018-04-04 | 2019-10-18 | 灵动科技(北京)有限公司 | Calibration and distance measuring method, device, electronic equipment and computer readable storage medium |
| CN110345875B (en) * | 2018-04-04 | 2021-04-27 | 灵动科技(北京)有限公司 | Calibration and ranging method, device, electronic equipment and computer readable storage medium |
| CN108510551A (en) * | 2018-04-25 | 2018-09-07 | 上海大学 | Method and system for calibrating camera parameters under long-distance and large field of view conditions |
| US11276183B2 (en) | 2018-04-27 | 2022-03-15 | Tencent Technology (Shenzhen) Company Limited | Relocalization method and apparatus in camera pose tracking process, device, and storage medium |
| CN108876854A (en) * | 2018-04-27 | 2018-11-23 | 腾讯科技(深圳)有限公司 | Method for relocating, device, equipment and the storage medium of camera posture tracing process |
| CN108682037A (en) * | 2018-04-27 | 2018-10-19 | 腾讯科技(深圳)有限公司 | Method for relocating, device, equipment and the storage medium of camera posture tracing process |
| CN108895959B (en) * | 2018-04-27 | 2020-03-27 | 电子科技大学 | A sub-pixel-based camera calibration board corner calculation method |
| CN108895959A (en) * | 2018-04-27 | 2018-11-27 | 电子科技大学 | A kind of camera calibration plate angle point calculating method based on sub-pix |
| CN108876854B (en) * | 2018-04-27 | 2022-03-08 | 腾讯科技(深圳)有限公司 | Method, device and equipment for relocating camera attitude tracking process and storage medium |
| CN108682037B (en) * | 2018-04-27 | 2022-03-08 | 腾讯科技(深圳)有限公司 | Method, device and equipment for relocating camera attitude tracking process and storage medium |
| CN108734744A (en) * | 2018-04-28 | 2018-11-02 | 国网山西省电力公司电力科学研究院 | A kind of remote big field-of-view binocular scaling method based on total powerstation |
| CN108734744B (en) * | 2018-04-28 | 2022-02-18 | 国网山西省电力公司电力科学研究院 | Long-distance large-view-field binocular calibration method based on total station |
| CN110728714A (en) * | 2018-07-16 | 2020-01-24 | Oppo广东移动通信有限公司 | Image processing method and device, storage medium and electronic equipment |
| CN110728714B (en) * | 2018-07-16 | 2023-06-20 | Oppo广东移动通信有限公司 | Image processing method and device, storage medium and electronic equipment |
| CN109146932A (en) * | 2018-07-17 | 2019-01-04 | 北京旷视科技有限公司 | Determine the methods, devices and systems of the world coordinates of target point in image |
| CN109242910A (en) * | 2018-08-21 | 2019-01-18 | 电子科技大学 | A kind of monocular camera self-calibrating method based on any known flat shape |
| CN109242910B (en) * | 2018-08-21 | 2021-10-08 | 电子科技大学 | A Monocular Camera Self-Calibration Method Based on Any Known Plane Shape |
| CN109003312B (en) * | 2018-08-24 | 2022-01-28 | 重庆邮电大学 | Camera calibration method based on nonlinear optimization |
| CN109003312A (en) * | 2018-08-24 | 2018-12-14 | 重庆邮电大学 | A kind of camera calibration method based on nonlinear optimization |
| CN109521781A (en) * | 2018-10-30 | 2019-03-26 | 普宙飞行器科技(深圳)有限公司 | Unmanned plane positioning system, unmanned plane and unmanned plane localization method |
| CN109658465A (en) * | 2018-12-07 | 2019-04-19 | 广州华端科技有限公司 | Data processing, image rebuilding method and device in image reconstruction process |
| CN109753930A (en) * | 2019-01-03 | 2019-05-14 | 京东方科技集团股份有限公司 | Method for detecting human face and face detection system |
| CN111652937B (en) * | 2019-03-04 | 2023-11-03 | 广州汽车集团股份有限公司 | Vehicle-mounted camera calibration method and device |
| CN111652937A (en) * | 2019-03-04 | 2020-09-11 | 广州汽车集团股份有限公司 | Vehicle camera calibration method and device |
| CN111833404A (en) * | 2019-04-23 | 2020-10-27 | 鸿富锦精密电子(天津)有限公司 | Camera calibration system and camera calibration method |
| CN111833404B (en) * | 2019-04-23 | 2023-10-31 | 富联精密电子(天津)有限公司 | Camera correction system and camera correction method |
| CN110298892B (en) * | 2019-07-05 | 2022-10-11 | 河南科技大学 | Method for calibrating internal and external parameters of single-line-array camera |
| CN110298892A (en) * | 2019-07-05 | 2019-10-01 | 河南科技大学 | A kind of single line array camera inside and outside parameter scaling method |
| CN112541950A (en) * | 2019-09-20 | 2021-03-23 | 杭州海康机器人技术有限公司 | Method and device for calibrating external parameter of depth camera |
| CN111047614A (en) * | 2019-10-10 | 2020-04-21 | 南昌市微轲联信息技术有限公司 | Feature extraction-based method for extracting target corner of complex scene image |
| CN111047614B (en) * | 2019-10-10 | 2023-09-29 | 南昌市微轲联信息技术有限公司 | Feature extraction-based method for extracting target corner of complex scene image |
| CN110866956A (en) * | 2019-10-28 | 2020-03-06 | 中国科学院深圳先进技术研究院 | Robot calibration method and terminal |
| CN112907674B (en) * | 2019-11-19 | 2022-06-07 | 魔门塔(苏州)科技有限公司 | Camera calibration method and device for unmanned vehicle |
| CN112907674A (en) * | 2019-11-19 | 2021-06-04 | 初速度(苏州)科技有限公司 | Camera calibration method and device for unmanned vehicle |
| CN112907677A (en) * | 2019-12-04 | 2021-06-04 | 杭州海康威视数字技术股份有限公司 | Camera calibration method and device for single-frame image and storage medium |
| CN111311491A (en) * | 2020-01-20 | 2020-06-19 | 当家移动绿色互联网技术集团有限公司 | Image processing method and device, storage medium and electronic equipment |
| CN111311491B (en) * | 2020-01-20 | 2020-12-04 | 当家移动绿色互联网技术集团有限公司 | Image processing method and device, storage medium and electronic equipment |
| CN113256725B (en) * | 2020-02-10 | 2023-06-20 | 武汉Tcl集团工业研究院有限公司 | Camera calibration method, device and storage medium |
| CN113256725A (en) * | 2020-02-10 | 2021-08-13 | 武汉Tcl集团工业研究院有限公司 | Camera calibration method and device and storage medium |
| CN111566701B (en) * | 2020-04-02 | 2021-10-15 | 深圳市瑞立视多媒体科技有限公司 | Method, device, equipment and storage medium for edge-scanning calibration in large space environment |
| CN111566701A (en) * | 2020-04-02 | 2020-08-21 | 深圳市瑞立视多媒体科技有限公司 | Method, device, equipment and storage medium for edge-scanning calibration in large space environment |
| CN111429532A (en) * | 2020-04-30 | 2020-07-17 | 南京大学 | Method for improving camera calibration accuracy by utilizing multi-plane calibration plate |
| CN111951335A (en) * | 2020-08-13 | 2020-11-17 | 珠海格力电器股份有限公司 | Method, device, processor and image acquisition system for determining camera calibration parameters |
| CN114511640A (en) * | 2020-11-17 | 2022-05-17 | 北京四维图新科技股份有限公司 | A method, device and storage medium for camera calibration using map |
| CN112634375A (en) * | 2020-12-21 | 2021-04-09 | 杭州东信北邮信息技术有限公司 | Plane calibration and three-dimensional reconstruction method in AI intelligent detection |
| CN112634375B (en) * | 2020-12-21 | 2022-08-05 | 杭州东信北邮信息技术有限公司 | Plane calibration and three-dimensional reconstruction method in AI intelligent detection |
| CN113516719B (en) * | 2021-04-21 | 2023-08-15 | 深圳臻像科技有限公司 | Camera calibration method, system and storage medium based on multiple homography matrixes |
| CN113516719A (en) * | 2021-04-21 | 2021-10-19 | 深圳臻像科技有限公司 | Camera calibration method, system and storage medium based on multiple homography matrixes |
| CN113192145A (en) * | 2021-05-08 | 2021-07-30 | 深圳市商汤科技有限公司 | Equipment calibration method and device, electronic equipment and storage medium |
| CN113192145B (en) * | 2021-05-08 | 2023-02-28 | 深圳市商汤科技有限公司 | Equipment calibration method and device, electronic equipment and storage medium |
| CN113284190B (en) * | 2021-06-09 | 2023-04-25 | 上海临港绝影智能科技有限公司 | Calibration method, device, equipment, storage medium and product |
| CN113284190A (en) * | 2021-06-09 | 2021-08-20 | 上海商汤临港智能科技有限公司 | Calibration method, calibration device, calibration equipment, storage medium and product |
| CN113706632B (en) * | 2021-08-31 | 2024-01-16 | 上海景吾智能科技有限公司 | Calibration method and system based on three-dimensional visual calibration plate |
| CN113706632A (en) * | 2021-08-31 | 2021-11-26 | 上海景吾智能科技有限公司 | Calibration method and system based on three-dimensional visual calibration plate |
| CN115439550A (en) * | 2021-11-01 | 2022-12-06 | 天津五八驾考信息技术有限公司 | Camera calibration method, distance measurement method, equipment and storage medium |
| CN114549652A (en) * | 2022-01-13 | 2022-05-27 | 湖南视比特机器人有限公司 | Camera calibration method, device, equipment and computer readable medium |
| CN114549658A (en) * | 2022-02-18 | 2022-05-27 | 北京达佳互联信息技术有限公司 | Camera calibration method and device and electronic equipment |
| CN114663533A (en) * | 2022-04-15 | 2022-06-24 | 南京大学 | Multi-view camera calibration method and system based on nonlinear optimization |
| CN114663533B (en) * | 2022-04-15 | 2025-04-25 | 南京大学 | A multi-view camera calibration method and system based on nonlinear optimization |
| WO2024011764A1 (en) * | 2022-07-11 | 2024-01-18 | 深圳思谋信息科技有限公司 | Calibration parameter determination method and apparatus, hybrid calibration board, device, and medium |
| CN115880374A (en) * | 2022-12-29 | 2023-03-31 | 深圳市识渊科技有限公司 | Tensor parallel computation accelerated camera checkerboard calibration method, device and equipment |
| CN116128973A (en) * | 2023-01-04 | 2023-05-16 | 浙江零跑科技股份有限公司 | Calibration method for multiple vehicle-mounted cameras and intelligent automobile |
| CN116403156A (en) * | 2023-03-15 | 2023-07-07 | 上海仙工智能科技有限公司 | A method and system for managing warehouse locations based on visual recognition |
| CN116912324A (en) * | 2023-07-07 | 2023-10-20 | 珠海一微半导体股份有限公司 | A camera internal parameter calibration method |
| CN117226853A (en) * | 2023-11-13 | 2023-12-15 | 之江实验室 | A method, device, storage medium and equipment for robot kinematics calibration |
| CN117226853B (en) * | 2023-11-13 | 2024-02-06 | 之江实验室 | Robot kinematics calibration method, device, storage medium and equipment |
| CN118247360A (en) * | 2024-04-18 | 2024-06-25 | 镁佳(北京)科技有限公司 | Calibration method, device, equipment, storage medium and program product for camera internal and external parameters |
| CN118238148A (en) * | 2024-05-13 | 2024-06-25 | 北京迁移科技有限公司 | Hand-eye calibration system, method, readable storage medium and computer program product |
| CN118238148B (en) * | 2024-05-13 | 2024-10-25 | 北京迁移科技有限公司 | Hand-eye calibration system, method, readable storage medium and computer program product |
| CN118505816A (en) * | 2024-05-21 | 2024-08-16 | 中国汽车工程研究院股份有限公司 | Visual calibration and parameter correction method and system |
| CN118505816B (en) * | 2024-05-21 | 2024-12-03 | 中国汽车工程研究院股份有限公司 | Visual calibration and parameter correction method and system |
| CN120070600A (en) * | 2025-04-28 | 2025-05-30 | 北京思谋智能科技有限公司 | Camera calibration method, device, equipment and computer readable storage medium |
| CN120070600B (en) * | 2025-04-28 | 2025-11-28 | 北京思谋智能科技有限公司 | Camera calibration method, device, equipment and computer readable storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107633536B (en) | 2020-04-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107633536A (en) | A kind of camera calibration method and system based on two-dimensional planar template | |
| CN110689581B (en) | Structured light module calibration method, electronic device, and computer-readable storage medium | |
| CN111127422A (en) | Image annotation method, device, system and host | |
| CN113012234B (en) | High-precision camera calibration method based on plane transformation | |
| CN116433737B (en) | A method, apparatus, and intelligent terminal for lidar point cloud and image registration. | |
| CN112132906A (en) | A method and system for calibrating external parameters between a depth camera and a visible light camera | |
| CN109544643B (en) | Video camera image correction method and device | |
| CN104200454B (en) | Fisheye image distortion correction method and device | |
| WO2021004416A1 (en) | Method and apparatus for establishing beacon map on basis of visual beacons | |
| WO2018153374A1 (en) | Camera calibration | |
| CN111667536A (en) | Parameter calibration method based on zoom camera depth estimation | |
| CN113763478B (en) | Unmanned vehicle camera calibration method, device, equipment, storage medium and system | |
| CN112862895B (en) | A fisheye camera calibration method, device and system | |
| CN115564842A (en) | Parameter calibration method, device, equipment and storage medium of binocular fisheye camera | |
| JP2020523703A5 (en) | ||
| CN107194974A (en) | A kind of raising method of many mesh Camera extrinsic stated accuracies based on multiple identification scaling board image | |
| CN109003312B (en) | Camera calibration method based on nonlinear optimization | |
| US12260591B2 (en) | Method, apparatus and system for image processing | |
| CN106570907B (en) | Camera calibration method and device | |
| CN116051634A (en) | A visual positioning method, terminal and storage medium | |
| CN114897990A (en) | Camera distortion calibration method and system based on neural network and storage medium | |
| CN101577004A (en) | Rectification method for polar lines, appliance and system thereof | |
| CN113920196B (en) | Visual positioning method, device and computer equipment | |
| CN117333367A (en) | Image stitching method, system, medium and device based on image local features | |
| CN114820810A (en) | Analysis method based on Tsai camera plane calibration algorithm |
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 | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20200417 Termination date: 20200809 |