CN112629565B - Method, device and equipment for calibrating rotation relation between camera and inertial measurement unit - Google Patents
Method, device and equipment for calibrating rotation relation between camera and inertial measurement unit Download PDFInfo
- Publication number
- CN112629565B CN112629565B CN202110249005.8A CN202110249005A CN112629565B CN 112629565 B CN112629565 B CN 112629565B CN 202110249005 A CN202110249005 A CN 202110249005A CN 112629565 B CN112629565 B CN 112629565B
- Authority
- CN
- China
- Prior art keywords
- image
- matrix
- relation
- equation set
- polynomial equation
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 50
- 238000005259 measurement Methods 0.000 title claims abstract description 49
- 239000011159 matrix material Substances 0.000 claims abstract description 183
- PXFBZOLANLWPMH-UHFFFAOYSA-N 16-Epiaffinine Natural products C1C(C2=CC=CC=C2N2)=C2C(=O)CC2C(=CC)CN(C)C1C2CO PXFBZOLANLWPMH-UHFFFAOYSA-N 0.000 claims abstract description 67
- 230000009466 transformation Effects 0.000 claims abstract description 50
- 239000013598 vector Substances 0.000 claims abstract description 45
- 238000013519 translation Methods 0.000 claims abstract description 42
- 238000009434 installation Methods 0.000 claims abstract description 21
- 239000000126 substance Substances 0.000 claims description 35
- 238000004590 computer program Methods 0.000 claims description 14
- 238000005457 optimization Methods 0.000 claims description 12
- 230000006870 function Effects 0.000 claims description 10
- 238000006243 chemical reaction Methods 0.000 claims description 7
- 230000033001 locomotion Effects 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000004927 fusion Effects 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000003384 imaging method Methods 0.000 description 2
- 238000013507 mapping Methods 0.000 description 2
- 238000005070 sampling Methods 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 235000002779 Morchella esculenta Nutrition 0.000 description 1
- 240000002769 Morchella esculenta Species 0.000 description 1
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 150000001875 compounds Chemical class 0.000 description 1
- 238000011835 investigation Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000004807 localization Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C25/00—Manufacturing, calibrating, cleaning, or repairing instruments or devices referred to in the other groups of this subclass
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C21/00—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
- G01C21/10—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration
- G01C21/12—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration executed aboard the object being navigated; Dead reckoning
- G01C21/16—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration executed aboard the object being navigated; Dead reckoning by integrating acceleration or speed, i.e. inertial navigation
- G01C21/165—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration executed aboard the object being navigated; Dead reckoning by integrating acceleration or speed, i.e. inertial navigation combined with non-inertial navigation instruments
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C21/00—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
- G01C21/20—Instruments for performing navigational calculations
-
- G06T3/02—
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/30—Determination of transform parameters for the alignment of images, i.e. image registration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/80—Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
Abstract
The application relates to a method, a device and equipment for calibrating the rotation relation between a camera and an inertial measurement unit. The method comprises the following steps: acquiring a first image and a second image shot by a camera, and extracting affine matching point pairs of the first image and the second image; establishing a second relation between the homography matrix and the first homogeneous coordinate and the second homogeneous coordinate according to the first relation between the homography matrix of the first image and the second image and the rotation matrix and the translation vector; establishing a third relation between the affine transformation matrix and the rotation matrix according to the affine transformation matrix; obtaining a polynomial equation set according to the second relation and the third relation; acquiring initial installation parameters, and performing first-order approximation on a polynomial equation set to obtain a simplified polynomial equation set with the order of 2; and solving the simplified polynomial equation set by adopting a resolver to obtain a rotation matrix to be calibrated and a translation vector. By adopting the method, the rapid correction of the rotation relation can be realized.
Description
Technical Field
The application relates to the technical field of non-contact measurement, in particular to a method, a device and equipment for calibrating the rotation relation between a camera and an inertial measurement unit.
Background
Multi-sensor fusion, particularly the fusion of a camera and an Inertial Measurement Unit (IMU), has a wide range of applications in the fields of computer vision and optical measurement, such as autonomous navigation and automatic landing and simultaneous localization and mapping (SLAM). In these applications, successful fusion of the camera and IMU data requires precise alignment of the spatiotemporal relationship between the camera and IMU, and alignment errors can reduce the fusion accuracy of the sensors, affecting the final measurement. Therefore, precise alignment of the spatiotemporal relationship between the camera and the IMU is a fundamental task that plays an important role in sensor fusion and measurement.
The conventional calibration method treats the alignment of the camera IMU system as a hand-eye calibration problem because the IMU directly outputs rotation information relative to the IMU reference frame, but this method requires the camera pose to be recovered in advance. In addition, methods which do not need known calibration targets and camera attitude prior information are also provided, the relative position is directly calculated from feature matching, and the accuracy of the methods is greatly influenced by feature mismatch because the methods do not have a mechanism for processing outliers. A more recent approach describes a method for solving the minimum solution of rotational alignment of an IMU camera system using homography constraint, which directly calculates the rotational alignment of the IMU system of the camera, avoiding calculating the camera pose or camera relative pose, and uses RANSAC (RANdomS multiple Consensions, Random sampling consistency algorithm) framework (marking A Fishler and Robert C balls. Random sampling consistency sensing: A partial for model fixing with automatic imaging analysis and automatic mapping. communication of the ACM, 24(6):381 and 395, 1981.), but which requires at least three image coordinate points to be solved.
Disclosure of Invention
In view of the above, there is a need to provide a method, an apparatus, a computer device and a storage medium for calibrating a rotation relationship between a camera and an Inertial Measurement Unit (IMU) with high accuracy and high efficiency without requiring a known calibration apparatus, without restricting the motion of the camera, and without calculating the attitude of the camera in advance.
A method of calibrating a camera to inertial measurement unit rotational relationship, the method comprising:
acquiring a first image and a second image shot by a camera, and extracting affine matching point pairs of the first image and the second image; each pair of affine matching point pairs comprises a first homogeneous coordinate of a first image, a second homogeneous coordinate of an image point in a second image and an affine transformation matrix;
establishing a second relation between the homography matrix and the first and second homogeneous coordinates according to a first relation between the homography matrix of the first and second images and a rotation matrix and a translation vector for converting the first image into the second image;
establishing a third relationship of the affine transformation matrix and the rotation matrix based on the homography matrix according to the affine transformation matrix in the first image and the second image;
obtaining a polynomial equation set according to the second relation and the third relation; the order of the polynomial equation set is 6, and the unknowns are 3 rotation parameters and 3 translation parameters;
acquiring initial installation parameters between an inertia measurement unit and a camera, and performing first-order approximation on the polynomial equation set according to the initial installation parameters to obtain a simplified polynomial equation set with the order of 2;
and solving the simplified polynomial equation set by adopting a resolver to obtain a rotation relation matrix to be calibrated and a translation vector.
In one embodiment, the method further comprises the following steps: acquiring a plurality of matching interior point pairs in the first image and the second image;
calculating a reprojection error according to the matching interior point pairs and the homography matrix;
and constructing a conversion error cost function according to the reprojection error, and minimizing the error cost function by taking the corrected rotation matrix as an optimization parameter to obtain an optimized rotation matrix.
In one embodiment, the method further comprises the following steps: acquiring the homography of the first image and the second image as follows:
wherein the content of the first and second substances,respectively representing a first homogeneous coordinate of an image point in the first image and a second homogeneous coordinate of an image point in the second image, H representing a homography matrix, R representing a rotation matrix, t representing a translation vector,dexpressed as the distance of the first image coordinate system to the 3D ground,representing a unit normal vector of the 3D ground in a first image coordinate system;
according to the homography, obtaining a first relation among a homography matrix, a rotation matrix and a translation vector, wherein the first relation is as follows:
wherein the content of the first and second substances,represents the rotation matrix calibrated for R, T represents the translation vector calibrated for T,representing the angular information output by the inertial measurement unit when the camera takes the first image,representing the angular information output by the inertial measurement unit when the camera takes the second image,representing a unit normal vector of the 3D ground in a first image coordinate system after calibration;
according to the first relation, establishing a second relation among the homography matrix, the first homogeneous coordinate and the second homogeneous coordinate as follows:
wherein the content of the first and second substances,is thatFirst, theLine and firstElements of a column。
In one embodiment, the method further comprises the following steps: obtaining affine matching point pairs in the first image and the second image(ii) a Wherein the content of the first and second substances,andis a corresponding point pair in the form of homogeneous coordinates in the first image and the second image, a represents an affine transformation matrix;
according to the homography matrix, establishing a third relation between the affine transformation matrix and the rotation matrix as follows:
wherein the content of the first and second substances,is thatTo (1) aLine and firstColumn element,The direction of the first image is such that,is a direction in the second image;a projection of the depth is represented and,take a value ofThe last row of (2).
In one embodiment, the method further comprises the following steps: using Euler anglesParameterizing the rotation matrix to obtain a fourth relation:
(ii) a Obtaining a polynomial equation set according to the second relation, the third relation and the fourth relation, wherein the polynomial equation set is:
in one embodiment, the method further comprises the following steps: obtaining initial setup parameters between an inertial measurement unit and a camera;
Obtaining the relationship between the initial installation parameters and the rotation matrix based on the rotation matrix of the small angle as follows:
wherein the content of the first and second substances,is formed by three-dimensional vectorsThe formed anti-symmetric matrix is a matrix with a plurality of anti-symmetric matrixes,is an identity matrix;
according to the converted first relation, performing first order approximation on the polynomial equation set to obtain a simplified polynomial equation set with the order of 2:
in one embodiment, the method further comprises the following steps: converting each solution of the optimized polynomial equation set into an output homography matrix;
and judging interior points between the matching point pairs of the images after the movement according to the output homography matrix.
A camera and inertial measurement unit rotational relationship calibration apparatus, the apparatus comprising:
the data acquisition module is used for acquiring a first image and a second image shot by the camera and extracting affine matching point pairs of the first image and the second image; each pair of affine matching point pairs comprises a first homogeneous coordinate of a first image, a second homogeneous coordinate of an image point in a second image and an affine transformation matrix;
the second relation establishment module is used for establishing a second relation between the homography matrix and the first homogeneous coordinate and the second homogeneous coordinate according to the first relation between the homography matrix of the first image and the second image and the rotation matrix and translation vector of the transformation from the first image to the second image;
a third relation establishing module, configured to establish a third relation between the affine transformation matrix and the rotation matrix based on the homography matrix according to the affine transformation matrix in the first image and the second image;
the equation set establishing module is used for obtaining a polynomial equation set according to the second relation and the third relation; the order of the polynomial equation set is 6, and the unknowns are 3 rotation parameters and 3 translation parameters;
the system comprises an equation set optimization module, a polynomial equation set optimization module and a camera, wherein the equation set optimization module is used for acquiring initial installation parameters between an inertia measurement unit and the camera and performing first-order approximation on the polynomial equation set according to the initial installation parameters to obtain a simplified polynomial equation set with the order of 2;
and the resolving module is used for solving the simplified polynomial equation set by adopting a resolver to obtain a rotation matrix to be calibrated and a translation vector.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring a first image and a second image shot by a camera, and extracting affine matching point pairs of the first image and the second image; each pair of affine matching point pairs comprises a first homogeneous coordinate of a first image, a second homogeneous coordinate of an image point in a second image and an affine transformation matrix;
establishing a second relation between the homography matrix and the first and second homogeneous coordinates according to a first relation between the homography matrix of the first and second images and a rotation matrix and a translation vector for converting the first image into the second image;
establishing a third relationship of the affine transformation matrix and the rotation matrix based on the homography matrix according to the affine transformation matrix in the first image and the second image;
obtaining a polynomial equation set according to the second relation and the third relation; the order of the polynomial equation set is 6, and the unknowns are 3 rotation parameters and 3 translation parameters;
acquiring initial installation parameters between an inertia measurement unit and a camera, and performing first-order approximation on the polynomial equation set according to the initial installation parameters to obtain a simplified polynomial equation set with the order of 2;
and solving the simplified polynomial equation set by adopting a resolver to obtain a rotation matrix to be calibrated and a translation vector.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring a first image and a second image shot by a camera, and extracting affine matching point pairs of the first image and the second image; each pair of affine matching point pairs comprises a first homogeneous coordinate of a first image, a second homogeneous coordinate of an image point in a second image and an affine transformation matrix;
establishing a second relation between the homography matrix and the first and second homogeneous coordinates according to a first relation between the homography matrix of the first and second images and a rotation matrix and a translation vector for converting the first image into the second image;
establishing a third relationship of the affine transformation matrix and the rotation matrix based on the homography matrix according to the affine transformation matrix in the first image and the second image;
obtaining a polynomial equation set according to the second relation and the third relation; the order of the polynomial equation set is 6, and the unknowns are 3 rotation parameters and 3 translation parameters;
acquiring initial installation parameters between an inertia measurement unit and a camera, and performing first-order approximation on the polynomial equation set according to the initial installation parameters to obtain a simplified polynomial equation set with the order of 2;
and solving the simplified polynomial equation set by adopting a resolver to obtain a rotation matrix to be calibrated and a translation vector.
According to the camera and inertia measurement unit rotation relation calibration method and device, the computer equipment and the storage medium, the solution of the calibration problem can be completed by introducing the affine matching point pairs and only one affine matching point pair, the calibration speed can be obviously improved, and calibration objects with known structures and other special equipment are not needed, so that the process is simple.
Drawings
FIG. 1 is a schematic flow chart of a method for calibrating the rotational relationship between a camera and an inertial measurement unit in one embodiment;
FIG. 2 is a schematic diagram of coordinate transformation in one embodiment;
FIG. 3 is a block diagram of an embodiment of a camera to inertial measurement unit rotational relationship calibration apparatus;
FIG. 4 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In one embodiment, as shown in fig. 1, there is provided a method for calibrating a rotational relationship between a camera and an inertial measurement unit, comprising the steps of:
and 102, acquiring a first image and a second image shot by the camera, and extracting affine matching point pairs of the first image and the second image.
Each pair of affine matching point pairs comprises a first homogeneous coordinate of the first image and a second homogeneous coordinate of the image point in the second image, and an affine transformation matrix.
And 104, establishing an equation second relation between the homography matrix and the first and second homogeneous coordinates according to the first relation between the homography matrix of the first and second images and the rotation matrix and translation vector of the transformation from the first image to the second image.
And 106, establishing a third relation between the affine transformation matrix and the rotation matrix based on the homography matrix according to the affine transformation matrix in the first image and the second image.
And 108, obtaining a polynomial equation set according to the second relation and the third relation.
The order of the polynomial equation set is 6, the unknowns are 3 rotation parameters and 3 translation parameters, and due to the complexity of the polynomial equation set, the polynomial equation set needs to be further optimized.
And step 110, acquiring initial installation parameters between the inertia measurement unit and the camera, and performing first-order approximation on the polynomial equation set according to the initial installation parameters to obtain a simplified polynomial equation set with the order of 2.
And 112, solving the simplified polynomial equation set by using a resolver to obtain a rotation matrix to be calibrated and a translation vector.
According to the camera and inertia measurement unit rotation relation calibration method, by introducing the affine matching point pairs, only one affine matching point pair can complete the solution of the calibration problem, the calibration speed can be obviously improved, and calibration objects with known structures and other special equipment are not needed, and the process is simple.
In one embodiment, the homography for obtaining the first image and the second image is:
wherein the content of the first and second substances,respectively representing a first homogeneous coordinate of an image point in the first image and a second homogeneous coordinate of an image point in the second image, H representing a homography matrix, R representing a rotation matrix, t representing a translation vector,dexpressed as the distance of the first image coordinate system to the 3D ground,representing a unit normal vector of the 3D ground in a first image coordinate system;
according to the homography, obtaining a first relation among a homography matrix, a rotation matrix and a translation vector, wherein the first relation is as follows:
wherein the content of the first and second substances,represents the rotation matrix calibrated for R, T represents the translation vector calibrated for T,representing the angular information output by the inertial measurement unit when the camera takes the first image,representing the angular information output by the inertial measurement unit when the camera takes the second image,representing a unit normal vector of the 3D ground in a first image coordinate system after calibration;
according to the first relation, establishing a second relation among the homography matrix, the first homogeneous coordinate and the second homogeneous coordinate as follows:
wherein the content of the first and second substances,is thatFirst, theLine and firstElements of a column。
Specifically, as shown in fig. 2, the inertial measurement unit is mounted in conjunction with a camera, the movement of which includes translation and rotation.Respectively representing the camera coordinate system and the inertial measurement unit coordinate system, fromToIs a rotational transformation matrix of。Representing the inertial measurement unit reference frame. From the view(first image) and(second image) toCan be expressed asAnd。is composed ofTo andand (5) coordinate systems with consistent directions. After transformation, only the translation component is needed to represent the aligned viewAndto be transformed between. Fig. 2 shows the original image pair on the left and the corrected image pair on the right.Is a unit normal vector of a planeTransformed into views relative to after calibrationThe value of (c). After transformation, the homography between the two images is as follows
In one embodiment, affine matching point pairs in the first image and the second image are obtained(ii) a Wherein the content of the first and second substances,andis a corresponding point pair in the form of homogeneous coordinates in the first image and the second image, a represents an affine transformation matrix;
according to the homography matrix, establishing a third relation between the affine transformation matrix and the rotation matrix as follows:
wherein the content of the first and second substances,is thatTo (1) aLine and firstColumn element,Andis the firstDirections in the individual images, i.e. the first two values of the homogeneous coordinates of the image points;a projection of the depth is represented and,take a value ofThe last row of (2).
Specifically, the local Affine transformation can be extracted by ASIFT (j. -m. Morel and g. Yu, "ASIFT: a New Framework for full affinity investigation Image company," SIAM Journal on Imaging Sciences 2, 438-:
in one embodiment, Euler angles are usedParameterizing the rotation matrix to obtain a fourth relation:
obtaining a polynomial equation set according to the second relation, the third relation and the fourth relation, wherein the polynomial equation set is as follows:
however, due to the complexity of the polynomial equation set, the maximum order of the Gr baby-ner base solver (Z. Kukelova, M. Bujnak, and T. Pajdla, "Automatic Generator of minor Problim solutions," Computer Vision-Eccv 2008, Pt Iii, Proceedings 5304, 302-. Therefore, there is a need to find a faster, more stable solution.
In practice, the approximate mounting relationship between the IMU and the camera may be measured manually or by an equipment manualAnd (4) obtaining. Thus, the rotational alignment relationship between the camera and the IMU may be expressed as an approximate rotation matrix resulting from multiplying the approximate mounting angle by a small angle based rotation matrix, thus in one embodiment, obtaining initial mounting parameters between the inertial measurement unit and the camera;
Based on the rotation matrix of the small angle, the relation between the obtained installation parameters and the rotation matrix is as follows:
wherein the content of the first and second substances,is formed by three-dimensional vectorsThe formed anti-symmetric matrix is a matrix with a plurality of anti-symmetric matrixes,is an identity matrix;
according to the converted first relation, performing first order approximation on the polynomial equation set to obtain a simplified polynomial equation set with the order of 2:
the simplified polynomial equation set has a maximum order of 2 and a maximum solution number of 19, and may be solved faster and more stably by the Gr baby basis solver than the polynomial equation set.
In the RANSAC framework, the modified homography is used to convert each solution into a corresponding homography, which is used to determine inliers between pairs of matched points of the moving image, and to select the solution that yields the largest set of inliers as output. For each image pair, the rotation matrix from the camera coordinates to the IMU coordinates can be calculated as:
whereinIs thatOrthogonal form of (a). Furthermore, the motion of the camera can also be recovered, i.e. the rotation matrix and translation vector between the two views can be expressed as:
in the formula (I), the compound is shown in the specification,,calculated by the Grubner-based solverThe value is obtained.
In one embodiment, a plurality of matching interior point pairs in the first image and the second image are obtained;
calculating a reprojection error according to the matching interior point pairs and the homography matrix;
and constructing a conversion error cost function according to the reprojection error, and minimizing the error cost function by taking the corrected rotation matrix as an optimization parameter to obtain an optimized rotation matrix.
In particular, for each image pair,and corresponding interior pointsCan be obtained by the single affine matching point pair method and RANSAC. For each image pair,Andcan be combined withThe interior points are obtained together, and the reprojection error can be calculatedIs calculated, whereinIs each image pairThe restored homography matrix. The minimization of the total conversion error cost function is as follows:
whereinIs a three parameter rotation estimate for optimization. The initial value is set to the average value of the calibration results obtained in the previous step.Is a viewAndthe conversion between the first and the second,is the information from the IMU. HomographyIs a transformation model which transforms the viewsTo view in homogeneous image coordinatesCorresponding image coordinates.
In order to reduce the influence of potential abnormal values, homography conversion error of points in image matching by Cauchy function is adoptedAnd (3) weighting:
In summary, the invention provides a method for calibrating the rotation relationship between the camera coordinate system and the inertial measurement unit coordinate system by directly utilizing the homography constraint of the image matching point pair, does not depend on calibration objects with known structures and other special equipment, does not need to calculate the camera attitude in advance, provides the minimum configuration solution for solving the rotation relationship between the camera and the inertial measurement unit, and improves the efficiency of eliminating the image matching point pair midrange value by the RANSAC algorithm.
It should be understood that, although the steps in the flowchart of fig. 1 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 1 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 3, there is provided a camera and inertial measurement unit rotational relationship calibration apparatus comprising: a data acquisition module 302, a second relationship establishing module 304, a third relationship establishing module 306, an equation set establishing module 308, an equation set optimizing module 310, and a calculation module 312, wherein:
a data obtaining module 302, configured to obtain a first image and a second image captured by a camera, and extract an affine matching point pair of the first image and the second image; each pair of affine matching point pairs comprises a first homogeneous coordinate of a first image, a second homogeneous coordinate of an image point in a second image and an affine transformation matrix;
a second relation establishing module 304, configured to establish a second relation between the homography matrix and the first and second homogeneous coordinates according to a first relation between the homography matrix of the first and second images and a rotation matrix and a translation vector of a transformation from the first image to the second image;
a third relation establishing module 306, configured to establish a third relation between the affine transformation matrix and the rotation matrix based on the homography matrix according to the affine transformation matrix in the first image and the second image;
an equation set establishing module 308, configured to obtain a polynomial equation set according to the second relationship and the third relationship; the order of the polynomial equation set is 6, and the unknowns are 3 rotation parameters and 3 translation parameters;
the equation set optimization module 310 is configured to obtain initial installation parameters between the inertial measurement unit and the camera, and perform first-order approximation on the polynomial equation set according to the initial installation parameters to obtain a simplified polynomial equation set with an order of 2;
and the resolving module 312 is configured to solve the simplified polynomial equation set by using a resolver to obtain a rotation matrix to be calibrated and a translation vector.
In one embodiment, the method further comprises the following steps: the nonlinear optimization module is used for acquiring a plurality of matching interior point pairs in the first image and the second image; calculating a reprojection error according to the matching interior point pairs and the homography matrix; and constructing a conversion error cost function according to the reprojection error, and minimizing the error cost function by taking the corrected rotation matrix as an optimization parameter to obtain an optimized rotation matrix.
In one embodiment, the second relationship establishing module 304 is further configured to obtain a homography of the first image and the second image as follows:
wherein the content of the first and second substances,respectively representing a first homogeneous coordinate of an image point in the first image and a second homogeneous coordinate of an image point in the second image, H representing a homography matrix, R representing a rotation matrix, t representing a translation vector,dexpressed as the distance of the first image coordinate system to the 3D ground,representing a unit normal vector of the 3D ground in a first image coordinate system;
according to the homography, obtaining a first relation among a homography matrix, a rotation matrix and a translation vector, wherein the first relation is as follows:
wherein the content of the first and second substances,represents the rotation matrix calibrated for R, T represents the translation vector calibrated for T,representing the angular information output by the inertial measurement unit when the camera takes the first image,representing the angular information output by the inertial measurement unit when the camera takes the second image,representing a unit normal vector of the 3D ground in a first image coordinate system after calibration;
according to the first relation, establishing a second relation among the homography matrix, the first homogeneous coordinate and the second homogeneous coordinate as follows:
wherein the content of the first and second substances,is thatFirst, theLine and firstElements of a column。
In one embodiment, the third relation establishing module 306 is configured to obtain affine matching point pairs in the first image and the second image(ii) a Wherein the content of the first and second substances,andis a corresponding point pair in the form of homogeneous coordinates in the first image and the second image, a represents an affine transformation matrix;
according to the homography matrix, establishing a third relation between the affine transformation matrix and the rotation matrix as follows:
wherein the content of the first and second substances,is thatTo (1) aLine and firstColumn element,Andis the firstA direction in the individual image;a projection of the depth is represented and,take a value ofIs the most important ofThe latter row.
The equation set establishing module 308 is further configured to employ the Euler anglesParameterizing the rotation matrix to obtain a fourth relation:
obtaining a polynomial equation set according to the second relation and the third relation, including:
obtaining a polynomial equation set according to the second relation, the third relation and the fourth relation, wherein the polynomial equation set is:
in one embodiment, the equation set optimization module 310 is further configured to obtain mounting parameters between the inertial measurement unit and the camera;
Obtaining the relationship between the initial installation parameters and the rotation matrix based on the rotation matrix of the small angle as follows:
wherein the content of the first and second substances,is formed by three-dimensional vectorsThe formed anti-symmetric matrix is a matrix with a plurality of anti-symmetric matrixes,is an identity matrix;
according to the converted first relation, optimizing the polynomial equation set to obtain an optimized polynomial equation set with the order of 2 as follows:
in one embodiment, the nonlinear optimization module is further configured to convert each solution of the optimized polynomial equation set into an output homography matrix; and judging interior points between the matching point pairs of the images after the movement according to the output homography matrix.
For the specific definition of the calibration device for the rotation relationship between the camera and the inertial measurement unit, reference may be made to the above definition of the calibration method for the rotation relationship between the camera and the inertial measurement unit, and details thereof are not repeated herein. The modules in the camera and inertial measurement unit rotational relationship calibration apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, a mobile phone, a drone, etc., and its internal structure diagram may be as shown in fig. 4. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method for calibrating the rotational relationship of a camera and an inertial measurement unit. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and when the computer equipment is a terminal or a mobile phone, the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
The technical personnel in the field know that the calculation method provided by the embodiment has small calculation amount, is suitable for equipment with limited calculation capacity, such as mobile phones, unmanned planes and the like, and has wide application prospect.
Those skilled in the art will appreciate that the architecture shown in fig. 4 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In an embodiment, a computer device is provided, comprising a memory storing a computer program and a processor implementing the steps of the method in the above embodiments when the processor executes the computer program.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the method in the above-mentioned embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.
Claims (10)
1. A method for calibrating a camera to inertial measurement unit rotational relationship, the method comprising:
acquiring a first image and a second image shot by a camera, and extracting affine matching point pairs of the first image and the second image; each pair of affine matching point pairs comprises a first homogeneous coordinate of a first image, a second homogeneous coordinate of an image point in a second image and an affine transformation matrix;
establishing a second relation between the homography matrix and the first and second homogeneous coordinates according to a first relation between the homography matrix of the first and second images and a rotation matrix and a translation vector for converting the first image into the second image;
establishing a third relationship of the affine transformation matrix and the rotation matrix based on the homography matrix according to the affine transformation matrix in the first image and the second image;
obtaining a polynomial equation set according to the second relation and the third relation; the order of the polynomial equation set is 6, and the unknowns are 3 rotation parameters and 3 translation parameters;
acquiring initial installation parameters between an inertia measurement unit and a camera, and performing first-order approximation on the polynomial equation set according to the initial installation parameters to obtain a simplified polynomial equation set with the order of 2;
solving the simplified polynomial equation set by adopting a resolver to obtain a rotation matrix to be calibrated and a translation vector;
before obtaining a polynomial equation set from the second relationship and the third relationship, the method further comprises:
obtaining six equations according to the second relation and the third relation:
wherein the content of the first and second substances,is thatFirst, theLine and firstThe elements of the column are,h represents a homography matrix, and the affine matching point pairs areWherein, in the step (A),andis a corresponding point pair in the form of homogeneous coordinates in the first image and the second image, a denotes an affine transformation matrix,is thatTo (1) aLine and firstThe elements of the column are, in turn,,andis the firstThe direction in the individual images is such that,,a projection of the depth is represented and,take a value ofThe last row of (2);
and obtaining a polynomial equation set according to the six equations.
2. The method of claim 1, further comprising:
acquiring a plurality of matching interior point pairs in the first image and the second image;
calculating a reprojection error according to the matching interior point pairs and the homography matrix;
and constructing a conversion error cost function according to the reprojection error, and minimizing the error cost function by taking the corrected rotation matrix as an optimization parameter to obtain an optimized rotation matrix.
3. The method of claim 1, wherein establishing a second relationship of the homography matrix with the first and second homogeneous coordinates according to a first relationship of the homography matrix of the first and second images with a rotation matrix and a translation vector of a first image to second image transformation comprises:
acquiring the homography of the first image and the second image as follows:
wherein the content of the first and second substances,respectively representing a first homogeneous coordinate of an image point in the first image and a second homogeneous coordinate of an image point in the second image, H representing a homography matrix, R representing a rotation matrix, t representing a translation vector,drepresenting the distance of the first image coordinate system to the 3D ground,representing a unit normal vector of the 3D ground in a first image coordinate system;
according to the homography, obtaining a first relation between the homography matrix of the first image and the second image and the rotation matrix and the translation vector of the transformation from the first image to the second image, wherein the first relation is as follows:
wherein the content of the first and second substances,represents the rotation matrix calibrated for R, T represents the translation vector calibrated for T,representing the angular information output by the inertial measurement unit when the camera takes the first image,representing the angular information output by the inertial measurement unit when the camera takes the second image,representing a unit normal vector of the 3D ground in a first image coordinate system after calibration;
according to the first relation, establishing a second relation among the homography matrix, the first homogeneous coordinate and the second homogeneous coordinate as follows:
4. the method of claim 3, wherein establishing a third relationship of the affine transformation matrix and the rotation matrix based on the homography matrix according to the affine transformation matrix in the first image and the second image comprises:
obtaining affine matching point pairs in the first image and the second image(ii) a Wherein the content of the first and second substances,andis a corresponding point pair in the form of homogeneous coordinates in the first image and the second image, a represents an affine transformation matrix;
according to the homography matrix, establishing a third relation between the affine transformation matrix and the rotation matrix as follows:
5. The method of claim 4, wherein prior to deriving the system of polynomial equations from the second relationship and the third relationship, the method further comprises:
obtaining a polynomial equation set according to the second relation and the third relation, including:
obtaining a polynomial equation set according to the second relation, the third relation and the fourth relation, wherein the polynomial equation set is:
6. the method of claim 5, wherein obtaining initial setup parameters between the inertial measurement unit and the camera, and performing a first order approximation of the polynomial equation set based on the initial setup parameters to obtain a simplified polynomial equation set of order 2 comprises:
Obtaining the relationship between the initial installation parameters and the rotation matrix based on the rotation matrix of the small angle as follows:
wherein the content of the first and second substances,is formed by three-dimensional vectorsThe formed anti-symmetric matrix is a matrix with a plurality of anti-symmetric matrixes,is an identity matrix;
according to the converted first relation, performing first order approximation on the polynomial equation set to obtain a simplified polynomial equation set with the order of 2:
7. the method of claim 2, wherein obtaining a plurality of matching interior point pairs in the first image and the second image comprises:
converting each solution of the optimized polynomial equation set into an output homography matrix;
and judging interior points between the matching point pairs of the images after the movement according to the output homography matrix.
8. A camera and inertial measurement unit rotational relationship calibration apparatus, said apparatus comprising:
the data acquisition module is used for acquiring a first image and a second image shot by the camera and extracting affine matching point pairs of the first image and the second image; each pair of affine matching point pairs comprises a first homogeneous coordinate of a first image, a second homogeneous coordinate of an image point in a second image and an affine transformation matrix;
the second relation establishment module is used for establishing a second relation between the homography matrix and the first homogeneous coordinate and the second homogeneous coordinate according to the first relation between the homography matrix of the first image and the second image and the rotation matrix and translation vector of the transformation from the first image to the second image;
a third relation establishing module, configured to establish a third relation between the affine transformation matrix and the rotation matrix based on the homography matrix according to the affine transformation matrix in the first image and the second image;
the equation set establishing module is used for obtaining a polynomial equation set according to the second relation and the third relation; the order of the polynomial equation set is 6, and the unknowns are 3 rotation parameters and 3 translation parameters;
the equation set simplifying module is used for acquiring initial installation parameters between the inertia measuring unit and the camera, and performing first-order approximation on the polynomial equation set according to the initial installation parameters to obtain a simplified polynomial equation set with the order of 2;
the resolving module is used for solving the simplified polynomial equation set by adopting a resolver to obtain a rotation matrix to be calibrated and a translation vector;
the equation set establishing module is further configured to obtain six equations according to the second relationship and the third relationship:
wherein the content of the first and second substances,is thatFirst, theLine and firstThe elements of the column are,h represents a homography matrix, and the affine matching point pairs areWherein, in the step (A),andis a corresponding point pair in the form of homogeneous coordinates in the first image and the second image, a denotes an affine transformation matrix,is thatTo (1) aLine and firstThe elements of the column are, in turn,,andis the firstThe direction in the individual images is such that,,a projection of the depth is represented and,take a value ofThe last row of (2);
and obtaining a polynomial equation set according to the six equations.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110249005.8A CN112629565B (en) | 2021-03-08 | 2021-03-08 | Method, device and equipment for calibrating rotation relation between camera and inertial measurement unit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110249005.8A CN112629565B (en) | 2021-03-08 | 2021-03-08 | Method, device and equipment for calibrating rotation relation between camera and inertial measurement unit |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112629565A CN112629565A (en) | 2021-04-09 |
CN112629565B true CN112629565B (en) | 2021-06-01 |
Family
ID=75297655
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110249005.8A Active CN112629565B (en) | 2021-03-08 | 2021-03-08 | Method, device and equipment for calibrating rotation relation between camera and inertial measurement unit |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112629565B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113048985B (en) * | 2021-05-31 | 2021-08-06 | 中国人民解放军国防科技大学 | Camera relative motion estimation method under known relative rotation angle condition |
CN114708331B (en) * | 2022-02-24 | 2023-03-14 | 合肥的卢深视科技有限公司 | Calibration method and device for depth camera, electronic equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110246194A (en) * | 2019-06-25 | 2019-09-17 | 中国人民解放军国防科技大学 | Method for quickly calibrating rotation relation between camera and inertia measurement unit |
CN111429524A (en) * | 2020-03-19 | 2020-07-17 | 上海交通大学 | Online initialization and calibration method and system for camera and inertial measurement unit |
CN111754586A (en) * | 2020-06-28 | 2020-10-09 | 苏州臻迪智能科技有限公司 | External parameter calibration method and device, external parameter calibration system and computer storage medium |
CN112362084A (en) * | 2020-11-23 | 2021-02-12 | 北京三快在线科技有限公司 | Data calibration method, device and system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109069067B (en) * | 2015-12-16 | 2022-04-12 | 穆罕默德·R·马赫福兹 | IMU calibration |
-
2021
- 2021-03-08 CN CN202110249005.8A patent/CN112629565B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110246194A (en) * | 2019-06-25 | 2019-09-17 | 中国人民解放军国防科技大学 | Method for quickly calibrating rotation relation between camera and inertia measurement unit |
CN111429524A (en) * | 2020-03-19 | 2020-07-17 | 上海交通大学 | Online initialization and calibration method and system for camera and inertial measurement unit |
CN111754586A (en) * | 2020-06-28 | 2020-10-09 | 苏州臻迪智能科技有限公司 | External parameter calibration method and device, external parameter calibration system and computer storage medium |
CN112362084A (en) * | 2020-11-23 | 2021-02-12 | 北京三快在线科技有限公司 | Data calibration method, device and system |
Non-Patent Citations (2)
Title |
---|
Minimal Solutions for the Rotational Alignment of IMU-Camera Systems using Homography Constraints;Banglei Guan 等;《computer vision and image understanding》;20180312;第170卷;第79-91页 * |
Rotational Alignment of IMU-camera Systems with 1-point RANSAC;Banglei Guan 等;《PRCV 2019: Pattern Recognition and Computer Vision》;20191031;第172-183页 * |
Also Published As
Publication number | Publication date |
---|---|
CN112629565A (en) | 2021-04-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110009681B (en) | IMU (inertial measurement unit) assistance-based monocular vision odometer pose processing method | |
CN108871311B (en) | Pose determination method and device | |
CN111415387B (en) | Camera pose determining method and device, electronic equipment and storage medium | |
WO2021004416A1 (en) | Method and apparatus for establishing beacon map on basis of visual beacons | |
CN112629565B (en) | Method, device and equipment for calibrating rotation relation between camera and inertial measurement unit | |
CN113409391B (en) | Visual positioning method and related device, equipment and storage medium | |
US20090141043A1 (en) | Image mosaicing apparatus for mitigating curling effect | |
CN112184824A (en) | Camera external parameter calibration method and device | |
Yu et al. | The effects of temperature variation on videometric measurement and a compensation method | |
CN109901123B (en) | Sensor calibration method, device, computer equipment and storage medium | |
CN112446917B (en) | Gesture determination method and device | |
CN112465877A (en) | Kalman filtering visual tracking stabilization method based on motion state estimation | |
CN113436267B (en) | Visual inertial navigation calibration method, device, computer equipment and storage medium | |
CN114063046A (en) | Parameter calibration method and device, computer equipment and storage medium | |
US20230379422A1 (en) | Method for vehicle hinge point calibration and corresponding calibration apparatus, computer device, and storage medium | |
CN111721283B (en) | Precision detection method and device for positioning algorithm, computer equipment and storage medium | |
CN111445513A (en) | Plant canopy volume obtaining method and device based on depth image, computer equipment and storage medium | |
CN108345463B (en) | Three-dimensional measuring method and device based on robot, robot and storage medium | |
CN113628284B (en) | Pose calibration data set generation method, device and system, electronic equipment and medium | |
CN113405532B (en) | Forward intersection measuring method and system based on structural parameters of vision system | |
CN115205419A (en) | Instant positioning and map construction method and device, electronic equipment and readable storage medium | |
CN111723826B (en) | Method, device, computer equipment and storage medium for detecting precision of tracking algorithm | |
CN110232715B (en) | Method, device and system for self calibration of multi-depth camera | |
Zhong et al. | CalQNet-detection of calibration quality for life-long stereo camera setups | |
CN114063024A (en) | Calibration method and device of sensor, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |