[go: up one dir, main page]

CN104077768B - Method and device for calibrating fish-eye lens radial distortion - Google Patents

Method and device for calibrating fish-eye lens radial distortion Download PDF

Info

Publication number
CN104077768B
CN104077768B CN201410244246.3A CN201410244246A CN104077768B CN 104077768 B CN104077768 B CN 104077768B CN 201410244246 A CN201410244246 A CN 201410244246A CN 104077768 B CN104077768 B CN 104077768B
Authority
CN
China
Prior art keywords
center
distortion
group
circular arc
circle
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.)
Expired - Fee Related
Application number
CN201410244246.3A
Other languages
Chinese (zh)
Other versions
CN104077768A (en
Inventor
杜歆
方奎
朱云芳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201410244246.3A priority Critical patent/CN104077768B/en
Publication of CN104077768A publication Critical patent/CN104077768A/en
Application granted granted Critical
Publication of CN104077768B publication Critical patent/CN104077768B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)

Abstract

本发明实施例公开一种鱼眼镜头径向畸变的标定方法及标定装置,其中方法包括如下步骤:获取包含至少两组空间平行直线的标定图像;对所述至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组进行拟合处理;根据拟合处理结果生成畸变标定模型,可以提高畸变标定模型的标定结果的准确率。

The embodiment of the present invention discloses a calibration method and calibration device for the radial distortion of a fisheye lens, wherein the method includes the following steps: acquiring a calibration image containing at least two sets of spatially parallel straight lines; The spatially parallel straight lines are fitted to the center-point collinear arc group mapped on the distorted image; the distortion calibration model is generated according to the fitting processing results, which can improve the accuracy of the calibration results of the distortion calibration model.

Description

一种鱼眼镜头径向畸变的标定方法及标定装置Calibration method and calibration device for radial distortion of fisheye lens

技术领域technical field

本发明涉及电子技术领域,尤其涉及一种鱼眼镜头径向畸变的标定方法及标定装置。The invention relates to the field of electronic technology, in particular to a calibration method and a calibration device for radial distortion of a fisheye lens.

背景技术Background technique

随着电子科技的不断开发和完善,相机、手机等具备照相、摄像功能的终端设备已经被广泛的运用到人们的日常生活中,为了增加拍摄图像的表现方式,用户通常会使用一些特殊效果的镜头,例如:鱼眼镜头、移轴镜头、微距镜头等,增加了图像拍摄的效果及种类。With the continuous development and improvement of electronic technology, cameras, mobile phones and other terminal devices with camera and video functions have been widely used in people's daily life. In order to increase the expression of captured images, users usually use some special effects Lenses, such as: fisheye lens, tilt-shift lens, macro lens, etc., increase the effect and variety of image shooting.

鱼眼镜头是一种极端的广角镜头,为使镜头达到最大的摄影视角,其前镜片的直径呈抛物状向镜头前部凸出,鱼眼镜头的视角力求达到或超出人眼所能看到的范围。因此,鱼眼镜头与人们眼中的真实世界的景象存在很大的差别。然而,鱼眼镜头所拍摄的图像存在多种类型的失真,其中径向失真被认为是影响图像质量的主要因素,由于传统的径向畸变的标定过程仅限于拟合单直线对应的圆弧来得到畸变参数,以生成畸变标定模型,导致该畸变标定模型的标定结果准确率低,无法很好的解决鱼眼镜头径向失真的问题。The fisheye lens is an extreme wide-angle lens. In order to achieve the maximum photographic viewing angle, the diameter of the front lens protrudes toward the front of the lens in a parabolic shape. The angle of view of the fisheye lens strives to reach or exceed what the human eye can see. scope. Therefore, there is a big difference between the fisheye lens and the real world scene in people's eyes. However, there are many types of distortion in the images captured by the fisheye lens, among which the radial distortion is considered to be the main factor affecting the image quality, because the traditional radial distortion calibration process is limited to fitting the arc corresponding to a single line to The distortion parameters are obtained to generate a distortion calibration model, which leads to a low accuracy rate of the calibration results of the distortion calibration model, and cannot well solve the problem of radial distortion of the fisheye lens.

发明内容Contents of the invention

本发明实施例提供一种鱼眼镜头径向畸变的标定方法及标定装置,可以提高畸变标定模型的标定结果的准确率。Embodiments of the present invention provide a calibration method and a calibration device for radial distortion of a fisheye lens, which can improve the accuracy of calibration results of a distortion calibration model.

为了解决上述技术问题,本发明实施例第一方面提供了一种鱼眼镜头径向畸变的标定方法,可包括:In order to solve the above technical problems, the first aspect of the embodiment of the present invention provides a method for calibrating the radial distortion of a fisheye lens, which may include:

获取包含至少两组空间平行直线的标定图像;Obtain a calibration image comprising at least two sets of spatially parallel straight lines;

对所述至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组进行拟合处理;performing fitting processing on the group of collinear arcs with the center of the circle mapped on the distorted image by each of the at least two groups of spatially parallel straight lines;

根据拟合处理结果生成畸变标定模型。A distortion calibration model is generated according to the fitting processing results.

基于第一方面,在第一方面的第一种可行的实施方式中,所述至少两组空间平行直线中任一组空间平行直线在畸变图像上均映射为一个圆心共线圆弧组,所述任一组空间平行直线中任一直线在畸变图像上映射的圆心共线圆弧组中均存在对应的一条圆弧。Based on the first aspect, in the first feasible implementation manner of the first aspect, any set of spatially parallel straight lines in the at least two groups of spatially parallel straight lines are mapped to a group of collinear arcs with centers of circles on the distorted image, so Any straight line in any set of spatially parallel straight lines has a corresponding arc in the center-collinear arc group mapped on the distorted image.

基于第一方面或第一方面的第一种可行的实施方式,在第一方面的第二种可行的实施方式中,所述对所述至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组进行拟合处理,包括:Based on the first aspect or the first feasible implementation manner of the first aspect, in the second feasible implementation manner of the first aspect, each set of spatially parallel straight lines in the at least two groups of spatially parallel straight lines is The center collinear arc group mapped on the distorted image is used for fitting processing, including:

采用预设的非线性优化算法,计算所述至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组的公共参数和比例系数;Using a preset non-linear optimization algorithm to calculate the common parameters and proportional coefficients of the center collinear arc group mapped on the distorted image by each group of spatial parallel straight lines in the at least two groups of spatial parallel straight lines;

采用所述公共参数和所述比例系数计算获取拟合处理结果,所述拟合处理结果包括各个所述圆心共线圆弧组中每条圆弧的参数化表示以及各个所述圆心共线圆弧组对应的两个公共交点;Using the public parameters and the proportional coefficient to calculate and obtain a fitting processing result, the fitting processing result includes a parametric representation of each arc in each of the center collinear arc groups and each of the center collinear circles The two public intersection points corresponding to the arc group;

其中,所述公共参数包括所述两个公共交点间连线的中点坐标以及所述中点到所述两个公共交点中任一交点的向量,所述比例系数包括各个所述圆心共线圆弧组中每条圆弧对应的预设系数。Wherein, the public parameters include the midpoint coordinates of the line between the two public intersections and the vector from the midpoint to any intersection point of the two public intersections, and the proportional coefficient includes the collinear The preset coefficient corresponding to each arc in the arc group.

基于第一方面的第二种可行的实施方式,在第一方面的第三种可行的实施方式中,所述采用预设的非线性优化算法,计算所述至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组的公共参数和比例系数,包括:Based on the second feasible implementation manner of the first aspect, in the third feasible implementation manner of the first aspect, the preset nonlinear optimization algorithm is used to calculate each of the at least two sets of spatially parallel straight lines The public parameters and scale coefficients of the group space parallel lines mapped on the distorted image and the collinear arc group, including:

获取所述至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组对应的平方距离最小化方程;Obtaining the square distance minimization equation corresponding to the group of collinear arcs with the centers of each group of the at least two groups of spatially parallel straight lines mapped on the distorted image;

采用预设的非线性优化算法对所述平方距离最小化方程进行计算,获取各个所述圆心共线圆弧组的公共参数和比例系数。A preset nonlinear optimization algorithm is used to calculate the square distance minimization equation to obtain the common parameters and proportional coefficients of each of the collinear arc groups with centers.

基于第一方面的第二种可行的实施方式,在第一方面的第四种可行的实施方式中,所述根据拟合处理结果生成畸变标定模型,包括:Based on the second feasible implementation manner of the first aspect, in the fourth feasible implementation manner of the first aspect, the generation of the distortion calibration model according to the fitting processing result includes:

根据拟合处理结果获取畸变中心点坐标和畸变参数;Obtain the coordinates of the distortion center point and the distortion parameters according to the fitting processing result;

采用所述畸变中心点坐标和所述畸变参数生成畸变标定模型。A distortion calibration model is generated by using the coordinates of the distortion center point and the distortion parameters.

基于第一方面的第四种可行的实施方式,在第一方面的第五种可行的实施方式中,所述根据拟合处理结果获取畸变中心点坐标和畸变参数,包括:Based on the fourth feasible implementation manner of the first aspect, in the fifth feasible implementation manner of the first aspect, the obtaining the distortion center point coordinates and distortion parameters according to the fitting processing result includes:

获取各个圆心共线圆弧组对应的两个公共交点的直线方程,并将所有直线方程的交点坐标确定为畸变中心点坐标;Obtain the straight line equations of the two common intersection points corresponding to the collinear arc groups of the respective circle centers, and determine the intersection coordinates of all straight line equations as the distortion center point coordinates;

根据所述畸变中心点坐标和任一圆心共线圆弧组中任一圆弧的参数化表示,获取畸变参数。The distortion parameters are obtained according to the coordinates of the distortion center point and the parametric representation of any circular arc in any circle center collinear circular arc group.

基于第一方面的第三种可行的实施方式,在第一方面的第六种可行的实施方式中,所述平方距离最小化方程为:Based on the third feasible implementation manner of the first aspect, in the sixth feasible implementation manner of the first aspect, the square distance minimization equation is:

其中,m表示拟合第i条圆弧的点的个数,|Qi,joi|表示第i条圆弧上的点Qi,j与圆心oi之间的距离,ri表示第i条圆弧的半径,n表示一个圆心共线圆弧组中圆弧的条数,(px,py)表示所述两个公共交点M点和N点间连线的中点P点的坐标,(tx,ty)表示所述P点到所述M点或N点的向量,(k1…kn)表示n条圆弧中每条圆弧的比例系数;Among them, m represents the number of points fitting the i-th circular arc, |Q i,j o i | represents the distance between point Q i,j on the i-th circular arc and the center o i of the circle, r i represents The radius of the i-th arc, n represents the number of arcs in a center collinear arc group, (p x , p y ) represents the midpoint P of the line between the two public intersection points M and N The coordinates of the point, (t x , ty ) represents the vector from the P point to the M point or N point, and (k 1 ... k n ) represents the proportional coefficient of each arc in the n arcs;

所述预设的非线性优化算法为LM(Leven-Marquardt)算法。The preset nonlinear optimization algorithm is LM (Leven-Marquardt) algorithm.

基于第一方面的第五种可行的实施方式,在第一方面的第七种可行的实施方式中,假设任一圆心共线圆弧组中任一圆弧的参数化表示为所述畸变中心点坐标为(xd0,yd0),则所述畸变参数为:Based on the fifth feasible implementation manner of the first aspect, in the seventh feasible implementation manner of the first aspect, it is assumed that the parametric representation of any arc in any circle center collinear arc group is expressed as The coordinates of the distortion center point are (x d0 , y d0 ), then the distortion parameters are:

其中,A、B和C为任一圆弧的参数化表示中的参数。where A, B and C are the parameters in the parametric representation of any arc.

基于第一方面的第七种可行的实施方式,在第一方面的第八种可行的实施方式中,所述畸变标定模型为:Based on the seventh feasible implementation manner of the first aspect, in the eighth feasible implementation manner of the first aspect, the distortion calibration model is:

其中,b=(xd,yd)为畸变图像坐标点,a=(xu,yu)为经过畸变校正后的图像坐标点,rd为b与畸变中心点坐标的欧氏距离。Among them, b=(x d , y d ) is the coordinate point of the distorted image, a=(x u , y u ) is the coordinate point of the image after distortion correction, and r d is the Euclidean distance between b and the coordinate of the distortion center point.

本发明实施例第二方面提供了一种鱼眼镜头径向畸变的标定装置,可包括:The second aspect of the embodiment of the present invention provides a calibration device for radial distortion of a fisheye lens, which may include:

标定图像获取模块,用于获取包含至少两组空间平行直线的标定图像;A calibration image acquisition module, configured to acquire calibration images comprising at least two sets of spatially parallel straight lines;

圆弧拟合模块,用于对所述至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组进行拟合处理;An arc fitting module, configured to perform fitting processing on the group of collinear arcs with the center of the circle mapped on the distorted image by each group of spatial parallel straight lines in the at least two groups of spatially parallel straight lines;

模型生成模块,用于根据拟合处理结果生成畸变标定模型。The model generation module is used to generate a distortion calibration model according to the fitting processing result.

基于第二方面,在第二方面的第一种可行的实施方式中,所述至少两组空间平行直线中任一组空间平行直线在畸变图像上均映射为一个圆心共线圆弧组,所述任一组空间平行直线中任一直线在畸变图像上映射的圆心共线圆弧组中均存在对应的一条圆弧。Based on the second aspect, in the first possible implementation manner of the second aspect, any set of spatially parallel straight lines in the at least two groups of spatially parallel straight lines are mapped to a group of collinear arcs with centers of circles on the distorted image, so Any straight line in any set of spatially parallel straight lines has a corresponding arc in the center-collinear arc group mapped on the distorted image.

基于第二方面或第二方面的第一种可行的实施方式,在第二方面的第二种可行的实施方式中,所述圆弧拟合模块包括:Based on the second aspect or the first possible implementation manner of the second aspect, in the second feasible implementation manner of the second aspect, the arc fitting module includes:

参数系数计算单元,用于采用预设的非线性优化算法,计算所述至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组的公共参数和比例系数;A parameter coefficient calculation unit, configured to use a preset nonlinear optimization algorithm to calculate the public parameters and proportional coefficients of the center collinear arc group mapped on the distorted image by each set of spatial parallel straight lines in the at least two groups of spatial parallel straight lines ;

结果获取单元,用于采用所述公共参数和所述比例系数计算获取拟合处理结果,所述拟合处理结果包括各个所述圆心共线圆弧组中每条圆弧的参数化表示以及各个所述圆心共线圆弧组对应的两个公共交点;A result acquisition unit, configured to calculate and obtain a fitting processing result by using the public parameters and the proportional coefficient, the fitting processing result includes a parametric representation of each arc in each of the center-center collinear arc groups and each Two public intersection points corresponding to the group of collinear arcs with centers of circles;

其中,所述公共参数包括所述两个公共交点间连线的中点坐标以及所述中点到所述两个公共交点中任一交点的向量,所述比例系数包括各个所述圆心共线圆弧组中每条圆弧对应的预设系数。Wherein, the public parameters include the midpoint coordinates of the line between the two public intersections and the vector from the midpoint to any intersection point of the two public intersections, and the proportional coefficient includes the collinear The preset coefficient corresponding to each arc in the arc group.

基于第二方面的第二种可行的实施方式,在第二方面的第三种可行的实施方式中,所述参数系数计算单元包括:Based on the second feasible implementation manner of the second aspect, in a third feasible implementation manner of the second aspect, the parameter coefficient calculation unit includes:

方程获取子单元,用于获取所述至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组对应的平方距离最小化方程;An equation obtaining subunit, configured to obtain a square distance minimization equation corresponding to a group of collinear arcs with center points mapped on the distorted image for each group of spatially parallel straight lines in the at least two groups of spatially parallel straight lines;

参数系数获取子单元,用于采用预设的非线性优化算法对所述平方距离最小化方程进行计算,获取各个所述圆心共线圆弧组的公共参数和比例系数。The parameter coefficient acquisition subunit is used to calculate the square distance minimization equation by using a preset nonlinear optimization algorithm, and acquire the common parameters and proportional coefficients of each of the collinear arc groups with centers of circles.

基于第二方面的第二种可行的实施方式,在第二方面的第四种可行的实施方式中,所述模型生成模块包括:Based on the second feasible implementation manner of the second aspect, in the fourth feasible implementation manner of the second aspect, the model generation module includes:

坐标参数获取单元,用于根据拟合处理结果获取畸变中心点坐标和畸变参数;A coordinate parameter acquiring unit, configured to acquire the coordinates of the distortion center point and the distortion parameters according to the fitting processing result;

模型生成单元,用于采用所述畸变中心点坐标和所述畸变参数生成畸变标定模型。A model generation unit, configured to generate a distortion calibration model by using the coordinates of the distortion center point and the distortion parameters.

基于第二方面的第四种可行的实施方式,在第二方面的第五种可行的实施方式中,所述坐标参数获取单元包括:Based on the fourth feasible implementation manner of the second aspect, in the fifth feasible implementation manner of the second aspect, the coordinate parameter acquisition unit includes:

坐标获取子单元,用于获取各个圆心共线圆弧组对应的两个公共交点的直线方程,并将所有直线方程的交点坐标确定为畸变中心点坐标;The coordinate obtaining subunit is used to obtain the straight line equations of the two common intersection points corresponding to the collinear arc groups of the respective circle centers, and determine the coordinates of the intersection points of all the straight line equations as the coordinates of the distortion center point;

参数获取子单元,用于根据所述畸变中心点坐标和任一圆心共线圆弧组中任一圆弧的参数化表示,获取畸变参数。The parameter acquisition subunit is configured to acquire distortion parameters according to the coordinates of the distortion center point and the parametric representation of any arc in any circle center collinear arc group.

基于第二方面的第三种可行的实施方式,在第二方面的第六种可行的实施方式中,所述平方距离最小化方程为:Based on the third feasible implementation manner of the second aspect, in the sixth feasible implementation manner of the second aspect, the square distance minimization equation is:

其中,m表示拟合第i条圆弧的点的个数,|Qi,joi|表示第i条圆弧上的点Qi,j与圆心oi之间的距离,ri表示第i条圆弧的半径,n表示一个圆心共线圆弧组中圆弧的条数,(px,py)表示所述两个公共交点M点和N点间连线的中点P点的坐标,(tx,ty)表示所述P点到所述M点或N点的向量,(k1…kn)表示n条圆弧中每条圆弧的比例系数;Among them, m represents the number of points fitting the i-th circular arc, |Q i,j o i | represents the distance between point Q i,j on the i-th circular arc and the center o i of the circle, r i represents The radius of the i-th arc, n represents the number of arcs in a center collinear arc group, (p x , p y ) represents the midpoint P of the line between the two public intersection points M and N The coordinates of the point, (t x , ty ) represents the vector from the P point to the M point or N point, and (k 1 ... k n ) represents the proportional coefficient of each arc in the n arcs;

所述预设的非线性优化算法为LM算法。The preset nonlinear optimization algorithm is LM algorithm.

基于第二方面的第五种可行的实施方式,在第二方面的第七种可行的实施方式中,假设任一圆心共线圆弧组中任一圆弧的参数化表示为所述畸变中心点坐标为(xd0,yd0),则所述畸变参数为:Based on the fifth feasible implementation manner of the second aspect, in the seventh feasible implementation manner of the second aspect, it is assumed that the parametric representation of any arc in any circle center collinear arc group is expressed as The coordinates of the distortion center point are (x d0 , y d0 ), then the distortion parameters are:

其中,A、B和C为任一圆弧的参数化表示中的参数。where A, B and C are the parameters in the parametric representation of any arc.

基于第二方面的第七种可行的实施方式,在第二方面的第八种可行的实施方式中,所述畸变标定模型为:Based on the seventh feasible implementation manner of the second aspect, in the eighth feasible implementation manner of the second aspect, the distortion calibration model is:

其中,b=(xd,yd)为畸变图像坐标点,a=(xu,yu)为经过畸变校正后的图像坐标点,rd为b与畸变中心点坐标的欧氏距离。Among them, b=(x d , y d ) is the coordinate point of the distorted image, a=(x u , y u ) is the coordinate point of the image after distortion correction, and r d is the Euclidean distance between b and the coordinate of the distortion center point.

在本发明实施例中,通过获取包含至少两组空间平行直线的标定图像,对所述至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组进行拟合处理,并根据拟合处理结果生成畸变标定模型。通过采用至少两组空间平行直线,以及分别对至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组进行拟合处理,提高了畸变标定模型的标定结果的准确率;通过利用圆心共线性质,使得标定结果在存在较大噪声的情况下仍旧能够保持鲁棒性。In the embodiment of the present invention, by acquiring a calibration image containing at least two sets of spatially parallel straight lines, the group of collinear arcs with the centers of circles mapped on the distorted image by each of the at least two sets of spatially parallel straight lines is simulated. Fit processing, and generate a distortion calibration model based on the fitting processing results. By adopting at least two sets of spatially parallel straight lines, and respectively fitting the at least two sets of spatially parallel straight lines on the center-point collinear arc group mapped on the distorted image, the calibration results of the distortion calibration model are improved. The accuracy rate; by using the collinear nature of the center of the circle, the calibration results can still maintain robustness in the presence of large noise.

附图说明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 are only 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 schematic flowchart of a calibration method for radial distortion of a fisheye lens provided by an embodiment of the present invention;

图2是本发明实施例提供的另一种鱼眼镜头径向畸变的标定方法的流程示意图;2 is a schematic flowchart of another calibration method for radial distortion of a fisheye lens provided by an embodiment of the present invention;

图3是本发明实施例提供的又一种鱼眼镜头径向畸变的标定方法的流程示意图;3 is a schematic flowchart of another calibration method for radial distortion of a fisheye lens provided by an embodiment of the present invention;

图4是本发明实施例提供的圆心共线圆弧组在畸变图像上的举例示意图;Fig. 4 is an example schematic diagram of a group of collinear arcs with centers of circles on a distorted image provided by an embodiment of the present invention;

图5是本发明实施例提供的一种鱼眼镜头径向畸变的标定装置的结构示意图;5 is a schematic structural diagram of a calibration device for radial distortion of a fisheye lens provided by an embodiment of the present invention;

图6是本发明实施例提供的圆弧拟合模块的结构示意图;Fig. 6 is a schematic structural diagram of an arc fitting module provided by an embodiment of the present invention;

图7是本发明实施例提供的参数系数计算单元的结构示意图;7 is a schematic structural diagram of a parameter coefficient calculation unit provided by an embodiment of the present invention;

图8是本发明实施例提供的模型生成模块的结构示意图;Fig. 8 is a schematic structural diagram of a model generation module provided by an embodiment of the present invention;

图9是本发明实施例提供的坐标参数获取单元的结构示意图;FIG. 9 is a schematic structural diagram of a coordinate parameter acquisition unit provided by an embodiment of the present invention;

图10是本发明实施例提供的另一种鱼眼镜头径向畸变的标定装置的结构示意图。FIG. 10 is a schematic structural diagram of another calibration device for radial distortion of a fisheye lens provided by an embodiment of the present invention.

具体实施方式detailed description

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

下面将结合附图1-附图4,对本发明实施例提供的鱼眼镜头径向畸变的标定方法进行详细介绍。The method for calibrating the radial distortion of the fisheye lens provided by the embodiment of the present invention will be described in detail below in conjunction with accompanying drawings 1 to 4 .

请参见图1,为本发明实施例提供了一种鱼眼镜头径向畸变的标定方法的流程示意图。如图1所示,本发明实施例的所述方法包括以下步骤S101-步骤S103。Please refer to FIG. 1 , which provides a schematic flowchart of a method for calibrating radial distortion of a fisheye lens according to an embodiment of the present invention. As shown in FIG. 1 , the method in the embodiment of the present invention includes the following steps S101-S103.

S101,获取包含至少两组空间平行直线的标定图像;S101. Acquire a calibration image containing at least two sets of spatially parallel straight lines;

具体的,鱼眼镜头径向畸变的标定装置获取采用鱼眼镜头所拍摄的标定图像,所述标定图像可以包含至少两组空间平行直线,所述至少两组空间平行直线中每组空间平行直线均包含若干条直线。Specifically, the calibration device for the radial distortion of the fisheye lens acquires a calibration image taken by a fisheye lens, and the calibration image may include at least two sets of spatially parallel straight lines, and each set of spatially parallel straight lines in the at least two sets of spatially parallel straight lines Both contain several straight lines.

S102,对所述至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组进行拟合处理;S102. Perform fitting processing on a group of collinear arcs with centers of circles mapped on the distorted image by each group of spatially parallel straight lines in the at least two groups of spatially parallel straight lines;

具体的,所述标定装置可以分别对所述至少两组空间平行直线中每一组空间平行直线进行操作。所述标定装置对每一组空间平行直线在畸变图像上映射的圆心共线圆弧组进行拟合处理,进一步的,所述标定装置采用预设的非线性优化算法,计算所述每一组空间平行直线在畸变图像上映射的圆心共线圆弧组的公共参数和比例系数,所述标定装置采用所述公共参数和所述比例系数计算获取拟合处理结果,所述拟合处理结果包括各个所述圆心共线圆弧组中每条圆弧的参数化表示以及各个所述圆心共线圆弧组对应的两个公共交点。Specifically, the calibration device may operate on each set of spatially parallel straight lines in the at least two groups of spatially parallel straight lines. The calibration device performs fitting processing on each group of spatially parallel straight lines mapped on the distorted image to the center collinear arc group, and further, the calibration device uses a preset nonlinear optimization algorithm to calculate each group The common parameters and proportional coefficients of the collinear arc group with the center of the circle mapped on the distorted image by parallel straight lines in space, the calibration device uses the public parameters and the proportional coefficients to calculate and obtain fitting processing results, and the fitting processing results include A parametric representation of each arc in each of the groups of collinear arcs with centers of circles and two common intersection points corresponding to each of the groups of collinear arcs with centers of circles.

其中,所述至少两组空间平行直线中任一组空间平行直线在畸变图像上均映射为一个圆心共线圆弧组,所述任一组空间平行直线中任一直线在畸变图像上映射的圆心共线圆弧组中均存在对应的一条圆弧。所述公共参数包括所述两个公共交点间连线的中点坐标以及所述中点到所述两个公共交点中任一交点的向量,所述比例系数包括各个所述圆心共线圆弧组中每条圆弧对应的预设系数。Wherein, any set of spatially parallel straight lines in the at least two groups of spatially parallel straight lines are mapped on the distorted image to a group of collinear arcs, and any one of the set of spatially parallel straight lines mapped on the distorted image There is a corresponding arc in the center collinear arc group. The public parameters include the coordinates of the midpoint of the line between the two public intersections and the vector from the midpoint to any intersection point in the two public intersections, and the proportional coefficient includes each of the collinear arcs with centers of circles The default coefficient for each arc in the group.

S103,根据拟合处理结果生成畸变标定模型;S103, generating a distortion calibration model according to the fitting processing result;

具体的,所述标定装置根据各个所述圆心共线圆弧组中每条圆弧的参数化表示以及各个所述圆心共线圆弧组对应的两个公共交点获取畸变中心点坐标和畸变参数,并采用所述畸变中心点坐标和所述畸变参数生成畸变标定模型。Specifically, the calibration device obtains the coordinates of the distortion center point and the distortion parameters according to the parameterized representation of each arc in each of the collinear arc groups and the two common intersection points corresponding to each of the collinear arc groups. , and generate a distortion calibration model by using the coordinates of the distortion center point and the distortion parameters.

在本发明实施例中,通过获取包含至少两组空间平行直线的标定图像,对所述至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组进行拟合处理,并根据拟合处理结果生成畸变标定模型。通过采用至少两组空间平行直线,以及分别对至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组进行拟合处理,提高了畸变标定模型的标定结果的准确率;通过利用圆心共线性质,使得标定结果在存在较大噪声的情况下仍旧能够保持鲁棒性。In the embodiment of the present invention, by acquiring a calibration image containing at least two sets of spatially parallel straight lines, the group of collinear arcs with the centers of circles mapped on the distorted image by each of the at least two sets of spatially parallel straight lines is simulated. Fit processing, and generate a distortion calibration model based on the fitting processing results. By adopting at least two sets of spatially parallel straight lines, and respectively fitting the at least two sets of spatially parallel straight lines on the center-point collinear arc group mapped on the distorted image, the calibration results of the distortion calibration model are improved. The accuracy rate; by using the collinear nature of the center of the circle, the calibration results can still maintain robustness in the presence of large noise.

请参见图2,为本发明实施例提供了另一种鱼眼镜头径向畸变的标定方法的流程示意图。如图2所示,本发明实施例的所述方法包括以下步骤S201-步骤S205。Please refer to FIG. 2 , which is a schematic flowchart of another method for calibrating radial distortion of a fisheye lens according to an embodiment of the present invention. As shown in FIG. 2 , the method in the embodiment of the present invention includes the following steps S201 to S205.

S201,获取包含至少两组空间平行直线的标定图像;S201. Obtain a calibration image including at least two sets of spatially parallel straight lines;

S202,采用预设的非线性优化算法,计算所述至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组的公共参数和比例系数;S202. Using a preset nonlinear optimization algorithm, calculate the common parameters and proportional coefficients of the center collinear arc group mapped on the distorted image by each group of spatial parallel straight lines in the at least two groups of spatial parallel straight lines;

S203,采用所述公共参数和所述比例系数计算获取拟合处理结果,所述拟合处理结果包括各个所述圆心共线圆弧组中每条圆弧的参数化表示以及各个所述圆心共线圆弧组对应的两个公共交点;S203. Calculate and obtain a fitting processing result by using the public parameters and the proportional coefficient, the fitting processing result includes a parametric representation of each arc in each of the center-collinear arc groups and each of the center-colinear arc groups. The two public intersection points corresponding to the line arc group;

具体的,鱼眼镜头径向畸变的标定装置可以分别对所述至少两组空间平行直线中每一组空间平行直线进行操作。所述标定装置可以采用预设的非线性优化算法,计算每一组空间平行直线在畸变图像上映射的圆心共线圆弧组的公共参数和比例系数,进一步的,所述标定装置获取所述至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组对应的平方距离最小化方程,并采用预设的非线性优化算法对所述平方距离最小化方程进行计算,获取各个所述圆心共线圆弧组的公共参数和比例系数。Specifically, the calibration device for the radial distortion of the fisheye lens can operate on each set of spatially parallel straight lines in the at least two groups of spatially parallel straight lines. The calibration device can use a preset nonlinear optimization algorithm to calculate the common parameters and proportional coefficients of the collinear arc group with the center of each group of parallel straight lines mapped on the distorted image. Further, the calibration device obtains the The square distance minimization equation corresponding to the center collinear arc group of each group of spatial parallel straight lines mapped on the distorted image in at least two groups of spatially parallel straight lines, and using a preset nonlinear optimization algorithm to optimize the square distance minimization equation Calculations are performed to obtain the common parameters and proportional coefficients of each of the collinear arc groups with centers.

可以理解的是,每个圆心共线圆弧组都存在各自的公共参数和比例系数。所述标定装置可以根据各个圆心共线圆弧组的公共参数获取各个所述圆心共线圆弧组对应的两个公共交点,根据各个圆心共线圆弧组的比例系数获取各个圆心共线圆弧组中每条圆弧的参数化表示。It can be understood that each group of center-center collinear arcs has its own public parameters and proportional coefficients. The calibration device can obtain two common intersection points corresponding to each of the collinear arc groups according to the public parameters of each collinear arc group, and obtain each collinear circle according to the proportional coefficient of each collinear arc group A parametric representation of each arc in the arc group.

其中,所述至少两组空间平行直线中任一组空间平行直线在畸变图像上均映射为一个圆心共线圆弧组,所述任一组空间平行直线中任一直线在畸变图像上映射的圆心共线圆弧组中均存在对应的一条圆弧。所述公共参数包括所述两个公共交点间连线的中点坐标以及所述中点到所述两个公共交点中任一交点的向量,所述比例系数包括各个所述圆心共线圆弧组中每条圆弧对应的预设系数。Wherein, any set of spatially parallel straight lines in the at least two groups of spatially parallel straight lines are mapped on the distorted image to a group of collinear arcs, and any one of the set of spatially parallel straight lines mapped on the distorted image There is a corresponding arc in the center collinear arc group. The public parameters include the coordinates of the midpoint of the line between the two public intersections and the vector from the midpoint to any intersection point in the two public intersections, and the proportional coefficient includes each of the collinear arcs with centers of circles The default coefficient for each arc in the group.

S204,根据拟合处理结果获取畸变中心点坐标和畸变参数;S204. Obtain the coordinates of the distortion center point and the distortion parameters according to the fitting processing result;

S205,采用所述畸变中心点坐标和所述畸变参数生成畸变标定模型;S205. Generate a distortion calibration model by using the coordinates of the distortion center point and the distortion parameters;

具体的,所述标定装置获取各个圆心共线圆弧组对应的两个公共交点的直线方程,并将所有直线方程的交点坐标确定为畸变中心点坐标,所述标定装置根据所述畸变中心点坐标和任一圆心共线圆弧组中任一圆弧的参数化表示,获取畸变参数。所述标定装置可以根据所述畸变中点坐标和所述畸变参数生成畸变标定模型。Specifically, the calibration device acquires the straight line equations of the two common intersection points corresponding to the collinear arc groups with the centers of each circle, and determines the coordinates of the intersection points of all the straight line equations as the coordinates of the distortion center point. Coordinates and the parametric representation of any arc in the group of arcs whose centers are collinear, get the distortion parameters. The calibration device may generate a distortion calibration model according to the distortion midpoint coordinates and the distortion parameters.

其中,本发明实施例的步骤S201可以参见图1所示实施例的步骤S101,在此不进行赘述。Wherein, for step S201 in the embodiment of the present invention, reference may be made to step S101 in the embodiment shown in FIG. 1 , and details are not described here.

在本发明实施例中,通过获取包含至少两组空间平行直线的标定图像,对所述至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组进行拟合处理,并根据拟合处理结果生成畸变标定模型。通过采用至少两组空间平行直线,以及分别对至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组进行拟合处理,提高了畸变标定模型的标定结果的准确率;通过利用圆心共线性质,使得标定结果在存在较大噪声的情况下仍旧能够保持鲁棒性。In the embodiment of the present invention, by acquiring a calibration image containing at least two sets of spatially parallel straight lines, the group of collinear arcs with the centers of circles mapped on the distorted image by each of the at least two sets of spatially parallel straight lines is simulated. Fit processing, and generate a distortion calibration model based on the fitting processing results. By adopting at least two sets of spatially parallel straight lines, and respectively fitting the at least two sets of spatially parallel straight lines on the center-point collinear arc group mapped on the distorted image, the calibration results of the distortion calibration model are improved. The accuracy rate; by using the collinear nature of the center of the circle, the calibration results can still maintain robustness in the presence of large noise.

请参见图3,为本发明实施例提供了又一种鱼眼镜头径向畸变的标定方法的流程示意图。如图3所示,本发明实施例的所述方法可以包括以下步骤S301-步骤S307。Please refer to FIG. 3 , which is a schematic flowchart of another method for calibrating radial distortion of a fisheye lens according to an embodiment of the present invention. As shown in FIG. 3 , the method in the embodiment of the present invention may include the following steps S301-S307.

S301,获取包含至少两组空间平行直线的标定图像;S301. Acquire a calibration image including at least two sets of spatially parallel straight lines;

具体的,鱼眼镜头径向畸变的标定装置获取采用鱼眼镜头所拍摄的标定图像,所述标定图像可以包含至少两组空间平行直线,所述至少两组空间平行直线中每组空间平行直线均包含若干条直线。Specifically, the calibration device for the radial distortion of the fisheye lens acquires a calibration image taken by a fisheye lens, and the calibration image may include at least two sets of spatially parallel straight lines, and each set of spatially parallel straight lines in the at least two sets of spatially parallel straight lines Both contain several straight lines.

在本发明实施例中,所采用的畸变标定模型可以表示为(1)式:In the embodiment of the present invention, the adopted distortion calibration model can be expressed as formula (1):

(1)式中,b=(xd,yd)为畸变图像坐标点,a=(xu,yu)为经过畸变校正后的图像坐标点,rd为b与畸变中心点坐标的欧氏距离。由于传统的径向畸变的畸变标定模型是基于畸变中心点作为图像中心的假设,对畸变参数λ进行求解,以生成该畸变标定模型,但是在通常情况下,畸变中心点并不位于图像中心,因此本发明实施例中将畸变中心点坐标(xd0,yd0)也作为未知参数进行求解。In formula (1), b=(x d , y d ) is the coordinate point of the distorted image, a=(x u , y u ) is the coordinate point of the image after distortion correction, and r d is the relationship between b and the coordinates of the distortion center point Euclidean distance. Since the traditional radial distortion distortion calibration model is based on the assumption that the distortion center point is the center of the image, the distortion parameter λ is solved to generate the distortion calibration model, but in general, the distortion center point is not located at the image center, Therefore, in the embodiment of the present invention, the coordinates (x d0 , y d0 ) of the distortion center point are also used as unknown parameters for solution.

在三维空间中,每一组空间平行直线中的任一直线方程可以表示为(2)式:In three-dimensional space, the equation of any line in each group of parallel lines in space can be expressed as formula (2):

(2)式中,D=(dx,dy,dz)为单位方向矢量,(xi,yi,zi)为该直线经过的某一个三维空间点,t为一个比例因子,用来生成在这条直线上的不同点。由(2)式可知,一组空间平行直线可能会经过不同的点(xi,yi,zi),但一定具有相同的单位方向矢量D。In formula (2), D=(dx, dy, dz) is the unit direction vector, ( xi , y i , zi ) is a certain three-dimensional space point that the straight line passes through, and t is a scale factor used to generate different points on this line. It can be known from formula (2) that a group of parallel straight lines in space may pass through different points ( xi , y, zi ) , but must have the same unit direction vector D.

在理想透视投影下,该组空间平行直线被映射为理想透视图像上的一组直线,可以表示为(3)式:Under ideal perspective projection, the group of spatially parallel straight lines is mapped to a group of straight lines on the ideal perspective image, which can be expressed as formula (3):

(3)式中,f为理想透视相机的焦距。当经过的三维点(xi,yi,zi)不同时,这组空间平行直线投影到理想透视图像上所成的直线可能不再平行。(3) where f is the focal length of the ideal perspective camera. When the passing three-dimensional points ( xi , y, zi ) are different, the lines formed by the projection of the set of parallel straight lines in space onto the ideal perspective image may no longer be parallel.

当t→±∞时,可得到这组空间平行直线的灭点在理想透视图像上的投影点,可以表示为(4)式:When t→±∞, the projection point of the vanishing point of this group of parallel lines in space on the ideal perspective image can be obtained, which can be expressed as formula (4):

由(4)式可知,在理想透视投影下,这组空间平行直线在理想透视图像上会相交于同一点(即是空间平行直线的灭点在理想透视图像上的投影点)。It can be seen from formula (4) that under the ideal perspective projection, the set of parallel spatial lines will intersect at the same point on the ideal perspective image (that is, the projection point of the vanishing point of the parallel spatial lines on the ideal perspective image).

将(1)式代入(4)式,并假设畸变中心即为图像的原点,则可得(5)式:Substituting formula (1) into formula (4), and assuming that the distortion center is the origin of the image, formula (5) can be obtained:

以及(6)式:And (6) type:

用(5)式除以(6)式,得:Divide formula (5) by formula (6) to get:

(7)式表示在传统的径向畸变的畸变标定模型下,a和b具有相同的斜率,并且它们与图像坐标原点三点共线。将(7)式代入(6)式,可得(8)式:Equation (7) indicates that under the traditional radial distortion distortion calibration model, a and b have the same slope, and they are collinear with the three points of the image coordinate origin. Substituting formula (7) into formula (6), formula (8) can be obtained:

这是一个关于yd的一元二次方程,其判别式为(9)式:This is a one-variable quadratic equation about y d , and its discriminant formula is (9):

由于对于径向失真而言,有λ<0,因而Δ必然大于零,由此可得式(8)必然有2个实数解。从以上推导可知,在传统的径向畸变的畸变标定模型下,一组空间平行直线的灭点在畸变图像上会有2个投影点。由于一组空间平行直线在该模型下被映射成为一个圆心共线圆弧组,因此该圆心共线圆弧组中所有的圆弧会有2个公共交点。As for the radial distortion, λ<0, and thus Δ must be greater than zero, so it can be obtained that formula (8) must have 2 real number solutions. From the above derivation, it can be seen that under the traditional radial distortion distortion calibration model, the vanishing points of a group of parallel straight lines in space will have two projection points on the distorted image. Since a group of parallel straight lines in space is mapped into a center-collinear arc group under this model, all arcs in the center-collinear arc group will have two common intersection points.

需要说明的是,所述至少两组空间平行直线中任一组空间平行直线在畸变图像上均映射为一个圆心共线圆弧组,所述任一组空间平行直线中任一直线在畸变图像上映射的圆心共线圆弧组中均存在对应的一条圆弧。It should be noted that any set of spatially parallel straight lines in the at least two groups of spatially parallel straight lines are mapped to a group of collinear arcs with the centers of circles on the distorted image, and any one of the set of spatially parallel straight lines in the distorted image There is a corresponding arc in the center collinear arc group mapped above.

S302,获取所述至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组对应的平方距离最小化方程;S302. Acquire a square distance minimization equation corresponding to a group of collinear arcs with center points mapped on the distorted image by each group of spatially parallel straight lines in the at least two groups of spatially parallel straight lines;

具体的,所述标定装置在拟合所述至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组时,所述标定装置获取该圆心共线圆弧组的平方距离最小化方程。Specifically, when the calibration device fits the group of collinear arcs with the center of the circle mapped on the distorted image by each of the at least two sets of parallel straight lines in space, the calibration device obtains the collinear arc with the center of the circle The group's squared distance minimization equation.

请一并参见图4,为本发明实施例提供了圆心共线圆弧组在畸变图像上的举例示意图。如图4所示,假设2个公共交点分别是M点和N点,假设M、N点连线的中点P在畸变图像上的坐标为(px,py),获取P点到N点或M点的向量,本发明实施例中采用P点到N点的向量,记为若这个圆心共线圆弧组中第i个圆弧的圆心位置是oi,则从P点出发到oi点的有向直线的单位向量可表示为(10)式:Please also refer to FIG. 4 , which provides an example schematic diagram of a group of collinear arcs with centers of circles on a distorted image according to an embodiment of the present invention. As shown in Figure 4, assuming that the two common intersection points are points M and N respectively, assuming that the coordinates of the midpoint P on the line connecting M and N points on the distorted image are (p x , p y ), obtain points P to N The vector of point or M point, adopt the vector of P point to N point in the embodiment of the present invention, denote as If the center position of the i-th arc in the collinear arc group is o i , then the unit vector of the directed line from point P to point o i can be expressed as formula (10):

(10)式中,表示与向量相垂直的向量,须满足 表示向量的模。由此可知,Poi o有二组解,分别是 (10) where, representation and vector Perpendicular vectors must satisfy representation vector model. It can be seen that Po i o has two sets of solutions, which are with

设定一个比例系数则圆心oi可以表示为(11)式:set a scaling factor Then the center o i can be expressed as (11):

假设该圆心共线圆弧组对应的共线圆组共有n条圆弧,则待求的未知变量的总数为(4+n),(4+n)中n表示有n个比例系数(k1…kn),4表示为n条圆弧所共有的公共参数,分别是表示P点位置的px和py,以及表示向量的tx和tyAssuming that the collinear circle group corresponding to the center collinear arc group has n arcs, the total number of unknown variables to be obtained is (4+n), and n in (4+n) means that there are n proportional coefficients (k 1 ... k n ), 4 represents the public parameters shared by n arcs, which are respectively p x and p y representing the position of point P, and representing the vector t x and t y .

对于共线圆组中第i条圆弧,它的半径可表示为(12)式:For the i-th arc in the collinear circle group, its radius can be expressed as formula (12):

则在拟合该圆弧时,要求最小化的方程为(13)式:Then when fitting the arc, the equation required to be minimized is (13):

(13)式中,m表示拟合该条圆弧的点的个数,|Qi,joi|为第i条圆弧上的点Qi,j与圆心oi之间的距离。In formula (13), m represents the number of points fitting the arc, and |Q i,j o i | is the distance between point Q i,j on the i-th arc and the center o i .

在一个圆心共线圆弧组中,这样的圆弧共有n条,因此平方距离最小化方程为(14)式:In a group of collinear arcs with centers, there are n such arcs, so the square distance minimization equation is (14):

S303,采用预设的非线性优化算法对所述平方距离最小化方程进行计算,获取各个所述圆心共线圆弧组的公共参数和比例系数;S303. Using a preset nonlinear optimization algorithm to calculate the square distance minimization equation, and obtain the common parameters and proportional coefficients of each of the collinear arc groups with centers of circles;

具体的,所述预设的非线性优化算法优选为LM算法,所述标定装置采用所述预设的非线性优化算法对所述平方距离最小化方程进行计算,获取各个所述圆心共线圆弧组的公共参数和比例系数。Specifically, the preset nonlinear optimization algorithm is preferably the LM algorithm, and the calibration device uses the preset nonlinear optimization algorithm to calculate the square distance minimization equation to obtain the collinear circles with the centers of each Common parameters and scale factor for the arc group.

其中,所述公共参数包括所述两个公共交点间连线的中点坐标以及所述中点到所述两个公共交点中任一交点的向量,所述比例系数包括各个所述圆心共线圆弧组中每条圆弧对应的预设系数。Wherein, the public parameters include the midpoint coordinates of the line between the two public intersections and the vector from the midpoint to any intersection point of the two public intersections, and the proportional coefficient includes the collinear The preset coefficient corresponding to each arc in the arc group.

S304,采用所述公共参数和所述比例系数计算获取拟合处理结果,所述拟合处理结果包括各个所述圆心共线圆弧组中每条圆弧的参数化表示以及各个所述圆心共线圆弧组对应的两个公共交点;S304. Calculate and obtain a fitting processing result by using the public parameter and the proportional coefficient, and the fitting processing result includes a parameterized representation of each arc in each of the center-collinear arc groups and each of the center-colinear arc groups. The two public intersection points corresponding to the line arc group;

具体的,每个圆心共线圆弧组都存在各自的公共参数和比例系数。所述标定装置可以根据各个圆心共线圆弧组的公共参数获取各个所述圆心共线圆弧组对应的两个公共交点,根据各个圆心共线圆弧组的比例系数获取各个圆心共线圆弧组中每条圆弧的参数化表示。Specifically, each center-center collinear arc group has its own public parameters and proportional coefficients. The calibration device can obtain two common intersection points corresponding to each of the collinear arc groups according to the public parameters of each collinear arc group, and obtain each collinear circle according to the proportional coefficient of each collinear arc group A parametric representation of each arc in the arc group.

S305,获取各个圆心共线圆弧组对应的两个公共交点的直线方程,并将所有直线方程的交点坐标确定为畸变中心点坐标;S305. Obtain the straight line equations of the two common intersection points corresponding to each circle center collinear arc group, and determine the intersection point coordinates of all the straight line equations as the distortion center point coordinates;

具体的,所述标定装置获取各个圆心共线圆弧组对应的两个公共交点所组成的直线方程,例如:M点与N点在畸变图像中所确定的直线方程,若空间平行直线存在有W组,则对应的圆心共线圆弧组也有W个,则可以获得W条直线方程,对W条直线方程求交点坐标,并将该交点坐标确定为畸变中心点坐标。例如:W条直线方程得出的交点坐标为(xd0,yd0),则将(xd0,yd0)确定为畸变中心点坐标。Specifically, the calibration device obtains the straight line equation formed by the two public intersections corresponding to the collinear arc groups with the centers of each circle, for example: the straight line equation determined by point M and point N in the distorted image, if there are parallel straight lines in space W group, then there are also W corresponding circle center collinear arc groups, then W straight line equations can be obtained, the intersection point coordinates are calculated for the W straight line equations, and the intersection point coordinates are determined as the distortion center point coordinates. For example: the coordinates of the intersection obtained from the equations of W straight lines are (x d0 , y d0 ), then (x d0 , y d0 ) is determined as the coordinates of the distortion center point.

S306,根据所述畸变中心点坐标和任一圆心共线圆弧组中任一圆弧的参数化表示,获取畸变参数;S306. Obtain a distortion parameter according to the coordinates of the distortion center point and the parametric representation of any arc in any center collinear arc group;

具体的,假设求得的任一圆心共线圆弧组中任一圆弧的参数化表示为所述畸变中心点坐标为(xd0,yd0),则所述畸变参数为:Specifically, it is assumed that the parametric expression of any arc in any of the obtained collinear arc groups is as The coordinates of the distortion center point are (x d0 , y d0 ), then the distortion parameters are:

其中,A、B和C为任一圆弧的参数化表示中的参数。where A, B and C are the parameters in the parametric representation of any arc.

S307,采用所述畸变中心点坐标和所述畸变参数生成畸变标定模型;S307. Generate a distortion calibration model by using the coordinates of the distortion center point and the distortion parameters;

具体的,所述标定装置根据畸变中心点坐标可以确定rd的表达方式,假设畸变中心点坐标为c,则表达方式为:Specifically, the calibration device can determine the expression of r d according to the coordinates of the distortion center point. Assuming that the coordinate of the distortion center point is c, the expression method is:

rd=︱b-c︱r d =︱bc︱

将所述表达方式以及畸变参数λ代入(1)式,生成畸变标定模型。Substitute the expression and distortion parameter λ into formula (1) to generate a distortion calibration model.

在本发明实施例中,通过获取包含至少两组空间平行直线的标定图像,对所述至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组进行拟合处理,并根据拟合处理结果生成畸变标定模型。通过采用至少两组空间平行直线、分别对至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组进行拟合处理,以及对畸变中心点坐标重新求取,提高了畸变标定模型的标定结果的准确率;通过利用圆心共线性质,使得标定结果在存在较大噪声的情况下仍旧能够保持鲁棒性。In the embodiment of the present invention, by acquiring a calibration image containing at least two sets of spatially parallel straight lines, the group of collinear arcs with the centers of circles mapped on the distorted image by each of the at least two sets of spatially parallel straight lines is simulated. Fit processing, and generate a distortion calibration model based on the fitting processing results. By adopting at least two sets of spatially parallel straight lines, respectively performing fitting processing on the center collinear arc groups mapped on the distorted image by each set of spatially parallel straight lines in the at least two sets of spatially parallel straight lines, and recalculating the coordinates of the distortion center point , which improves the accuracy of the calibration results of the distortion calibration model; by using the collinear property of the center of the circle, the calibration results can still maintain robustness in the presence of large noise.

