CN114565679A - Focal length, radial distortion and posture calibration method based on camera position - Google Patents

Focal length, radial distortion and posture calibration method based on camera position Download PDF

Info

Publication number
CN114565679A
CN114565679A CN202210149047.9A CN202210149047A CN114565679A CN 114565679 A CN114565679 A CN 114565679A CN 202210149047 A CN202210149047 A CN 202210149047A CN 114565679 A CN114565679 A CN 114565679A
Authority
CN
China
Prior art keywords
distortion
camera
coordinate system
point
follows
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210149047.9A
Other languages
Chinese (zh)
Other versions
CN114565679B (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.)
Chinese People's Liberation Army 63660
Original Assignee
Chinese People's Liberation Army 63660
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 Chinese People's Liberation Army 63660 filed Critical Chinese People's Liberation Army 63660
Priority to CN202210149047.9A priority Critical patent/CN114565679B/en
Priority claimed from CN202210149047.9A external-priority patent/CN114565679B/en
Publication of CN114565679A publication Critical patent/CN114565679A/en
Application granted granted Critical
Publication of CN114565679B publication Critical patent/CN114565679B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • G06T7/85Stereo camera calibration
    • G06T5/80
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • G06T2207/10012Stereo images

Abstract

The invention provides a method for calibrating focal length, radial distortion and posture based on camera position, and belongs to the technical fields of machine vision, photogrammetry, SLAM and the like. Laying three mark points, measuring the position of a camera and the positions of the three mark points, shooting images of the mark points to obtain an imaging corresponding relation between the camera and the mark points, establishing a method for iteratively solving focal length and multi-order distortion by using an important geometric phenomenon that the direction between the camera and a main point does not change after radial distortion, further carrying out distortion correction on the image, and finally calibrating the posture of the camera by using the imaging position of the mark point corresponding to the undistorted image. Compared with the existing calibration method, the method has the advantages of reducing the number of the mark points, shortening the calibration time, having a unique solution, being capable of adopting various radial distortion models and the like.

Description

