A RGBD and IMU hybrid tracking registration method based on sliding window optimization

By combining RGBD and IMU sensors, the sliding window optimization method is used to solve the problem of poor tracking registration robustness caused by sparse textures and rapid motion in the assembly of industrial machinery products, achieving higher tracking registration accuracy and stability, and improving assembly efficiency. .

CN114529576BActive Publication Date: 2024-09-24CHONGQING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210002435.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-04
Publication Date
2024-09-24
Estimated Expiration
2042-01-04

AI Technical Summary

Technical Problem

In the assembly process of industrial machinery products, vision-based tracking registration methods have poor robustness due to sparse textures and smooth surfaces, and rapid motion and depth sensor range limitations cause tracking registration accuracy and stability problems, which cannot be effectively guaranteed.

Method used

Combining RGBD and IMU sensors, through a multi-sensor fusion algorithm, using a sliding window optimization method, introducing depth information and inertial measurement information, optimizing pose estimation, improving the robustness and accuracy of tracking registration, and marginalizing prior information and sliding The window strategy improves the real-time performance of the algorithm.

Benefits of technology

In environments with sparse textures and fast motion, the robustness and accuracy of augmented reality tracking registration are improved, overcoming the problems of tracking registration failure and insufficient robustness in traditional methods, and improving the efficiency and stability of complex mechanical product assembly. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114529576B
    Figure CN114529576B
Patent Text Reader

Abstract

The present invention claims protection for a RGBD and IMU hybrid tracking and registration method based on sliding window optimization, which includes the following steps: visual measurement front-end step: first, RGB information and depth information are obtained through an RGBD camera to perform feature extraction and tracking; the external parameters, bias, and absolute scale of the three sensors are calibrated, and the poses of all frames in the sliding window and the inverse depth of the observation point are estimated through PnP and ICP algorithms, and aligned with the IMU pre-integration results to solve related parameters; a sliding window-based method is used to further optimize the initial pose information transmitted from the visual measurement front end, and a target error function is constructed through prior information constraints, visual constraints, and IMU constraints. The pose and bias information of all frames are continuously optimized through a sliding window-based graph optimization algorithm; loop detection and optimization step: loop detection is performed using the DboW algorithm. If a loop is detected, the entire trajectory is closed-loop optimized by repositioning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of augmented reality and is applicable to indoor industrial machinery product assembly scenes. Specifically, it relates to an RGBD and IMU hybrid tracking registration method based on sliding window optimization. Background Art

[0002] In today's manufacturing industry, the assembly of complex mechanical products has always been a key issue in the production process. According to statistics, in modern manufacturing, the assembly workload accounts for 20%-70% of the entire product development workload, with an average of 45%, and the assembly time accounts for 40% to 60% of the entire manufacturing time. At present, the assembly process of complex mechanical products is still mainly manual assembly, which has problems such as long assembly cycle and low assembly efficiency, which directly affects the development cost of the product.

[0003] In recent years, with the continuous improvement of science and technology, the problems existing in the manual assembly process have been solved to a certain extent through the augmented reality auxiliary assembly technology. This method uses the computer to generate virtual assembly auxiliary information related to assembly, and superimposes it on the real assembly operation environment, providing assemblers with an augmented reality environment that integrates virtual and real, making the product assembly process more concise and intuitive, thereby effectively reducing the product development cost.

[0004] Among them, tracking and registration technology refers to superimposing computer-generated virtual object information and other information on the real scene, which is also the key to the fusion of virtual and real in augmented reality technology. At present, many scholars have proposed many valuable methods in the field of tracking and registration, including tracking and registration methods based on artificial marks, tracking and registration methods based on natural features, and tracking and registration methods based on models. These methods are all based on vision. However, in the field of industrial machinery product assembly, industrial parts have the characteristics of sparse texture and smooth surface. At the same time, during the movement of head-mounted devices, it is easy to produce image blur and jitter caused by movement. In this case, the visual-based tracking and registration method will have great difficulties in feature extraction and tracking, which will lead to the inability to guarantee the accuracy and robustness of tracking and registration. Therefore, in order to solve the above problems, on the basis of the visual sensor measurement method, the measurement information of other types of sensors can be introduced to overcome the problem of poor robustness of pure visual tracking and registration methods in the industrial machinery product assembly environment. In view of the above problems, on the basis of visual measurement sensors, other types of small and low-cost sensors can be introduced for measurement, and the idea of ​​multi-sensor fusion can be used to achieve complementary advantages between different sensors, thereby improving the robustness of augmented reality tracking and registration process.

[0005] Compared with ordinary RGB cameras, depth sensors can obtain dense and stable depth feature information on the surface of mechanical products with smooth surfaces and sparse textures. At the same time, the introduction of depth information can also overcome the scale uncertainty of monocular cameras and the inaccuracy of scale estimation under binocular cameras, and can assist RGB feature information in more stable tracking and registration through the ICP algorithm. However, this method has the following problems: First, when the camera moves quickly, it will cause 3D features to be missing, which will cause the ICP (iterative closest point) algorithm to fall into the local optimal solution and fail during the iteration process; second, when it exceeds the working range of the depth sensor (0.15~4m), it is easy to cause "frame loss", which will lead to tracking registration failure.

[0006] Inertial trackers, also known as inertial measurement units (IMUs), include inertial gyroscopes and micro-accelerometers, and use the strapdown inertial navigation principle to calculate direction and position. They are small, free from occlusion, have unlimited working range, and have high update frequency, which can effectively help RGBD-based tracking and registration methods overcome the problem of reduced robustness of tracking and registration caused by rapid motion and limited depth measurement range. Although inertial measurement units are susceptible to noise and self-bias, errors accumulate as the system's running time increases. Due to the presence of RGBD cameras, the IMU's own gyroscope bias can be calibrated.

[0007] In response to the above problems and in combination with the characteristics of the mechanical product assembly environment, on the basis of traditional visual measurement sensors, small and low-cost depth sensors and inertial measurement units (IMUs) are introduced. The multi-sensor fusion algorithm is used to improve the robustness of the augmented reality tracking registration process and improve the assembly efficiency and stability of complex mechanical products.

[0008] Application publication number CN111462231A, a positioning method based on RGBD sensor and IMU sensor, the process is as follows: first, the mobile robot is equipped with RGBD sensor and IMU sensor to collect data; second, the visual SLAM algorithm is used to initialize the RGBD sensor data to obtain its posture information, and the IMU sensor data is pre-integrated, and then the mobile robot is initialized to obtain its initial state information; based on the reprojection error optimization tracking mobile robot posture information, speed and IMU sensor bias; at the same time, a nonlinear optimization algorithm based on sliding window is used to optimize the posture information and map in real time; loop detection is added to avoid the occurrence of zero bias. This positioning method uses RGBD sensor and IMU sensor in combination to overcome the shortcomings of pure visual SLAM algorithm that is easy to fail to track in pure rotation and single background and IMU sensor produces zero bias in long-term movement.

[0009] Although the above patents also propose a tracking and positioning method based on the fusion of RGBD information and IMU information, this patent has the following differences in detail processing:

[0010] 1. Since the mechanical parts in the industrial assembly site have the characteristics of sparse texture and smooth surface, this will directly lead to the RGB camera being unable to extract a sufficient number of stable feature points for tracking and registration. Therefore, in the visual measurement front end described in claim 1, it is proposed to obtain a dense point cloud through the depth information collected by the depth camera on the basis of the RGB camera, and to achieve tracking and registration in the form of point cloud registration. Although the 2D ORB feature is also extracted by the RGB camera, this ORB feature is sparse in the weak texture scene. The pose information calculated by this feature in the present invention has only two uses: the first is to serve as the initial pose information in the point cloud registration process to accelerate the iteration process; the second is to serve as the only basis for the visual tracking and registration process when the depth of the depth camera is unmeasurable, and the measurement error generated by it is compensated by the subsequent IMU. In the above patent, in the visual feature tracking and matching, only the ORB features collected by the RGB camera are used, and the depth information collected by the depth sensor is not used, so the robustness of the tracking and registration in the scene described in this patent will not be guaranteed.

[0011] 2. This patent introduces marginalization prior information in the error function of back-end optimization. In the sliding window, if a variable is removed from the window, this method will not directly remove the variable and related constraint information, but will generate a new constraint relationship between the variables that have a constraint relationship with the variable, thereby passing the information carried by the discarded variable to the remaining variables, providing prior information for the subsequent optimization process, thereby optimizing to obtain a more accurate pose estimation. At the same time, this patent has made relevant optimizations in the optimization strategy of the sliding window, aiming to ensure a certain tracking and registration accuracy while improving the real-time performance of the algorithm. In the above-mentioned patent, only the constraint relationship is established with the adjacent frames during the back-end optimization process, and the constraint information of the marginalized variables is not involved in the optimization, so the accuracy of tracking and registration will not be better than that of this patent. At the same time, the above-mentioned patent has not been optimized in the marginalization strategy, so the real-time performance of tracking and registration may be relatively poor. Summary of the invention

[0012] The present invention aims to solve the above problems of the prior art. A RGBD and IMU hybrid tracking registration method based on sliding window optimization is proposed. The technical solution of the present invention is as follows:

[0013] A RGBD and IMU hybrid tracking registration method based on sliding window optimization includes the following steps:

[0014] Front-end steps of visual measurement: First, RGB information and depth information are obtained through the RGBD camera, feature extraction and tracking are performed, and the RGBD-based tracking registration method is used to calculate the position of the current frame and the 3D information of the observation point, and the tracked and matched feature information is added to the key frame queue and handed over to the back-end for optimization processing. At the same time, the IMU performs pre-integration operations on the collected pose information to obtain the pose information between adjacent frames as the initial pose when calculating the RGBD-based tracking registration method, and then handed over to the back-end for optimization processing;

[0015] Multi-sensor joint initialization step: calibrate the external parameters, bias, and absolute scale of the three sensors, estimate the pose of the first two frames in the sliding window and the inverse depth of the observation point through the SLAM algorithm, and align with the IMU pre-integration results to solve the relevant parameters;

[0016] Back-end optimization steps: A sliding window-based method is used to further optimize the initial pose information transmitted from the visual measurement front end. The target error function is constructed through prior information constraints, visual constraints, and IMU constraints. The pose and bias information of all frames are continuously optimized through a sliding window-based graph optimization algorithm.

[0017] Loop detection and optimization steps: Use the DboW visual word bag algorithm to perform loop detection. If a loop is detected, the entire trajectory is closed-loop optimized by relocalization.