下面将结合附图5和附图9,对本发明实施例提供的鱼眼镜头径向畸变的标定装置进行详细介绍。需要说明的是,附图5和附图9所示的标定装置,用于执行本发明图1-图4所示实施例的方法,为了便于说明,仅示出了与本发明实施例相关的部分,具体技术细节未揭示的,请参照本发明图1-图4所示的实施例。The apparatus for calibrating the radial distortion of the fisheye lens provided by the embodiment of the present invention will be described in detail below with reference to FIG. 5 and FIG. 9 . It should be noted that the calibration device shown in Figure 5 and Figure 9 is used to execute the method of the embodiment shown in Figure 1-Figure 4 of the present invention, for the convenience of description, only shows the For the part, the specific technical details are not disclosed, please refer to the embodiment shown in Fig. 1-Fig. 4 of the present invention.

请参见图5,为本发明实施例提供了一种鱼眼镜头径向畸变的标定装置的结构示意图。如图5所示,本发明实施例的所述标定装置1可以包括:标定图像获取模块11、圆弧拟合模块12和模型生成模块13。Please refer to FIG. 5 , which provides a schematic structural diagram of an apparatus for calibrating radial distortion of a fisheye lens according to an embodiment of the present invention. As shown in FIG. 5 , the calibration device 1 of the embodiment of the present invention may include: a calibration image acquisition module 11 , an arc fitting module 12 and a model generation module 13 .

标定图像获取模块11,用于获取包含至少两组空间平行直线的标定图像;A calibration image acquisition module 11, configured to acquire a calibration image comprising at least two groups of spatially parallel straight lines;

具体实现中,所述标定图像获取模块11获取采用鱼眼镜头所拍摄的标定图像,所述标定图像可以包含至少两组空间平行直线,所述至少两组空间平行直线中每组空间平行直线均包含若干条直线。In a specific implementation, the calibration image acquisition module 11 acquires a calibration image captured by a fisheye lens, and the calibration image may include at least two sets of spatially parallel straight lines, and each set of spatially parallel straight lines in the at least two sets of spatially parallel straight lines is Contains several straight lines.

在本发明实施例中,所采用的畸变标定模型可以表示为(1)式:In the embodiment of the present invention, the adopted distortion calibration model can be expressed as formula (1):

(1)式中,b=(xd,yd)为畸变图像坐标点,a=(xu,yu)为经过畸变校正后的图像坐标点,rd为b与畸变中心点坐标的欧氏距离。由于传统的径向畸变的畸变标定模型是基于畸变中心点作为图像中心的假设,对畸变参数λ进行求解,以生成该畸变标定模型,但是在通常情况下,畸变中心点并不位于图像中心,因此本发明实施例中将畸变中心点坐标(xd0,yd0)也作为未知参数进行求解。In formula (1), b=(x d , y d ) is the coordinate point of the distorted image, a=(x u , y u ) is the coordinate point of the image after distortion correction, and r d is the relationship between b and the coordinates of the distortion center point Euclidean distance. Since the traditional radial distortion distortion calibration model is based on the assumption that the distortion center point is the center of the image, the distortion parameter λ is solved to generate the distortion calibration model, but in general, the distortion center point is not located at the image center, Therefore, in the embodiment of the present invention, the coordinates (x d0 , y d0 ) of the distortion center point are also used as unknown parameters for solution.

在三维空间中,每一组空间平行直线中的任一直线方程可以表示为(2)式:In three-dimensional space, the equation of any line in each group of parallel lines in space can be expressed as formula (2):

(2)式中,D=(dx,dy,dz)为单位方向矢量,(xi,yi,zi)为该直线经过的某一个三维空间点,t为一个比例因子,用来生成在这条直线上的不同点。由(2)式可知,一组空间平行直线可能会经过不同的点(xi,yi,zi),但一定具有相同的单位方向矢量D。In formula (2), D=(dx, dy, dz) is the unit direction vector, ( xi , y i , zi ) is a certain three-dimensional space point that the straight line passes through, and t is a scale factor used to generate different points on this line. It can be known from formula (2) that a group of parallel straight lines in space may pass through different points ( xi , y, zi ) , but must have the same unit direction vector D.

在理想透视投影下,该组空间平行直线被映射为理想透视图像上的一组直线,可以表示为(3)式:Under ideal perspective projection, the group of spatially parallel straight lines is mapped to a group of straight lines on the ideal perspective image, which can be expressed as formula (3):

(3)式中,f为理想透视相机的焦距。当经过的三维点(xi,yi,zi)不同时,这组空间平行直线投影到理想透视图像上所成的直线可能不再平行。(3) where f is the focal length of the ideal perspective camera. When the passing three-dimensional points ( xi , y, zi ) are different, the lines formed by the projection of the set of parallel straight lines in space onto the ideal perspective image may no longer be parallel.

当t→±∞时,可得到这组空间平行直线的灭点在理想透视图像上的投影点,可以表示为(4)式:When t→±∞, the projection point of the vanishing point of this group of parallel lines in space on the ideal perspective image can be obtained, which can be expressed as formula (4):

由(4)式可知,在理想透视投影下,这组空间平行直线在理想透视图像上会相交于同一点(即是空间平行直线的灭点在理想透视图像上的投影点)。It can be seen from formula (4) that under the ideal perspective projection, the set of parallel spatial lines will intersect at the same point on the ideal perspective image (that is, the projection point of the vanishing point of the parallel spatial lines on the ideal perspective image).

将(1)式代入(4)式,并假设畸变中心即为图像的原点,则可得(5)式:Substituting formula (1) into formula (4), and assuming that the distortion center is the origin of the image, formula (5) can be obtained:

以及(6)式:And (6) type:

用(5)式除以(6)式,得:Divide formula (5) by formula (6) to get:

(7)式表示在传统的径向畸变的畸变标定模型下,a和b具有相同的斜率,并且它们与图像坐标原点三点共线。将(7)式代入(6)式,可得(8)式:Equation (7) indicates that under the traditional radial distortion distortion calibration model, a and b have the same slope, and they are collinear with the three points of the image coordinate origin. Substituting formula (7) into formula (6), formula (8) can be obtained:

这是一个关于yd的一元二次方程,其判别式为(9)式:This is a one-variable quadratic equation about y d , and its discriminant formula is (9):

由于对于径向失真而言,有λ<0,因而Δ必然大于零,由此可得式(8)必然有2个实数解。从以上推导可知,在传统的径向畸变的畸变标定模型下,一组空间平行直线的灭点在畸变图像上会有2个投影点。由于一组空间平行直线在该模型下被映射成为一个圆心共线圆弧组,因此该圆心共线圆弧组中所有的圆弧会有2个公共交点。As for the radial distortion, λ<0, Δ must be greater than zero, so it can be obtained that formula (8) must have 2 real number solutions. From the above derivation, it can be seen that under the traditional radial distortion distortion calibration model, the vanishing points of a group of parallel straight lines in space will have two projection points on the distorted image. Since a group of parallel straight lines in space is mapped into a center-collinear arc group under this model, all arcs in the center-collinear arc group will have two common intersection points.

需要说明的是,所述至少两组空间平行直线中任一组空间平行直线在畸变图像上均映射为一个圆心共线圆弧组,所述任一组空间平行直线中任一直线在畸变图像上映射的圆心共线圆弧组中均存在对应的一条圆弧。It should be noted that any set of spatially parallel straight lines in the at least two groups of spatially parallel straight lines are mapped to a group of collinear arcs with the centers of circles on the distorted image, and any one of the set of spatially parallel straight lines in the distorted image There is a corresponding arc in the center collinear arc group mapped above.

圆弧拟合模块12,用于对所述至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组进行拟合处理;An arc fitting module 12, configured to perform fitting processing on the group of collinear arcs with the center of the circle mapped on the distorted image by each group of spatial parallel straight lines in the at least two groups of spatially parallel straight lines;

具体实现中,所述圆弧拟合模块12可以分别对所述至少两组空间平行直线中每一组空间平行直线进行操作。所述圆弧拟合模块12对每一组空间平行直线在畸变图像上映射的圆心共线圆弧组进行拟合处理,进一步的,所述圆弧拟合模块12采用预设的非线性优化算法,计算所述每一组空间平行直线在畸变图像上映射的圆心共线圆弧组的公共参数和比例系数,所述圆弧拟合模块12采用所述公共参数和所述比例系数计算获取拟合处理结果,所述拟合处理结果包括各个所述圆心共线圆弧组中每条圆弧的参数化表示以及各个所述圆心共线圆弧组对应的两个公共交点。In a specific implementation, the arc fitting module 12 may separately operate on each group of spatially parallel straight lines in the at least two groups of spatially parallel straight lines. The arc fitting module 12 performs fitting processing on each group of spatially parallel straight lines mapped on the distorted image to the center collinear arc group, further, the arc fitting module 12 adopts a preset nonlinear optimization Algorithm, calculating the common parameters and proportional coefficients of the center collinear arc group mapped on the distorted image by each group of spatially parallel straight lines, the arc fitting module 12 uses the public parameters and the proportional coefficient to calculate and obtain A fitting processing result, the fitting processing result including a parametric representation of each arc in each of the groups of collinear arcs with centers of circles and two common intersection points corresponding to each of the groups of collinear arcs with centers of circles.

其中,所述公共参数包括所述两个公共交点间连线的中点坐标以及所述中点到所述两个公共交点中任一交点的向量,所述比例系数包括各个所述圆心共线圆弧组中每条圆弧对应的预设系数。Wherein, the public parameters include the midpoint coordinates of the line between the two public intersections and the vector from the midpoint to any intersection point of the two public intersections, and the proportional coefficient includes the collinear The preset coefficient corresponding to each arc in the arc group.

具体的,请一并参见图6,为本发明实施例提供了圆弧拟合模块的结构示意图。如图6所示,所述圆弧拟合模块12可以包括:Specifically, please refer to FIG. 6 , which provides a schematic structural diagram of an arc fitting module according to an embodiment of the present invention. As shown in Figure 6, the arc fitting module 12 may include:

参数系数计算单元121,用于采用预设的非线性优化算法,计算所述至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组的公共参数和比例系数;The parameter coefficient calculation unit 121 is configured to use a preset nonlinear optimization algorithm to calculate the common parameters and proportions of the center collinear arc group mapped on the distorted image by each set of spatial parallel straight lines in the at least two groups of spatial parallel straight lines coefficient;

结果获取单元122,用于采用所述公共参数和所述比例系数计算获取拟合处理结果,所述拟合处理结果包括各个所述圆心共线圆弧组中每条圆弧的参数化表示以及各个所述圆心共线圆弧组对应的两个公共交点;The result obtaining unit 122 is configured to use the public parameters and the proportional coefficient to calculate and obtain a fitting processing result, the fitting processing result including a parametric representation of each arc in each of the collinear arc groups with centers of circles and Two public intersection points corresponding to each of the collinear arc groups with centers of circles;

具体实现中,所述参数系数计算单元121可以分别对所述至少两组空间平行直线中每一组空间平行直线进行操作。所述参数系数计算单元121可以采用预设的非线性优化算法,计算每一组空间平行直线在畸变图像上映射的圆心共线圆弧组的公共参数和比例系数,进一步的,所述参数系数计算单元121获取所述至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组对应的平方距离最小化方程,并采用预设的非线性优化算法对所述平方距离最小化方程进行计算,获取各个所述圆心共线圆弧组的公共参数和比例系数。In a specific implementation, the parameter coefficient calculating unit 121 may separately operate on each group of spatially parallel straight lines in the at least two groups of spatially parallel straight lines. The parameter coefficient calculation unit 121 can use a preset nonlinear optimization algorithm to calculate the public parameters and proportional coefficients of the center collinear arc group mapped by each group of spatially parallel straight lines on the distorted image. Further, the parameter coefficient The calculation unit 121 obtains the square distance minimization equation corresponding to the collinear arc group with the center of the center of each group of the at least two groups of spatially parallel straight lines mapped on the distorted image, and uses a preset nonlinear optimization algorithm to The square distance minimization equation is used for calculation, and the common parameters and proportional coefficients of each of the collinear arc groups with the centers of the circles are obtained.

可以理解的是,每个圆心共线圆弧组都存在各自的公共参数和比例系数。所述结果获取单元122可以根据各个圆心共线圆弧组的公共参数获取各个所述圆心共线圆弧组对应的两个公共交点,根据各个圆心共线圆弧组的比例系数获取各个圆心共线圆弧组中每条圆弧的参数化表示。It can be understood that each group of center-center collinear arcs has its own public parameters and proportional coefficients. The result acquisition unit 122 can obtain the two common intersection points corresponding to each of the collinear arc groups according to the common parameters of each group of collinear arcs, and obtain the common points of intersection of each group of collinear arcs according to the proportional coefficient of each group of collinear arcs. A parametric representation of each arc in the line-arc group.

其中,所述公共参数包括所述两个公共交点间连线的中点坐标以及所述中点到所述两个公共交点中任一交点的向量,所述比例系数包括各个所述圆心共线圆弧组中每条圆弧对应的预设系数。Wherein, the public parameters include the midpoint coordinates of the line between the two public intersections and the vector from the midpoint to any intersection point of the two public intersections, and the proportional coefficient includes the collinear The preset coefficient corresponding to each arc in the arc group.

具体的,请一并参见图7,为本发明实施例提供了参数系数计算单元的结构示意图。如图7所示,所述参数系数计算单元121可以包括:Specifically, please refer to FIG. 7 , which provides a schematic structural diagram of a parameter coefficient calculation unit for an embodiment of the present invention. As shown in Figure 7, the parameter coefficient calculation unit 121 may include:

方程获取子单元1211,用于获取所述至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组对应的平方距离最小化方程;The equation obtaining subunit 1211 is configured to obtain the square distance minimization equation corresponding to the group of collinear arcs with the center of the circle mapped on the distorted image by each group of the at least two groups of spatially parallel straight lines;

具体实现中,所述方程获取子单元1211在拟合所述至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组时,所述方程获取子单元1211获取该圆心共线圆弧组的平方距离最小化方程。In a specific implementation, when the equation acquisition subunit 1211 fits the group of collinear arcs with the centers of the circles mapped on the distorted image by each set of spatial parallel straight lines in the at least two sets of spatial parallel straight lines, the equation acquisition subunit 1211 Obtains the squared distance minimization equation for this set of collinear arcs with centers.

请一并参见图4,为本发明实施例提供了圆心共线圆弧组在畸变图像上的举例示意图。如图4所示,假设2个公共交点分别是M点和N点,假设M、N点连线的中点P在畸变图像上的坐标为(px,py),获取P点到N点或M点的向量,本发明实施例中采用P点到N点的向量,记为若这个圆心共线圆弧组中第i个圆弧的圆心位置是oi,则从P点出发到oi点的有向直线的单位向量可表示为(10)式:Please also refer to FIG. 4 , which provides an example schematic diagram of a group of collinear arcs with centers of circles on a distorted image according to an embodiment of the present invention. As shown in Figure 4, assuming that the two common intersection points are points M and N respectively, assuming that the coordinates of the midpoint P on the line connecting M and N points on the distorted image are (p x , p y ), obtain points P to N The vector of point or M point, adopt the vector of P point to N point in the embodiment of the present invention, denote as If the center position of the i-th arc in the collinear arc group is o i , then the unit vector of the directed line from point P to point o i can be expressed as formula (10):

(10)式中,表示与向量相垂直的向量,须满足 表示向量的模。由此可知,Poi o有二组解,分别是 (10) where, representation and vector Perpendicular vectors must satisfy representation vector model. It can be seen that Po i o has two sets of solutions, which are with

设定一个比例系数则圆心oi可以表示为(11)式:set a scaling factor Then the center o i can be expressed as (11):

假设该圆心共线圆弧组对应的共线圆组共有n条圆弧,则待求的未知变量的总数为(4+n),(4+n)中n表示有n个比例系数(k1…kn),4表示为n条圆弧所共有的公共参数,分别是表示P点位置的px和py,以及表示向量的tx和tyAssuming that the collinear circle group corresponding to the center collinear arc group has n arcs, the total number of unknown variables to be obtained is (4+n), and n in (4+n) means that there are n proportional coefficients (k 1 ... k n ), 4 represents the public parameters shared by n arcs, which are respectively p x and p y representing the position of point P, and representing the vector t x and t y .

对于共线圆组中第i条圆弧,它的半径可表示为(12)式:For the i-th arc in the collinear circle group, its radius can be expressed as formula (12):

则在拟合该圆弧时,要求最小化的方程为(13)式:Then when fitting the arc, the equation required to be minimized is (13):

(13)式中,m表示拟合该条圆弧的点的个数,|Qi,joi|为第i条圆弧上的点Qi,j与圆心oi之间的距离。In formula (13), m represents the number of points fitting the arc, and |Q i,j o i | is the distance between point Q i,j on the i-th arc and the center o i .

在一个圆心共线圆弧组中,这样的圆弧共有n条,因此平方距离最小化方程为(14)式:In a group of collinear arcs with centers, there are n such arcs, so the square distance minimization equation is (14):

参数系数获取子单元1212,用于采用预设的非线性优化算法对所述平方距离最小化方程进行计算,获取各个所述圆心共线圆弧组的公共参数和比例系数;The parameter coefficient obtaining subunit 1212 is used to calculate the square distance minimization equation by using a preset nonlinear optimization algorithm, and obtain the public parameters and proportional coefficients of each of the collinear arc groups with centers of circles;

具体实现中,所述预设的非线性优化算法优选为LM算法,所述参数系数获取子单元1212采用所述预设的非线性优化算法对所述平方距离最小化方程进行计算,获取各个所述圆心共线圆弧组的公共参数和比例系数。In a specific implementation, the preset nonlinear optimization algorithm is preferably the LM algorithm, and the parameter coefficient acquisition subunit 1212 uses the preset nonlinear optimization algorithm to calculate the square distance minimization equation to obtain each Describe the common parameters and proportional coefficients of the center collinear arc group.

其中,所述公共参数包括所述两个公共交点间连线的中点坐标以及所述中点到所述两个公共交点中任一交点的向量,所述比例系数包括各个所述圆心共线圆弧组中每条圆弧对应的预设系数。Wherein, the public parameters include the midpoint coordinates of the line between the two public intersections and the vector from the midpoint to any intersection point of the two public intersections, and the proportional coefficient includes the collinear The preset coefficient corresponding to each arc in the arc group.

模型生成模块13,用于根据拟合处理结果生成畸变标定模型;A model generation module 13, configured to generate a distortion calibration model according to the fitting processing result;

具体实现中,所述模型生成模块13根据各个所述圆心共线圆弧组中每条圆弧的参数化表示以及各个所述圆心共线圆弧组对应的两个公共交点获取畸变中心点坐标和畸变参数,并采用所述畸变中心点坐标和所述畸变参数生成畸变标定模型。In a specific implementation, the model generation module 13 obtains the coordinates of the distortion center point according to the parameterized representation of each arc in each of the collinear arc groups and the two public intersection points corresponding to each of the collinear arc groups. and distortion parameters, and generate a distortion calibration model by using the coordinates of the distortion center point and the distortion parameters.

具体的,请一并参见图8,为本发明实施例提供了模型生成模块的结构示意图。如图8所示,所述模型生成模块13可以包括:Specifically, please refer to FIG. 8 , which provides a schematic structural diagram of a model generation module for an embodiment of the present invention. As shown in Figure 8, the model generation module 13 may include:

坐标参数获取单元131,用于根据拟合处理结果获取畸变中心点坐标和畸变参数;A coordinate parameter acquiring unit 131, configured to acquire the coordinates of the distortion center point and the distortion parameters according to the fitting processing result;

具体实现中,所述坐标参数获取单元131获取各个圆心共线圆弧组对应的两个公共交点的直线方程,并将所有直线方程的交点坐标确定为畸变中心点坐标,所述坐标参数获取单元131根据所述畸变中心点坐标和任一圆心共线圆弧组中任一圆弧的参数化表示,获取畸变参数。In a specific implementation, the coordinate parameter acquisition unit 131 acquires the straight line equations of the two common intersection points corresponding to each circle center collinear arc group, and determines the intersection point coordinates of all the straight line equations as the distortion center point coordinates, and the coordinate parameter acquisition unit 131 Obtain a distortion parameter according to the coordinates of the distortion center point and the parametric representation of any arc in any circle center collinear arc group.

具体的,请一并参见图9,为本发明实施例提供了坐标参数获取单元的结构示意图。如图9所示,所述坐标参数获取单元131可以包括:Specifically, please refer to FIG. 9 , which provides a schematic structural diagram of a coordinate parameter acquisition unit for an embodiment of the present invention. As shown in Figure 9, the coordinate parameter acquisition unit 131 may include:

坐标获取子单元1311,用于获取各个圆心共线圆弧组对应的两个公共交点的直线方程,并将所有直线方程的交点坐标确定为畸变中心点坐标;The coordinate obtaining subunit 1311 is used to obtain the straight line equations of the two common intersection points corresponding to the collinear arc groups of the respective circle centers, and determine the intersection point coordinates of all the straight line equations as the distortion center point coordinates;

具体实现中,所述坐标获取子单元1311获取各个圆心共线圆弧组对应的两个公共交点所组成的直线方程,例如:M点与N点在畸变图像中所确定的直线方程,若空间平行直线存在有W组,则对应的圆心共线圆弧组也有W个,则可以获得W条直线方程,对W条直线方程求交点坐标,并将该交点坐标确定为畸变中心点坐标。例如:W条直线方程得出的交点坐标为(xd0,yd0),则将(xd0,yd0)确定为畸变中心点坐标。In a specific implementation, the coordinate acquisition subunit 1311 acquires the straight line equation formed by the two common intersection points corresponding to the collinear arc groups with the centers of each circle, for example: the straight line equation determined by point M and point N in the distorted image, if the space If there are W groups of parallel straight lines, there are also W corresponding circle center collinear arc groups, then W straight line equations can be obtained, the coordinates of the intersection points are calculated for the W straight line equations, and the coordinates of the intersection points are determined as the coordinates of the distortion center point. For example: the coordinates of the intersection obtained from the equations of W straight lines are (x d0 , y d0 ), then (x d0 , y d0 ) is determined as the coordinates of the distortion center point.

参数获取子单元1312,用于根据所述畸变中心点坐标和任一圆心共线圆弧组中任一圆弧的参数化表示,获取畸变参数;A parameter acquisition subunit 1312, configured to acquire distortion parameters according to the coordinates of the distortion center point and the parametric representation of any arc in any circle center collinear arc group;

具体实现中,假设所述参数获取子单元1312获得的任一圆心共线圆弧组中任一圆弧的参数化表示为所述畸变中心点坐标为(xd0,yd0),则所述畸变参数为:In the specific implementation, it is assumed that the parameterized expression of any arc in any circle center collinear arc group obtained by the parameter acquisition subunit 1312 is expressed as The coordinates of the distortion center point are (x d0 , y d0 ), then the distortion parameters are:

其中,A、B和C为任一圆弧的参数化表示中的参数。where A, B and C are the parameters in the parametric representation of any arc.

模型生成单元132,用于采用所述畸变中心点坐标和所述畸变参数生成畸变标定模型;A model generating unit 132, configured to generate a distortion calibration model by using the coordinates of the distortion center point and the distortion parameters;

具体实现中,所述模型生成单元132可以根据所述畸变中点坐标和所述畸变参数生成畸变标定模型。In a specific implementation, the model generation unit 132 may generate a distortion calibration model according to the distortion midpoint coordinates and the distortion parameters.

所述模型生成单元132根据畸变中心点坐标可以确定rd的表达方式,假设畸变中心点坐标为c,则表达方式为:The model generation unit 132 can determine the expression of r according to the coordinates of the distortion center point. Assuming that the coordinate of the distortion center point is c , the expression is:

rd=︱b-c︱r d =︱bc︱

所述模型生成单元132将所述表达方式以及畸变参数λ代入(1)式,生成畸变标定模型。The model generation unit 132 substitutes the expression and the distortion parameter λ into formula (1) to generate a distortion calibration model.

在本发明实施例中,通过获取包含至少两组空间平行直线的标定图像,对所述至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组进行拟合处理,并根据拟合处理结果生成畸变标定模型。通过采用至少两组空间平行直线、分别对至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组进行拟合处理,以及对畸变中心点坐标重新求取,提高了畸变标定模型的标定结果的准确率;通过利用圆心共线性质,使得标定结果在存在较大噪声的情况下仍旧能够保持鲁棒性。In the embodiment of the present invention, by acquiring a calibration image containing at least two sets of spatially parallel straight lines, the group of collinear arcs with the centers of circles mapped on the distorted image by each of the at least two sets of spatially parallel straight lines is simulated. Fit processing, and generate a distortion calibration model based on the fitting processing results. By adopting at least two sets of spatially parallel straight lines, respectively performing fitting processing on the center collinear arc groups mapped on the distorted image by each set of spatially parallel straight lines in the at least two sets of spatially parallel straight lines, and recalculating the coordinates of the distortion center point , which improves the accuracy of the calibration results of the distortion calibration model; by using the collinear property of the center of the circle, the calibration results can still maintain robustness in the presence of large noise.

请参见图10,为本发明实施例提供了另一种鱼眼镜头径向畸变的标定装置的结构示意图。如图10所示,所述标定装置1000可以包括:至少一个处理器1001,例如CPU,用户接口1003,至少一个网络接口1004,存储器1005,至少一个通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。其中,用户接口1003可以包括显示屏(Display)、键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器。存储器1005可选的还可以是至少一个位于远离前述处理器1001的存储装置。如图10所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及标定应用程序。Please refer to FIG. 10 , which provides a schematic structural diagram of another calibration device for radial distortion of a fisheye lens according to an embodiment of the present invention. As shown in FIG. 10 , the calibration device 1000 may include: at least one processor 1001 , such as a CPU, a user interface 1003 , at least one network interface 1004 , a memory 1005 , and at least one communication bus 1002 . Wherein, the communication bus 1002 is used to realize connection and communication between these components. Wherein, the user interface 1003 may include a display screen (Display) and a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. Optionally, the network interface 1004 may include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a non-volatile memory, such as at least one disk memory. Optionally, the memory 1005 may also be at least one storage device located away from the aforementioned processor 1001 . As shown in FIG. 10 , the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a calibration application program.

所述处理器1001可以用于调用存储器1005中存储的标定应用程序,并具体执行以下步骤:The processor 1001 can be used to call the calibration application program stored in the memory 1005, and specifically perform the following steps:

获取包含至少两组空间平行直线的标定图像;Obtain a calibration image comprising at least two sets of spatially parallel straight lines;

对所述至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组进行拟合处理;performing fitting processing on the group of collinear arcs with the center of the circle mapped on the distorted image by each of the at least two groups of spatially parallel straight lines;

根据拟合处理结果生成畸变标定模型。A distortion calibration model is generated according to the fitting processing results.

在本发明实施例的一种可行的实施方式中所述至少两组空间平行直线中任一组空间平行直线在畸变图像上均映射为一个圆心共线圆弧组,所述任一组空间平行直线中任一直线在畸变图像上映射的圆心共线圆弧组中均存在对应的一条圆弧。In a feasible implementation manner of the embodiment of the present invention, any set of spatially parallel straight lines among the at least two groups of spatially parallel straight lines are mapped to a group of collinear arcs with centers of circles on the distorted image, and any set of spatially parallel straight lines Any straight line among the straight lines has a corresponding circular arc in the group of collinear arcs with the center of the circle mapped on the distorted image.

在本发明实施例的另一种可行的实施方式中,所述处理器1001在执行对所述至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组进行拟合处理时,具体执行以下步骤:In another feasible implementation manner of the embodiment of the present invention, the processor 1001 executes the group of collinear arcs with the centers of the circles mapped on the distorted image for each set of the at least two sets of spatially parallel straight lines. When performing fitting processing, the following steps are specifically performed:

采用预设的非线性优化算法,计算所述至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组的公共参数和比例系数;Using a preset non-linear optimization algorithm to calculate the common parameters and proportional coefficients of the center collinear arc group mapped on the distorted image by each group of spatial parallel straight lines in the at least two groups of spatial parallel straight lines;

采用所述公共参数和所述比例系数计算获取拟合处理结果,所述拟合处理结果包括各个所述圆心共线圆弧组中每条圆弧的参数化表示以及各个所述圆心共线圆弧组对应的两个公共交点;Using the public parameters and the proportional coefficient to calculate and obtain a fitting processing result, the fitting processing result includes a parametric representation of each arc in each of the center collinear arc groups and each of the center collinear circles The two public intersection points corresponding to the arc group;

其中,所述公共参数包括所述两个公共交点间连线的中点坐标以及所述中点到所述两个公共交点中任一交点的向量,所述比例系数包括各个所述圆心共线圆弧组中每条圆弧对应的预设系数。Wherein, the public parameters include the midpoint coordinates of the line between the two public intersections and the vector from the midpoint to any intersection point of the two public intersections, and the proportional coefficient includes the collinear The preset coefficient corresponding to each arc in the arc group.

在本发明实施例的又一种可行的实施方式中,所述处理器1001在执行采用预设的非线性优化算法,计算所述至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组的公共参数和比例系数时,具体执行以下步骤:In yet another feasible implementation manner of the embodiment of the present invention, the processor 1001 is executing a preset nonlinear optimization algorithm to calculate the effect of each group of spatially parallel straight lines in the at least two groups of spatially parallel straight lines on the distorted image. When the public parameters and proportional coefficients of the center-point collinear arc group are mapped, the following steps are specifically performed:

获取所述至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组对应的平方距离最小化方程;Obtaining the square distance minimization equation corresponding to the group of collinear arcs with the centers of each group of the at least two groups of spatially parallel straight lines mapped on the distorted image;

采用预设的非线性优化算法对所述平方距离最小化方程进行计算,获取各个所述圆心共线圆弧组的公共参数和比例系数。A preset nonlinear optimization algorithm is used to calculate the square distance minimization equation to obtain the common parameters and proportional coefficients of each of the collinear arc groups with centers.

在本发明实施例的又一种可行的实施方式中,所述处理器1001在执行根据拟合处理结果生成畸变标定模型时,具体执行以下步骤:In yet another feasible implementation manner of the embodiment of the present invention, when the processor 1001 generates the distortion calibration model according to the fitting processing result, specifically perform the following steps:

根据拟合处理结果获取畸变中心点坐标和畸变参数;Obtain the coordinates of the distortion center point and the distortion parameters according to the fitting processing result;

采用所述畸变中心点坐标和所述畸变参数生成畸变标定模型。A distortion calibration model is generated by using the coordinates of the distortion center point and the distortion parameters.

在本发明实施例的又一种可行的实施方式中,所述处理器1001在执行根据拟合处理结果获取畸变中心点坐标和畸变参数时,具体执行以下步骤:In yet another feasible implementation manner of the embodiment of the present invention, when the processor 1001 executes obtaining the coordinates of the distortion center point and the distortion parameters according to the fitting processing result, specifically perform the following steps:

获取各个圆心共线圆弧组对应的两个公共交点的直线方程,并将所有直线方程的交点坐标确定为畸变中心点坐标;Obtain the straight line equations of the two common intersection points corresponding to the collinear arc groups of the respective circle centers, and determine the intersection coordinates of all straight line equations as the distortion center point coordinates;

根据所述畸变中心点坐标和任一圆心共线圆弧组中任一圆弧的参数化表示,获取畸变参数。The distortion parameters are obtained according to the coordinates of the distortion center point and the parametric representation of any circular arc in any circle center collinear circular arc group.

在本发明实施例的又一种可行的实施方式中,所述平方距离最小化方程为:In yet another feasible implementation manner of the embodiment of the present invention, the square distance minimization equation is:

其中,m表示拟合第i条圆弧的点的个数,|Qi,joi|表示第i条圆弧上的点Qi,j与圆心oi之间的距离,ri表示第i条圆弧的半径,n表示一个圆心共线圆弧组中圆弧的条数,(px,py)表示所述两个公共交点M点和N点间连线的中点P点的坐标,(tx,ty)表示所述P点到所述M点或N点的向量,(k1…kn)表示n条圆弧中每条圆弧的比例系数;Among them, m represents the number of points fitting the i-th circular arc, |Q i,j o i | represents the distance between point Q i,j on the i-th circular arc and the center o i of the circle, r i represents The radius of the i-th arc, n represents the number of arcs in a center collinear arc group, (p x , p y ) represents the midpoint P of the line between the two public intersection points M and N The coordinates of the point, (t x , ty ) represents the vector from the P point to the M point or N point, and (k 1 ... k n ) represents the proportional coefficient of each arc in the n arcs;

所述预设的非线性优化算法为LM算法。The preset nonlinear optimization algorithm is LM algorithm.

在本发明实施例的又一种可行的实施方式中,假设任一圆心共线圆弧组中任一圆弧的参数化表示为所述畸变中心点坐标为(xd0,yd0),则所述畸变参数为:In yet another feasible implementation of the embodiment of the present invention, it is assumed that the parametric representation of any arc in any group of collinear arcs is The coordinates of the distortion center point are (x d0 , y d0 ), then the distortion parameters are:

其中,A、B和C为任一圆弧的参数化表示中的参数。where A, B and C are the parameters in the parametric representation of any arc.

在本发明实施例的又一种可行的实施方式中,所述畸变标定模型为:In yet another feasible implementation manner of the embodiment of the present invention, the distortion calibration model is:

其中,b=(xd,yd)为畸变图像坐标点,a=(xu,yu)为经过畸变校正后的图像坐标点,rd为b与畸变中心点坐标的欧氏距离。Among them, b=(x d , y d ) is the coordinate point of the distorted image, a=(x u , y u ) is the coordinate point of the image after distortion correction, and r d is the Euclidean distance between b and the coordinate of the distortion center point.

在本发明实施例中,通过获取包含至少两组空间平行直线的标定图像,对所述至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组进行拟合处理,并根据拟合处理结果生成畸变标定模型。通过采用至少两组空间平行直线、分别对至少两组空间平行直线中每一组空间平行直线在畸变图像上映射的圆心共线圆弧组进行拟合处理,以及对畸变中心点坐标重新求取,提高了畸变标定模型的标定结果的准确率;通过利用圆心共线性质,使得标定结果在存在较大噪声的情况下仍旧能够保持鲁棒性。In the embodiment of the present invention, by acquiring a calibration image containing at least two sets of spatially parallel straight lines, the group of collinear arcs with the centers of circles mapped on the distorted image by each of the at least two sets of spatially parallel straight lines is simulated. Fit processing, and generate a distortion calibration model based on the fitting processing results. By adopting at least two sets of spatially parallel straight lines, respectively performing fitting processing on the center collinear arc groups mapped on the distorted image by each set of spatially parallel straight lines in the at least two sets of spatially parallel straight lines, and recalculating the coordinates of the distortion center point , which improves the accuracy of the calibration results of the distortion calibration model; by using the collinear property of the center of the circle, the calibration results can still maintain robustness in the presence of large noise.

通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本发明可以用硬件实现,或固件实现,或它们的组合方式来实现。当使用软件实现时,可以将上述功能存储在计算机可读介质中或作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是计算机能够存取的任何可用介质。以此为例但不限于:计算机可读介质可以包括RAM、ROM、或其他光盘存储、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质。此外。任何连接可以适当的成为计算机可读介质。例如,如果软件是使用同轴电缆、光纤光缆、双绞线、数字用户线或者诸如红外线、无线电和微波之类的无线技术从网站、服务器或者其他远程源传输的,那么同轴电缆、光纤光缆、双绞线、数字用户线或者诸如红外线、无线和微波之类的无线技术包括在所属介质的定影中。如本发明所使用的,盘(Disk)和碟(disc)包括压缩光碟、激光碟、光碟、数字通用光碟、软盘和蓝光光碟,其中盘通常磁性的复制数据,而碟则用激光来光学的复制数据。上面的组合也应当包括在计算机可读介质的保护范围之内。Through the above description of the implementation manners, those skilled in the art can clearly understand that the present invention can be implemented by hardware, firmware, or a combination thereof. When implemented in software, the functions described above may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a computer. By way of example and without limitation, computer readable media may include RAM, ROM, or other optical disk storage, magnetic disk storage media, or other magnetic storage devices, or may be used to carry or store desired program code in the form of instructions or data structures and any other medium that can be accessed by a computer. also. Any connection can suitably be a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line, or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable , twisted pair, digital subscriber line, or wireless technologies such as infrared, wireless, and microwave are included in the fixation of the respective media. As used herein, disk and disc include compact disc, laser disc, optical disc, digital versatile disc, floppy disc and blu-ray disc, where discs usually reproduce data magnetically, while discs reproduce data optically with lasers Copy data. Combinations of the above should also be included within the scope of computer-readable media.

以上所揭露的仅为本发明较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。The above disclosures are only preferred embodiments of the present invention, and certainly cannot limit the scope of rights of the present invention. Therefore, equivalent changes made according to the claims of the present invention still fall within the scope of the present invention.

Claims (16)

1. a kind of scaling method of fish eye lens radial distortion, it is characterised in that include:
Obtain the uncalibrated image comprising at least two groups of space parallel lines;
The center of circle mapped on fault image each group of space parallel lines at least two groups space parallel lines is conllinear Circular arc group is fitted process;
Distortion peg model is generated according to process of fitting treatment result;
Wherein, it is described that each group of space parallel lines at least two groups space parallel lines mapped on fault image The conllinear circular arc group in the center of circle is fitted process, including:
Using default nonlinear optimization algorithm, each group of space parallel lines at least two groups space parallel lines described in calculating The common parameter and proportionality coefficient of the conllinear circular arc group in the center of circle mapped on fault image;
Calculated using the common parameter and the proportionality coefficient and obtain process of fitting treatment result, the process of fitting treatment result includes each The parametrization of every circular arc is represented and the conllinear circular arc group corresponding two in each described center of circle in the conllinear circular arc group in the individual center of circle Individual common intersection;
Wherein, the common parameter includes that the middle point coordinates of line and the midpoint are to described two between described two common intersections The vector of arbitrary intersection point in individual common intersection, the proportionality coefficient includes every circular arc pair in the conllinear circular arc group in each described center of circle The predetermined coefficient answered.
2. method according to claim 1, it is characterised in that arbitrary group of space at least two groups space parallel lines Parallel lines is mapped as the conllinear circular arc group in center of circle on fault image, arbitrary straight in the arbitrary group of space parallel lines There is a corresponding circular arc in the conllinear circular arc group in the center of circle that line maps on fault image.
3. method according to claim 1, it is characterised in that described using default nonlinear optimization algorithm, calculates institute State at least two groups space parallel lines the conllinear circular arc group in the center of circle that each group of space parallel lines maps on fault image Common parameter and proportionality coefficient, including:
Obtain at least two groups space parallel lines center of circle that each group of space parallel lines map on fault image common The corresponding square distance minimization equation of line circular arc group;
The square distance minimization equation is calculated using default nonlinear optimization algorithm, obtains each center of circle The common parameter and proportionality coefficient of conllinear circular arc group.
4. method according to claim 1, it is characterised in that described that distortion calibration mold is generated according to process of fitting treatment result Type, including:
Center of distortion point coordinates and distortion parameter are obtained according to process of fitting treatment result;
Distortion peg model is generated using the center of distortion point coordinates and the distortion parameter.
5. method according to claim 4, it is characterised in that described center of distortion point is obtained according to process of fitting treatment result to sit Mark and distortion parameter, including:
Obtain the linear equation of corresponding two common intersections of the conllinear circular arc group in each center of circle, and by the intersection point of all linear equations Coordinate is defined as center of distortion point coordinates;
Represented according to the parametrization of arbitrary circular arc in the conllinear circular arc group of the center of distortion point coordinates and arbitrary center of circle, obtain distortion Parameter.
6. method according to claim 3, it is characterised in that the square distance minimization equation is:
arg min p x , p y , t x , t y k 1 ... k n &Sigma; i = 1 n &Sigma; j = 1 m &lsqb; | Q i , j o i | - r i &rsqb; 2
Wherein, m represents the number of the point of i-th circular arc of fitting, | Qi,joi| represent the point Q on i-th circular arci,jWith center of circle oiIt Between distance, riThe radius of i-th circular arc is represented, n represents the bar number of circular arc in the conllinear circular arc group in center of circle, (px, py) represent The coordinate of the midpoint P points of line, (t between described two common intersection M points and N pointsx, ty) represent the P points to the M points or N points Vector, (k1…kn) represent n bar circular arcs in every circular arc proportionality coefficient;
The default nonlinear optimization algorithm is LM (Leven-Marquardt) algorithm.
7. method according to claim 5, it is characterised in that assume the ginseng of arbitrary circular arc in the conllinear circular arc group in arbitrary center of circle Numberization is expressed asThe center of distortion point coordinates is (xd0, yd0), then the distortion parameter For:
&lambda; = 1 x d 0 2 + y d 0 2 + Ax d 0 + By d 0 + C
Wherein, A, B and C are the parameter in the parametrization expression of arbitrary circular arc.
8. method according to claim 7, it is characterised in that the distortion peg model is:
a = b 1 + &lambda;r d 2
Wherein, b=(xd, yd) be fault image coordinate points, a=(xu, yu) it is image coordinate point after distortion correction, rdFor The Euclidean distance of b and center of distortion point coordinates.
9. a kind of caliberating device of fish eye lens radial distortion, it is characterised in that include:
Uncalibrated image acquisition module, for obtaining the uncalibrated image comprising at least two groups of space parallel lines;
Circular fitting module, for each group of space parallel lines at least two groups space parallel lines in fault image The conllinear circular arc group in the center of circle of upper mapping is fitted process;
Model generation module, for generating distortion peg model according to process of fitting treatment result;
Wherein, the circular fitting module includes:
Parameter coefficient calculation unit, for using default nonlinear optimization algorithm, at least two groups space straight parallels described in calculating The common parameter and proportionality coefficient of the conllinear circular arc group in the center of circle that each group of space parallel lines maps on fault image in line;
As a result acquiring unit, for calculating using the common parameter and the proportionality coefficient process of fitting treatment result is obtained, described Process of fitting treatment result includes that the parametrization of every circular arc in the conllinear circular arc group in each described center of circle is represented and each described center of circle Corresponding two common intersections of conllinear circular arc group;
Wherein, the common parameter includes that the middle point coordinates of line and the midpoint are to described two between described two common intersections The vector of arbitrary intersection point in individual common intersection, the proportionality coefficient includes every circular arc pair in the conllinear circular arc group in each described center of circle The predetermined coefficient answered.
10. caliberating device according to claim 9, it is characterised in that arbitrary at least two groups space parallel lines Group space parallel lines is mapped as the conllinear circular arc group in center of circle on fault image, in the arbitrary group of space parallel lines There is a corresponding circular arc in the conllinear circular arc group in the center of circle that arbitrary straight line maps on fault image.
11. caliberating devices according to claim 9, it is characterised in that the parameter coefficient calculation unit includes:
Equation obtains subelement, for obtaining at least two groups space parallel lines in each group of space parallel lines in distortion The corresponding square distance minimization equation of the conllinear circular arc group in the center of circle mapped on image;
Parameter coefficient obtains subelement, for being entered to the square distance minimization equation using default nonlinear optimization algorithm Row is calculated, and obtains the common parameter and proportionality coefficient of the conllinear circular arc group in each described center of circle.
12. caliberating devices according to claim 9, it is characterised in that the model generation module includes:
Coordinate parameters acquiring unit, for obtaining center of distortion point coordinates and distortion parameter according to process of fitting treatment result;
Model signal generating unit, for generating distortion peg model using the center of distortion point coordinates and the distortion parameter.
13. caliberating devices according to claim 12, it is characterised in that the coordinate parameters acquiring unit includes:
Coordinate obtains subelement, for obtaining the linear equation of corresponding two common intersections of the conllinear circular arc group in each center of circle, and The intersecting point coordinate of all linear equations is defined as into center of distortion point coordinates;
Parameter acquiring subelement, for according to arbitrary circular arc in the conllinear circular arc group of the center of distortion point coordinates and arbitrary center of circle Parametrization expression, obtains distortion parameter.
14. caliberating devices according to claim 11, it is characterised in that the square distance minimization equation is:
arg min p x , p y , t x , t y k 1 ... k n &Sigma; i = 1 n &Sigma; j = 1 m &lsqb; | Q i , j o i | - r i &rsqb; 2
Wherein, m represents the number of the point of i-th circular arc of fitting, | Qi,joi| represent the point Q on i-th circular arci,jWith center of circle oiIt Between distance, riThe radius of i-th circular arc is represented, n represents the bar number of circular arc in the conllinear circular arc group in center of circle, (px, py) represent The coordinate of the midpoint P points of line, (t between described two common intersection M points and N pointsx, ty) represent the P points to the M points or N points Vector, (k1…kn) represent n bar circular arcs in every circular arc proportionality coefficient;
The default nonlinear optimization algorithm is LM algorithms.
15. caliberating devices according to claim 13, it is characterised in that assume arbitrary circle in the conllinear circular arc group in arbitrary center of circle The parametrization of arc is expressed asThe center of distortion point coordinates is (xd0, yd0), then it is described abnormal Variable element is:
&lambda; = 1 x d 0 2 + y d 0 2 + Ax d 0 + By d 0 + C
Wherein, A, B and C are the parameter in the parametrization expression of arbitrary circular arc.
16. caliberating devices according to claim 15, it is characterised in that the distortion peg model is:
a = b 1 + &lambda;r d 2
Wherein, b=(xd, yd) be fault image coordinate points, a=(xu, yu) it is image coordinate point after distortion correction, rdFor The Euclidean distance of b and center of distortion point coordinates.
CN201410244246.3A 2014-06-04 2014-06-04 Method and device for calibrating fish-eye lens radial distortion Expired - Fee Related CN104077768B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410244246.3A CN104077768B (en) 2014-06-04 2014-06-04 Method and device for calibrating fish-eye lens radial distortion

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410244246.3A CN104077768B (en) 2014-06-04 2014-06-04 Method and device for calibrating fish-eye lens radial distortion

Publications (2)

Publication Number Publication Date
CN104077768A CN104077768A (en) 2014-10-01
CN104077768B true CN104077768B (en) 2017-04-19

Family

ID=51599010

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410244246.3A Expired - Fee Related CN104077768B (en) 2014-06-04 2014-06-04 Method and device for calibrating fish-eye lens radial distortion

Country Status (1)

Country Link
CN (1) CN104077768B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104408730B (en) * 2014-12-08 2018-08-07 北京市新技术应用研究所 Fish-eye caliberating device
CN105096269B (en) * 2015-07-21 2018-03-02 北京交通大学 The method and system of image radial distortion correction based on distortion linear structure detection
CN108009981B (en) * 2017-09-26 2021-06-01 深圳市易成自动驾驶技术有限公司 Method and device for optimizing distortion parameter and computer readable storage medium
CN109102545A (en) * 2018-07-11 2018-12-28 大连理工大学 A kind of distortion correction method based on nonmetric
CN109215084A (en) * 2018-08-06 2019-01-15 杭州雄迈集成电路技术有限公司 A method of for distortion correction location of the core

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1507407A2 (en) * 2003-08-13 2005-02-16 Topcon Corporation Electronic image pickup apparatus with image correction function and method thereof
CN102750697A (en) * 2012-06-08 2012-10-24 华为技术有限公司 A parameter calibration method and device
CN103617615A (en) * 2013-11-27 2014-03-05 华为技术有限公司 Radial distortion parameter obtaining method and obtaining device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1507407A2 (en) * 2003-08-13 2005-02-16 Topcon Corporation Electronic image pickup apparatus with image correction function and method thereof
CN102750697A (en) * 2012-06-08 2012-10-24 华为技术有限公司 A parameter calibration method and device
CN103617615A (en) * 2013-11-27 2014-03-05 华为技术有限公司 Radial distortion parameter obtaining method and obtaining device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Equidistant (fθ) fish-eye perspective with application in distortion centre estimation;Ciaran Hughes 等;《Image and Vision Computing》;20100331;第28卷(第3期);第3节,图7 *
摄像机径向畸变校正和内参估计的单图标定方法;朱云芳;《光电工程》;20120930;第39卷(第9期);125-131 *

Also Published As

Publication number Publication date
CN104077768A (en) 2014-10-01

Similar Documents

Publication Publication Date Title
CN107396075B (en) Method and device for generating projection image correction information
CN104077768B (en) Method and device for calibrating fish-eye lens radial distortion
KR102227583B1 (en) Method and apparatus for camera calibration based on deep learning
CN106127714B (en) A kind of measurement method of virtual reality head-mounted display equipment distortion parameter
CN106251403B (en) A kind of methods, devices and systems of virtual three-dimensional Scene realization
CN111010560B (en) Anti-distortion adjustment method, device and virtual reality system for head-mounted display device
CN102176755B (en) Control method and device based on eye movement three-dimensional display angle
CN106981050A (en) The method and apparatus of the image flame detection shot to fish eye lens
CN107248178A (en) A kind of fisheye camera scaling method based on distortion parameter
WO2016065632A1 (en) Image processing method and device
CN113902849B (en) Three-dimensional face model reconstruction method, device, electronic equipment and storage medium
CN114742703B (en) Method, device, equipment and storage medium for generating binocular stereoscopic panoramic images
CN107976804A (en) A kind of design method of lens optical system, device, equipment and storage medium
CN103247020A (en) Fisheye image spread method based on radial characteristics
CN110874135A (en) Optical distortion correction method and device, terminal equipment and storage medium
CN109785390A (en) A kind of method and apparatus for image flame detection
CN114332246A (en) Virtual simulation method and device for camera distortion
CN112529006B (en) Panoramic picture detection method, device, terminal and storage medium
JP2008052589A (en) Method for correcting distortion of wide angle image
CN105488764B (en) Fisheye image correcting method and device
CN115834860B (en) Background blur method, device, equipment, storage medium and program product
CN104994295B (en) The method and mobile terminal of a kind of distortion correction
CN106780405A (en) A kind of quick fish eye images edge enhancing method
Lazarenko et al. The algorithm for transformation of images from omnidirectional cameras
CN106162149A (en) A kind of method shooting 3D photo and mobile terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into 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: 20170419

Termination date: 20200604