A multi-camera visual-inertial odometry optimization method based on continuous-time model

Through the multi-camera visual inertial odometry optimization method based on the continuous time model, B-spline curves and deep learning are used to solve the problems of cross-camera common view constraints and rolling shutter effect, and improve the multi-camera VIO algorithm in autonomous driving scenarios. accuracy and robustness.

CN117629241BActive Publication Date: 2024-09-10BEIJING HUIXI TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310730524.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-20
Publication Date
2024-09-10
Estimated Expiration
2043-06-20

AI Technical Summary

Technical Problem

The existing multi-camera visual inertial odometry calculation method does not fully utilize the common view constraints across the overlapping fields of view of the cameras, and does not consider the 'jelly effect' of rolling shutter cameras and the inconsistency of camera timestamps, resulting in affected accuracy and robustness. Especially in autonomous driving scenarios.

Method used

A multi-camera visual inertial odometry optimization method based on a continuous time model is used to parameterize the motion trajectory through the continuous time trajectory model of the B-spline curve. It combines deep learning and nonlinear optimization to solve the problem of asynchronous data and time asynchrony. , and estimate camera line delay and sensor time shift in real time to achieve cross-camera feature tracking and error correction.

Benefits of technology

It improves the accuracy and robustness of the multi-camera VIO algorithm, enhances the real-time and reliability of estimation, overcomes the motion distortion of rolling shutter cameras, and ensures consistent feature tracking in time and space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117629241B
    Figure CN117629241B
Patent Text Reader

Abstract

The present invention relates to a multi-camera visual inertial odometer optimization method based on a continuous time model, comprising the following steps: S1-S4, collecting and processing sensor data, extracting and tracking feature points; S5, if not initialized, initializing the multi-camera visual inertial odometer, constructing an initial feature map, and parameterizing the multi-camera motion trajectory based on a continuous time trajectory model of a B-spline curve; S6, if the multi-camera visual inertial odometer has been initialized, the current multi-camera image frame uses IMU integration to obtain an initial pose value, and is added to a sliding window with a sliding window size of N for nonlinear optimization, using all trajectory control point poses in the sliding window, feature inverse depth, line delay of each camera, and time shift between the camera and the IMU sensor as estimated state quantities, and using IMU pre-integration error and feature point reprojection error as error terms, iteratively estimating the optimal pose. The beneficial effect is to overcome the camera common view constraint and rolling curtain effect at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to the field of computer vision technology, and in particular to a multi-camera visual inertial odometer optimization method based on a continuous time model. [Background technology]

[0002] Visual-inertial Odometry (VIO) is a computer vision technique used to estimate the 3D pose (local position and orientation), the velocity of a moving body relative to a local starting position, and is often used to navigate a vehicle when satellite positioning is not present or unreliable (e.g., indoors or when flying under a bridge). VIO uses visual odometry to estimate the body pose from camera images, combined with inertial measurements from the body inertial measurement unit (IMU) to correct errors caused by rapid body movement due to poor image capture. Multi-Camera Visual-inertial Odometry (MC-VIO).

[0003] Inertial sensor (IMU, Inertial Measurement Unit) is a sensor mainly used to detect and measure acceleration and rotational motion.

[0004] B-spline curve refers to a special representation in numerical analysis, a sub-discipline of mathematics. It is a linear combination of B-spline basis curves. B-spline is an abbreviation of basis spline. B-spline is a generalization of Bezier curve (also known as Bezier curve), which can be further generalized to non-uniform rational B-spline (NURBS), so that accurate models can be built for more general geometric bodies. B-spline curves and surfaces have many excellent properties such as geometric invariance, convex hull, convexity preservation, variation reduction, local support, etc.

[0005] In mathematics, polar line is usually a concept applicable to quadratic curves. If a straight line l is drawn through a point P that is not on the quadratic curve and intersects the quadratic curve at two points M and N, then there is one and only one point Q on l such that (PQ, MN) = -1 (i.e., P, Q, M, N form a harmonic point sequence). When l rotates around P, the trajectory of Q is a straight line p (or a part of it). This straight line p is called the polar line of point P with respect to the quadratic curve, and P is called the pole of p with respect to the curve.

[0006] 3D Landmark Of Map: A virtual 3D landmark is created based on real scenes, presenting a 3D model that is identical to the actual building appearance, and using the 3D model of the building complex as a map.

[0007] Autonomous vehicles need to obtain real-time image information of the surrounding environment in order to make effective perception, positioning and driving decisions. Cameras are one of the most commonly used sensors for autonomous vehicles. Usually, multiple cameras are installed around the vehicle body to cover different fields of view. This ensures that the vehicle obtains all-round field of view information, so that it can perceive the surrounding environment more accurately and completely, and improve the safety and reliability of autonomous driving. The multi-camera VIO algorithm that uses multiple cameras and inertial measurement units (IMUs) as sensors is an important component of the unmanned driving positioning module. The attitude (including position and direction) or relative attitude output by it is essential and important information for modules such as planning and control.

[0008] There are two main problems with current multi-camera VIO algorithms. First, the current mainstream multi-camera VIO algorithms only implement feature tracking within the camera in time sequence, while ignoring feature matching across cameras, and do not fully utilize the common view constraints generated by overlapping fields of view across cameras. Second, previous multi-camera VIO algorithms were mainly aimed at global shutter cameras, and did not consider the impact of the "rolling shutter effect" and camera timestamp inconsistency problems of rolling shutter cameras that are more common in the industry. The existence of these problems often has a significant impact on the accuracy and robustness of multi-camera VIO algorithms, especially in applications in autonomous driving scenarios.

[0009] After searching, the following related patents were found.

[0010] Related search result 1: Chinese patent application publication number, CN104501814B, name, a posture and position estimation method based on visual and inertial information, which fuses image vision and inertial information, uses an extended Kalman filter to save and update motion state information, so as to calculate the current accurate posture and position of the device, and obtain the motion trajectory of the device over a period of time.

[0011] Related search result 2: Chinese patent application publication number, CN105783913A, name, a SLAM device integrating multiple vehicle-mounted sensors and its control method. This patent can improve the robot positioning and mapping effects, solve the positioning and mapping error problems caused by the lack of depth values ​​or scarce feature points when relying solely on RGB-D sensors for SLAM, thereby improving the robustness and accuracy of SLAM.

[0012] Related search result 3: Chinese patent application publication number, CN112798010A, name, a method and device for initializing a visual inertial odometer (VIO) system. This patent enables the initialization of the VIO system to cover more scenarios. Regardless of whether the initial state is a dynamic state or a static state, the VIO system initialization can be completed, making the system initialization link more robust.

[0013] The present invention aims to solve the technical problems that the prior art does not fully utilize the common view constraint generated by overlapping fields of view across cameras, does not consider the "jello effect" of rolling shutter cameras and the inconsistency of camera timestamps, and makes technical improvements to the multi-camera visual inertial odometer. [Summary of the invention]

[0014] The purpose of the present invention is to provide a multi-camera visual inertial odometer optimization method that can simultaneously overcome camera common view constraints and rolling shutter effects.

[0015] To achieve the above object, the technical solution adopted by the present invention is a multi-camera visual inertial odometer optimization method based on a continuous time model, comprising the following steps:

[0016] S1, collect sensor data, including acceleration and angular velocity data output by the inertial measurement unit, referred to as IMU data, and multiple image data synchronously collected by multiple cameras, referred to as multi-camera image frames, and cache them in a cache queue;

[0017] S2, sensor data preprocessing, constructing the state quantity constraints between the current multi-camera image frame and the previous multi-camera image frame;

[0018] S3, performing image perception on the current multi-camera image frames based on a deep learning neural network, obtaining semantic perception results of moving objects, and generating a moving object image mask, wherein the moving object image mask is used to remove feature points in the moving object area during feature point extraction and tracking;

[0019] S4, taking out the current multi-camera image frame and the previous multi-camera image frame to extract and track feature points, and obtaining the feature point association data of the previous and next multi-camera image frames and the feature point association data between multiple cameras in the current multi-camera image frame;

[0020] S5. If the multi-camera visual inertial odometer is not initialized, initialize the multi-camera visual inertial odometer, construct an initial feature map, associate the multi-camera image frames and IMU data at any time, align the IMU coordinate system and the visual local coordinate system, and parameterize the multi-camera motion trajectory based on the continuous time trajectory model of the B-spline curve, and execute step S2;

[0021] S6. If the multi-camera visual inertial odometer has been initialized, the current multi-camera image frame is integrated using the IMU to obtain the initial pose value, and is added to a sliding window with a sliding window size of N for nonlinear optimization. The poses of all trajectory control points in the sliding window, the feature inverse depth, the line delay of each camera, and the time shift between the camera and the IMU sensor are used as estimated state quantities, and the IMU pre-integration error and the feature point reprojection error are used as error terms. The optimal pose is iteratively estimated and step S2 is executed.

[0022] Preferably, the multi-camera visual inertial odometer optimization method based on a continuous-time model, step S2: when new sensor data is collected in the cache queue, the head data of the multi-camera image frame queue is extracted as the current multi-camera image frame, and all IMU data between the image timestamp of the current multi-camera image frame and the image timestamp of the previous multi-camera image frame are extracted, and IMU pre-integration is performed, and the acceleration and angular velocity data output by all inertial measurement units between the current multi-camera image frame and the previous multi-camera image frame are integrated to obtain the displacement and azimuth change, and construct the state quantity constraint between the current multi-camera image frame and the previous multi-camera image frame.

[0023] Preferably, in the multi-camera visual inertial odometer optimization method based on a continuous time model, step S4 specifically includes the following sub-steps:

[0024] S41, if the multi-camera visual inertial odometer is not initialized, firstly calculate the common overlapping area between the multiple cameras;

[0025] S42, complete the feature point extraction and tracking between the current multi-camera image frame and the previous multi-camera image frame;

[0026] S43, obtaining feature point association data between the current multi-camera image frame and the previous multi-camera image frame of each of the multiple cameras in time sequence, performing cross-matching between cameras on new feature points obtained by feature tracking between the current multi-camera image frame and the previous multi-camera image frame, obtaining feature point association data between multiple cameras in the current multi-camera image frame, and realizing feature tracking across cameras in space;

[0027] S44, finally, feature point screening is performed, and the features are screened according to the distribution of feature points and the tracking length of feature points, and feature points with short tracking length and relatively concentrated distribution are eliminated to maintain a stable number of feature points in each camera image frame.

[0028] Preferably, in the multi-camera visual inertial odometer optimization method based on a continuous-time model, step S41 is to calculate the common overlapping area between camera Ci and other cameras: first, each camera image area is divided into an M*N 2D grid to obtain M*N grid units; then, according to the relative position and posture relationship between the cameras, the epipolar lines corresponding to other cameras are calculated through the center points of each grid unit of each camera; finally, according to the grid units through which the epipolar lines pass, the common overlapping area between multiple cameras is obtained.

[0029] Preferably, the multi-camera visual inertial odometer optimization method based on a continuous-time model, step S42: first, the Lucas-Kanade method is used to track the feature points of the current multi-camera image frame, and the Shi-Tomasi corner points are extracted, so that the number of feature points in each camera image frame reaches a set constant number, and the feature points are evenly distributed; then, the tracked feature points are converted into feature vectors according to the calibrated camera model, and the abnormal feature points are matched and eliminated using the RANSAC method based on the basic matrix model.

[0030] Preferably, in the multi-camera visual inertial odometer optimization method based on a continuous time model, step S5 specifically includes the following sub-steps:

[0031] S51, if it is determined that the cross-camera feature points can be successfully triangulated and the number of landmarks reaches a certain threshold, the three-dimensional landmark map is initialized, the initialization map is constructed, and step S53 is executed; if the number of landmarks is insufficient, step S52 is executed;

[0032] S52, constructing an initialization map using a structure-from-motion algorithm based on the existing and sufficient multi-camera image frames;

[0033] S53, after constructing the initialization map, the local visual coordinate system and the IMU coordinate system trajectory alignment constraints are then performed to optimize the IMU bias, gravity, and initial velocity, and align the multi-camera image frames to the inertial IMU coordinate system;

[0034] S54, all multi-camera image frame positions are initialized, and the speed and position of all multi-camera image frames and the accumulated IMU original observations are used to optimize the continuous-time trajectory model based on the B-spline curve, wherein the continuous-time trajectory model is represented by a series of control points with uniform time intervals.

[0035] Preferably, in the multi-camera visual inertial odometer optimization method based on a continuous time model, step S6 specifically includes the following sub-steps:

[0036] S61, before nonlinear optimization, determine whether the current multi-camera image frame timestamp exceeds the maximum timestamp of the existing continuous time trajectory, if so, add a new control point, and initialize the pose of each new control point with the pose of the previous control point of the new control point as an initial value;

[0037] S62, calculating the IMU pre-integration and relative pose between adjacent image frames, the error between the relative velocity and the IMU bias based on the continuous time trajectory model of the B-spline curve;

[0038] S63, calculating the reprojection error of feature points between adjacent image frames based on the continuous time trajectory model of the B-spline curve;

[0039] S64, construct a nonlinear optimization problem, with the positions of all trajectory control points in the sliding window, the feature inverse depth, the line delay of each camera, and the time shift between the camera and the IMU sensor as the state quantities to be estimated;

[0040] S65. Finally, the continuous time trajectory of the optimized B-spline curve is obtained. The oldest image frame is removed from the sliding window according to the timestamp, and the control point state corresponding to the oldest image frame is marginalized. Step S2 is executed to process the new sensor data.

[0041] Preferably, the multi-camera visual inertial odometer optimization method based on a continuous-time model, step S62: find the image timestamps of two adjacent image frames, use continuous-time trajectory interpolation to obtain the pose, velocity, and IMU bias of the corresponding image timestamps, calculate the relative pose, relative velocity, and subtract them from the calculated value of IMU pre-integration.

[0042] Preferably, the multi-camera visual inertial odometer optimization method based on a continuous time model, step S63: first, each feature point has a main image and a main camera, that is, the earliest image frame in which the feature point is found and the corresponding sub-camera, and the specific image timestamp of the feature point is calculated according to the main image timestamp and the row where the feature point is located, and the posture state of the main image when the feature point appears is interpolated using the continuous time trajectory, and the feature point is back-projected into the camera coordinate system of the main image, and the landmark point corresponding to the feature point is converted to the inertial IMU coordinate system according to the posture of the main image; then, according to the data association of the feature matching, the image timestamp of the specific appearance of the feature point on other image frames is found, and the posture of the other image frames is also interpolated; finally, the landmark point is projected onto other image frames, and the coordinate difference between the reprojection position and the matching position is calculated, which is the reprojection error of the feature point between adjacent image frames.

[0043] Preferably, in the multi-camera visual inertial odometer optimization method based on a continuous-time model, step S63: the nonlinear optimization problem is set as a matrix solver, a gradient descent method or a robust kernel function; the nonlinear optimization problem program code framework adopts a mainstream nonlinear optimization open source library.

[0044] The beneficial effects of the multi-camera visual inertial odometer optimization method based on the continuous time model of the present invention are as follows: 1. Based on the continuous time trajectory model of the B-spline curve, the motion trajectory of the multi-camera system is parameterized. Through this model, the multi-camera visual observation and IMU data can be associated at any time, thereby solving the problem that asynchronous data cannot be jointly optimized; in addition, the algorithm can also estimate the time difference between different sensors to solve the problem of time asynchrony between different sensors, thereby improving the accuracy and robustness of the multi-camera VIO algorithm; 3. The line delay of each camera can be estimated in real time, the motion distortion of the rolling shutter camera can be compensated, and the estimation accuracy can be improved; 3. A feature tracking strategy for time-space consistency verification is proposed to realize feature tracking between time frames and across cameras, and according to the distribution of feature points and tracking time, feature points with longer tracking time and more common view frames are screened, so that richer visual information can be obtained and the robustness of the estimation is enhanced.

Brief Description of the Drawings

[0045] Figure 1 It is a flow chart of a multi-camera visual-inertial odometry optimization method based on a continuous-time model. [Specific implementation method]

[0046] The features and exemplary embodiments of various aspects of the present invention will be described in detail below. In the detailed description below, many specific details are proposed to provide a comprehensive understanding of the present invention. But it is obvious to those skilled in the art that the present invention can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present invention by illustrating examples of the present invention. The present invention is by no means limited to any specific configuration and algorithm proposed below, but covers any modification, replacement and improvement of elements, parts and algorithms without departing from the concept of the present invention. In the accompanying drawings and the following description, known structures and technologies are not shown to avoid unnecessary ambiguity to the present invention.

[0047] Example

[0048] This embodiment implements a multi-camera visual inertial odometer optimization method based on a continuous-time model.

[0049] This embodiment proposes a multi-camera visual-inertial odometry (MC-VIO) algorithm based on a continuous-time model, which uses a B-spline curve to represent the continuous-time trajectory of a multi-camera system, and parameterizes the motion trajectory using a continuous-time model represented by the B-spline curve. Through sliding window optimization, an IMU pre-integration error and a reprojection error based on the continuous-time model are constructed to perform state estimation. At the same time, the influence of the rolling shutter effect is overcome, the camera exposure delay is optimized online, and the accuracy of the odometer estimation is improved.

[0050] The method of this embodiment can associate multi-camera visual information with IMU data at any time, and estimate the line delay of each camera and the time shift between the camera and the IMU sensor in real time in the sliding window, thereby improving the accuracy and robustness of the odometer. The method of this embodiment can make full use of the constraints of the common view information of the features between multiple cameras in time and space, and improve the real-time and robustness of the multi-camera VIO algorithm.

[0051] The core features of the method of this embodiment are:

[0052] 1. The continuous-time model based on B-spline curves is used to parameterize the motion trajectory, which can associate asynchronous multi-camera visual observations and original IMU data, solving the problem that asynchronous data cannot be jointly optimized;

[0053] 2. The motion trajectory parameterization method based on the continuous time model can be used to estimate the time difference between the camera and the IMU sensor, solving the problem of time asynchrony between sensors;

[0054] 3. The line delay of each camera can be estimated in real time, which can compensate for the motion distortion of the rolling shutter camera and improve the estimation accuracy;

[0055] 4. Make full use of the overlapping fields of view between multiple cameras to achieve feature tracking between frames and across cameras, and filter the feature points of the tracking camera pairs according to the distribution of feature points and tracking time to obtain richer visual information and enhance the robustness of the estimation.

[0056] Figure 1 This is a flow chart of a multi-camera visual inertial odometry optimization method based on a continuous time model. Figure 1 As shown, the method of this embodiment includes the following steps:

[0057] Step 1:

[0058] Collect current sensor data, including high-frequency acceleration and angular velocity data output by the inertial measurement unit, and image data output by multiple cameras (usually multiple images collected synchronously, hereinafter referred to as multi-camera image frames). And cache the newly collected IMU data and multi-camera image frames in the corresponding cache queue.

[0059] Step 2:

[0060] Preprocessing of sensor data. When there is new data collected in the cache queue, extract the head data of the multi-camera image frame queue as the image data currently being processed, and extract all IMU data between the current image timestamp and the previous image timestamp, and perform IMU pre-integration. Integrate the acceleration and angular velocity data of all IMU measurements between the two frames to obtain the displacement and azimuth change, which are used to construct the constraints of the state quantity between these frames.

[0061] Step 3:

[0062] Perform image perception based on deep learning neural network on the currently processed multi-camera image frames to obtain the semantic perception results of moving objects such as vehicles or pedestrians, and generate corresponding image masks (the pixel grayscale value in the moving object area is set to 0, and the other areas are set to 255). The generated mask image will be used in the feature extraction and tracking module to remove feature points in the dynamic object area.

[0063] Step 4:

[0064] Take out the latest frame and the next latest multi-camera image frame to extract feature points (Feature Extraction) and track (Feature Tracking), and obtain the feature point association data of the previous and next multi-camera image frames and the feature point association data between the cameras in the latest multi-camera image frame. This step includes:

[0065] Step 4.1:

[0066] First, the common overlapping area between each camera is calculated. This calculation is performed only once at the beginning of the initialization phase (step 5). In order to calculate the common overlapping area between camera Ci and other cameras, this embodiment first divides each camera image area into an M*N 2D grid, and M*N cells can be obtained. Since the relative position and posture relationship between the cameras are known, the center point of each grid of each camera can calculate the epipolar line (epipolar line) corresponding to other cameras, and the grid points through which the epipolar line passes correspond to the overlapping area between the cameras.

[0067] Step 4.2:

[0068] Then, inter-frame feature tracking is completed. This module (inter-frame feature tracking module) uses the Lucas-Kanade method to track the feature points of each new image and extract Shi-Tomasi corner points to keep the number of features in each camera image at a certain number (usually set between 100 and 300). In order to make the feature points evenly distributed, the feature detector is set according to the minimum pixel interval between two adjacent features and the maximum number of feature points in the grid. If the position of the matched corner point exceeds the image boundary, it will be discarded as an outlier. This implementation can effectively reduce the number of feature points and reduce the computational complexity during back-end optimization. Then, the tracking points are converted into feature vectors according to the calibrated camera model, and abnormal matches are eliminated using RANSAC based on the basic matrix model.

[0069] Step 4.3:

[0070] In addition to the feature point association data between the previous and next image frames of multiple cameras in time sequence, the new feature points obtained by inter-frame feature tracking are cross-matched between cameras to achieve feature tracking across cameras in space. Based on the feature points of known depth, the current frame pose obtained by IMU integration is used to project the feature points onto other cameras, and the KLT method is used to perform feature matching across cameras. In addition, the pre-calculated common overlapping areas between cameras are used for feature matching across cameras, which greatly reduces the search range of feature matching and improves the efficiency of feature tracking.

[0071] Step 4.4:

[0072] Finally, feature screening is performed. After tracking features between frames in time and across camera frames in space, the number of new tracking features in each image of the current frame is often greater than the set maximum number of image features. Therefore, this embodiment screens features based on the distribution of features and the tracking length of features, removes features with short tracking lengths and relatively concentrated distribution, and ultimately maintains the number of features in each camera image.

[0073] Step 5:

[0074] Initialize the VIO system, complete the construction of the initial feature map, and align the IMU coordinate system and the visual local coordinate system. The steps are as follows:

[0075] Step 5.1:

[0076] If it is determined that the cross-camera features can be successfully triangulated and the number reaches a certain threshold, the landmark map is initialized. However, if the number of landmarks is insufficient, proceed to step 5.2.

[0077] Step 5.2:

[0078] If the map is not constructed successfully and there are enough multi-camera image frames, the map is initialized using the Structure from Motion (SFM) algorithm. Each time a new keyframe is added, the feature correspondence between the latest frame and all previous frames is checked. If stable feature tracking (more than 30 tracked features) and sufficient parallax (more than 20 pixels) between the latest frame and other frames can be found in the sliding window, the relative pose relationship between the latest frame and other frames will be estimated.

[0079] At the same time, this algorithm uses a generalized camera model to represent the multi-camera structure. The model allows non-central projection and uses the 17-point algorithm and RANSAC to estimate the relative pose between frames. Then all the features observed in these two frames are triangulated to obtain map points. Based on the triangulated map points, we can use the GPnP method to estimate the pose of all other frames in the window. Finally, the global bundle adjustment is used to minimize the total reprojection error of all feature observations to complete the construction of the initial feature map in the initialization phase.

[0080] Step 5.3:

[0081] After the map is built, the visual and IMU coordinate systems are used to align the trajectory. Other initialization states to be estimated are optimized, including gyroscope bias, gravity, and initial velocity. Finally, the image frame is aligned to the inertial coordinate system.

[0082] Step 5.4:

[0083] At this point, all the multi-camera image frame poses have been initialized, and the speed and pose of all the multi-camera image frames and the accumulated IMU raw observations are used to optimize the continuous time trajectory based on the B-spline curve (represented by a series of control points with uniform time intervals).

[0084] Step 6:

[0085] After the multi-camera VIO system is initialized, the new multi-camera image frame is integrated using the IMU to obtain the initial pose value, and is added to a sliding window of size N for nonlinear optimization. The poses of all trajectory control points in the sliding window, the feature inverse depth, the line delay of each camera, and the time shift between the camera and the IMU sensor are used as estimated state quantities, and the IMU pre-integration error and the feature point reprojection error are used as error terms to iteratively estimate the optimal pose. This step includes:

[0086] Step 6.1:

[0087] Before nonlinear optimization, determine whether the timestamp of the latest frame image exceeds the maximum timestamp of the existing continuous time trajectory. If so, add a new control point, and initialize the pose of each new control point with the pose of its previous control point as the initial value.

[0088] Step 6.2:

[0089] Based on the continuous time trajectory, the error between the IMU pre-integration and relative pose, relative velocity and IMU bias between two adjacent frames is calculated. In the specific implementation, the timestamps of two adjacent frames are found, the pose, velocity, and IMU bias of the corresponding timestamps are obtained by interpolation of the continuous time trajectory, and the relative pose and relative velocity are calculated, and the difference is made with the calculated value of the IMU pre-integration.

[0090] Step 6.3:

[0091] Based on the continuous time trajectory, the reprojection error of the inter-frame features is calculated. In the specific implementation, each feature has a main image and a main camera (that is, the earliest frame where the feature is found and the corresponding sub-camera). According to the timestamp of the main image, the row where the feature is located, the initial delay value of the corresponding camera row, and the initial time shift value between the multi-camera system and the IMU sensor, the specific timestamp of the feature can be calculated. The posture state of the main image when the feature appears can be interpolated using the continuous time trajectory. The feature is back-projected into the camera coordinate system of the main image, and the landmark point corresponding to the feature is converted to the world coordinate system according to the posture of the main image. Then, according to the data association of the feature matching, the timestamp of the specific appearance of the feature on other frames is found, and the posture of other images is interpolated in the same way. Finally, the landmark point is projected onto other images, and the coordinate difference between the reprojected position and the matched position is calculated, which is the reprojection error.

[0092] Step 6.4:

[0093] Construct a nonlinear optimization problem, with the poses of all trajectory control points in the sliding window, the feature inverse depth, the line delay of each camera, and the time shift between the camera and the IMU sensor as the state quantities to be estimated. Set relevant optimization parameters, such as matrix solver, gradient descent method, and robust kernel function. The nonlinear optimization framework can use mainstream nonlinear optimization open source libraries, such as G2O, CERES, etc.

[0094] Step 6.5:

[0095] Finally, the optimized continuous time trajectory is obtained. The oldest image frame is removed from the sliding window according to the timestamp, and the corresponding control point state is marginalized. After completion, return to step 2 to process the new sensor data.

[0096] The core technical effect of the method of this embodiment is:

[0097] 1. The proposed continuous-time model based on B-spline curves parameterizes the motion trajectory of the multi-camera system. Through this model, multi-camera visual observations and IMU data can be associated at any time, thereby solving the problem that asynchronous data cannot be jointly optimized. In addition, the algorithm can also estimate the time difference between different sensors to solve the problem of time asynchrony between different sensors, thereby improving the accuracy and robustness of the multi-camera VIO algorithm.

[0098] 2. The line delay of each camera can be estimated in real time, which can compensate for the motion distortion of rolling shutter cameras and improve the estimation accuracy.

[0099] 3. A feature tracking strategy for temporal and spatial consistency verification is proposed to realize feature tracking between sequential frames and across cameras. Feature points with longer tracking time and more common view frames are selected based on the distribution of feature points and tracking time. This can obtain richer visual information and enhance the robustness of the estimation.

[0100] Those skilled in the art will appreciate that all or part of the steps to implement the above embodiments may be accomplished by hardware, or may be accomplished by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, wherein the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0101] The above is only a preferred embodiment of the present invention. It should be pointed out that ordinary technicians in this technical field can make several improvements and supplements without departing from the principle of the present invention. These improvements and supplements should also be regarded as the scope of protection of the present invention.

Claims

1. A multi-camera visual inertial odometry optimization method based on a continuous time model, characterized in that The following steps are involved: S1, collect sensor data, including acceleration and angular velocity data output by the inertial measurement unit, referred to as IMU data, and multiple image data synchronously collected by multiple cameras, referred to as multi-camera image frames, and cache them in a cache queue; S2, sensor data preprocessing, constructing the state quantity constraints between the current multi-camera image frame and the previous multi-camera image frame; S3, performing image perception on the current multi-camera image frames based on a deep learning neural network, obtaining semantic perception results of moving objects, and generating a moving object image mask, wherein the moving object image mask is used to remove feature points in the moving object area during feature point extraction and tracking; S4, taking out the current multi-camera image frame and the previous multi-camera image frame to extract and track feature points, and obtaining the feature point association data of the previous and next multi-camera image frames and the feature point association data between multiple cameras in the current multi-camera image frame; S5. If the multi-camera visual inertial odometer is not initialized, initialize the multi-camera visual inertial odometer, construct an initial feature map, associate the multi-camera image frames and IMU data at any time, align the IMU coordinate system and the visual local coordinate system, and parameterize the multi-camera motion trajectory based on the continuous time trajectory model of the B-spline curve, and execute step S2; S6. If the multi-camera visual inertial odometer has been initialized, the current multi-camera image frame is integrated using the IMU to obtain the initial pose value, and is added to a sliding window with a sliding window size of N for nonlinear optimization. The poses of all trajectory control points in the sliding window, the feature inverse depth, the line delay of each camera, and the time shift between the camera and the IMU sensor are used as estimated state quantities, and the IMU pre-integration error and the feature point reprojection error are used as error terms. The optimal pose is iteratively estimated, and step S2 is executed; Step S4 specifically includes the following sub-steps: S41, if the multi-camera visual inertial odometer is not initialized, firstly calculate the common overlapping area between the multiple cameras; S42, complete the feature point extraction and tracking between the current multi-camera image frame and the previous multi-camera image frame; S43, obtaining feature point association data between the current multi-camera image frame and the previous multi-camera image frame of each of the multiple cameras in time sequence, performing cross-matching between cameras on new feature points obtained by feature tracking between the current multi-camera image frame and the previous multi-camera image frame, obtaining feature point association data between multiple cameras in the current multi-camera image frame, and realizing feature tracking across cameras in space; S44, finally, feature point screening is performed, and the features are screened according to the distribution of feature points and the tracking length of feature points, and feature points with short tracking length and relatively concentrated distribution are eliminated to maintain a stable number of feature points in each camera image frame.

2. The multi-camera visual inertial odometer optimization method based on a continuous time model according to claim 1, characterized in that Step S2: When new sensor data is collected in the cache queue, the head data of the multi-camera image frame queue is extracted as the current multi-camera image frame. At the same time, all IMU data between the image timestamp of the current multi-camera image frame and the image timestamp of the previous multi-camera image frame are extracted, and IMU pre-integration is performed. The acceleration and angular velocity data output by all inertial measurement units between the current multi-camera image frame and the previous multi-camera image frame are integrated to obtain the displacement and azimuth change, and the state quantity constraint between the current multi-camera image frame and the previous multi-camera image frame is constructed.

3. The multi-camera visual inertial odometer optimization method based on a continuous time model according to claim 1, characterized in that Step S41 is to calculate the common overlapping area between camera Ci and other cameras: first, divide the image area of ​​each camera into an M*N 2D grid to obtain M*N grid units; then, according to the relative position and posture relationship between the cameras, the epipolar lines corresponding to other cameras are calculated through the center points of each grid unit of each camera; finally, the common overlapping area between multiple cameras is obtained according to the grid units through which the epipolar lines pass.

4. The multi-camera visual inertial odometer optimization method based on a continuous time model according to claim 1, characterized in that Step S42: First, the Lucas-Kanade method is used to track the feature points of the current multi-camera image frame and extract the Shi-Tomasi corner points, so that the number of feature points in each camera image frame reaches a set constant number and the feature points are evenly distributed; then, the tracked feature points are converted into feature vectors according to the calibrated camera model, and the RANSAC method based on the basic matrix model is used to match and eliminate abnormal feature points.

5. The multi-camera visual inertial odometer optimization method based on a continuous time model according to claim 1, characterized in that Step S5 specifically includes the following sub-steps: S51, if it is determined that the cross-camera feature points can be successfully triangulated and the number of landmarks reaches a certain threshold, the three-dimensional landmark map is initialized, the initialization map is constructed, and step S53 is executed; if the number of landmarks is insufficient, step S52 is executed; S52, constructing an initialization map using a structure-from-motion algorithm based on the existing and sufficient multi-camera image frames; S53, after constructing the initialization map, the local visual coordinate system and the IMU coordinate system trajectory alignment constraints are then performed to optimize the IMU bias, gravity, and initial velocity, and align the multi-camera image frames to the inertial IMU coordinate system; S54, all multi-camera image frame positions are initialized, and the speed and position of all multi-camera image frames and the accumulated IMU original observations are used to optimize the continuous-time trajectory model based on the B-spline curve, wherein the continuous-time trajectory model is represented by a series of control points with uniform time intervals.

6. The method for optimizing multi-camera visual inertial odometer based on continuous time model according to claim 5, characterized in that Step S6 specifically includes the following sub-steps: S61, before nonlinear optimization, determine whether the current multi-camera image frame timestamp exceeds the maximum timestamp of the existing continuous time trajectory, if so, add a new control point, and initialize the pose of each new control point with the pose of the previous control point of the new control point as an initial value; S62, calculating the IMU pre-integration and relative pose between adjacent image frames, the error between the relative velocity and the IMU bias based on the continuous time trajectory model of the B-spline curve; S63, calculating the reprojection error of feature points between adjacent image frames based on the continuous time trajectory model of the B-spline curve; S64, construct a nonlinear optimization problem, with the positions of all trajectory control points in the sliding window, the feature inverse depth, the line delay of each camera, and the time shift between the camera and the IMU sensor as the state quantities to be estimated; S65. Finally, the continuous time trajectory of the optimized B-spline curve is obtained. The oldest image frame is removed from the sliding window according to the timestamp, and the control point state corresponding to the oldest image frame is marginalized. Step S2 is executed to process the new sensor data.

7. The method for optimizing multi-camera visual inertial odometer based on continuous time model according to claim 6, characterized in that Step S62: Find the image timestamps of two adjacent image frames, use continuous time trajectory interpolation to obtain the posture, velocity, and IMU bias of the corresponding image timestamps, calculate the relative posture and relative velocity, and subtract them from the calculated values ​​of IMU pre-integration.

8. The method for optimizing multi-camera visual inertial odometer based on continuous time model according to claim 7, characterized in that Step S63: First, each feature point has a main image and a main camera, that is, the earliest image frame in which the feature point is found and the corresponding sub-camera. According to the main image timestamp and the row where the feature point is located, the specific image timestamp of the feature point is calculated, and the posture state of the main image when the feature point appears is interpolated using the continuous time trajectory. The feature point is back-projected into the camera coordinate system of the main image, and the landmark point corresponding to the feature point is converted to the inertial IMU coordinate system according to the posture of the main image; then, according to the data association of the feature matching, the image timestamp of the specific appearance of the feature point on other image frames is found, and the posture of the other image frames is also interpolated; finally, the landmark point is projected onto other image frames, and the coordinate difference between the reprojected position and the matched position is calculated, which is the reprojection error of the feature point between adjacent image frames.

9. The method for optimizing multi-camera visual inertial odometer based on continuous time model according to claim 8, characterized in that Step S63: The nonlinear optimization problem is set as a matrix solver, a gradient descent method or a robust kernel function; the nonlinear optimization problem program code framework adopts a mainstream nonlinear optimization open source library.