Focal length, radial distortion and posture calibration method based on camera position
Technical Field
The invention relates to the technical fields of machine vision, photogrammetry, SLAM and the like, in particular to a focal length, radial distortion and posture calibration method based on a camera position.
Background
In the related fields of machine vision, photogrammetry, SLAM and the like, internal and external parameters such as distortion, focal length, position, attitude and the like of a camera need to be calibrated for measurement and estimation. At present, there are many internal and external parameter calibration methods, for example, An external parameter calibration method [ An accurate o (n) solution to the pnp recipe ] for which the internal parameters of the camera are known or ideal internal parameters can be adopted; an internal and external parameter calibration method for known internal parameters of a part of cameras [ Camera position and calibration from 4or 5 knock 3d points ]; and an internal and external parameter calibration method for known partial postures of the camera [ Closed-form solutions to minor absolute position schemes with tangential vertical direction ]. With the development of positioning technology, positioning devices are gradually miniaturized, made inexpensive and have accuracy meeting engineering requirements, and are beginning to be applied in camera positioning in large quantities to acquire camera positions. In addition, in machine vision, in order to enlarge the field of view of the camera, a short-focus or fisheye lens is often adopted, but the lens has the defects of serious distortion and the like, and if the distortion influence is not considered, great errors are brought to measurement and estimation. The method aims at the conditions that the position of the camera is known, the focal length is unknown and the lens has serious distortion, and calibrates the camera, wherein the calibration comprises parameters such as the focal length, radial distortion and posture.
At present, under the condition of no prior knowledge, the number of mark points required by calibrating parameters such as focal length, radial distortion and attitude of a camera is more than or equal to 4. The document [ position Estimation with Radial Distortion and Unknown Focal Length ] provides a Focal Length, Radial Distortion and attitude calibration method based on 4 mark points, in order to simplify the calibration process, a division Radial Distortion model is adopted, and only one Radial Distortion coefficient can be estimated; the document [ Real-time solution to the absolute position protocol with unknown radial distortion and focal length ] provides a focal length, radial distortion and attitude calibration method based on 5 mark points, in order to simplify the calibration process, a division radial distortion model is adopted, and the estimation quantity of radial distortion coefficients can reach 3; the above method has a multi-solution phenomenon. It can be seen that, to realize the focal length, radial distortion and attitude calibration, not less than 4 mark points are needed, and to simplify the calibration process, a division radial distortion model is often adopted, and a multi-solution phenomenon occurs, and an additional constraint condition is needed to obtain a unique solution. The acquisition and maintenance of the precise mark points need to consume a large amount of manpower and material resources, for example, in a field strong wind environment, when the attitude of an aircraft is measured, a camera needs to be calibrated in advance, a plurality of mark points need to be set, and the field strong wind environment brings a serious challenge to the setting of the mark points.
Disclosure of Invention
The invention aims to provide a method for calibrating focal length, radial distortion and posture based on camera positions, which solves the technical problems that only one distortion model is adopted in the existing calibration method, more than or equal to 4 mark points are needed when the focal length, distortion and posture of a camera are solved simultaneously, and part of methods have multiple solutions.
In order to achieve the above purpose and solve the above technical problems, the technical solution of the present invention is as follows:
a method for calibrating focal length, radial distortion and posture based on camera position is characterized by comprising the following steps:
let camera position point C (x)0 y0 z0) Known, three marker points P1(x1 y1 z1)、P2(x2 y2 z2)、P3(x3 y3z3) It is known that the external mark point has the following relationship with the camera imaging position under the distortion-free condition: p is a radical of1、p2、p3Is P under the condition of no distortion1、P2、P3An imaging position in the camera; p is a radical ofcThe camera main point is positioned in the center of the image; oc is the camera position;
step 1, establishing a nonlinear equation set to solve intermediate variables in an iterative manner
Selecting a division distortion model and a traditional distortion model;
the distortion model of division is as follows
Figure BDA0003509962140000031
The conventional distortion model is as follows
Figure BDA0003509962140000032
Wherein k isiIn order to be the radial distortion factor,
Figure BDA0003509962140000033
the geometry at radial distortion is as follows: symbol p1Ocp2,∠p2Ocp3,∠p3Ocp1Are respectively expressed as alpha111Due to PiAnd Oc is known, the angular size of these three angles passes through the triangle ap1OcP2,ΔP2OcP3,ΔP3OcP1Calculating to obtain; at the same time, the angle p1pcp2,∠p2pcp3,∠p3pcp1Are respectively expressed as alpha222(ii) a Principal point pcAnd distortion point
Figure BDA00035099621400000311
Known as α222By a triangle
Figure BDA0003509962140000034
Obtaining;
let pcpi=xi,Ocpi=yiTriangle Δ p1pcp2,Δp1Ocp2Having a common side p1p2By the cosine theorem
Figure BDA0003509962140000035
Wherein, OcpcF, is the focal length, which is perpendicular to the plane p1p2p3Thus, according to triangle Δ OcpcpiTo obtain
Figure BDA0003509962140000036
By bringing formula (4) into formula (3), the compound (3) can be obtained
Figure BDA0003509962140000037
Similarly, two other equations can be obtained
Figure BDA0003509962140000038
Is provided with
Figure BDA0003509962140000039
Then, an equation set with three unknowns is obtained
Figure BDA00035099621400000310
Solving the solution f of the system of nonlinear equations by an iterative methodi
Step 2, calculating focal length and distortion coefficient
2.1 distortion model for division
The two-parameter model is as follows:
Figure BDA0003509962140000041
wherein k isj(j 1,2) is a radial distortion coefficient,
Figure BDA0003509962140000042
is the distance from the distortion point to the principal point, and then obtains
Figure BDA0003509962140000043
Wherein the content of the first and second substances,
Figure BDA0003509962140000044
is a known amount; a polynomial equation set is obtained:
Figure BDA0003509962140000045
f, k is1f,k2f are treated as three unknowns of the above equation set, and then a linear equation set can be obtained as follows:
A1X1=Y1 (10)
wherein
Figure BDA0003509962140000046
The solution of the system of equations is
Figure BDA0003509962140000047
The focal length and distortion coefficient are calculated as follows:
Figure BDA0003509962140000051
2.2 for the conventional distortion model
The two-parameter model is as follows:
Figure BDA0003509962140000052
similarly, a linear system of equations is obtained as follows:
A2X2=Y2 (14)
wherein
Figure BDA0003509962140000053
The focal length and distortion coefficient are obtained by linear solving of the formula (16):
Figure BDA0003509962140000054
step 3, calculating the camera attitude
According to the distortion coefficient and the corresponding distortion model obtained in the step 2, the position of the imaging point after the distortion correction can be obtained, and the corresponding relation of the 2D-3D point after the distortion correction is as follows: let Oc-XcYcZcAs camera coordinate system, Ow-XwYwZwIs a world coordinate system; the camera pose, i.e. the rotation matrix R, is calculated using any two landmark points and the camera positionw_cAnd a translation vector Tw_c
Defining a new camera coordinate system Oc-Xc2Yc2Zc2A new world coordinate system Oc-Xw2Yw2Zw2(ii) a The new camera coordinate system is defined as follows:
Figure BDA0003509962140000061
wherein, the first and the second end of the pipe are connected with each other,
Figure BDA0003509962140000062
known quantities after the first step of solving; by definition, under the new camera coordinate system, Xc2Axis being vector
Figure BDA0003509962140000063
Zc2Axis perpendicular to plane Ocp1p2,Yc2The axes are defined according to a right-hand coordinate system; original camera coordinate system Oc-XcYcZcLower point PcIs converted to a new camera coordinate system O byc-Xw2Yw2Zw2Coordinate of lower Pc2
Figure BDA0003509962140000064
The new world coordinate system is defined as follows:
Figure BDA0003509962140000065
by definition, in a new world coordinate system, OcIs the origin of a coordinate system, Xw2Axis is vector
Figure BDA0003509962140000066
Zw2Axis perpendicular to plane OcP1P2,Yw2The axes are defined according to a right-hand coordinate system; original world coordinate system Oc-XwYwZwLower point PwCan be converted into a new world coordinate system O byc-Xw2Yw2Zw2Coordinate of lower Pw2
Figure BDA0003509962140000067
New camera coordinate system and new world coordinate system, assuming point P under the original camera coordinate systemcAnd point P in the original world coordinate systemwObtaining a conversion relation to each coordinate system for the same point according to the definition of a new camera coordinate system and a new world coordinate system;
rotation matrix Rw_cAnd a translation vector Tw_cThe calculation is as follows:
Figure BDA0003509962140000071
and finishing the calculation of the camera posture.
Further, in step 1 fiSolving by adopting an LM method; selecting f without considering distortion conditioniIs given by the conventional PnP algorithm, and since the initial value is close to the true value, the solution f of the nonlinear equation can be solved by a small number of iterationsi
Compared with the prior art, the method has the following effective benefits:
1. the method provided by the invention solves the technical problems that in the existing calibration method, more than or equal to 4 mark points are needed when the focal length, distortion and posture of the camera are solved simultaneously, and part of methods have multiple solutions and only one distortion model is adopted.
2. The method provided by the invention can simultaneously solve the focal length, distortion and posture of the camera by only using 3 mark points and the known camera position, has a unique solution, and can be suitable for various distortion models.
3. The method is suitable for application scenes which can acquire the position of the camera in advance, have serious distortion and unknown radial distortion models and can use a small number of mark points.
Drawings
FIG. 1 is a schematic diagram of a corresponding relationship between a 3D point and a camera imaging point under no distortion;
FIG. 2 is a schematic view of a camera imaging geometry at radial distortion;
FIG. 3 is a schematic diagram of a 2D-3D point correspondence after distortion correction;
FIG. 4 is a schematic diagram of the transformation relationship between different coordinate systems.
Detailed Description
The invention is explained and illustrated in detail below with reference to the figures and examples.
The invention provides a camera focal length, distortion and posture calibration method based on a camera position and three mark points, which is characterized in that only three mark points need to be arranged, the camera position and the three mark point positions are measured, mark point images are shot, imaging corresponding relations between a camera and the mark points are obtained, a method for iteratively solving focal length and 4-order distortion is established by utilizing an important geometrical phenomenon that the direction between the camera and a main point does not change after radial distortion is utilized, distortion correction is further carried out on the images, and finally the camera posture is calibrated by utilizing the imaging positions of the mark points corresponding to the undistorted images. Compared with the existing calibration method, the method has the advantages of reducing the number of the mark points, shortening the calibration time, having a unique solution, being capable of adopting various radial distortion models and the like.
When the camera is at point C (x)0 y0 z0) Known, three marker points P1(x1 y1 z1)、P2(x2 y2 z2)、P3(x3 y3z3) It is known that the specific relationship between the outer mark point and the camera imaging position under the distortion-free condition is shown in fig. 1.
Wherein p is1、p2、p3Is P under the condition of no distortion1、P2、P3An imaging position in the camera. p is a radical ofcThe camera main point is positioned in the center of the image; oc is the camera position. In practical application, due to the existence of distortion, only 2D imaging points with distortion can be obtained
Figure BDA0003509962140000081
Without distortion of the 2D imaging point piIs not available. The purpose of the invention is to utilize the 3D mark point Pi(i ═ 1,2,3) and distorted 2D imaging points
Figure BDA0003509962140000082
To calibrate the focal length, distortion and pose of the camera.
In order to simplify the process of solving the technical problem, the calibration problem is decomposed into two sub-problems to be solved, so that the solution is more efficient: the first problem is to solve the focus and distortion parameters and the second problem is to solve the camera extrinsic parameters.
For the first problem, an important geometric phenomenon that the direction between the radial distortion and the principal point of the camera does not change is utilized, a method for iteratively solving the focal length and the 4-order distortion is established, in the iterative process, an intermediate variable without considering the distortion is used as an initial value, and the initial value is relatively close to a true value, so that even if the method needs iteration, the initial value is good, and a global optimal solution can be quickly obtained; in addition, the method can adapt to various distortion models, and the applicability of the method is expanded. And after the distortion and the focal length are obtained through solving, a corrected image is obtained, and the external parameters of the camera are solved linearly by utilizing the geometric constraint.
In the second problem, the distortion parameter obtained in the first problem is utilized to firstly carry out distortion correction on the image to obtain an undistorted image; and then, calibrating the camera posture by using the position of the camera, the known mark point and the corresponding imaging point.
The method comprises the following concrete implementation steps:
step 1, establishing a nonlinear equation set to iteratively solve intermediate variables
At present, many distortion models exist, and for most digital cameras, the main distortion is radial distortion, and the most widely used are division distortion models and traditional distortion models.
The distortion model of division is as follows
Figure BDA0003509962140000091
The conventional distortion model is as follows
Figure BDA0003509962140000092
Wherein k isiIn order to be the radial distortion factor,
Figure BDA0003509962140000093
radial distortion is mainly affected by the first two terms, and therefore the first two terms are analyzed in the present invention. Of course, with the number of the mark pointsThe number of analyzed distortion coefficients increases. It can be seen that, in any distortion model, the direction between the imaging point and the distortion center (i.e., the principal point of the camera) does not change, but only the distance changes under the distortion. The method utilizes the important and key geometric characteristic that the direction between an imaging point and a distortion center does not change under radial distortion to calculate the focal length and the distortion of the camera. According to this feature, the geometry at radial distortion is shown in fig. 2.
In FIG. 2, angle p1Ocp2,∠p2Ocp3,∠p3Ocp1Are respectively expressed as alpha111Due to PiAnd Oc is known, the angular size of these three angles can be determined by the triangle ap in fig. 11OcP2,ΔP2OcP3,ΔP3OcP1And (4) calculating. At the same time, the angle p1pcp2,∠p2pcp3,∠p3pcp1Are respectively expressed as alpha222. Here, the principal point pcAnd distortion point
Figure BDA0003509962140000101
Known, but undistorted point piIs unknown. However, since the direction between the imaging point and the principal point does not change before and after the distortion, α is222Can pass through a triangle
Figure BDA0003509962140000102
Figure BDA0003509962140000103
And (4) calculating. In the following calculation process, only the distance between the undistorted point and the distortion center is involved, and the distortion coefficient is not involved, so the method does not directly calculate the distortion coefficient.
Let pcpi=xi,Ocpi=yiBecause ofTriangle delta p1pcp2,Δp1Ocp2Having a common edge p1p2Thus, it can be obtained by the cosine theorem
Figure BDA0003509962140000104
In FIG. 2, OcpcF, is the focal length, which is perpendicular to the plane p1p2p3Thus, according to triangle Δ OcpcpiCan obtain
Figure BDA0003509962140000105
By bringing formula (4) into formula (3), the compound (3) can be obtained
Figure BDA0003509962140000106
Similarly, two other equations can be obtained
Figure BDA0003509962140000107
Is provided with
Figure BDA0003509962140000108
Then, an equation set with three unknowns is obtained
Figure BDA0003509962140000109
The system of nonlinear equations is then solved using an iterative method, such as the LM (Levenberg-Marquardt) method. For a nonlinear equation set, the speed of iteration from the initial value of the difference to the global optimal solution is slow, even the local optimal solution can only be obtained by solving, the global optimal solution cannot be obtained, and the good initial value can improve the calculation speed anda globally optimal solution can be obtained and therefore the method requires good initial values. Therefore, in order to obtain a globally optimal solution, it is an important step to select the initial values of the system of nonlinear equations. Here, f is used irrespective of distortioniCan be given by a conventional PnP algorithm, and since the initial value is close to the true value, the solution f of the nonlinear equation can be solved with a small number of iterationsi
Step 2, calculating focal length and distortion coefficient
Obtaining fiAnd then, obtaining the focal length and the radial distortion coefficient according to different radial distortion models. Because the commonly used radial distortion model is a division distortion model and a traditional distortion model, the calculation methods under the two models are respectively explained.
2.1 distortion model for division
The two-parameter model is as follows:
Figure BDA0003509962140000111
wherein k isj(j 1,2) is a radial distortion coefficient,
Figure BDA0003509962140000112
is the distance from the distortion point to the principal point, and then obtains
Figure BDA0003509962140000113
Here, the number of the first and second electrodes,
Figure BDA0003509962140000114
is a known amount; thus, a polynomial equation set can be obtained, as shown below.
Figure BDA0003509962140000115
To achieve a linear solution, f, k are added1f,k2f are considered as three unknowns of the above system of equations. Then a system of linear equations can be found as follows:
A1X1=Y1 (31)
wherein
Figure BDA0003509962140000121
The solution of the system of equations is
Figure BDA0003509962140000122
Then, the focal length and distortion coefficient are calculated as follows:
Figure BDA0003509962140000123
2.2 conventional distortion model. The two-parameter model is as follows:
Figure BDA0003509962140000124
similarly, a system of linear equations can be obtained as follows:
A2X2=Y2 (35)
wherein
Figure BDA0003509962140000125
Finally, the focal length and distortion coefficients can be solved linearly directly:
Figure BDA0003509962140000126
so far, under two distortion models, a focal length and two distortion coefficients are obtained through three mark points and a camera position.
Step 3, calculating the camera attitude
And (4) obtaining the position of the imaging point after the distortion correction according to the distortion coefficient obtained in the step (1) and the corresponding distortion model. The 2D-3D point correspondence after the distortion correction is shown in FIG. 3.
In FIG. 3, Oc-XcYcZcAs camera coordinate system, Ow-XwYwZwIs a world coordinate system. The camera pose, i.e. the rotation matrix R, is calculated using any two landmark points and the camera positionw_cAnd translation vector Tw_c
To calculate the camera pose, a new camera coordinate system O is definedc-Xc2Yc2Zc2A new world coordinate system Oc-Xw2Yw2Zw2(ii) a The new camera coordinate system is defined as follows:
Figure BDA0003509962140000131
wherein the content of the first and second substances,
Figure BDA0003509962140000132
known quantities after the first step of solving. By definition, under the new camera coordinate system, Xc2Axis being vector
Figure BDA0003509962140000133
Zc2Axis perpendicular to plane Ocp1p2,Yc2The axes are defined in terms of a right-hand coordinate system. Original camera coordinate system Oc-XcYcZcLower point PcCan be converted to a new camera coordinate system O byc-Xw2Yw2Zw2Coordinate of lower Pc2
Figure BDA0003509962140000134
The new world coordinate system is defined as follows:
Figure BDA0003509962140000135
by definition, in a new world coordinate system, OcIs the origin of a coordinate system, Xw2Axis being vector
Figure BDA0003509962140000136
Zw2Axis perpendicular to plane OcP1P2,Yw2The axes are defined according to a right-hand coordinate system. Original world coordinate system Oc-XwYwZwLower point PwCan be converted into a new world coordinate system O byc-Xw2Yw2Zw2Coordinate of lower Pw2
Figure BDA0003509962140000141
Obviously, the new camera coordinate system and the new world coordinate system coincide. Assuming point P in the original camera coordinate systemcAnd point P in the original world coordinate systemwFor the same point, the transformation relationship in each coordinate system can be obtained according to the definition of the new camera coordinate system and the new world coordinate system, as shown in fig. 4.
Thus, the rotation matrix Rw_cAnd a translation vector Tw_cThe calculation is as follows:
Figure BDA0003509962140000142
and then, finishing the calculation of the camera attitude.
Example 1
Three landmark coordinates, P1(-9.31, 13.50, 200.00), P2(22.86, 0.06, 200.00), P3(22.58, 6.38, 230.00), and camera position Oc (0, 0, 0) are given below. Setting the resolution of a camera to be 1280 multiplied by 800, setting the pixel size to be 14 mu m, and adopting a division distortion model, wherein two radial distortion coefficients are respectively-0.01, -0.02 and the focal length is 50 mm; the other camera intrinsic parameters are known, and the camera theoretical extrinsic parameter rotation matrix is set as follows:
Figure BDA0003509962140000143
to approximate the real situation, an error of 0.2 pixel is added to the 2D imaging point of each 3D landmark point. By adopting the method, the focal length is 50.0385mm, the distortion coefficient is-0.0101 and 0.0201, and the measurement result of the external parameter rotation matrix is as follows:
Figure BDA0003509962140000151
the calculation results show that the errors of the focal length, the distortion coefficient and the external parameters are small. In order to better analyze the calculation accuracy of the method, the reprojection error of each point is calculated to obtain the average reprojection error of 0.12 pixel, which shows that the method has high calculation accuracy.

Claims (2)

1. A method for calibrating focal length, radial distortion and posture based on camera position is characterized by comprising the following steps:
let camera position point C (x)0 y0 z0) Known, three marker points P1(x1 y1 z1)、P2(x2 y2 z2)、P3(x3 y3 z3) It is known that the external mark point has the following relationship with the camera imaging position under the distortion-free condition: p is a radical of1、p2、p3Is P under the condition of no distortion1、P2、P3An imaging position in the camera; p is a radical ofcThe camera main point is positioned in the center of the image; oc is the camera position;
step 1, establishing a nonlinear equation set to solve intermediate variables in an iterative manner
Selecting a division distortion model and a traditional distortion model;
the distortion model of division is as follows
Figure FDA0003509962130000011
The conventional distortion model is as follows
Figure FDA0003509962130000012
Wherein k isiIn order to be the radial distortion factor,
Figure FDA0003509962130000013
the geometry at radial distortion is as follows: symbol p1Ocp2,∠p2Ocp3,∠p3Ocp1Are respectively expressed as alpha111Due to PiAnd the position of Oc is known, the angular size of these three angles passes through the triangle ap1OcP2,ΔP2OcP3,ΔP3OcP1Calculating to obtain; at the same time, the angle p1pcp2,∠p2pcp3,∠p3pcp1Are respectively expressed as alpha222(ii) a Principal point pcAnd distortion point
Figure FDA0003509962130000014
Known as α222By a triangle
Figure FDA0003509962130000015
Obtaining;
let pcpi=xi,Ocpi=yiTriangle Δ p1pcp2,Δp1Ocp2Has the advantages ofCommon edge p1p2By the cosine theorem
Figure FDA0003509962130000016
Wherein, OcpcF, is the focal length, which is perpendicular to the plane p1p2p3Thus, according to triangle Δ OcpcpiTo obtain
Figure FDA0003509962130000021
By bringing formula (4) into formula (3), the compound (3) can be obtained
Figure FDA0003509962130000022
Similarly, two other equations can be obtained
Figure FDA0003509962130000023
Is provided with
Figure FDA0003509962130000024
Then, an equation set with three unknowns is obtained
Figure FDA0003509962130000025
Solving the solution f of the system of nonlinear equations by an iterative methodi
Step 2, calculating focal length and distortion coefficient
2.1 distortion model for division
The two-parameter model is as follows:
Figure FDA0003509962130000026
wherein k isj(j 1,2) is a radial distortion coefficient,
Figure FDA0003509962130000027
is the distance from the distortion point to the principal point, and then obtains
Figure FDA0003509962130000028
Wherein, the first and the second end of the pipe are connected with each other,
Figure FDA0003509962130000029
is a known amount; a polynomial equation is obtained:
Figure FDA00035099621300000210
f, k is1f,k2f are treated as three unknowns of the above equation set, and then a linear equation set can be obtained as follows:
A1X1=Y1 (10)
wherein
Figure FDA0003509962130000031
The solution of the system of equations is
Figure FDA0003509962130000032
The focal length and distortion coefficient are calculated as follows:
Figure FDA0003509962130000033
2.2 for the conventional distortion model
The two-parameter model is as follows:
Figure FDA0003509962130000034
similarly, a linear system of equations is obtained as follows:
A2X2=Y2 (14)
wherein
Figure FDA0003509962130000035
The focal length and distortion coefficient are obtained by linear solving of the formula (16):
Figure FDA0003509962130000036
step 3, calculating the camera attitude
According to the distortion coefficient and the corresponding distortion model obtained in the step 2, the position of the imaging point after the distortion correction can be obtained, and the corresponding relation of the 2D-3D point after the distortion correction is as follows: let Oc-XcYcZcAs camera coordinate system, Ow-XwYwZwIs a world coordinate system; the camera pose, i.e. the rotation matrix R, is calculated using any two landmark points and the camera positionw_cAnd a translation vector Tw_c
Defining a new camera coordinate system Oc-Xc2Yc2Zc2A new world coordinate system Oc-Xw2Yw2Zw2(ii) a The new camera coordinate system is defined as follows:
Figure FDA0003509962130000041
wherein the content of the first and second substances,
Figure FDA0003509962130000042
known quantities after the first step of solving; by definition, under the new camera coordinate system, Xc2Axis is vector
Figure FDA0003509962130000043
Zc2Axis perpendicular to plane Ocp1p2,Yc2The axes are defined according to a right-hand coordinate system; original camera coordinate system Oc-XcYcZcLower point PcIs converted to a new camera coordinate system O byc-Xw2Yw2Zw2Coordinate of lower Pc2
Figure FDA0003509962130000044
The new world coordinate system is defined as follows:
Figure FDA0003509962130000045
by definition, in a new world coordinate system, OcIs the origin of a coordinate system, Xw2Axis being vector
Figure FDA0003509962130000046
Zw2Axis perpendicular to plane OcP1P2,Yw2Axes are defined according to a right-hand coordinate system; original world coordinate system Oc-XwYwZwLower point PwCan be converted into a new world coordinate system O byc-Xw2Yw2Zw2Coordinate of lower Pw2
Figure FDA0003509962130000051
New camera coordinate system and new world coordinate system, assuming point P in the original camera coordinate systemcAnd point P in the original world coordinate systemwObtaining a conversion relation to each coordinate system for the same point according to the definition of a new camera coordinate system and a new world coordinate system;
rotation matrix Rw_cAnd a translation vector Tw_cThe calculation is as follows:
Figure FDA0003509962130000052
and finishing the calculation of the camera posture.
2. The method for calibrating focal length, radial distortion and posture based on camera position as claimed in claim 1, wherein f in step 1iSolving by adopting an LM method; to increase the computation speed and obtain a global optimal solution, f is selected without considering the distortion conditioniIs given by the conventional PnP algorithm, and since the initial value is close to the true value, the solution f of the nonlinear equation can be solved with a small number of iterationsi
CN202210149047.9A 2022-02-18 Focal length, radial distortion and attitude calibration method based on camera position Active CN114565679B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210149047.9A CN114565679B (en) 2022-02-18 Focal length, radial distortion and attitude calibration method based on camera position

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210149047.9A CN114565679B (en) 2022-02-18 Focal length, radial distortion and attitude calibration method based on camera position

