CN111340851A - SLAM method based on binocular vision and IMU fusion - Google Patents
SLAM method based on binocular vision and IMU fusion Download PDFInfo
- Publication number
- CN111340851A CN111340851A CN202010422434.6A CN202010422434A CN111340851A CN 111340851 A CN111340851 A CN 111340851A CN 202010422434 A CN202010422434 A CN 202010422434A CN 111340851 A CN111340851 A CN 111340851A
- Authority
- CN
- China
- Prior art keywords
- formula
- imu
- coordinate system
- frame
- camera
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/20—Analysis of motion
- G06T7/254—Analysis of motion involving subtraction of images
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/22—Matching criteria, e.g. proximity measures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/20—Analysis of motion
- G06T7/285—Analysis of motion using a sequence of stereo image pairs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
- G06T7/73—Determining position or orientation of objects or cameras using feature-based methods
- G06T7/75—Determining position or orientation of objects or cameras using feature-based methods involving models
-
- 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
- G06T7/85—Stereo camera calibration
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Multimedia (AREA)
- Artificial Intelligence (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Life Sciences & Earth Sciences (AREA)
- General Engineering & Computer Science (AREA)
- Studio Devices (AREA)
Abstract
The embodiment of the invention discloses a SLAM method based on fusion of binocular vision and IMU, which comprises the following steps: initializing the IMU according to rigid constraint between the binocular camera and the IMU, specifically comprising initializing the bias of the angular velocity of the IMU and initializing the velocity and gravity of the IMU; an objective function is constructed that contains the IMU residual and the camera reprojection error. Compared with the prior art, the technical scheme of the invention can realize the fusion of binocular vision and IMU, and simultaneously increases the robustness of the system.
Description
Technical Field
The invention relates to the technical field of navigation survey, in particular to a SLAM method based on fusion of binocular vision and IMU.
Background
The camera can provide rich image information, and is widely applied to the field of mobile SLAM and the simultaneous positioning and map creation.
When the mobile robot moves too fast, the camera has motion blur, or the overlapping area between frames is too small to perform feature matching; compared with a camera, the inertial measurement unit IMU can measure angular velocity and acceleration, and for short-time rapid movement, the inertial measurement unit IMU can provide good movement estimation and measurement, in addition, the inertial measurement unit IMU can have drift, and data of the camera basically cannot have drift.
In order to solve the problems, research and development personnel provide an effective solution to the problem that information of vision and an IMU are fused, an inertial measurement unit IMU provides a better solution for fast motion, and a camera can solve the problem of IMU drift under slow motion. It is therefore important to say how to achieve both visual and IMU fusion.
The prior art at present mainly has the following defects: 1. for example: fusing by adopting a loose coupling method: namely, the IMU and the camera respectively carry out self motion estimation, and then the pose estimation results are fused. The method can effectively improve the robustness and the accuracy of the system, and has small calculation amount, but the method does not consider the internal relation of the information of two sensors (namely an IMU sensor and a visual image sensor) and lacks effective constraint and compensation. 2. For example: fusing by adopting a tight coupling method: namely, the states of the IMU and the camera are merged together, a motion equation and a state equation are jointly constructed, and then state estimation is carried out. The method fully utilizes the information of the sensor, improves the robustness and the accuracy of the system, but has large calculation amount.
Disclosure of Invention
Aiming at the problems, the invention provides a SLAM method based on fusion of a binocular camera and an IMU.
The main technical purpose of the invention is to solve the pose of the robot by constructing a reprojection error equation of residual error of IMU and vision and by an optimization method and construct a map of the surrounding environment. Specifically, initializing and constructing a reprojection error equation of residual error and vision of the IMU; the final purpose is to solve the three-dimensional information of the feature points and simultaneously obtain pose information, and the camera and the IMU obtain external parameters;
in view of this, the embodiment of the present invention provides a method for SLAM based on fusion of binocular vision and IMU.
The invention provides a SLAM method based on binocular vision and IMU fusion, which comprises the following operation steps:
initializing the IMU according to rigid constraint between the binocular camera and the IMU, specifically comprising initializing the bias of a gyroscope of the IMU and initializing the speed and gravity of the IMU;
an objective function is constructed that contains the IMU residual and the camera reprojection error.
Preferably, as one possible embodiment; initializing the bias of a gyroscope of the IMU based on a rigid constraint condition between the binocular camera and the IMU, and specifically comprising the following operation steps:
the initial calculation formula is as follows:
wherein the content of the first and second substances,indicates that the j frame picture is in C0Relative rotation of the coordinate systems;for the ith frame picture at C0Relative rotation of the coordinate systems; item II aboveAnd the first itemIs obtained by carrying out generalized multiplication, theRelative rotation of the camera from the ith frame to the jth frame;relative rotation of the gyroscope from the j-th time to the i-th time; c0Is the reference coordinate system;
the calculation result obtained by the initial calculation formula is the initial bias of the gyroscope, and the specific implementation also comprises the following calculation steps;
for the abovePerforming first-order approximate calculation on the relative rotation of the gyroscope from the jth moment to the ith moment to obtain a formula 2;
the 2 nd formula isThe first order linear approximation of (1), substituting its formula 2 into the formula 1, and then according to the second term in the formula 1And the first itemMaking a constraint condition that the difference is approximately zero, and solving to obtain the initial bias of the gyroscope; wherein the 2 nd formula is mainly toIn the explanation of (1) the description,relative rotation of the IMU from the j-th time to the i-th time;the deviation of the angular speed is calculated by representing the angular change function of the IMU;the initial offset of the angular velocity of the IMU is obtained by minimizing a least squares function for the angular change that is sought by the measured angular velocity of the IMU.
Preferably, as one possible embodiment; initializing the velocity and gravity of the IMU based on the rigid constraint condition between the binocular camera and the IMU, and specifically comprising the following operation steps:
setting target solution values for initialized speed and gravitational acceleration, i.e. settingSolving a value for the target, wherein the expression formula is as follows;(ii) a Formula 3;
in the formula 3, in the formula,solving a value for the target; whereinThe speed of the ith frame picture;the speed of the kth frame picture; since a binocular camera is used, the scale factor is 1;is shown in C0Acceleration of gravity under a coordinate system, C0Is the reference coordinate system; as described aboveThe factors in the middle brackets are the initialized speed and the gravity acceleration;
in the formula 4, in the formula,the displacement change from the jth frame to the ith frame;indicates the j-th time to C0A change in position of the coordinate system;indicates the ith time to C0Transforming the position of the coordinate system;this parameter is the i-th time to C0Carrying out rotation transformation on coordinates;is as followsThe speed of the frame picture;is the time difference from the ith frame to the jth frame;
in the formula 5, in the following formula,the angle change from the jth frame to the ith frame;is C0Relative rotation of the coordinate system to the ith frame;is from the i-th time to C0Carrying out rotation transformation on coordinates; whereinThe speed of the jth frame picture;is the time difference from the ith frame to the jth frame;is shown in C0Gravitational acceleration under a coordinate system;the speed of the ith frame picture;
enumerating the translation information of the camera coordinate system converted into the translation information of the IMU to the initial coordinate system, the calculation formula is as follows:(ii) a Formula 6;
in the above-mentioned formula 6, the first,from the ith time to C0Transforming the position of the coordinate system;for the ci frame to C0Transforming the position of the coordinate system;is the CiTime to C0Carrying out rotation transformation on coordinates;for the translation information of the camera to the IMU, the 6 th formula is to convert the translation information in the camera coordinate system to the translation information of the IMU to the initial coordinate system; the above formula 6 is mainly used for coordinate transformation between the camera and the IMU;
then combining the 4 th formula, the 5 th formula and the 6 th formula to form a target equation, namely a 7 th formula, and finally solving according to the target equation to obtain the initial velocity and the gravitational acceleration of the IMU; wherein the target equation is obtained in this way:
in the above formula 7By solving the objective equation, a numerical value of an objective solution value can be obtained; namely, the initialization velocity and the gravitational acceleration of the IMU can be obtained according to the target equation in the formula 7.
Preferably, as one possible embodiment; the construction of the objective function containing the IMU residual error and the camera reprojection error specifically comprises the following operation steps:
determining the state quantity to be optimized of the IMU, and setting a target solution value related to the state quantity to be optimized, namely settingSolving for the target value:
wherein, the above formula 8 is only a target value to be solved, in other words, it is only a label formula; in the above equation 8In order to translate the information in the second direction,in order to be the speed information,in order to obtain the pose information,is a bias to the acceleration of the IMU,bias of a gyroscope that is an IMU;
enumerating an objective function equation according to the state quantity to be optimized as follows:
wherein a first term in the objective function equation is a residual of the IMU; performing expansion conversion on the first term in the 9 th formula to obtain a 10 th formula;
in the above-mentioned formula 10, the,in order to be the difference in the displacement,in order to be the speed difference,in order to be the angle difference between the two angles,is the difference in the bias of the accelerometer,is the bias difference of the gyroscope;rotating the transpose of the matrix under the reference coordinate system at the moment of the ith frame;the speed of the j frame picture under the reference coordinate system;is the gravity acceleration under the reference coordinate system;the speed of the ith frame of picture under a reference coordinate system;translation information of a reference coordinate system at the j frame moment;translation information of the ith frame in a reference coordinate system;is the acceleration of gravity;is the time difference;displacement obtained by IMU pre-integration;pre-integrating the IMU to obtain a speed;pre-integrating the IMU to obtain an angle;representing the posture transposition of the ith frame time under a reference coordinate system;the posture of the jth frame moment under a reference coordinate system;the acceleration offset of the jth frame picture under a reference coordinate system is obtained;the acceleration offset of the ith frame picture under a reference coordinate system;the gyroscope bias is the j frame picture under the reference coordinate system;the gyroscope bias is the ith frame picture under the reference coordinate system;
in addition, in the 10 th formula, the content of the matrix of the 10 th formula is based on that the first term on the matrix side in the 10 th formula can pass through the 4 th formulaSubstitution conversion, and the second term on the matrix side in the above 10 th formula can be expressed by the 5 th formulaSubstitution conversion in which the third term on the matrix side in the above 10 th formula is multiplication between two quaternionsRepresents the inverse of the quaternion at time i in the world coordinate system, which is referred to herein as the top C0A coordinate system; warp beamThe first term related to the state quantity to be optimized can be obtained through the operation of the 10 th formula;
wherein the second term in the objective function equation is a re-projection error of the camera: carrying out expansion conversion on the second term in the 9 th formula to obtain an 11 th formula;
The embodiment of the invention realizes the following technical effects:
the invention provides a SLAM method based on fusion of binocular vision and IMU, which increases the robustness of a system compared with the traditional fusion method of the vision SLAM and the IMU; it uses the construction of an objective function containing the IMU residual and the camera reprojection error, namelyTo realize the output state quantity to be optimized; after the optimization processing of the step, the final value to be optimized can be obtained by minimizing the objective function by adopting an optimization method, and the pose and the feature points in the environment are displayed, so that a technical basis is provided for the subsequent positioning and composition.
The invention provides a SLAM method based on fusion of binocular vision and IMU, which fuses the angle information of the IMU at the front end of the vision, improves the accuracy of feature matching, increases binocular baseline constraint and stereo matching, and screens wrong matching;
the invention provides a SLAM method based on binocular vision and IMU fusion, which uses a binocular camera and adds the matching from 3D points to 3D points, (the method not only considers IMU residual errors, but also considers the reprojection errors of characteristic points) to improve the precision of the system.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings required to be used in the embodiments will be briefly described below, and it should be understood that the following drawings only illustrate some embodiments of the present invention, and therefore should not be considered as limiting the scope of the present invention. Like components are numbered similarly in the various figures.
Fig. 1 shows a first flowchart of a SLAM method based on binocular vision and IMU fusion according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments.
The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
Hereinafter, the terms "including", "having", and their derivatives, which may be used in various embodiments of the present invention, are only intended to indicate specific features, numbers, steps, operations, elements, components, or combinations of the foregoing, and should not be construed as first excluding the existence of, or adding to, one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing.
Example one
The present embodiment provides a method for implementing a SLAM based on fusion of binocular vision and an IMU, which can be applied to occasions requiring multiple sensors to perform information fusion, such as instant positioning and map building (SLAM), autonomous navigation positioning, and the like. It should be noted that the inertial measurement unit is a device for measuring the three-axis attitude angle (or angular velocity) and acceleration of the object. An IMU contains three single-axis accelerometers and three single-axis gyroscopes (angular velocity sensors), the accelerometers detecting acceleration signals of the object in three independent axes of the carrier coordinate system, and the gyroscopes detecting angular velocity signals of the carrier relative to the navigation coordinate system, measuring the angular velocity and acceleration of the object in three-dimensional space, and calculating the attitude of the object based thereon.
The following describes a SLAM method based on binocular vision and IMU fusion in an embodiment of the present invention in detail.
Referring to fig. 1, an embodiment of the present invention provides a method for SLAM based on binocular vision and IMU fusion, including the following steps:
step S102, initializing the IMU according to rigid constraint between the binocular camera and the IMU, specifically including initializing the bias of the angular velocity of the IMU and initializing the velocity and gravity of the IMU;
and step S103, constructing an objective function containing the IMU residual error and the camera reprojection error.
Before the step S102, the method further includes executing step S101; acquiring image information of a binocular camera and data of an IMU (inertial measurement Unit), and extracting feature points; for example, a certain feature point P mentioned in the following description provides a technical basis for performing feature point matching subsequently through the above feature point extraction. The embodiment of the present invention for extracting the feature points is not described in detail.
In addition, it has been found through research that IMU initialization (visual-inertial joint initialization), which is the first step of fusion of visual and inertial data, combines visual data with fast IMU data, including: bias calibration (zero bias) of the gyroscope, bias calibration of the accelerometer, and the like, and the bias of the gyroscope is initialized, and detailed technical contents are described in the following description.
Preferably, as one possible embodiment; in step S102, initializing a bias of a gyroscope of the IMU based on a rigid constraint condition between the binocular camera and the IMU, specifically including the following operation steps:
step S1021: the initial calculation formula is as follows:
wherein the content of the first and second substances,the actual first step is the first step of obtaining R (i.e. R in the camera calibration external reference matrix), here expressed as a quaternion, which represents the relative rotation of the camera in the reference coordinate system of the jth frame picture (where the reference coordinate system refers to C)0) The upper right-1 is the inverse, i.e. the first term of the above formulaFrom C0Relative rotation of the coordinate system to the jth frame picture; second term of the above formulaFor the ith frame picture at C0Relative rotation of the coordinate systems; item II aboveAnd the first itemThe generalized multiplication results in a relative rotation of the camera from frame i to frame j,relative rotation of the gyroscope from the j-th time to the i-th time; c0Is the reference coordinate system; the above equation 1 concerning initialization of the gyroscope, where the input factors are the first term, the second term and the third term of the equation, and the output calculation result is the initialized gyroscope bias;
regarding the meaning of the above formula 1, it should be noted that, as it can be known from the analysis that the camera and the IMU are on the same rigid body, the angle changes of the camera and the IMU are the same in the same time, so that the gyroscope bias (i.e. the bias of the gyroscope) can be solved by using the formula 1, where the input factors of the formula 1 are:、、the following results can be calculated from formula 1 for the three main elements: i.e. initial bias of the gyroscope;
in the above-mentioned formula 1, the first,change the angle of the camera in the ith frame and the jth frame;changing the angle of the IMU in the ith frame and the jth frame;is C0Relative rotation of the coordinate system to the jth frame picture;for the ith frame picture at C0Relative rotation of the coordinate systems;relative rotation of the gyroscope from the j-th time to the i-th time; c0Is the reference coordinate system; the calculation result obtained by the initialization calculation formula is the initialized bias of the gyroscope (or called initial bias of the gyroscope), and the specific implementation further comprises the following calculation steps;
step S1022: for the abovePerforming first-order approximate calculation on the relative rotation of the gyroscope from the jth moment to the ith moment to obtain a formula 2;
wherein the 2 nd formula is mainly toIn the explanation of (1) the description,for the relative rotation of the IMU in the ideal case (noise and bias are not taken into account),is the difference in the bias of the gyroscope,is a matrix of the Jacobian, and is,the bias of the angular velocity is calculated as the bias of the angular change function representing the IMU, which is actually a first order approximation.
In the formula 2, in the formula,relative rotation of the IMU from the j-th time to the i-th time;the deviation of the angular speed is calculated by representing the angular change function of the IMU;for the angular variation solved by the measurement of the angular velocity of the IMU, the initial offset of the angular velocity of the IMU can be obtained by minimizing the least squares function;
step S1023: the 2 nd formula isThe first order linear approximation of (A) is to bring its formula 2 into formula 1 (i.e., the initial calculation formula), and thenAccording to the second term of formula 1And the first itemAnd solving to obtain the initial bias of the gyroscope under the constraint condition that the difference is approximately zero. It should be briefly noted that, since the binocular camera and the IMU are on the same rigid body (i.e., both mounted on the drone onboard platform), the angular changes of the binocular camera and the IMU are consistent within the same time, and the angular velocity bias (i.e., gyroscope bias) of the IMU is initialized according to this constraint.
Preferably, as one possible embodiment; in step S102, initializing the velocity and gravity of the IMU based on the rigid constraint condition between the binocular camera and the IMU, specifically including the following operation steps: it should be noted that, based on the rigid constraint conditions in the same manner, the velocity and gravity of the IMU are initialized, and then the initialized velocity and gravity acceleration are obtained by solving;
step S1024: setting target solution values for initialized speed and gravitational acceleration, i.e. settingSolving a value for the target, wherein the expression formula is as follows;(ii) a Formula 3;
in the formula 3, in the formula,solving a value for the target; whereinThe speed of the ith frame picture;the speed of the kth frame picture; due to the use ofBinocular camera, so the scale factor is 1;is shown in C0Acceleration of gravity under a coordinate system, C0Is the reference coordinate system; it should be noted that the above formula 3 is only a set label, and is used as a target solution value to perform solution; it is clear that the aboveFactors in the middle brackets are the initial speed and the gravity acceleration of the target to be solved;
step S1025: list(s) ofA displacement change formula from the ith frame to the jth frame;(ii) a Formula 4;
in the formula 4, in the formula,the displacement change from the jth frame to the ith frame;indicates the j-th time to C0A change in position of the coordinate system;indicates the ith time to C0Transforming the position of the coordinate system;this parameter is the i-th time to C0Carrying out rotation transformation on coordinates;is as followsThe speed of the frame picture;is the time difference from the ith frame to the jth frame;
in the formula 5, in the following formula,the angle change from the jth frame to the ith frame;is C0Relative rotation of the coordinate system to the ith frame;is from time j to C0Carrying out rotation transformation on coordinates;is from the i-th time to C0Carrying out rotation transformation on coordinates; whereinThe speed of the jth frame picture;is the time difference from the ith frame to the jth frame;is shown in C0Gravitational acceleration under a coordinate system;the speed of the ith frame picture; the above formula 4 and formula 5 mainly obtain displacement and angle according to the IMU information, that is, a displacement formula and an angle formula respectively;
step S1026: enumerating the translation information of the camera coordinate system converted into the translation information of the IMU to the initial coordinate system, the calculation formula is as follows:(ii) a Formula 6;
in the above-mentioned formula 6, the first,from the ith time to C0Transforming the position of the coordinate system;is the CiFrame to C0Transforming the position of the coordinate system;is the CiTime to C0Carrying out rotation transformation on coordinates;for the translation information of the camera to the IMU, the 6 th formula is to convert the translation information in the camera coordinate system to the translation information of the IMU to the initial coordinate system; the above formula 6 is mainly used for coordinate transformation between the camera and the IMU;
step S1027: combining the formula 4, the formula 5 and the formula 6 to form a target equation, namely a formula 7, and solving according to the target equation to obtain the initial velocity and the gravitational acceleration of the IMU; wherein the target equation is obtained in this way:
in the above formula 7The numerical value of the target solution value can be obtained by solving the target equation; the value of the target solution isThe factors in the middle brackets are the initial speed and the gravity acceleration; the initial velocity and the gravitational acceleration of the IMU can be obtained from the target equation in the formula 7 (the target equation is an overdetermined equation when the input parameters are sufficient).
It should be noted that the above step is that the above formula 7 is actually formed by combining the formula 4, the formula 5 and the formula 6; the specific merging process is as follows: this equation 6 is actually substituted into equation 4 to derive: based on the 4 th formula and the 6 th formula we can get
(i.e., the formula is actually the 6 th formulaSubstituted into equation 4Can be obtained by derivation); then again becauseThus can be calculated(ii) a Equation 6Substituted into equation 5The expansion can also obtain a similar formula, and finally the formula is written into a matrix formThe formula is the 7 th formula;
in step S103, an objective function is constructed that includes the IMU residual and the camera reprojection error.
Preferably, as one possible embodiment; the construction of the objective function containing the IMU residual error and the camera reprojection error specifically comprises the following operation steps:
step S1031: determining the state quantity to be optimized of the IMU as follows:
setting a target solution value relating to the quantity of state to be optimized, i.e. settingTo solve the value for the target, note that the above formula 8 is only one target value to be solved, in other words, it is only one index formula; in the above equation 8In order to translate the information in the second direction,in order to be the speed information,in order to obtain the pose information,is a bias to the acceleration of the IMU,bias of a gyroscope that is an IMU;
step S1032: enumerating an objective function equation according to the state quantity to be optimized as follows:
it should be noted that the meaning of the 9 th formula is to construct an objective function, so as to solve the state quantity; the input factors of the above 9 th formula are the residual of the IMU and the reprojection error of the camera, respectively, and the calculation result output by the 9 th formula is the state quantity to be optimized, that is:;
it should be noted that, in the objective function equation of the above formula 9, the first term in the parentheses of the formula 9As residual error of IMU, second termIs a reprojection error of the camera, whereinIs represented by CiAn observed value of a time;indicating the state quantity obtained(ii) a In the formula 9 (i.e., the objective function equation), it should be noted that all the factors in the formula 9 are only one symbol, so as to facilitate writing and subsequent solution;the residual error of the IMU is shown;representing the observed value at time i;indicating the state quantity obtainedSame principle ofRepresenting the reprojection error of the camera;、a covariance matrix representing the IMU and the camera; regarding the objective function equation, the final value to be optimized can be obtained by minimizing the objective function by adopting an optimization method, and the pose and the feature points in the environment are displayed, so that a technical basis is provided for the subsequent positioning and composition.
Wherein the first term in the objective function equation (i.e., formula 9) is the residual of the IMU; step S1033: expanding and converting the first term in the objective function equation (namely according to the 9 th formula) related to the state quantity to be optimized to obtain a 10 th formula; while in equation 10This symbol represents the residual error of the IMU, which includes information representative of displacement, velocity, rotation, accelerometer bias, and gyroscope bias, i.e., in turn, respectively、、、、;
in the above-mentioned formula 10, the,in order to be the difference in the displacement,in order to be the speed difference,in order to be the angle difference between the two angles,is the difference in the bias of the accelerometer,is the bias difference of the gyroscope;rotating the transpose of the matrix under the reference coordinate system at the moment of the ith frame;the speed of the j frame picture under the reference coordinate system;is the gravity acceleration under the reference coordinate system;the speed of the ith frame of picture under a reference coordinate system;translation information of a reference coordinate system at the j frame moment;translation information of the ith frame in a reference coordinate system;is the acceleration of gravity;is the time difference;displacement obtained by IMU pre-integration;pre-integrating the IMU to obtain a speed;pre-integrating the IMU to obtain an angle;representing the posture (expressed by quaternion) of the ith frame time under a reference coordinate system;the posture of the jth frame moment under a reference coordinate system;the acceleration offset of the jth frame picture under a reference coordinate system is obtained;the acceleration offset of the ith frame picture under a reference coordinate system;the gyroscope bias is the j frame picture under the reference coordinate system;the gyroscope bias is the ith frame picture under the reference coordinate system;
in addition, the invention is disclosed in item 10In the formula, the content of the matrix of the 10 th formula is based on that the first term on the matrix side in the 10 th formula can pass through the 4 th formulaSubstitution conversion, and the second term on the matrix side in the above 10 th formula can be expressed by the 5 th formulaSubstituting conversion, wherein the third term on the matrix side in the above 10 th formula is the inverse of the quaternion under the world coordinate system at the i-th time point represented by the multiplication between two quaternions, where the world coordinate system is the top C0A coordinate system; obtaining a first term related to the state quantity to be optimized through the operation of the 10 th formula;
step S1034: wherein the second term in the objective function equation is a re-projection error of the camera: expanding and converting the second term in the objective function equation (namely according to the 9 th formula) related to the state quantity to be optimized to obtain an 11 th formula;
in the 11 th formula, the reprojection error is formed by that the ith feature in the ith frame picture is observed in the jth frame picture;
wherein, in the 12 th formula,is the first characteristicAt the pixel coordinates of the picture of the i-th frame,is an internal reference of the camera, and converts pixel coordinates into normalized coordinates;
wherein, in the 13 th formula,in order to obtain external reference between the IMU and the camera,for the outer parameter transpose (where R is denoted as rotation information),for external reference between the camera and the IMU (where p is primarily denoted translation information),representing the attitude of the ith frame under the reference coordinate system,representing the pose of the j frame time under the reference coordinate system,is 1;translation information in the reference coordinate system for the ith frame time,Translation information of a reference coordinate system at the j frame moment; the above 12 th formula and the above 13 th formula explain the factors in the 11 th formula, respectively.
It should be further explained that the 11 th formula is a comprehensive formula, and the 12 th formula is an explanation of the 11 th formula; in the above-mentioned formula 11, the first,representing the reprojection error from the k frame to the (k + 1) frame, namely feature matching; (generally, there will be errors in feature matching when performing feature matching, and the state quantities (pose and feature points) in the optimization by calculating the reprojection error are to minimize the above feature matching error;
by way of example, a certain feature point P is now exemplified: that is, the feature point p is calculated into the 12 th formula to obtain the following result: now suppose that a feature point p is observed in the ith and jth frames, based on its pixel coordinates in the jth frameAnd reference information of cameraThree-dimensional information of the feature point can be obtained, wherein the internal reference information refers to the focal length, distortion parameters and the like of the camera,the parameter represents that the Lth feature point is observed in the ith frame and the j frame at the same time, the L-th feature point is observed in the three-dimensional space coordinate of the j frame, and the coordinate is normalized (the normalization process is to divide the three-dimensional coordinate by a module value);
that is, the feature point p is calculated into the 13 th formula to obtain the following result: in the above-mentioned formula 13, the first expression,this parametric representation is the three-dimensional spatial coordinates found by the rotation and translation between two frames, i.e. formula 13;
then, the 13 th formula is decomposed in one stepLooking inside first is the pixel coordinate of the L-th feature in the i-th frameFirstly, converting internal parameters of a camera into three-dimensional space coordinates; based on the depth informationObtaining three-dimensional information with the depth of 1, wherein the three-dimensional information is obtained according to external parameters from the camera to the IMU under a camera coordinate system、Marking the point as A when the point is transferred to the IMU coordinate system; then according toTurning to the world coordinate system and marking as B, and then according toC is obtained under the IMU coordinate system when the world coordinate system collides with the coordinate system at the jth moment, and then the C is transferred to the camera coordinate system according to the external parameters from the IMU to the camera, namely the jth frame coordinate systemThis time it is obtained that(i.e., in equation 13)) Finally, normalization processing is carried out; then, the result calculated by the 12 th formula and the result calculated by the 13 th formula are substituted into the 11 th formula to obtain the reprojection error which is the result of the present embodiment (i.e. the normalized coordinate calculated by the 12 th formula and the result obtained by the 13 th formula are further converted to obtainA difference reprojection error). The operation being a certain characteristic point PCalculating the line projection error to obtain a result; in this way, the reprojection errors of all the feature points are combinedI.e. the reprojection error of the camera involved in the present embodiment; it should be noted that, the kernel function is always used, so as to avoid that values with large errors in the re-solving cause relatively large interference to the optimal solution. After comprehensive calculation, a first term related to the state quantity to be optimized can be obtained through the operation of the 10 th formula; through the operation of the 11 th formula, a second term related to the state quantity to be optimized can be obtained, so that the solution process of the state quantity to be optimized to the enumeration objective function equation can be completed: namely, the embodiment(ii) a Formula 9.
In the technical scheme of the embodiment of the invention, the rotation information of the IMU is fused in the feature extraction at the visual front end, the external parameters of the IMU and the camera and the drift of the IMU are estimated on line, and in addition, the projection error between three-dimensional points is added in the optimization function. According to the embodiment of the invention, the pose of the robot is solved by constructing a reprojection error equation of residual errors of the IMU and vision and an optimization method, and meanwhile, a map of the surrounding environment is constructed. Specifically, initializing and constructing a reprojection error equation of residual error and vision of the IMU; the final purpose is to solve the three-dimensional information of the feature points, pose information and external parameters of a camera and an IMU.
The embodiment of the invention realizes the following technical effects:
the invention provides a SLAM method based on fusion of binocular vision and IMU, which increases the robustness of a system compared with the traditional fusion method of the vision SLAM and the IMU; it uses the construction of an objective function containing the IMU residual and the camera reprojection error, namelyTo achieve outputA quantity of state to be optimized; after the optimization processing of the step, the final value to be optimized can be obtained by minimizing the objective function by adopting an optimization method, and the pose and the feature points in the environment are displayed, so that a technical basis is provided for the subsequent positioning and composition.
The invention provides a SLAM method based on fusion of binocular vision and IMU, which fuses the angle information of the IMU at the front end of the vision, improves the accuracy of feature matching, increases binocular baseline constraint and stereo matching, and screens wrong matching;
the invention provides a SLAM method based on binocular vision and IMU fusion, which uses a binocular camera and adds the matching from 3D points to 3D points, (the method not only considers IMU residual errors, but also considers the reprojection errors of characteristic points) to improve the precision of the system.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention.
Claims (3)
1. A SLAM method based on binocular vision and IMU fusion is characterized by comprising the following steps:
initializing the IMU according to rigid constraint between the binocular camera and the IMU, specifically comprising initializing the bias of a gyroscope of the IMU and initializing the speed and gravity of the IMU;
constructing an objective function containing an IMU residual error and a camera reprojection error;
initializing the bias of a gyroscope of the IMU based on a rigid constraint condition between the binocular camera and the IMU, and specifically comprising the following operation steps:
the initial calculation formula is as follows:
wherein the content of the first and second substances,indicates that the j frame picture is in C0Relative rotation of the coordinate systems;for the ith frame picture at C0Relative rotation of the coordinate systems; item II aboveAnd the first itemCarry out generalized multiplication to obtainSaidRelative rotation of the camera from the ith frame to the jth frame;relative rotation of the gyroscope from the j-th time to the i-th time; c0Is the reference coordinate system;
the calculation result obtained by the initial calculation formula is the initial bias of the gyroscope, and the specific implementation also comprises the following calculation steps;
for the abovePerforming first-order approximate calculation on the relative rotation of the gyroscope from the jth moment to the ith moment to obtain a formula 2;
the 2 nd formula isThe first order linear approximation of (1), substituting its formula 2 into the formula 1, and then according to the second term in the formula 1And the first itemMaking a constraint condition that the difference is approximately zero, and solving to obtain the initial bias of the gyroscope; wherein the 2 nd formula is mainly toIn the explanation of (1) the description,relative rotation of the IMU from the j-th time to the i-th time;the deviation of the angular speed is calculated by representing the angular change function of the IMU;the initial offset of the angular velocity of the IMU is obtained by minimizing a least squares function for the angular change that is sought by the measured angular velocity of the IMU.
2. The SLAM method based on binocular vision and IMU fusion of claim 1,
initializing the velocity and gravity of the IMU based on the rigid constraint condition between the binocular camera and the IMU, and specifically comprising the following operation steps:
setting target solution values for initialized speed and gravitational acceleration, i.e. settingSolving for a value for the target, which is expressed by the formulaThe following steps of (1);(ii) a Formula 3;
in the formula 3, in the formula,solving a value for the target; whereinThe speed of the ith frame picture;the speed of the kth frame picture; since a binocular camera is used, the scale factor is 1;is shown in C0Acceleration of gravity under a coordinate system, C0Is the reference coordinate system; as described aboveThe factors in the middle brackets are the initialized speed and the gravity acceleration;
in the formula 4, in the formula,the displacement change from the jth frame to the ith frame;indicates the j-th time to C0A change in position of the coordinate system;indicates the ith time to C0Transforming the position of the coordinate system;this parameter is the i-th time to C0Carrying out rotation transformation on coordinates;is as followsThe speed of the frame picture;is the time difference from the ith frame to the jth frame;
in the formula 5, in the following formula,the angle change from the jth frame to the ith frame;is C0Relative rotation of the coordinate system to the ith frame;is from time j to C0Carrying out rotation transformation on coordinates;is from the i-th time to C0Carrying out rotation transformation on coordinates; whereinThe speed of the jth frame picture;is the time difference from the ith frame to the jth frame;is shown in C0Gravitational acceleration under a coordinate system;this parameter is the i-th time to C0Carrying out rotation transformation on coordinates;the speed of the ith frame picture;
enumerating the translation information of the camera coordinate system converted into the translation information of the IMU to the initial coordinate system, the calculation formula is as follows:(ii) a Formula 6;
in the above-mentioned formula 6, the first,from the ith time to C0Transforming the position of the coordinate system;is the CiFrame to C0Transforming the position of the coordinate system;is the CiTime to C0Carrying out rotation transformation on coordinates;is a phase ofTranslation information from the machine to the IMU, the 6 th formula being translation information in the camera coordinate system to translation information in the IMU to the initial coordinate system; the above formula 6 is mainly used for coordinate transformation between the camera and the IMU;
then combining the 4 th formula, the 5 th formula and the 6 th formula to form a target equation, namely a 7 th formula, and finally solving according to the target equation to obtain the initial velocity and the gravitational acceleration of the IMU; wherein the target equation is obtained in this way:
3. The SLAM method based on binocular vision and IMU fusion of claim 2,
the construction of the objective function containing the IMU residual error and the camera reprojection error specifically comprises the following operation steps:
determining the state quantity to be optimized of the IMU, and setting a target solution value related to the state quantity to be optimized, namely settingSolving for the target value:
wherein the above formula 8 is only oneThe target value to be solved, in other words it is only a labeled formula; in the above equation 8In order to translate the information in the second direction,in order to be the speed information,in order to obtain the pose information,is a bias to the acceleration of the IMU,bias of a gyroscope that is an IMU;
enumerating an objective function equation according to the state quantity to be optimized as follows:
wherein a first term in the objective function equation is a residual of the IMU; performing expansion conversion on the first term in the 9 th formula to obtain a 10 th formula;
in the above-mentioned formula 10, the,in order to be the difference in the displacement,in order to be the speed difference,in order to be the angle difference between the two angles,is the difference in the bias of the accelerometer,is the bias difference of the gyroscope;rotating the transpose of the matrix under the reference coordinate system at the moment of the ith frame;the speed of the j frame picture under the reference coordinate system;is the gravity acceleration under the reference coordinate system;the speed of the ith frame of picture under a reference coordinate system;translation information of a reference coordinate system at the j frame moment;translation information of the ith frame in a reference coordinate system;is the acceleration of gravity;is the time difference;displacement obtained by IMU pre-integration;pre-integrating the IMU to obtain a speed;pre-integrating the IMU to obtain an angle;representing the posture transposition of the ith frame time under a reference coordinate system;the posture of the jth frame moment under a reference coordinate system;the acceleration offset of the jth frame picture under a reference coordinate system is obtained;the acceleration offset of the ith frame picture under a reference coordinate system;the gyroscope bias is the j frame picture under the reference coordinate system;the gyroscope bias is the ith frame picture under the reference coordinate system;
in addition, in the 10 th formula, the content of the matrix of the 10 th formula is based on that the first term on the matrix side in the 10 th formula can pass through the 4 th formulaSubstitution conversion, and the second term on the matrix side in the above 10 th formula can be expressed by the 5 th formulaSubstitution conversion, wherein the third term on the matrix side in the above-mentioned formula 10Is a multiplication between two quaternionsRepresents the inverse of the quaternion at time i in the world coordinate system, which is referred to herein as the top C0A coordinate system; obtaining a first term related to the state quantity to be optimized through the operation of the 10 th formula; wherein the second term in the objective function equation is a re-projection error of the camera: carrying out expansion conversion on the second term in the 9 th formula to obtain an 11 th formula;
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010422434.6A CN111340851A (en) | 2020-05-19 | 2020-05-19 | SLAM method based on binocular vision and IMU fusion |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010422434.6A CN111340851A (en) | 2020-05-19 | 2020-05-19 | SLAM method based on binocular vision and IMU fusion |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111340851A true CN111340851A (en) | 2020-06-26 |
Family
ID=71187572
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010422434.6A Pending CN111340851A (en) | 2020-05-19 | 2020-05-19 | SLAM method based on binocular vision and IMU fusion |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111340851A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111623773A (en) * | 2020-07-17 | 2020-09-04 | 国汽(北京)智能网联汽车研究院有限公司 | Target positioning method and device based on fisheye vision and inertial measurement |
CN111811502A (en) * | 2020-07-10 | 2020-10-23 | 北京航空航天大学 | Motion carrier multi-source information fusion navigation method and system |
CN111899276A (en) * | 2020-07-07 | 2020-11-06 | 武汉大学 | SLAM method and system based on binocular event camera |
CN113324542A (en) * | 2021-06-07 | 2021-08-31 | 北京京东乾石科技有限公司 | Positioning method, device, equipment and storage medium |
CN114119885A (en) * | 2020-08-11 | 2022-03-01 | 中国电信股份有限公司 | Image feature point matching method, device and system and map construction method and system |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107747941A (en) * | 2017-09-29 | 2018-03-02 | 歌尔股份有限公司 | A kind of binocular visual positioning method, apparatus and system |
CN110345944A (en) * | 2019-05-27 | 2019-10-18 | 浙江工业大学 | Merge the robot localization method of visual signature and IMU information |
-
2020
- 2020-05-19 CN CN202010422434.6A patent/CN111340851A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107747941A (en) * | 2017-09-29 | 2018-03-02 | 歌尔股份有限公司 | A kind of binocular visual positioning method, apparatus and system |
CN110345944A (en) * | 2019-05-27 | 2019-10-18 | 浙江工业大学 | Merge the robot localization method of visual signature and IMU information |
Non-Patent Citations (2)
Title |
---|
盛淼: "基于双目视觉惯导的SLAM算法研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
陶阳: "双目与IMU融合的无人机定位技术研究及系统设计", 《中国优秀硕士学位论文全文数据库 工程科技II辑》 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111899276A (en) * | 2020-07-07 | 2020-11-06 | 武汉大学 | SLAM method and system based on binocular event camera |
CN111811502A (en) * | 2020-07-10 | 2020-10-23 | 北京航空航天大学 | Motion carrier multi-source information fusion navigation method and system |
CN111623773A (en) * | 2020-07-17 | 2020-09-04 | 国汽(北京)智能网联汽车研究院有限公司 | Target positioning method and device based on fisheye vision and inertial measurement |
CN114119885A (en) * | 2020-08-11 | 2022-03-01 | 中国电信股份有限公司 | Image feature point matching method, device and system and map construction method and system |
CN113324542A (en) * | 2021-06-07 | 2021-08-31 | 北京京东乾石科技有限公司 | Positioning method, device, equipment and storage medium |
CN113324542B (en) * | 2021-06-07 | 2024-04-12 | 北京京东乾石科技有限公司 | Positioning method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111340851A (en) | SLAM method based on binocular vision and IMU fusion | |
Huang | Visual-inertial navigation: A concise review | |
CN110030994B (en) | Monocular-based robust visual inertia tight coupling positioning method | |
US20180031387A1 (en) | State estimation for aerial vehicles using multi-sensor fusion | |
CN110702107A (en) | Monocular vision inertial combination positioning navigation method | |
Nützi et al. | Fusion of IMU and vision for absolute scale estimation in monocular SLAM | |
Weiss et al. | Real-time onboard visual-inertial state estimation and self-calibration of MAVs in unknown environments | |
CN110986939B (en) | Visual inertia odometer method based on IMU (inertial measurement Unit) pre-integration | |
Panahandeh et al. | Vision-aided inertial navigation based on ground plane feature detection | |
CN112649016A (en) | Visual inertial odometer method based on point-line initialization | |
CN107909614B (en) | Positioning method of inspection robot in GPS failure environment | |
US20130162785A1 (en) | Method and system for fusing data arising from image sensors and from motion or position sensors | |
Kneip et al. | Closed-form solution for absolute scale velocity determination combining inertial measurements and a single feature correspondence | |
CN110207693B (en) | Robust stereoscopic vision inertial pre-integration SLAM method | |
CN112577493B (en) | Unmanned aerial vehicle autonomous positioning method and system based on remote sensing map assistance | |
CN111161337A (en) | Accompanying robot synchronous positioning and composition method in dynamic environment | |
Batista et al. | Low-cost attitude and heading reference system: Filter design and experimental evaluation | |
CN112985450B (en) | Binocular vision inertial odometer method with synchronous time error estimation | |
CN110954102A (en) | Magnetometer-assisted inertial navigation system and method for robot positioning | |
CN109685852B (en) | Calibration method, system, equipment and storage medium for camera and inertial sensor | |
CN115371665A (en) | Mobile robot positioning method based on depth camera and inertia fusion | |
Zheng et al. | SE (2)-constrained visual inertial fusion for ground vehicles | |
CN112902956A (en) | Course initial value acquisition method for handheld GNSS/MEMS-INS receiver, electronic equipment and storage medium | |
Xian et al. | Fusing stereo camera and low-cost inertial measurement unit for autonomous navigation in a tightly-coupled approach | |
CN112731503A (en) | Pose estimation method and system based on front-end tight coupling |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200626 |
|
RJ01 | Rejection of invention patent application after publication |