[0018] Furthermore, the feature extraction and tracking uses the ORB algorithm to extract and match feature points. The steps of the ORB algorithm specifically include: first, finding the corner feature of the component by comparing the difference between the current pixel and the surrounding pixel points; second, selecting N point pairs near the selected corner point according to a certain rule, and combining the difference results of the N point pairs as the descriptor of the feature point; finally, in the feature matching stage, performing feature matching by the similarity of the descriptors of the corner points;

[0019] The RANSAC algorithm is used to remove the mismatched points. The specific steps of the RANSAC algorithm to remove the mismatched points include: first, the feature point pairs matched to the corner points are mapped to the three-dimensional space through depth information collection, and a group of internal points, i.e., correct matching points, are randomly assumed as initial values ​​to fit a model; then, the assumed model is used to try to fit other feature points. If it fits the model, the model is expanded; otherwise, the point is regarded as an external point, i.e., a non-matching point, and is removed; finally, after reaching the maximum number of iterations, if the number of internal points in the assumed model is less than a certain threshold, the assumed model is abandoned and the iteration is re-assumed; otherwise, the model is considered to have high confidence, the model is retained, and the external points of the model, i.e., the non-matching points, are removed.

[0020] Furthermore, the RGBD-based tracking and registration method calculates the position of the frame at the current moment and the 3D information of the observation point, specifically including:

[0021] On the basis of ORB feature matching, it is determined whether the depth information of the corresponding feature point pairs can be measured. For the measurable feature point pairs, the depth information of the corresponding feature point pairs is measured, and the initial pose information of the current frame is calculated by the ICP algorithm. Then, the dense point cloud information is obtained through the depth image and the initial pose is used as the initial value of the ICP iteration. Further ICP iterative optimization is performed to obtain more accurate pose information. For the feature point pair information that cannot obtain the depth, the PnP method is still used for pose estimation.

[0022] Further, the steps of the SFM method are:

[0023] The initial pose information of the current frame is calculated by the ICP algorithm, specifically including: first, calculating the centroid coordinates of each point of the two sets of matching point clouds P1 and P2, p i and p' i Then, the point cloud P1 is transformed to P2 by the transformation matrix T, and the error function is constructed; finally, the transformation matrix T is continuously optimized by an iterative method until the error function is lower than a certain threshold or the maximum number of iterations is reached;

[0024] For feature point pair information that cannot obtain depth, the PnP method is still used for pose estimation, which specifically includes: first, find the observation point q that has a common view relationship between the current frame and the previous frame based on the feature matching point, and convert the point to the pixel coordinates of the current frame through the transformation matrix T; then, construct a reprojection error function, and continuously optimize the transformation matrix T through the iterative least squares method to solve the pose of the current frame. Furthermore, the IMU performs a pre-integration operation on the collected pose information, measures it through the IMU, and combines it with the pvq pose information at the i-th moment to obtain the pvq pose information at the j-th moment. The calculation formula is:

[0025]

[0026]

[0027]

[0028] in, is the position information of IMU in the world coordinate system at time j, i; is the velocity of the IMU in the world coordinate system at time j,i; It is the rotation information of IMU in the world coordinate system at time j, i; is the IMU acceleration at time t; is the angular velocity of the IMU at time t. The integral part of the above three equations represents the integral increment from time i to time j, which are recorded as, These three quantities will be used as inter-frame constraint information for the back-end visual measurement for nonlinear optimization.

[0029] Furthermore, the specific steps of the multi-sensor joint initialization are:

[0030] Step 1: Use the rotation constraint to estimate the external parameter q between the IMU and the RGBD camera bc ; The rotation constraints are as follows, where It is the rotation quaternion of the IMU itself from time k to time k+1. is the rotation quaternion of the RGBD camera itself from time k to time k+1;

[0031]

[0032] Step 2: Using the above rotation constraints, the error function is constructed through the visual observation value and the gyroscope measurement value, and the least squares iteration is performed to solve the gyroscope bias b g , and recalculate the IMU pre-integral under the current bias.

[0033] Step 3: Absolute scale translation obtained by integrating the IMU at time k and time k+1 and the relative scale translation of RGBD And the rotation extrinsic parameter q between IMU and RGBD bc , translation extrinsic parameter p bc , align the IMU trajectory with the RGBD camera trajectory to get the absolute scale s;

[0034] Step 4: Minimize the IMU pre-integration error by constructing the translation constraint to solve the initialization speed of the system And initialize gravity Specifically, the translation constraint calculation formula is as follows:

[0035]

[0036] in, is the relative scale displacement between the IMU system at the kth moment and the RGBD camera at the 0th moment, is the relative scale displacement between two RGBD cameras from the kth moment to the 0th moment, is the rotation matrix of the IMU system relative to the RGBD camera system at the kth moment.

[0037] The specific IMU pre-integration error calculation formula between the kth moment and the k+1th moment is:

[0038]

[0039] in, is the displacement change error of the IMU between the kth moment and the k+1th moment; is the measured and predicted value of the IMU displacement change between the kth moment and the k+1th moment, is the measured and predicted value of the IMU change between the kth moment and the k+1th moment. The meaning of the remaining symbols refers to the above notes.

[0040] Step 5: Through the constraint information of gravity modulus ||g||, the gravity in step 4 above is Parameterize and substitute into the above IMU pre-integration error calculation formula to calculate, so as to correct the initialized gravity scale. The parameterized expression is:

[0041]

[0042] In the formula, ||g|| is the known gravity, is the unit vector in the direction of gravity, b1 and b2 are two orthogonal basis vectors across the tangent plane, w1 and w2 are variables to be optimized, representing the displacement along the two orthogonal basis vectors, which together constitute

[0043] Furthermore, the sliding window-based method is used to further optimize the initial pose information transmitted from the visual measurement front end, and the target error function is constructed through prior information constraints, visual constraints, and IMU constraints. The pose and bias information of all frames are continuously optimized through the sliding window-based graph optimization algorithm, which specifically includes:

[0044] Step 1: Determine the optimized state vector. The state vectors that need to be optimized are: the state of all cameras in the sliding window and the inverse depth of m+1 observation points;

[0045]

[0046]

[0047] in, represents all the state quantities in the sliding window, n is the number of frames in the sliding window, m represents the total number of feature points in the sliding window, and λ k Represents the inverse depth information of each observation point; x k Represents the pose information of each frame, including the displacement of the IMU in the world coordinate system speed Angular velocity Accelerometer bias Gyroscope bias

[0048] Step 2: Construct the following least squares-based target error function through visual error and inertial measurement error to continuously optimize the state vector in the sliding window:

[0049]

[0050] Among them, e prior is the prior information of sliding window marginalization, r b is the IMU pre-integration error function between adjacent frames, is the IMU pre-integrated observation between the kth moment and the k+1th moment, is the covariance of the IMU pre-integrated noise term, r c is the visual reprojection error between adjacent frames, is the observation of the observation point l by the RGBD camera at time j, is the covariance of RGBD observations;

[0051] Step 3: Expand and derive the least squares objective function in Step 2 to calculate the error terms of each error term with respect to the state vector The Jacobian matrix J of

[0052] Step 4: Based on the Jacobian matrix J obtained above, the state vector is conditioned by the Gauss-Newton method with a damping factor. Perform iterative optimization to speed up the iterative optimization process.

[0053] Step 5: Update the state vector. When the target error function is lower than a certain threshold or reaches the maximum number of iterations N, stop, otherwise jump to Step 3.

[0054] Furthermore, in Step 2, the marginalized prior information is obtained by removing the old variables through the sliding window and re-establishing the constraint information between variables: the variable removal strategy of the sliding window is:

[0055] (1) After adding the sliding window to the new frame, find the landmark point l1 that can be observed in all frames in the current sliding window , Triangulation optimization is performed through these frames. After the optimization is completed, this observation point is removed from the sliding window and constraints are established between all frames.

[0056] (2) For the observation point l2 that cannot be seen in the new frame, remove the observation point and establish a constraint between the old frames where the point can be observed;

[0057] (3) After removing the above observation points, if some frames in the sliding window have no observable points, these observation frames are directly removed.

[0058] Furthermore, after removing these variables, the influence of the removed variables on other state vectors in the sliding window is calculated according to the Schur complement method, i.e., the marginalized prior information;

[0059] Furthermore, the DboW visual word bag algorithm is used for loop detection, specifically including: first, the ORB operator is used to describe the new and old corner points of the current frame, then the similarity score between the current frame and the word bag is calculated, and the similarity score is compared with all frames in the key frame database, and a closed loop consistency test is performed. Finally, if a closed loop is found, the state vector is adjusted by the SLAM algorithm. Perform loop optimization.

[0060] The advantages and beneficial effects of the present invention are as follows:

[0061] (1) Since mechanical parts have sparse textures and smooth surfaces, it is very difficult to extract 2D feature points, which makes it impossible to ensure the robustness of tracking and registration. Depth cameras can extract dense point cloud information in weak texture environments and supplement sparse 2D features. Therefore, claim 3 proposes a tracking and registration method based on RGBD, which introduces depth information to 2D features, calculates the initial pose through ORB features, and uses it as the initial pose value for the subsequent dense point cloud ICP registration process, which can accelerate ICP registration and obtain more accurate pose estimation.

[0062] (2) During the assembly of mechanical products, the operator's head movement will cause blurring and jittering in the RGB image and the depth image, resulting in the inability of the tracking and registration method based on RGBD features to perform correct pose estimation, while the IMU sensor can estimate its own pose in real time during the movement. Therefore, in claims 5-8, the IMU measurement information is introduced into the tracking and registration method based on RGBD features, and the IMU measurement information is also fused. When the tracking and registration method based on RGBD features can work normally, the pose information can be further optimized through the inter-frame constraint information of the IMU; when the tracking and registration method based on RGBD features cannot work normally due to movement, the IMU can still provide its own pose estimation in real time, thereby making up for the poor robustness of the RGBD camera in tracking and registration in motion scenes, and further improving the pose estimation accuracy of the tracking and registration method based on RGBD features.

[0063] (3) While improving the robustness of the tracking and registration of the augmented reality system, claims 7-8 propose a RGBD and IMU hybrid tracking and registration method based on sliding window optimization. During the movement of the sliding window, the constraint information of the removed variables is passed to the remaining variables in the form of prior information, participating in the back-end nonlinear optimization, and further improving the accuracy of tracking and registration. At the same time, on this basis, a sliding window variable elimination strategy is proposed to eliminate redundant state variables in the sliding window, shorten the response time of the back-end nonlinear optimization, and improve the real-time performance of the tracking and registration process. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] Figure 1 The present invention provides a preferred embodiment of a method for hybrid tracking and registration of augmented reality based on RGBD and IMU fusion;

[0065] Figure 2 It is the visual inertial constraint topology map and sliding window marginalization map;

[0066] Figure 3 This is a flow chart of the pose estimation method based on RGBD;

[0067] Figure 4 It is a schematic diagram of multi-sensor fusion strategy based on sliding window. DETAILED DESCRIPTION

[0068] The following will describe the technical solutions in the embodiments of the present invention in detail in conjunction with the accompanying drawings in the embodiments of the present invention. The described embodiments are only part of the embodiments of the present invention.

[0069] The technical solution of the present invention to solve the above technical problems is:

[0070] In view of the problems existing in the above-mentioned augmented reality technology in the industrial machinery production and assembly scene, a hybrid tracking and registration method based on the fusion of RGBD and inertial measurement unit is proposed. The technical solution of the present invention is as follows:

[0071] A hybrid tracking and registration method based on the fusion of RGBD and inertial measurement unit. The process framework of this method is as follows Figure 1 As shown, the following steps are included:

[0072] Front-end steps of visual measurement: First, RGB information and depth information are obtained through the RGBD camera, feature extraction and tracking are performed, and the RGBD-based tracking registration method is used to calculate the position of the current frame and the 3D information of the observation point, and the tracked and matched feature information is added to the key frame queue and handed over to the back-end for optimization processing. At the same time, the IMU performs pre-integration operations on the collected pose information to obtain the pose information between adjacent frames as the initial pose when calculating the RGBD-based tracking registration method, and then handed over to the back-end for optimization processing;

[0073] Multi-sensor joint initialization step: calibrate the external parameters, bias, and absolute scale of the three sensors, estimate the pose of the first two frames in the sliding window and the inverse depth of the observation point through the SLAM algorithm, and align with the IMU pre-integration results to solve the relevant parameters;

[0074] Back-end optimization steps: A sliding window-based method is used to further optimize the initial pose information transmitted from the visual measurement front end. The target error function is constructed through prior information constraints, visual constraints, and IMU constraints. The pose and bias information of all frames are continuously optimized through a sliding window-based graph optimization algorithm.

[0075] Loop detection and optimization steps: Use the DboW visual word bag algorithm to perform loop detection. If a loop is detected, the entire trajectory is closed-loop optimized by relocalization.

[0076] Furthermore, the feature extraction and tracking uses the ORB algorithm to extract and match feature points. The steps of the ORB algorithm specifically include: first, finding the corner feature of the component by comparing the difference between the current pixel and the surrounding pixel points; second, selecting N point pairs near the selected corner point according to a certain rule, and combining the difference results of the N point pairs as the descriptor of the feature point; finally, in the feature matching stage, performing feature matching by the similarity of the descriptors of the corner points;

[0077] The RANSAC algorithm is used to remove the mismatched points. The specific steps of the RANSAC algorithm to remove the mismatched points include: first, the feature point pairs matched to the corner points are mapped to the three-dimensional space through depth information collection, and a group of internal points, i.e., correct matching points, are randomly assumed as initial values ​​to fit a model; then, the assumed model is used to try to fit other feature points. If it fits the model, the model is expanded; otherwise, the point is regarded as an external point, i.e., a non-matching point, and is removed; finally, after reaching the maximum number of iterations, if the number of internal points in the assumed model is less than a certain threshold, the assumed model is abandoned and the iteration is re-assumed; otherwise, the model is considered to have high confidence, the model is retained, and the external points of the model, i.e., the non-matching points, are removed.

[0078] Furthermore, the RGBD-based tracking and registration method calculates the position of the frame at the current moment and the 3D information of the observation point, specifically including:

[0079] On the basis of ORB feature matching, it is determined whether the depth information of the corresponding feature point pairs can be measured. For the measurable feature point pairs, the depth information of the corresponding feature point pairs is measured, and the initial pose information of the current frame is calculated by the ICP algorithm. Then, the dense point cloud information is obtained through the depth image and the initial pose is used as the initial value of the ICP iteration. Further ICP iterative optimization is performed to obtain more accurate pose information. For the feature point pair information that cannot obtain the depth, the PnP method is still used for pose estimation.

[0080] Further, the steps of the SFM method are:

[0081] The initial pose information of the current frame is calculated by the ICP algorithm, specifically including: first, calculating the centroid coordinates of each point of the two sets of matching point clouds P1 and P2, p i and p' i Then, the point cloud P1 is transformed to P2 by the transformation matrix T, and the error function is constructed; finally, the transformation matrix T is continuously optimized by an iterative method until the error function is lower than a certain threshold or the maximum number of iterations is reached;

[0082] For feature point pair information that cannot obtain depth, the PnP method is still used for pose estimation, which specifically includes: first, find the observation point q that has a common view relationship between the current frame and the previous frame based on the feature matching point, and convert the point to the pixel coordinates of the current frame through the transformation matrix T; then, construct a reprojection error function, and continuously optimize the transformation matrix T through the iterative least squares method to solve the pose of the current frame. Furthermore, the IMU performs a pre-integration operation on the collected pose information, measures it through the IMU, and combines it with the pvq pose information at the i-th moment to obtain the pvq pose information at the j-th moment. The calculation formula is:

[0083]

[0084]

[0085]

[0086] in, is the position information of IMU in the world coordinate system at time j, i; is the velocity of the IMU in the world coordinate system at time j,i; It is the rotation information of IMU in the world coordinate system at time j, i; is the IMU acceleration at time t; is the angular velocity of the IMU at time t. The integral part of the above three equations represents the integral increment from time i to time j, which are recorded as, These three quantities will be used as inter-frame constraint information for the back-end visual measurement for nonlinear optimization.

[0087] Furthermore, the specific steps of the multi-sensor joint initialization are:

[0088] Step 1: Use the rotation constraint to estimate the external parameter q between the IMU and the RGBD camera bc ; The rotation constraints are as follows, where It is the rotation quaternion of the IMU itself from time k to time k+1. is the rotation quaternion of the RGBD camera itself from time k to time k+1;

[0089]

[0090] Step 2: Using the above rotation constraints, the error function is constructed through the visual observation value and the gyroscope measurement value, and the least squares iteration is performed to solve the gyroscope bias b g , and recalculate the IMU pre-integral under the current bias.

[0091] Step 3: Absolute scale translation obtained by integrating the IMU at time k and time k+1 and the relative scale translation of RGBD And the rotation extrinsic parameter q between IMU and RGBD bc , translation extrinsic parameter p bc , align the IMU trajectory with the RGBD camera trajectory to get the absolute scale s;

[0092] Step 4: Minimize the IMU pre-integration error by constructing the translation constraint to solve the initialization speed of the system And initialize gravity Specifically, the translation constraint calculation formula is as follows:

[0093]

[0094] in, is the relative scale displacement between the IMU system at the kth moment and the RGBD camera at the 0th moment, is the relative scale displacement between two RGBD cameras from the kth moment to the 0th moment, is the rotation matrix of the IMU system relative to the RGBD camera system at the kth moment.

[0095] The specific IMU pre-integration error calculation formula between the kth moment and the k+1th moment is:

[0096]

[0097] in, is the displacement change error of the IMU between the kth moment and the k+1th moment; is the measured and predicted value of the IMU displacement change between the kth moment and the k+1th moment, is the measured and predicted value of the IMU change between the kth moment and the k+1th moment. The meaning of the remaining symbols refers to the above notes.

[0098] Step 5: Through the constraint information of gravity modulus ||g||, the gravity in step 4 above is Parameterize and substitute into the above IMU pre-integration error calculation formula to calculate, so as to correct the initialized gravity scale. The parameterized expression is:

[0099]

[0100] In the formula, ||g|| is the known gravity, is the unit vector in the direction of gravity, b1 and b2 are two orthogonal basis vectors across the tangent plane, w1 and w2 are variables to be optimized, representing the displacement along the two orthogonal basis vectors, which together constitute

[0101] Furthermore, the sliding window-based method is used to further optimize the initial pose information transmitted from the visual measurement front end, and the target error function is constructed through prior information constraints, visual constraints, and IMU constraints. The pose and bias information of all frames are continuously optimized through the sliding window-based graph optimization algorithm, which specifically includes:

[0102] Step 1: Determine the optimized state vector. The state vectors that need to be optimized are: the state of all cameras in the sliding window and the inverse depth of m+1 observation points;

[0103]

[0104]

[0105] in, represents all the state quantities in the sliding window, n is the number of frames in the sliding window, m represents the total number of feature points in the sliding window, and λ k Represents the inverse depth information of each observation point; x k Represents the pose information of each frame, including the displacement of the IMU in the world coordinate system speed Angular velocity Accelerometer bias Gyroscope bias

[0106] Step 2: Construct the following least squares-based target error function through visual error and inertial measurement error to continuously optimize the state vector in the sliding window:

[0107]

[0108] Among them, e prior is the prior information of sliding window marginalization, r b is the IMU pre-integration error function between adjacent frames, is the IMU pre-integrated observation between the kth moment and the k+1th moment, is the covariance of the IMU pre-integrated noise term, r c is the visual reprojection error between adjacent frames, is the observation of the observation point l by the RGBD camera at time j, is the covariance of RGBD observations;

[0109] Step 3: Expand and derive the least squares objective function in Step 2 to calculate the error terms of each error term with respect to the state vector The Jacobian matrix J of

[0110] Step 4: Based on the Jacobian matrix J obtained above, the state vector is conditioned by the Gauss-Newton method with a damping factor. Perform iterative optimization to speed up the iterative optimization process.

[0111] Step 5: Update the state vector. When the target error function is lower than a certain threshold or reaches the maximum number of iterations N, stop, otherwise jump to Step 3.

[0112] Furthermore, in Step 2, the marginalized prior information is obtained by removing the old variables through the sliding window and re-establishing the constraint information between variables: the variable removal strategy of the sliding window is:

[0113] (1) After adding the sliding window to the new frame, find the landmark point l1 that can be observed in all frames in the current sliding window, and perform triangulation optimization through these frames. After the optimization is completed, remove this observation point from the sliding window and establish constraints between all frames;

[0114] (2) For the observation point l2 that cannot be seen in the new frame, remove the observation point and establish a constraint between the old frames where the point can be observed;

[0115] (3) After removing the above observation points, if some frames in the sliding window have no observable points, these observation frames are directly removed.

[0116] Furthermore, after removing these variables, the influence of the removed variables on other state vectors in the sliding window is calculated according to the Schur complement method, i.e., the marginalized prior information;

[0117] Furthermore, the DboW visual word bag algorithm is used for loop detection, specifically including: first, the ORB operator is used to describe the new and old corner points of the current frame, then the similarity score between the current frame and the word bag is calculated, and the similarity score is compared with all frames in the key frame database, and a closed loop consistency test is performed. Finally, if a closed loop is found, the state vector is adjusted by the SLAM algorithm. Perform loop optimization.

[0118] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0119] The above embodiments should be understood to be only used to illustrate the present invention and not to limit the protection scope of the present invention. After reading the contents of the present invention, technicians can make various changes or modifications to the present invention, and these equivalent changes and modifications also fall within the scope defined by the claims of the present invention.

Claims

1. A RGBD and IMU hybrid tracking registration method based on sliding window optimization, characterized in that: The following steps are involved: Front-end steps of visual measurement: First, RGB information and depth information are obtained through the RGBD camera, feature extraction and tracking are performed, and the RGBD-based tracking registration method is used to calculate the position of the current frame and the 3D information of the observation point, and the tracked and matched feature information is added to the key frame queue and handed over to the back-end for optimization processing. At the same time, the IMU performs pre-integration operations on the collected pose information to obtain the pose information between adjacent frames as the initial pose when calculating the RGBD-based tracking registration method, and then handed over to the back-end for optimization processing; Multi-sensor joint initialization step: calibrate the external parameters, bias, and absolute scale of the three sensors, estimate the pose of the first two frames in the sliding window and the inverse depth of the observation point through the SLAM algorithm, and align with the IMU pre-integration results to solve the relevant parameters; Back-end optimization steps: A sliding window-based method is used to further optimize the initial pose information transmitted from the visual measurement front end. The target error function is constructed through prior information constraints, visual constraints, and IMU constraints. The pose and bias information of all frames are continuously optimized through a sliding window-based graph optimization algorithm. Loop detection and optimization steps: Use the DboW visual word bag algorithm to perform loop detection. If a loop is detected, the entire trajectory is closed-loop optimized by relocalization; The method based on sliding window is used to further optimize the initial pose information transmitted from the visual measurement front end, and the target error function is constructed through prior information constraints, visual constraints, and IMU constraints. The pose and bias information of all frames are continuously optimized through the graph optimization algorithm based on sliding window, which specifically includes: Step 1: Determine the optimized state vector. The state vectors that need to be optimized are: the state of all cameras in the sliding window and the inverse depth of m+1 observation points; Among them, represents all the state quantities in the sliding window, n is the number of frames in the sliding window, m represents the total number of feature points in the sliding window, represents the inverse depth information of each observation point; represents the pose information in each frame, including the displacement of the IMU in the world coordinate system speed Angular velocity Accelerometer bias Gyroscope bias Step 2: Construct the following least squares-based target error function through visual error and inertial measurement error to continuously optimize the state vector in the sliding window; Among them, is the prior information of sliding window marginalization, is the IMU pre-integration error function between adjacent frames, is the IMU pre-integrated observation between the kth moment and the k+1th moment, is the covariance of the IMU pre-integrated noise term, is the visual reprojection error between adjacent frames, is the observation of the observation point l by the RGBD camera at time j, is the covariance of RGBD observations; Step 3: Expand and derive the least squares objective function in Step 2 to calculate the Jacobian matrix J of each error term with respect to the state vector; Step 4: Using the Jacobian matrix J obtained above, the state vector is iteratively optimized using the Gauss-Newton method with a damping factor to accelerate the iterative process of optimization. Step 5: Update the state vector. When the target error function is lower than a certain threshold or reaches the maximum number of iterations N, stop, otherwise jump to Step 3.

2. According to the sliding window optimized RGBD and IMU hybrid tracking registration method of claim 1, it is characterized in that: The feature extraction and tracking adopts the ORB algorithm to extract and match feature points. The steps of the ORB algorithm specifically include: first, by comparing the difference between the current pixel and the surrounding pixel points to find the corner point features of the component; second, by selecting N point pairs near the selected corner points according to a certain rule, and combining the difference results of the N point pairs as the descriptor of the feature point; finally, in the feature matching stage, feature matching is performed by the similarity of the descriptors of the corner points; The RANSAC algorithm is used to remove the mismatched points. The specific steps of the RANSAC algorithm to remove the mismatched points include: first, the feature point pairs matched to the corner points are mapped to the three-dimensional space through depth information collection, and a group of internal points, i.e., correct matching points, are randomly assumed as initial values ​​to fit a model; then, the assumed model is used to try to fit other feature points. If it fits the model, the model is expanded; otherwise, the point is regarded as an external point, i.e., a non-matching point, and is removed; finally, after reaching the maximum number of iterations, if the number of internal points in the assumed model is less than a certain threshold, the assumed model is abandoned and the iteration is re-assumed; otherwise, the model is considered to have high confidence, the model is retained, and the external points of the model, i.e., the non-matching points, are removed.

3. According to claim 2, a RGBD and IMU hybrid tracking registration method based on sliding window optimization is characterized in that: The RGBD-based tracking and registration method calculates the position of the frame at the current moment and the 3D information of the observation point, specifically including: On the basis of ORB feature matching, it is determined whether the depth information of the corresponding feature point pairs can be measured. For the measurable feature point pairs, the depth information of the corresponding feature point pairs is measured, and the initial pose information of the current frame is calculated by the ICP algorithm. Then, the dense point cloud information is obtained through the depth image and the initial pose is used as the initial value of the ICP iteration. Further ICP iterative optimization is performed to obtain more accurate pose information. For the feature point pair information that cannot obtain the depth, the PnP method is still used for pose estimation.

4. The RGBD and IMU hybrid tracking registration method based on sliding window optimization according to claim 3 is characterized in that: The initial pose information of the current frame is calculated by the ICP algorithm, specifically including: first, calculating the centroid coordinates of each point of the two sets of matching point clouds P1 and P2, and then, transforming the point cloud P1 point to P2 by using the transformation matrix T, and constructing an error function; finally, continuously optimizing the transformation matrix T by an iterative method until the error function is lower than a certain threshold or reaches a maximum number of iterations; For feature point pairs whose depth information cannot be obtained, the PnP method is still used for pose estimation, which specifically includes: first, finding the observation point q with a common view relationship between the current frame and the previous frame based on the feature matching points, and converting the point to the pixel coordinates of the current frame through the transformation matrix T; then, constructing a reprojection error function, and continuously optimizing the transformation matrix T through the iterative least squares method, thereby solving the pose of the current frame.

5. The RGBD and IMU hybrid tracking registration method based on sliding window optimization according to claim 1 is characterized in that: The IMU performs a pre-integration operation on the collected posture information, measures it through the IMU, and combines it with the pvq posture information at the i-th moment to obtain the pvq posture information at the j-th moment. The calculation formula is: in, is the position information of IMU in the world coordinate system at time j, i; is the velocity of the IMU in the world coordinate system at time j,i; It is the rotation information of IMU in the world coordinate system at time j, i; is the IMU acceleration at time t; is the angular velocity of the IMU at time t; the integral part of the above three equations represents the integral increment from time i to time j, which are recorded as, These three quantities will be used as inter-frame constraint information for the back-end visual measurement for nonlinear optimization.

6. The RGBD and IMU hybrid tracking registration method based on sliding window optimization according to claim 5 is characterized in that: The specific steps of the multi-sensor joint initialization are: Step 1: Use the rotation constraint to estimate the external parameters between the IMU and the RGBD camera; the rotation constraint is as follows, It is the rotation quaternion of the IMU itself from time k to time k+1. is the rotation quaternion of the RGBD camera itself from time k to time k+1; Step 2: Using the above rotation constraints, the error function is constructed through visual observations and gyroscope measurements to perform least squares iteration to solve the gyroscope bias and recalculate the IMU pre-integral under the current bias; Step 3: Absolute scale translation obtained by integrating the IMU at time k and time k+1 and the relative scale translation of RGBD As well as the rotation and translation of external parameters between IMU and RGBD, aligning the IMU trajectory with the RGBD camera trajectory to obtain the absolute scale s; Step 4: Minimize the IMU pre-integration error by constructing the translation constraint to solve the initialization speed of the system And initialize gravity Specifically, the translation constraint calculation formula is as follows: in, is the relative scale displacement between the IMU system at the kth moment and the RGBD camera at the 0th moment, is the relative scale displacement between two RGBD cameras from the kth moment to the 0th moment, is the rotation matrix of the IMU system relative to the RGBD camera system at the kth moment; The specific IMU pre-integration error calculation formula between the kth moment and the k+1th moment is: in, is the displacement change error of the IMU between the kth moment and the k+1th moment; is the measured and predicted value of the IMU displacement change between the kth moment and the k+1th moment, is the measured and predicted value of the IMU change between the kth moment and the k+1th moment; Step 5: Use the gravity modulus constraint information to adjust the gravity in step 4 above. Parameterize and substitute into the above IMU pre-integration error calculation formula to calculate, so as to correct the initialized gravity scale; the parameterized expression is: In the formula, is the known gravity, is the unit vector of the gravity direction, is the two orthogonal basis vectors across the tangent plane, is the variable to be optimized, represents the displacement along the two orthogonal basis vectors, and they together constitute 7. The RGBD and IMU hybrid tracking registration method based on sliding window optimization according to claim 1 is characterized in that: In Step 2, the marginalized prior information is obtained by removing the old variables through the sliding window and re-establishing the constraint information between variables: the variable removal strategy of the sliding window is: (1) After adding a sliding window to a new frame, find the landmark points that can be observed in all frames within the current sliding window, and perform triangulation optimization on these frames. After the optimization is completed, remove the observation point from the sliding window and establish constraints between all frames. (2) For observation points that cannot be seen in the new frame, the observation point is removed and constraints are established between the old frames where the point can be observed; (3) After removing the above observation points, if some frames in the sliding window have no observable points, these observation frames are directly removed; After removing these variables, the influence of the removed variables on other state vectors in the sliding window is calculated according to the Schur complement method, that is, the marginalized prior information.

8. The RGBD and IMU hybrid tracking registration method based on sliding window optimization according to claim 7 is characterized in that: The loop detection using the DboW visual word bag algorithm specifically includes: first, the ORB operator is used to describe the new and old corner points of the current frame, then the similarity score between the current frame and the word bag is calculated, and compared with all frames in the key frame database, and a closed-loop consistency test is performed. Finally, if a closed loop is found, the state vector is loop optimized through the SLAM algorithm.