Publications (2)

Publication Number Publication Date
CN114565679A true CN114565679A (en) 2022-05-31
CN114565679B CN114565679B (en) 2024-04-26

Family

ID=

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1719477A (en) * 2005-05-19 2006-01-11 上海交通大学 Calibration method of pick up camera or photographic camera geographic distortion
EP2048599A1 (en) * 2007-10-11 2009-04-15 MVTec Software GmbH System and method for 3D object recognition
CN108198219A (en) * 2017-11-21 2018-06-22 合肥工业大学 Error compensation method for camera calibration parameters for photogrammetry
WO2019179200A1 (en) * 2018-03-22 2019-09-26 深圳岚锋创视网络科技有限公司 Three-dimensional reconstruction method for multiocular camera device, vr camera device, and panoramic camera device
CN110298890A (en) * 2019-06-24 2019-10-01 西北工业大学 A kind of light-field camera scaling method based on Planck parametrization
CN111667536A (en) * 2019-03-09 2020-09-15 华东交通大学 Parameter calibration method based on zoom camera depth estimation
CN113223095A (en) * 2021-05-25 2021-08-06 中国人民解放军63660部队 Internal and external parameter calibration method based on known camera position

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1719477A (en) * 2005-05-19 2006-01-11 上海交通大学 Calibration method of pick up camera or photographic camera geographic distortion
EP2048599A1 (en) * 2007-10-11 2009-04-15 MVTec Software GmbH System and method for 3D object recognition
CN108198219A (en) * 2017-11-21 2018-06-22 合肥工业大学 Error compensation method for camera calibration parameters for photogrammetry
WO2019179200A1 (en) * 2018-03-22 2019-09-26 深圳岚锋创视网络科技有限公司 Three-dimensional reconstruction method for multiocular camera device, vr camera device, and panoramic camera device
CN111667536A (en) * 2019-03-09 2020-09-15 华东交通大学 Parameter calibration method based on zoom camera depth estimation
CN110298890A (en) * 2019-06-24 2019-10-01 西北工业大学 A kind of light-field camera scaling method based on Planck parametrization
CN113223095A (en) * 2021-05-25 2021-08-06 中国人民解放军63660部队 Internal and external parameter calibration method based on known camera position

Similar Documents

Publication Publication Date Title
CN105096329B (en) Method for accurately correcting image distortion of ultra-wide-angle camera
CN110322513A (en) A kind of Camera extrinsic scaling method, device and electronic equipment
CN111415391B (en) External azimuth parameter calibration method for multi-camera by adopting mutual shooting method
Chatterjee et al. Algorithms for coplanar camera calibration
CN109934878B (en) Linear calibration system and method based on camera coordinate system
US20090299684A1 (en) Method for calibrating cameras installed on vehicle
CN109272574B (en) Construction method and calibration method of linear array rotary scanning camera imaging model based on projection transformation
CN108663043B (en) Single-camera-assisted distributed POS main node and sub node relative pose measurement method
CN112598747A (en) Combined calibration method for monocular camera and projector
CN111811442A (en) Method for rapidly measuring and calculating planeness of large-area deck of ship
CN112634373A (en) Zero-expansion ceramic calibration plate-based dynamic correction method for vision measurement system
CN112665517B (en) Multi-camera large-view-field surface shape measurement calibration method
CN112857328B (en) Calibration-free photogrammetry method
CN113034591B (en) Tooth-shaped structure assembly-oriented addendum circle extraction algorithm
CN110836662A (en) Slope displacement monitoring method based on relative orientation and absolute orientation algorithm
CN114137590A (en) Target positioning method based on north reference correction of orthogonal shafting leveling device
CN114565679A (en) Focal length, radial distortion and posture calibration method based on camera position
CN114565679B (en) Focal length, radial distortion and attitude calibration method based on camera position
Zhang et al. Fisheye lens distortion correction based on an ellipsoidal function model
CN111561867A (en) Airplane surface appearance digital measurement method
CN109655080B (en) On-orbit calibration method for digital sun sensor
CN114001682B (en) Flatness judging method for mounting surface of heavy door frame of electric room module
CN113393507B (en) Unmanned aerial vehicle point cloud and ground three-dimensional laser scanner point cloud registration method
CN105651260A (en) Geometric positioning method and geometric positioning system for remote sensing satellite
CN113223095B (en) Internal and external parameter calibration method based on known camera position

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant