A binocular visual odometry method based on event camera

By introducing adaptive event Time-Surface representation and TSDF into the binocular event camera visual odometry, the problems of incomplete event processing and large depth estimation errors are solved, and the depth and state estimation accuracy of the binocular event camera visual odometry are improved. .

CN114943762BActive Publication Date: 2024-10-11NAT UNIV OF DEFENSE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210472398.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-29
Publication Date
2024-10-11
Estimated Expiration
2042-04-29

AI Technical Summary

Technical Problem

The existing visual odometry method based on binocular event cameras has the problems of incomplete event processing and large errors in depth estimation and state estimation.

Method used

Adaptive event Time-Surface representation and TSDF (Truncated Signed Distance Function) are used to improve the binocular event camera visual odometry method, and improve the accuracy of depth estimation and state estimation through better event processing methods and fusion of historical information.

Benefits of technology

The robustness and accuracy of depth estimation and state estimation of binocular event camera visual odometry are improved, and errors are reduced. Experimental results show good performance on multiple data sets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114943762B_ABST
    Figure CN114943762B_ABST
Patent Text Reader

Abstract

The present invention discloses a binocular visual odometer method based on an event camera, the purpose of which is to solve the shortcomings of large errors in depth estimation and state estimation of the existing visual odometer method based on a binocular event camera. The technical solution is to first construct a visual odometer system based on a binocular event camera consisting of a data acquisition module, an event processing and representation module, a depth estimation module, and a state estimation module. The data acquisition module acquires the event streams of the left and right event cameras; the event processing and representation module converts the event streams into an adaptive event Time-Surface representation; the depth estimation module performs depth estimation and acquires a three-dimensional representation of the environment; the state estimation module estimates the camera state and acquires state information such as the camera posture and speed. The present invention can improve the accuracy of depth estimation and state estimation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer image processing, and in particular to a method for using a binocular event camera to complete state estimation (including position, velocity, angular velocity, etc.) of a camera body and a robot equipped with the camera. Background Art

[0002] SLAM (Simultaneous Localization And Mapping) is an important branch in the field of robotics and has been widely studied in recent years. SLAM attempts to solve the following problem: when a robot moves in an unknown environment, how can it determine its own trajectory by observing the environment and build a map of the environment at the same time? SLAM technology is the sum of many technologies involved in achieving this goal. A complete SLAM system mainly includes a visual odometry part and an optimized mapping part. The visual odometry part roughly estimates the robot state, and the optimized mapping part optimizes the robot state based on global information, and builds a map of the robot's surroundings based on sensor information and robot state.

[0003] If the environment does not need to be mapped, the visual odometry can perform relatively efficient and accurate state estimation of the robot. However, based on only a monocular camera, the visual odometry cannot estimate the true scale of the surrounding environment. At the same time, the use of standard cameras still has accuracy and robustness problems when dealing with extreme environments. There are two main extreme cases: when the camera moves at high speed, if the camera moves too fast when acquiring images with a standard camera, the acquired image will show motion blur; in the case of high dynamic range scenes, the light intensity in the scene changes strongly, and the brightness and darkness of the previous and next frames change significantly. In these extreme cases, the use of standard cameras will seriously affect the accuracy and effect of visual odometry state estimation. In addition, standard cameras will generate redundant information in static scenes, which not only leads to a waste of storage resources, but also consumes a lot of additional computing resources in the subsequent image processing process.

[0004] The emergence of a bio-inspired event camera overcomes the above limitations of standard cameras. A typical representative of event cameras is DVS (Dynamic Vision Sensor, Chinese name is dynamic vision sensor, proposed by Patrick Lichtsteiner et al. in 2011 in the journal IEEE Journal of Solid-State Circuits, Vol. 43, No. 2, pp. 566-576, in the article "A 128×128 120dB 15μs Latency Asynchronous Temporal Contrast Vision Sensor", which is "A 128×128 pixel, 120dB dynamic range, 15 microseconds delay asynchronous temporal contrast vision sensor", produced by iviVation AG in Switzerland). Unlike standard cameras, event cameras only output brightness changes at the pixel level. In the pixel array, whenever the intensity change exceeds the threshold, the corresponding pixel will independently generate an output, which is called an "event". Therefore, unlike standard cameras, the data output by event cameras is an event stream in time and space. Due to low latency, event cameras have great advantages in fast-moving scenes. In addition, event cameras can also avoid recording redundant information in slowly changing scenes. In 2014, a new event camera, DAVIS (Dynamic and Active-pixel Vision Sensor), was proposed by Christian Brandli et al. in the article "A 240×180130dB 3μs Latency Global ShutterSpatiotemporal Vision Sensor" published in the journal IEEE Journal of Solid-State Circuits, Vol. 49, No. 10, pp. 2333-2344. It was later produced by iviVation AG in Switzerland. DAVIS combines a standard camera with an event camera DVS, and can output image frames and event streams simultaneously.

[0005] At present, most visual odometers based on event cameras use monocular event cameras as sensors to estimate the state of the robot. Rebecq et al. proposed a visual odometer method based on a monocular event camera in the article "EVO: A geometric approach to event-based 6-DoF parallel tracking and mapping in real time" (2016, published in the journal IEEE Robotics and Automation Letters, Vol. 2, No. 2, pp. 884-892). This method obtains the camera's pose change by aligning the event image with the semi-dense 3D reconstruction result. Kim et al. proposed a SLAM method based only on a monocular event camera in the article "Real-time 3D reconstruction and 6-DoF tracking with an event camera" (2016, published in the European Conference on Computer Vision (ECCV), pp. 349-364), which can perform 3D reconstruction, 6-DOF state estimation, and scene photometric estimation. Bryner et al. introduced the maximum likelihood estimation framework into the monocular event VO system in the article "Event-based, direct camera tracking from a photometric 3D map using nonlinear optimization" (2019, published in the International Conference on Robotics and Automation (ICRA), pp. 325-331) to estimate the camera motion.

[0006] However, based only on a monocular event camera, the visual odometry system cannot obtain scene scale information, which easily causes errors in state estimation. The sensor combination consisting of two event cameras (stereo event camera) can effectively solve this problem through depth estimation. Based on this, in 2021, YiZhou et al. published an article titled "Event-based stereo visual odometry" in the journal IEEE Transactions on Robotics, Vol. 18, No. 4, pp. 1159-1179, proposing a visual odometry ESVO (Event-based stereo visual odometry, Chinese name: Stereo visual odometry based on event camera) based on a stereo event camera. The paper announced that ESVO consists of an event preprocessing module, a mapping module, and a tracking module. The event preprocessing module is responsible for converting the event streams generated by the left and right event cameras into the Time-Surface (Chinese name: "time surface") representation of the left and right event camera events (a method of converting event streams into images). The mapping module is responsible for estimating the event depth in the event stream and generating a depth frame that fused the event depth. The tracking module is responsible for estimating the state information of the event camera, such as posture, velocity, and angular velocity. This paper publishes the process of the above three modules performing related tasks: the event preprocessing module obtains the event stream data of the left and right event cameras from any one of the public event camera datasets "StereoDAVISdataset" (Chinese name "Binocular Dynamic Vision Sensor Dataset", which is collected by DAVIS and includes binocular image frames and binocular event streams) of the University of Zurich or the public event camera dataset "TheMultiVehicleStereoEventCameraDataset" (Chinese name "Multiple Vehicle StereoEventCameraDataset") of the University of Pennsylvania, and then processes and generates the Time-Surface representation of the left and right event cameras at the current moment, and sends it to the mapping module; the mapping module estimates the depth of the latest event in the event stream based on the event stream data of the left and right event cameras and the Time-Surface representation of the left and right event cameras at the current moment, and generates the current moment depth frame with fused event depth based on the event depth probability model; the tracking module estimates the state information of the event camera such as posture, velocity, angular velocity, etc. based on the Time-Surface representation of the left event camera (in this field, the left camera coordinate system is usually used as the reference when estimating the camera state) and the depth frame.

[0007] ESVO is currently the only method in the field of visual odometry based on binocular event cameras, and has shown good depth estimation and state estimation performance in multiple data sets. However, ESVO still has the following problems: 1) The event Time-Surface representation generated in the event preprocessing module cannot cope with all camera motion situations. For example, when the camera is stationary, since no events occur in the camera's field of view, the camera does not generate or only generates an event stream containing a very small number of events, resulting in the absence of any valid information in the event Time-Surface representation, and the system cannot correctly perform depth estimation and state estimation; 2) The mapping module only estimates the depth of the latest event and generates a depth frame based on this. When there is a large error in the event depth estimation result, it is easy to cause a large error in the depth frame due to not considering historical information; 3) State estimation errors caused by the above two points.

[0008] Therefore, the existing visual odometry methods based on stereo event cameras have disadvantages such as incomplete event processing methods and large errors in depth estimation and state estimation. Summary of the invention

[0009] The technical problem to be solved by the present invention is to provide a visual odometer state estimation method based on a binocular event camera to solve the shortcomings of the visual odometer method based on a binocular event camera, such as incomplete event processing method, large errors in depth estimation and state estimation, etc.

[0010] To solve this problem, the present invention proposes a binocular event camera visual odometer method based on the ESVO method, which is based on adaptive event Time-Surface representation and TSDF (Truncated Signed Distance Function). The adaptive event Time-Surface representation can solve the problem of incomplete event processing methods by a better event processing method; the introduction of TSDF can integrate historical information in depth estimation and solve the problem of large errors in depth estimation and state estimation.

[0011] The specific technical solution of the present invention is divided into eleven steps:

[0012] The first step is to build a visual odometer system based on a binocular event camera. The visual odometer system based on a binocular event camera consists of a data acquisition module, an event processing and representation module, a depth estimation module, and a state estimation module.

[0013] The data acquisition module is connected to the event processing and representation module and the depth estimation module. The data acquisition module can download data from the public event camera dataset "The Event-Camera Dataset and Simulator" (Chinese name "Event Camera Dataset and Simulator", which is collected by DAVIS and includes binocular camera image frames and binocular event camera event streams) of the University of Zurich, the public event camera dataset "StereoDAVISdataset" (Chinese name "Binocular Dynamic Vision Sensor Dataset", which is collected by DAVIS and includes binocular camera image frames and binocular event camera event streams) of the University of Zurich, and the public event camera dataset "TheMultiVehicleStereoEventCameraDataset" (Chinese name "Multiple Vehicle StereoEventCamera Dataset", which is collected by DAVIS and includes binocular camera image frames and binocular event camera event streams) of the University of Pennsylvania, and send the acquired binocular event camera event streams (including left event camera event streams and right event camera event streams) to the event processing and representation module and the depth estimation module.

[0014] The event processing and representation module is connected to the data acquisition module, the depth estimation module, and the state estimation module. The event processing and representation module receives the binocular event camera event stream from the data acquisition module, converts the left event camera event stream into the left event camera adaptive event Time-Surface representation (same as the event Time-Surface representation, it is a method of converting the event stream into an image), converts the right event camera event stream into the right event camera adaptive event Time-Surface representation, and sends the left event camera adaptive event Time-Surface representation and the right event camera adaptive event Time-Surface representation to the depth estimation module and the state estimation module.

[0015] The depth estimation module is connected to the data acquisition module, the event processing and representation module, and the state estimation module. The depth estimation module receives the left-eye event camera event stream and the right-eye event camera event stream from the data acquisition module, receives the left-eye event camera adaptive event Time-Surface representation and the right-eye event camera adaptive event Time-Surface representation from the event processing and representation module, obtains the state estimation result from the state estimation module, and performs event depth estimation based on the left-eye event camera adaptive event Time-Surface representation, the right-eye event camera adaptive event Time-Surface representation, the left-eye event camera event stream and the state estimation result (in this field, when performing camera state estimation, the left-eye camera coordinate system is usually used as a reference), and fuses the event depth to obtain a depth frame, and sends the depth frame to the state estimation module.

[0016] The state estimation module is connected to the event processing and representation module and the depth estimation module. The state estimation module receives the adaptive event Time-Surface representation of the left event camera and the adaptive event Time-Surface representation of the right event camera from the event processing and representation module, receives the depth frame from the depth estimation module, estimates the state information such as the event camera's posture and speed based on the adaptive event Time-Surface representation of the left event camera and the depth frame, and sends the state estimation result to the depth estimation module.

[0017] In the second step, the data acquisition module obtains the left-eye event camera event stream and the right-eye event camera event stream from any one of the three data sets, namely, the event camera data set "The Event-Camera Dataset andSimulator", "StereoDAVISdataset", and "TheMultiVehicleStereoEventCameraDataset", and sends the left-eye event camera event stream and the right-eye event camera event stream to the event processing and representation module and the depth estimation module.

[0018] In the third step, the event processing and representation module processes the event stream of the left event camera and the event stream of the right event camera obtained from the data acquisition module, converts the event stream into an event Time-Surface representation, and obtains the event Time-Surface representation of the left event camera and the event Time-Surface representation of the right event camera at the initial time period t1, the method is:

[0019] 3.1, let t0 be the starting time when the event processing and representation module obtains the left event camera event stream and the right event camera event stream data set from the data acquisition module, let variable k = 1, and perform the calculation from t0 (i.e. the initial time of the data set) to t kThe left-eye event camera event stream and the right-eye event camera event stream of the time period at time t1 are initialized to obtain the left-eye event camera event Time-Surface representation and the right-eye event camera event Time-Surface representation, where t1 = t0 + 1·t duration , t duration is the interval time, t duration In the present invention, it is set to 10ms;

[0020] 3.2. Construct a grayscale image with the same pixel size as the event camera and It is used to store the event Time-Surface representation of the left-eye event camera at time t1. Used to store the event Time-Surface representation of the right-eye event camera at time t1, initialize and The gray value of all pixels in is 0;

[0021] 3.3, use the event camera event Time-Surface representation construction method to process the left-view event camera event stream and construct the left-view event camera event Time-Surface representation. The method is:

[0022] 3.3.1, let variable a = 0;

[0023] 3.3.2, let variable a = a + 1, calculate The ath pixel p a (u a , v a )’s grayscale value:

[0024] 3.3.2.1, if there is no event in the left-eye event camera event stream with a timestamp less than or equal to t1 and a coordinate of (u a , v a ) event, then let The middle pixel p a The gray value is 0, go to 3.3.3;

[0025] 3.3.2.2, if there is a time stamp less than or equal to t1 and the coordinates are (u a , v a ), select the event with the closest timestamp to t1 from these events, and record the timestamp of this event as t1′. The middle pixel p a The gray value I(p a , t1) is:

[0026]

[0027] In formula (1) is the decay rate parameter, which is set to 30ms in the present invention;

[0028] 3.3.3, if a<H×W(H is The number of pixel columns, W is ), go to 3.3.2, otherwise The result is processed, go to 3.3.4;

[0029] 3.3.4, at this time That is, the Time-Surface representation of the left-eye event camera event at time t1;

[0030] 3.4, use the method for constructing the Time-Surface representation of the event camera event described in step 3.3 to process the right-eye event camera event stream, construct the Time-Surface representation of the right-eye event camera event, and obtain the Time-Surface representation of the left-eye event camera event at time t1

[0031] 3.5, the event Time-Surface of the left event camera at time t1 is represented as The event Time-Surface representation of the right event camera at time t1 Send to the depth estimation module;

[0032] The fourth step is to estimate the depth based on the and Obtain the depth frame M1 at the initial time period t1. Based on M1, construct the TSDF representation of the three-dimensional environment at time t1. The method is:

[0033] 4.1, based on and The depth estimation module uses the improved SGM method (Sime-Global Matching, Chinese name is semi-global matching, proposed in 2007 by HirschmullerHeiko in the journal IEEE transactions on pattern analysis and machine intelligence, Vol. 30, No. 2, pp. 328-341, in the article "Stereoprocessing by semi-global matching and mutual information", namely "Binocular processing based on global matching and mutual information") to obtain the depth frame M1 at time t1. The depth frame M1 consists of a series of two-dimensional coordinate points with depth values ​​(i.e., "depth points"). The depth value refers to the depth of the three-dimensional space point corresponding to the two-dimensional coordinate point in the depth frame in the camera coordinate system, and the refined depth frame M1' is set to M1, and the refined depth frame M1' is sent to the state estimation module;

[0034] 4.2, using the TSDF construction method proposed in the article "Voxblox: Incremental 3D Euclidean Signed Distance Fieldsfor On-Board MAV Planning" (2017, published in the International Conference on Intelligent Robots and Systems (IROS), pp. 1366-1373), based on the depth frame M1, construct the TSDF representation of the three-dimensional environment at time t1. The process is as follows:

[0035] 4.2.1, convert the depth points in the depth frame M1 into a set of three-dimensional space points (The transformation from depth point to three-dimensional space point can be completed based on the two-dimensional coordinates and depth value of the depth point). is the kth three-dimensional space point in X1, the value range of c is 1≤c≤N1, and the value of N1 is the total number of depth points in M1;

[0036] 4.2.2, taking the origin of the camera coordinate system at time t1 as the center point, construct a voxel grid of the three-dimensional environment in a 10m×10m×10m three-dimensional environment. The voxel grid is composed of voxels with a side length of 0.05m. The set of voxels in the voxel grid is 1≤i≤n v , v i is the i-th voxel in V. Voxel refers to the smallest unit in the three-dimensional space representation method, similar to the pixel in the image;

[0037] 4.2.3, assign TSDF values ​​and TSDF weight values ​​to some voxels in the three-dimensional environment:

[0038] 4.2.3.1, let variable c = 1;

[0039] 4.2.3.2, starting from the camera origin O1, we pass through O1 and the three-dimensional space point Rays Will The voxels passed through construct voxel subsets for The total number of voxels traversed, for The d-th voxel in

[0040] 4.2.3.3, Yes The TSDF value of the voxel in is assigned by:

[0041] 4.2.3.3.1, let variable d = 1;

[0042] 4.2.3.3.2, Voxel The TSDF value is assigned as follows:

[0043] 4.2.3.3.2.1, if Include set up TSDF value If it is 0, go to 4.2.3.3.3;

[0044] 4.2.3.3.2.2, if exist is within the line segment connecting the origin O1 of the camera coordinate system, and if and The distance between the center points is less than 1, set TSDF value Greater than 0 and its absolute value for The distance from the center point of the voxel, go to 4.2.3.3.3;

[0045] 4.2.3.3.2.3, if exist is within the line segment connecting the origin O1 of the camera coordinate system, and if and The distance between the center points is greater than or equal to 1, set TSDF value If it is 1, go to 4.2.3.3.3;

[0046] 4.2.3.3.2.4, if exist Connect the line segment with the camera origin O1 On the reverse extension line of one side, and if and The distance between the center points is less than 1, set TSDF value Less than 0 and its absolute value for The distance from the center point of the voxel, go to 4.2.3.3.3;

[0047] 4.2.3.3.2.5, if the voxel exist Connect the line segment with the camera origin O1 On the reverse extension line of one side, and if and The distance between the center points is greater than or equal to 1, set TSDF value If it is -1, go to 4.2.3.3.3;

[0048] 4.2.3.3.3, let variable d = d + 1, if Go to 4.2.3.3.2, otherwise go to 4.2.3.4;

[0049] 4.2.3.4, let the variable c = c + 1, if c ≤ N1, go to 4.2.3.2, otherwise it means that the voxels that are passed by the rays constructed from all the 3D points in the camera origin O1 and X1 have completed the assignment of TSDF values, while the voxels that are not passed by the rays have no TSDF values, go to 4.2.3.5;

[0050] 4.2.3.5, based on all voxels in V with TSDF values, construct a subset of V n1 is the number of voxels in V1 (i.e., the number of all voxels with TSDF values ​​in V), n1≤N1, 1≤j≤n1, is the jth voxel in V1;

[0051] 4.2.3.6, assign TSDF weight values ​​to all voxels in V1 as follows:

[0052] 4.2.3.6.1, let variable j = 1;

[0053] 4.2.3.6.2, Voxel TSDF weight value To assign a value, the method is:

[0054]

[0055] In formula (2), ρ is Center point depth, d t is the TSDF cutoff distance, which is set to 0.2m in the present invention, ∈ is the voxel side length, which is set to 0.05m in the present invention, yes The TSDF value of for The absolute value of

[0056] 4.2.3.6.3, let variable j = j + 1, if j ≤ n1, go to 4.2.3.6.2, otherwise the TSDF weight values ​​of all voxels in V1 are assigned, go to step 5.

[0057] The fifth step is to set the camera pose at the initial time period t1 as the initial pose, and set the camera pose matrix T1 at the time t1 to the zero matrix (i.e., a 4×4 zero matrix).

[0058] Step 6: Set variable k=k+1;

[0059] Step 7: The event processing and presentation module receives the left-eye event camera event stream and the right-eye event camera event stream from the data acquisition module, and processes the left-eye event camera event stream and the right-eye event camera event stream from time t0 to time t1. k Process the event stream within the time period ending at time t k The adaptive event Time-Surface representation of the left event camera and the adaptive event Time-Surface representation of the right event camera at time t k =t0+k·t duration , t duration In the present invention, it is set to 10ms. The method is:

[0060] 7.1. Constructing a grayscale image with the same pixel size as the event camera and For storage k The adaptive event Time-Surface representation of the left-eye event camera at the moment, For storage k The adaptive event Time-Surface representation of the right eye event camera at the moment is initialized and The grayscale of all pixels in is 0;

[0061] 7.2, respectively count the time interval [t k-1 , t k ]Number of events in the left eye event camera event stream and the number of events in the right-eye event camera event stream

[0062] 7.3, the event camera adaptive event Time-Surface representation method is used to process the left-view event camera event stream, and the left-view event camera adaptive event Time-Surface representation is constructed to obtain The method is:

[0063] 7.3.1, let variable e = 0;

[0064] 7.3.2, let variable e = e + 1, for The e-th pixel p e (u e , v e ):

[0065] 7.3.2.1, if There is no time stamp less than or equal to t in the left event camera. k , the coordinates are (u e , v e ) event, then let The middle pixel p e The gray value of is 0;

[0066] 7.3.2.2, if there is a timestamp less than or equal to t in the left-eye event camera event stream k , the coordinates are (u e , v e ) and select the event with the timestamp closest to t k The event is recorded with the timestamp t k ',calculate The middle pixel p e Gray value:

[0067] 7.3.2.2.1, if N th Set the value of to 1500, The middle pixel p e The grayscale value of is:

[0068]

[0069] In formula (3) is the decay rate parameter, which is set to 30ms in the present invention;

[0070] 7.3.2.2.2, if N th Set the value of to 1500, The middle pixel p e The grayscale value of is:

[0071]

[0072] In formula (4) The attenuation rate parameter threshold is set in the present invention as:

[0073]

[0074] In formula (5) t is the left-eye event camera event stream k Before (including t k The Nth time that occurs th The timestamp of the event;

[0075] 7.3.3, if e<H×W, go to 7.3.2, otherwise go to 7.3.4;

[0076] 7.3.4, at this time That is t k Adaptive event Time-Surface representation of the left-eye event camera at the moment;

[0077] 7.4, using the event camera adaptive event Time-Surface representation method described in step 7.3 to process the right-view event camera event stream, construct the right-view event camera adaptive event Time-Surface representation, and obtain ( That is t k Adaptive event Time-Surface representation of the right eye event camera at the moment);

[0078] 7.5, will and Sent to the depth estimation module and the state estimation module.

[0079] In the eighth step, the state estimation module receives t from the event processing and representation module. k Time-surface representation of left-eye event camera adaptive event And right eye event camera adaptive event Time-Surface representation The t received from the depth estimation module k-1 Refine the depth frame M at a moment k-1 ′, estimate the left event camera from t k-1 Time to t k The coordinate transformation matrix T at the moment k,k-1 . And according to t k-1 The camera pose matrix T at this moment k-1 , calculate t k The camera pose matrix T at this moment k The process is as follows:

[0080] 8.1, t kTime-surface representation of left-eye event camera adaptive event Do the inversion process, that is, subtract the gray value of each pixel from 255 to obtain the new gray value of the pixel, forming t k Moment left eye event camera adaptive event inverse Time-Surface representation

[0081] 8.2, based on t k Moment left eye event camera adaptive event inverse Time-Surface representation t k-1 Refine the depth frame M at a moment k-1 ', using the 3D-2D registration algorithm proposed in the article "Canny-VO: Visual odometry with RGB-D cameras based on geometric 3D-2D edge alignment" (2018, published in the journal IEEE Transactions on Robotics, Vol. 35, No. 1, pp. 184-199), the left eye event camera is estimated from t k-1 Time to t k The coordinate transformation matrix T at the moment k,k-1 (T k,k-1 is a 4×4 matrix, R k,k-1 t k-1 Time to t k The rotation matrix at time t is 3×3 in size. k,k-1 t k-1 Time to t k The translation vector at the moment, the size is 3×1), and according to t k-1 The camera pose matrix T at this moment k-1 , calculate t k The camera pose matrix T at this moment k :T k =T k-1 ·T k,k-1 .

[0082] In the ninth step, the depth estimation module receives the left-eye event camera event stream and the right-eye event camera event stream from the data acquisition module and the event stream received from the event processing and presentation module. and The t received from the state estimation module k-1 and t k The camera pose matrix T at this moment k-1 and T k , construct t k Depth frame Mk Based on t k Depth frame M k , update t k The TSDF representation of the three-dimensional environment at that moment. Based on the updated t k The TSDF representation of the three-dimensional environment at the moment, for the depth frame M k Perform refinement to obtain a refined depth frame M k '.

[0083] The process is as follows:

[0084] 9.1, using the event depth estimation algorithm proposed in the paper "Semi-dense 3D reconstruction with a stereo event camera" (2018, published in the European Conference on Computer Vision (ECCV), pages 235-251), based on T k-1 、T k , estimate t k Before time (including t k The depth of the latest n events that occurred at the time (time), where n is set to 1500 in the present invention;

[0085] 9.2, using the event inverse depth estimation probability model and event depth fusion strategy proposed in the article "Event-based stereo visual odometry", construct an event inverse depth estimation probability model, and convert the depth of n events obtained in 9.1 to t k The left-eye event camera image coordinate system at time t is converted to t k The n event depths in the left event camera image coordinate system at time t are fused to obtain k Depth frame M k .

[0086] 9.3, the depth frame M k The depth point set in Convert to a three-dimensional space point set For x k The g-th three-dimensional space point in For X k The g-th three-dimensional space point in for The corresponding three-dimensional point in the three-dimensional space, the value range of g is 1≤g≤N k , N k M k The total number of depth points in ;

[0087] 9.4, based on the depth frame M k , update t k The TSDF representation of the three-dimensional environment at a moment (i.e., the TSDF value and TSDF weight value of the voxel in the three-dimensional environment) is as follows:

[0088] 9.4.1, let variable g = 1;

[0089] 9.4.2, with the camera origin O k As the starting point, k and Rays Will The voxels that pass through are constructed into voxel subsets for The number of voxels traversed, for The hth voxel in

[0090] 9.4.3, Update The TSDF value and TSDF weight value of the voxel in are:

[0091] 9.4.3.1, let variable h = 1;

[0092] 9.4.3.2, Update Voxels The TSDF value and TSDF weight value are as follows:

[0093] 9.4.3.2.1, Calculation Temporary TSDF value of

[0094]

[0095] In formula (6) for The three-dimensional coordinates of the center point, sign() is the sign function, Indicates acquisition The positive and negative signs of

[0096] 9.4.3.2.2, Calculation In t k Temporary weight value at the moment

[0097]

[0098] In formula (7) for The temporary depth weight of for The temporary uncertainty weight of According to formula (8), we can obtain:

[0099]

[0100] In formula (8), ρ is Center point depth, d t is the TSDF cutoff distance, which is set to 0.2m in the present invention, ∈ is the voxel size, which is set to 0.05m in the present invention;

[0101] According to formula (9), we can obtain:

[0102]

[0103] In formula (9) for In the depth frame M k The uncertainty value of the corresponding depth point in is provided by the event inverse depth estimation probability model constructed in 9.2, σ th is the uncertainty threshold, which is set to 1 in the present invention, and a and b are set to 20 and 40 respectively in the present invention;

[0104] 9.4.3.2.3, Update TSDF value

[0105]

[0106] In formula (10) and Before update TSDF value and weight value;

[0107] 9.4.3.2.4, Update The weight value

[0108]

[0109] In formula (11), min() is the minimum function. Indicates taking and W MAX The minimum value in MAX is the weight upper limit threshold, which is set to 1 in the present invention;

[0110] 9.4.3.3, let variable h = h + 1, if Go to 9.4.3.2, otherwise go to 9.4.4;

[0111] 9.4.4, let variable g = g + 1, if g ≤ N k , go to 9.4.2, otherwise go to 9.5;

[0112] 9.5, based on t k The TSDF representation of the three-dimensional environment after the momentary update is the depth frame M k To refine:

[0113] 9.5.1, let variable g = 1;

[0114] 9.5.2, for M k Depth point in The corresponding three-dimensional space point is Based on t k The TSDF representation of the three-dimensional environment after constant update and right Depth value is refined:

[0115] 9.5.2.1, with the camera origin O k As the starting point, k and Rays Will The voxels that pass through are constructed into voxel subsets for The total number of voxels traversed;

[0116] 9.5.2.2, Selection The voxel whose TSDF value is closest to 0 The three-dimensional coordinates of the center point are

[0117] 9.5.2.3, Calculation and The distance between the depth points The depth value is refined:

[0118] 9.5.2.3.1, if the distance is less than or equal to the voxel side length, then it is considered Corresponding depth point The depth value is relatively accurate and does not need to be refined. Go to 9.5.3;

[0119] 9.5.2.3.2, if the distance is greater than the voxel size, calculate exist Projection point on by The coordinates are replaced by The coordinates of In-depth update Corresponding depth point The depth value of the depth point is completed Refine the depth value and go to 9.5.3;

[0120] 9.5.3, let variable g = g + 1, if g ≤ N k , go to 9.5.2, otherwise go to 9.5.4;

[0121] 9.5.4, now the depth point set x k The depth frame composed is t k Refine the depth frame M at a moment k ';

[0122] 9.6, refine the depth frame M k 'Sent to the state estimation module.

[0123] Step 10. If the left and right event camera event streams can still be obtained from the event camera dataset, return to step 6. If the left and right event camera event streams cannot be obtained from the event camera dataset, go to step 11.

[0124] Step 11. End.

[0125] The following technical effects can be achieved by using the present invention:

[0126] 1. The present invention uses an adaptive event stream processing method (the seventh step) in the visual odometer based on the binocular event camera, so that the visual odometer can cope with the event streams occurring under different camera motion states, that is, events of different occurrence frequencies are converted and represented as event Time-Surface images with stable brightness and edge information, which are used for subsequent steps such as depth estimation and state estimation, thereby improving the robustness of the depth estimation and state estimation results of the visual odometer based on the binocular event camera;

[0127] 2. The present invention uses a global depth information iterative update method in the visual odometer based on the binocular event camera (the global depth information is initially created in the fourth step and iteratively updated in the ninth step). On the one hand, it iteratively updates the three-dimensional space TSDF to obtain and integrate more accurate semi-dense map construction results. On the other hand, it refines the depth estimation results based on the three-dimensional space TSDF to further improve the depth estimation and state estimation accuracy of the visual odometer.

[0128] The present invention was experimentally verified on the public event camera dataset "The Event-Camera Dataset and Simulator" of the University of Zurich, the public event camera dataset "StereoDAVIS dataset" of the University of Zurich, and the public event camera dataset "The MultiVehicleStereoEventCameraDataset" of the University of Pennsylvania, and a comparative experiment was conducted with ESVO. The experimental results show that the present invention not only improves the depth estimation accuracy, but also improves the state estimation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0129] Figure 1 It is the overall flow chart of the present invention;

[0130] Figure 2 The logical structure diagram of the visual odometer system based on the binocular event camera constructed in the first step of the present invention;

[0131] Figure 3 The experimental results of the average state estimation accuracy error comparison between the present invention and the ESVO method are shown in Figure 2.

[0132] Figure 4 The depth estimation performance comparison experimental results of the present invention and the ESVO method are shown in Figure 2. DETAILED DESCRIPTION

[0133] Figure 1 It is the overall flow chart of the present invention; Figure 1 As shown, the present invention comprises the following steps:

[0134] The first step is to build a visual odometer system based on a binocular event camera. Figure 2 As shown, it consists of a data acquisition module, an event processing and representation module, a depth estimation module, and a state estimation module.

[0135] The data acquisition module is connected to the event processing and representation module and the depth estimation module. The data acquisition module can download data from the public event camera dataset "The Event-Camera Dataset and Simulator" of the University of Zurich, the public event camera dataset "StereoDAVISdataset" of the University of Zurich, and the public event camera dataset "TheMultiVehicleStereoEventCameraDataset" of the University of Pennsylvania, and send the acquired binocular event camera event stream to the event processing and representation module and the depth estimation module.

[0136] The event processing and representation module is connected to the data acquisition module, the depth estimation module, and the state estimation module. The event processing and representation module receives the binocular event camera event stream from the data acquisition module, converts the left event camera event stream into the left event camera adaptive event Time-Surface representation, converts the right event camera event stream into the right event camera adaptive event Time-Surface representation, and sends the left event camera adaptive event Time-Surface representation and the right event camera adaptive event Time-Surface representation to the depth estimation module and the state estimation module.

[0137] The depth estimation module is connected to the data acquisition module, the event processing and representation module, and the state estimation module. The depth estimation module receives the left event camera event stream and the right event camera event stream from the data acquisition module, receives the left event camera adaptive event Time-Surface representation and the right event camera adaptive event Time-Surface representation from the event processing and representation module, obtains the state estimation result from the state estimation module, performs event depth estimation based on the left event camera adaptive event Time-Surface representation, the right event camera adaptive event Time-Surface representation, the left event camera event stream and the state estimation result, fuses the event depth to obtain a depth frame, and sends the depth frame to the state estimation module.

[0138] The state estimation module is connected to the event processing and representation module and the depth estimation module. The state estimation module receives the adaptive event Time-Surface representation of the left event camera and the adaptive event Time-Surface representation of the right event camera from the event processing and representation module, receives the depth frame from the depth estimation module, estimates the state information such as the event camera's posture and speed based on the adaptive event Time-Surface representation of the left event camera and the depth frame, and sends the state estimation result to the depth estimation module.

[0139] In the second step, the data acquisition module obtains the left-eye event camera event stream and the right-eye event camera event stream from any one of the three data sets, namely, the event camera data set "The Event-Camera Dataset andSimulator", "StereoDAVISdataset", and "TheMultiVehicleStereoEventCameraDataset", and sends the left-eye event camera event stream and the right-eye event camera event stream to the event processing and representation module and the depth estimation module.

[0140] In the third step, the event processing and representation module processes the event stream of the left event camera and the event stream of the right event camera obtained from the data acquisition module, converts the event stream into an event Time-Surface representation, and obtains the event Time-Surface representation of the left event camera and the event Time-Surface representation of the right event camera at the initial time period t1, the method is:

[0141] 3.1, let t0 be the starting time when the event processing and representation module obtains the left event camera event stream and the right event camera event stream data set from the data acquisition module, let variable k = 1, and perform the calculation from t0 (i.e. the initial time of the data set) to t k The left-eye event camera event stream and the right-eye event camera event stream of the time period at time t1 are initialized to obtain the left-eye event camera event Time-Surface representation and the right-eye event camera event Time-Surface representation, where t1 = t0 + 1·t duration , t duration is the interval time, t duration In the present invention, it is set to 10ms;

[0142] 3.2. Construct a grayscale image with the same pixel size as the event camera and It is used to store the event Time-Surface representation of the left-eye event camera at time t1. Used to store the event Time-Surface representation of the right-eye event camera at time t1, initialize and The gray value of all pixels in is 0;

[0143] 3.3, use the event camera event Time-Surface representation construction method to process the left-view event camera event stream and construct the left-view event camera event Time-Surface representation. The method is:

[0144] 3.3.1, let variable a = 0;

[0145] 3.3.2, let variable a = a + 1, calculate The ath pixel p a (u a , v a )’s grayscale value:

[0146] 3.3.2.1, if there is no event in the left-eye event camera event stream with a timestamp less than or equal to t1 and a coordinate of (u a , v a ) event, then let The middle pixel p aThe gray value is 0, go to 3.3.3;

[0147] 3.3.2.2, if there is a time stamp less than or equal to t1 and the coordinates are (u a , v a ), select the event with the closest timestamp to t1 from these events, and record the timestamp of this event as t1′. The middle pixel p a The gray value I(p a , t1) is:

[0148]

[0149] In formula (1) is the decay rate parameter, set to 30ms;

[0150] 3.3.3, if a<H×W(H is The number of pixel columns, W is ), go to 3.3.2, otherwise The result is processed, go to 3.3.4;

[0151] 3.3.4, at this time That is, the Time-Surface representation of the left-eye event camera event at time t1;

[0152] 3.4, use the method for constructing the Time-Surface representation of the event camera event described in step 3.3 to process the right-eye event camera event stream, construct the Time-Surface representation of the right-eye event camera event, and obtain the Time-Surface representation of the left-eye event camera event at time t1

[0153] 3.5, the event Time-Surface of the left event camera at time t1 is represented as The event Time-Surface representation of the right event camera at time t1 Send to the depth estimation module;

[0154] The fourth step is to estimate the depth based on the and Obtain the depth frame M1 at the initial time period t1. Based on M1, construct the TSDF representation of the three-dimensional environment at time t1. The method is:

[0155] 4.1, based on and The depth estimation module uses the improved SGM method to obtain the depth frame M1 at time t1. The depth frame M1 consists of a series of two-dimensional coordinate points with depth values ​​(i.e., "depth points"). The depth value refers to the depth of the three-dimensional space point corresponding to the two-dimensional coordinate point in the depth frame in the camera coordinate system, and sets the refined depth frame M1'=M1, and sends the refined depth frame M1' to the state estimation module;

[0156] 4.2, using the TSDF construction method proposed in the article "Voxblox: Incremental 3D Euclidean Signed Distance Fieldsfor On-Board MAV Planning", based on the depth frame M1, construct the TSDF representation of the three-dimensional environment at time t1. The process is as follows:

[0157] 4.2.1, convert the depth points in the depth frame M1 into a set of three-dimensional space points (The transformation from depth point to three-dimensional space point can be completed based on the two-dimensional coordinates and depth value of the depth point). is the kth three-dimensional space point in X1, the value range of c is 1≤c≤N1, and the value of N1 is the total number of depth points in M1;

[0158] 4.2.2, taking the origin of the camera coordinate system at time t1 as the center point, construct a voxel grid of the three-dimensional environment in a 10m×10m×10m three-dimensional environment. The voxel grid is composed of voxels with a side length of 0.05m. The set of voxels in the voxel grid is v i is the i-th voxel in V. Voxel refers to the smallest unit in the three-dimensional space representation method, similar to the pixel in the image;

[0159] 4.2.3, assign TSDF values ​​and TSDF weight values ​​to some voxels in the three-dimensional environment:

[0160] 4.2.3.1, let variable c = 1;

[0161] 4.2.3.2, starting from the camera origin O1, we pass through O1 and the three-dimensional space point Rays Will The voxels passed through construct voxel subsets for The total number of voxels traversed, for The d-th voxel in

[0162] 4.2.3.3, Yes The TSDF value of the voxel in is assigned by:

[0163] 4.2.3.3.1, let variable d = 1;

[0164] 4.2.3.3.2, Voxel The TSDF value is assigned as follows:

[0165] 4.2.3.3.2.1, if Include set up TSDF value If it is 0, go to 4.2.3.3.3;

[0166] 4.2.3.3.2.2, if exist is within the line segment connecting the origin O1 of the camera coordinate system, and if and The distance between the center points is less than 1, set TSDF value Greater than 0 and its absolute value for The distance from the center point of the voxel, go to 4.2.3.3.3;

[0167] 4.2.3.3.2.3, if exist is within the line segment connecting the origin O1 of the camera coordinate system, and if and The distance between the center points is greater than or equal to 1, set TSDF value If it is 1, go to 4.2.3.3.3;

[0168] 4.2.3.3.2.4, if exist Connect the line segment with the camera origin O1 On the reverse extension line of one side, and if and The distance between the center points is less than 1, set TSDF value Less than 0 and its absolute value for The distance from the center point of the voxel, go to 4.2.3.3.3;

[0169] 4.2.3.3.2.5, if the voxel exist Connect the line segment with the camera origin O1 On the reverse extension line of one side, and if and The distance between the center points is greater than or equal to 1, set TSDF value If it is -1, go to 4.2.3.3.3;

[0170] 4.2.3.3.3, let variable d = d + 1, if Go to 4.2.3.3.2, otherwise go to 4.2.3.4;

[0171] 4.2.3.4, let the variable c = c + 1, if c ≤ N1, go to 4.2.3.2, otherwise it means that the voxels that are passed by the rays constructed from all the 3D points in the camera origin O1 and X1 have completed the assignment of TSDF values, while the voxels that are not passed by the rays have no TSDF values, go to 4.2.3.5;

[0172] 4.2.3.5, based on all voxels in V with TSDF values, construct a subset of V n1 is the number of voxels in V1 (i.e., the number of all voxels with TSDF values ​​in V), n1≤N1, 1≤j≤n1, is the jth voxel in V1;

[0173] 4.2.3.6, assign TSDF weight values ​​to all voxels in V1 as follows:

[0174] 4.2.3.6.1, let variable j = 1;

[0175] 4.2.3.6.2, Voxel TSDF weight value To assign a value, the method is:

[0176]

[0177] In formula (2), ρ is Center point depth, d t is the TSDF cutoff distance, which is set to 0.2m in the present invention, ∈ is the voxel side length, which is set to 0.05m in the present invention, yes The TSDF value of for The absolute value of

[0178] 4.2.3.6.3, let variable j = j + 1, if j ≤ n1, go to 4.2.3.6.2, otherwise the TSDF weight values ​​of all voxels in V1 are assigned, go to step 5.

[0179] The fifth step is to set the camera pose at the initial time period t1 as the initial pose, and set the camera pose matrix T1 at the time t1 to a 4×4 zero matrix.

[0180] Step 6: Set variable k=k+1;

[0181] Step 7: The event processing and presentation module receives the left-eye event camera event stream and the right-eye event camera event stream from the data acquisition module, and processes the left-eye event camera event stream and the right-eye event camera event stream from time t0 to time t1. k Process the event stream within the time period ending at time t k The adaptive event Time-Surface representation of the left event camera and the adaptive event Time-Surface representation of the right event camera at time t k =t0+k·t duration , t duration In the present invention, it is set to 10ms. The method is:

[0182] 7.1. Constructing a grayscale image with the same pixel size as the event camera and For storage k The adaptive event Time-Surface representation of the left-eye event camera at the moment, For storage k The adaptive event Time-Surface representation of the right eye event camera at the moment is initialized and The grayscale of all pixels in is 0;

[0183] 7.2, respectively count the time interval [t k-1 , t k ]Number of events in the left eye event camera event stream and the number of events in the right-eye event camera event stream

[0184] 7.3, the event camera adaptive event Time-Surface representation method is used to process the left-view event camera event stream, and the left-view event camera adaptive event Time-Surface representation is constructed to obtain The method is:

[0185] 7.3.1, let variable e = 0;

[0186] 7.3.2, let variable e = e + 1, for The e-th pixel p e (u e , v e ):

[0187] 7.3.2.1, if There is no time stamp less than or equal to t in the left event camera. k , the coordinates are (ue , v e ) event, then let The middle pixel p e The gray value of is 0;

[0188] 7.3.2.2, if there is a timestamp less than or equal to t in the left-eye event camera event stream k , the coordinates are (u e , v e ) and select the event with the timestamp closest to t k The event is recorded with the timestamp t k ',calculate The middle pixel p e Gray value:

[0189] 7.3.2.2.1, if N th Set the value of to 1500, The middle pixel p e The grayscale value of is:

[0190]

[0191] In formula (3) is the decay rate parameter, which is set to 30ms in the present invention;

[0192] 7.3.2.2.2, if N th Set the value of to 1500, The middle pixel p e The grayscale value of is:

[0193]

[0194] In formula (4) The attenuation rate parameter threshold is set in the present invention as:

[0195]

[0196] In formula (5) t is the left-eye event camera event stream k Before (including t k The Nth time that occurs th The timestamp of the event;

[0197] 7.3.3, if e<H×W, go to 7.3.2, otherwise go to 7.3.4;

[0198] 7.3.4, at this time That is t kAdaptive event Time-Surface representation of the left-eye event camera at the moment;

[0199] 7.4, using the event camera adaptive event Time-Surface representation method described in step 7.3 to process the right-view event camera event stream, construct the right-view event camera adaptive event Time-Surface representation, and obtain ( That is t k Adaptive event Time-Surface representation of the right eye event camera at the moment);

[0200] 7.5, will and Sent to the depth estimation module and the state estimation module.

[0201] In the eighth step, the state estimation module receives t from the event processing and representation module. k Time-surface representation of left-eye event camera adaptive event And right eye event camera adaptive event Time-Surface representation The t received from the depth estimation module k-1 Refine the depth frame M at a moment k-1 ', estimate the left event camera from t k-1 Time to t k The coordinate transformation matrix T at the moment k,k-1 . And according to t k-1 The camera pose matrix T at this moment k-1 , calculate t k The camera pose matrix T at this moment k The process is as follows:

[0202] 8.1, t k Time-surface representation of left-eye event camera adaptive event Do the inversion process, that is, subtract the gray value of each pixel from 255 to obtain the new gray value of the pixel, forming t k Moment left eye event camera adaptive event inverse Time-Surface representation

[0203] 8.2, based on t k Moment left eye event camera adaptive event inverse Time-Surface representation t k-1 Refine the depth frame M at a moment k-1', using the 3D-2D registration algorithm proposed in the article "Canny-VO: Visual odometry with RGB-D cameras based on geometric 3D-2D edge alignment" (2018, published in the journal IEEE Transactions on Robotics, Vol. 35, No. 1, pp. 184-199), the left eye event camera is estimated from t k-1 Time to t k The coordinate transformation matrix T at the moment k,k-1 (T k,k-1 is a 4×4 matrix, R k,k-1 t k-1 Time to t k The rotation matrix at time t is 3×3 in size. k,k-1 t k-1 Time to t k The translation vector at the moment, the size is 3×1), and according to t k-1 The camera pose matrix T at this moment k-1 , calculate t k The camera pose matrix T at this moment k :T k =T k-1 ·T k,k-1 .

[0204] In the ninth step, the depth estimation module receives the left-eye event camera event stream and the right-eye event camera event stream from the data acquisition module and the event stream received from the event processing and presentation module. and The t received from the state estimation module k-1 and t k The camera pose matrix T at this moment k-1 and T k , construct t k Depth frame M k Based on t k Depth frame M k , update t k The TSDF representation of the three-dimensional environment at that moment. Based on the updated t k The TSDF representation of the three-dimensional environment at the moment, for the depth frame M k Perform refinement to obtain a refined depth frame M k ′.

[0205] The process is as follows:

[0206] 9.1, using the event depth estimation algorithm proposed in the paper "Semi-dense 3D reconstruction with a stereo event camera" (2018, published in the European Conference on Computer Vision (ECCV), pages 235-251), based on T k-1 、T k , estimate t k Before time (including t k The depth of the latest n events that occurred at the time (time), where n is set to 1500 in the present invention;

[0207] 9.2, using the event inverse depth estimation probability model and event depth fusion strategy proposed in the article "Event-based stereo visual odometry", construct an event inverse depth estimation probability model, and convert the depth of n events obtained in 9.1 to t k The left-eye event camera image coordinate system at time t is converted to t k The n event depths in the left event camera image coordinate system at time t are fused to obtain k Depth frame M k .

[0208] 9.3, the depth frame M k The depth point set in Convert to a three-dimensional space point set For x k The g-th three-dimensional space point in For X k The g-th three-dimensional space point in for The corresponding three-dimensional point in the three-dimensional space, the value range of g is 1≤g≤N k , N k M k The total number of depth points in ;

[0209] 9.4, based on the depth frame M k , update t k The TSDF representation of the three-dimensional environment at a moment (i.e., the TSDF value and TSDF weight value of the voxel in the three-dimensional environment) is as follows:

[0210] 9.4.1, let variable g = 1;

[0211] 9.4.2, with the camera origin O k As the starting point, kand Rays Will The voxels that pass through are constructed into voxel subsets for The number of voxels traversed, for The hth voxel in

[0212] 9.4.3, Update The TSDF value and TSDF weight value of the voxel in are:

[0213] 9.4.3.1, let variable h = 1;

[0214] 9.4.3.2, Update Voxels The TSDF value and TSDF weight value are as follows:

[0215] 9.4.3.2.1, Calculation Temporary TSDF value of

[0216]

[0217] In formula (6) for The three-dimensional coordinates of the center point, sign() is the sign function, Indicates acquisition The positive and negative signs of

[0218] 9.4.3.2.2, Calculation In t k Temporary weight value at the moment

[0219]

[0220] In formula (7) for The temporary depth weight of for The temporary uncertainty weight of According to formula (8), we can obtain:

[0221]

[0222] In formula (8), ρ is Center point depth, d t is the TSDF cutoff distance, which is set to 0.2m in the present invention, ∈ is the voxel size, which is set to 0.05m in the present invention;

[0223] According to formula (9), we can obtain:

[0224]

[0225] In formula (9) for In the depth frame M k The uncertainty value of the corresponding depth point in is provided by the event inverse depth estimation probability model constructed in 9.2, σ th is the uncertainty threshold, which is set to 1, and a and b are set to 20 and 40 respectively;

[0226] 9.4.3.2.3, Update TSDF Live

[0227]

[0228] In formula (10) and Before update TSDF value and weight value;

[0229] 9.4.3.2.4, Update The weight value

[0230]

[0231] In formula (11), min() is the minimum function. Indicates taking and W MAX The minimum value in MAX is the weight upper limit threshold, which is set to 1 in the present invention;

[0232] 9.4.3.3, let variable h = h + 1, if Go to 9.4.3.2, otherwise go to 9.4.4;

[0233] 9.4.4, let variable g = g + 1, if g ≤ N k , go to 9.4.2, otherwise go to 9.5;

[0234] 9.5, based on t k The TSDF representation of the three-dimensional environment after the momentary update is the depth frame M k To refine:

[0235] 9.5.1, let variable g = 1;

[0236] 9.5.2, for M k Depth point in The corresponding three-dimensional space point is Based on t k The TSDF representation of the three-dimensional environment after constant update and right Depth value is refined:

[0237] 9.5.2.1, with the camera origin O k As the starting point, k and Rays Will The voxels that pass through are constructed into voxel subsets for The total number of voxels traversed;

[0238] 9.5.2.2, Selection The voxel whose TSDF value is closest to 0 The three-dimensional coordinates of the center point are

[0239] 9.5.2.3, Calculation and The distance between the depth points The depth value is refined:

[0240] 9.5.2.3.1, if the distance is less than or equal to the voxel side length, then it is considered Corresponding depth point The depth value is relatively accurate and does not need to be refined. Go to 9.5.3;

[0241] 9.5.2.3.2, if the distance is greater than the voxel size, calculate exist Projection point on by The coordinates are replaced by The coordinates of In-depth update Corresponding depth point The depth value of the depth point is completed Refine the depth value and go to 9.5.3;

[0242] 9.5.3, let variable g = g + 1, if g ≤ N k , go to 9.5.2, otherwise go to 9.5.4;

[0243] 9.5.4, now the depth point set x k The depth frame composed is t k Refine the depth frame M at a moment k ';

[0244] 9.6, refine the depth frame M k'Sent to the state estimation module.

[0245] Step 10. If the left and right event camera event streams can still be obtained from the event camera dataset, return to step 6. If the left and right event camera event streams cannot be obtained from the event camera dataset, go to step 11.

[0246] Step 11. End.

[0247] Figure 3 The experimental results of the average state estimation accuracy error comparison between the present invention and the ESVO method described in the background technology are obtained by testing the present invention and ESVO on the "The Event-Camera Dataset and Simulator", "StereoDAVISdataset", and "TheMultiVehicleStereoEventCameraDataset" datasets. The experimental environment is a desktop computer with i9 3.7GHz CPU and 64GRAM. The evaluation index of the experiment is the average error between the state estimation trajectory result and the true value of the trajectory, in centimeters. Figure 3 The first column on the left is the name of the test data sequence of the dataset. The ones starting with “esim_” are the test data sequences in the “The Event-Camera Dataset and Simulator” dataset, the ones starting with “rpg_” are the test data sequences in the “StereoDAVISdataset” dataset, and the ones starting with “upenn_” are the test data sequences in the “TheMultiVehicleStereoEventCameraDataset” dataset. Figure 3 The first row in the upper middle is the name of the visual odometry method. Each column of experimental data in the figure is the test results of ESVO and the present invention in the same test data sequence and the same experimental environment. The experimental results show that compared with the ESVO method, the present invention has a lower average state estimation error in most test data sequences.

[0248] Figure 4 This is the experimental result of comparing the depth estimation accuracy error of the ESVO method described in the present invention with that of the background technology; the experimental result is obtained by testing the present invention and ESVO on the "MultiVehicleStereoEventCameraDataset" dataset. Figure 3 The corresponding experimental environment is the same. The evaluation indicators of this experiment are the absolute value of the relative error between the depth estimation result and the true value, the square root of the relative error between the depth estimation result and the true value, the root mean square error between the depth estimation result and the true value, and the logarithmic root mean square error between the depth estimation result and the true value, in meters. Figure 4The first column on the left is the name of the test data sequence of the dataset, the second column on the left is the visual odometer method corresponding to the test data sequence of different datasets, and the first line above is the different evaluation indicators. Each dataset test data sequence in the figure corresponds to the depth estimation accuracy error results of ESVO and the present invention, which are the results of ESVO and the present invention tested in the same test data sequence and the same experimental environment. The experimental results show that compared with ESVO, the present invention has a lower depth estimation error on most test data sequences.

Claims

1. A binocular visual odometer method based on event camera, characterized in that The following steps are involved: The first step is to build a visual odometry system based on a binocular event camera; The visual odometer system based on binocular event camera consists of data acquisition module, event processing and representation module, depth estimation module and state estimation module; The data acquisition module is connected to the event processing and representation module and the depth estimation module; the data acquisition module downloads data from the event camera data set, and sends the acquired binocular event camera event stream to the event processing and representation module and the depth estimation module; the binocular event camera event stream includes a left-eye event camera event stream and a right-eye event camera event stream; The event processing and representation module is connected to the data acquisition module, the depth estimation module, and the state estimation module; the event processing and representation module receives the binocular event camera event stream from the data acquisition module, converts the left event camera event stream into the left event camera adaptive event Time-Surface representation, converts the right event camera event stream into the right event camera adaptive event Time-Surface representation, and sends the left event camera adaptive event Time-Surface representation and the right event camera adaptive event Time-Surface representation to the depth estimation module and the state estimation module; The depth estimation module is connected to the data acquisition module, the event processing and representation module, and the state estimation module; the depth estimation module receives the left event camera event stream and the right event camera event stream from the data acquisition module, receives the left event camera adaptive event Time-Surface representation and the right event camera adaptive event Time-Surface representation from the event processing and representation module, obtains the state estimation result from the state estimation module, performs event depth estimation based on the left event camera adaptive event Time-Surface representation, the right event camera adaptive event Time-Surface representation, the left event camera event stream and the state estimation result, fuses the event depth to obtain a depth frame, and sends the depth frame to the state estimation module; The state estimation module is connected to the event processing and representation module and the depth estimation module; the state estimation module receives the adaptive event Time-Surface representation of the left event camera and the adaptive event Time-Surface representation of the right event camera from the event processing and representation module, receives the depth frame from the depth estimation module, estimates the event camera posture and speed state information based on the adaptive event Time-Surface representation of the left event camera and the depth frame, and sends the state estimation result to the depth estimation module; In the second step, the data acquisition module obtains the left event camera event stream and the right event camera event stream from the event camera data set, and sends the left event camera event stream and the right event camera event stream to the event processing and representation module and the depth estimation module; Step 3: The event processing and representation module processes the left-eye event camera event stream and the right-eye event camera event stream obtained from the data acquisition module, converts the event streams into event Time-Surface representations, and obtains the event Time-Surface representations of the left-eye event camera and the right-eye event camera at the initial time period t1. The method is as follows: 3.1, let t0 be the start time when the event processing and representation module obtains the left event camera event stream and the right event camera event stream data set from the data acquisition module, let variable k = 1, and k The left-eye event camera event stream and the right-eye event camera event stream of the time period of time are initialized to obtain the left-eye event camera event Time-Surface representation and the right-eye event camera event Time-Surface representation, where t1 = t0 + 1·t duration , t duration is the interval time; 3.

2. Construct a grayscale image with the same pixel size as the event camera and It is used to store the event Time-Surface representation of the left-eye event camera at time t1. Used to store the event Time-Surface representation of the right-eye event camera at time t1, initialize and The gray value of all pixels in is 0; 3.

3. Use the method for constructing the event Time-Surface representation of the event camera to process the left-eye event camera event stream and construct the event Time-Surface representation of the left-eye event camera. The method is as follows: 3.3.

1. Let variable a = 0; 3.3.2, let variable a = a + 1, calculate The ath pixel p a (u a ,v a )’s grayscale value: 3.3.2.1, if there is no event in the left camera event stream with a timestamp less than or equal to t1 and coordinates (u a ,v a ) event, then let The middle pixel p a The gray value is 0, go to 3.3.3; 3.3.2.2, if there is a time stamp less than or equal to t1 and the coordinates are (u a ,v a ), select the event with the closest timestamp to t1 from these events, and record the timestamp of this event as t1′. The middle pixel p a The gray value I(p a ,t1) is: In formula (1) is the decay rate parameter; 3.3.3, if a < H × W, where H is the number of pixel columns of , and W is the number of pixel rows of , go to 3.3.2; otherwise, after processing , go to 3.3.4; 3.3.4, at this time That is, the Time-Surface representation of the left-eye event camera event at time t1; 3.4, use the method for constructing the Time-Surface representation of the event camera event described in step 3.3 to process the right-eye event camera event stream, construct the Time-Surface representation of the right-eye event camera event, and obtain the Time-Surface representation of the left-eye event camera event at time t1 3.5, the event Time-Surface of the left event camera at time t1 is represented as The event Time-Surface representation of the right event camera at time t1 Send to the depth estimation module; The fourth step is to estimate the depth based on the and Obtain the depth frame M1 at the initial time period t1; based on M1, construct the TSDF representation of the three-dimensional environment at time t1; the method is: 4.1, based on and The depth estimation module uses the improved SGM method to obtain the depth frame M1 at time t1. The depth frame M1 consists of a series of two-dimensional coordinate points with depth values, namely "depth points". The depth value refers to the depth of the three-dimensional space point corresponding to the two-dimensional coordinate point in the depth frame in the camera coordinate system, and the refined depth frame M1'=M1 is set, and the refined depth frame M1' is sent to the state estimation module; 4.

2. Use the TSDF construction method to construct the 3D environment TSDF representation at time t1 based on the depth frame M1. The process is as follows: 4.2.1, convert the depth points in the depth frame M1 into a set of three-dimensional space points is the kth three-dimensional space point in X1, the value range of c is 1≤c≤N1, and the value of N1 is the total number of depth points in M1; 4.2.2, taking the origin of the camera coordinate system at time t1 as the center point, construct a voxel grid of the three-dimensional environment in a 10m×10m×10m three-dimensional environment. The voxel grid is composed of voxels with a side length of 0.05m. The set of voxels in the voxel grid is v i is the i-th voxel in V. Voxel refers to the smallest unit in the three-dimensional space representation method, similar to the pixel in the image; 4.2.

3. Assign values to the TSDF values and TSDF weight values of some voxels in the 3D environment: 4.2.3.

1. Let variable c = 1; 4.2.3.2, starting from the camera origin O1, we pass through O1 and the three-dimensional space point Rays Will The voxels passed through construct voxel subsets for l 1c The total number of voxels traversed, V 1c The d-th voxel in 4.2.3.3, Yes Assign the TSDF value of the voxel in the 4.2.3.

4. Let variable c = c + 1. If c ≤ N1, go to 4.2.3.

2. Otherwise, it means that the TSDF values of the voxels passed through by the rays constructed from all 3D points between the camera origin O1 and X1 have been assigned, and the voxels not passed through by the rays have no TSDF values. Go to 4.2.3.5; 4.2.3.5, based on all voxels in V with TSDF values, construct a subset of V n1 is the number of voxels in V1, that is, the number of voxels with TSDF values ​​in V, n1≤N1, 1≤j≤n1, is the jth voxel in V1; 4.2.3.6, assign TSDF weight values ​​to all voxels in V1, where voxel The TSDF weight value is Go to step 5; Step 5: Set the camera pose at the initial time period t1 to the initial pose, and set the camera pose matrix T1 at time t1 to a 4×4 zero matrix; Step 6: Let variable k = k + 1; Step 7: The event processing and presentation module receives the left-eye event camera event stream and the right-eye event camera event stream from the data acquisition module, and processes the left-eye event camera event stream and the right-eye event camera event stream from time t0 to time t1. k Process the event stream within the time period ending at time t k The adaptive event Time-Surface representation of the left event camera and the adaptive event Time-Surface representation of the right event camera at time t k =t0+k·t duration ; The method is: 7.

1. Constructing a grayscale image with the same pixel size as the event camera and For storage k The adaptive event Time-Surface representation of the left-eye event camera at the moment, For storage k The adaptive event Time-Surface representation of the right eye event camera at the moment is initialized and The grayscale of all pixels in is 0; 7.2, respectively count the time interval [t k-1 ,t k ]Number of events in the left eye event camera event stream and the number of events in the right-eye event camera event stream 7.3, the event camera adaptive event Time-Surface representation method is used to process the left-view event camera event stream, and the left-view event camera adaptive event Time-Surface representation is constructed to obtain The method is: 7.3.

1. Let variable e = 0; 7.3.2, let variable e = e + 1, for The e-th pixel p e (u e ,v e ): 7.3.2.1, if There is no time stamp less than or equal to t in the left event camera. k , the coordinates are (u e ,v e ) event, then let The middle pixel p e The gray value of is 0; 7.3.2.2, if there is a timestamp less than or equal to t in the left-eye event camera event stream k , the coordinates are (u e ,v e ) and select the event with the timestamp closest to t k The event is recorded with the timestamp t k ',calculate The middle pixel p e Gray value: 7.3.2.2.1, if N th is a positive integer, The middle pixel p e The grayscale value of is: 7.3.2.2.2, if N th Set the value of to 1500, The middle pixel p e The grayscale value of is: In formula (4) is the decay rate parameter threshold, set to: In formula (5) t is the left-eye event camera event stream k The Nth time that happened before th The timestamp of the event; 7.3.

3. If e < H×W, go to 7.3.

2. Otherwise, go to 7.3.4; 7.3.4, at this time That is t k Adaptive event Time-Surface representation of the left-eye event camera at the moment; 7.4, using the event camera adaptive event Time-Surface representation method described in step 7.3 to process the right-view event camera event stream, construct the right-view event camera adaptive event Time-Surface representation, and obtain That is t k Adaptive event Time-Surface representation of the moment-right event camera; 7.5, will and Send to the depth estimation module and the state estimation module; In the eighth step, the state estimation module receives t from the event processing and representation module. k Time-surface representation of left-eye event camera adaptive event And right eye event camera adaptive event Time-Surface representation The t received from the depth estimation module k-1 Refine the depth frame M at a moment k-1 ', estimate the left event camera from t k-1 Time to t k The coordinate transformation matrix T at the moment k,k-1 , and according to t k-1 The camera pose matrix T at this moment k-1 , calculate t k The camera pose matrix T at this moment k ; The T k,k-1 is a 4×4 matrix, R k,k-1 t k-1 Time to t k The rotation matrix at time t k,k-1 t k-1 Time to t k The translation vector at the moment; In the ninth step, the depth estimation module receives the left-eye event camera event stream and the right-eye event camera event stream from the data acquisition module and the event stream received from the event processing and presentation module. and The t received from the state estimation module k-1 and t k The camera pose matrix T at this moment k-1 and T k , construct t k Depth frame M k Based on t k Depth frame M k , update t k TSDF representation of the three-dimensional environment at the moment; based on the updated t k The TSDF representation of the three-dimensional environment at the moment, for the depth frame M k Perform refinement to obtain a refined depth frame M k ';The process is as follows: 9.1, using the event depth estimation algorithm, based on T k-1 、T k , estimate t k The depth of the latest n events that occurred before the moment, where n is a positive integer; 9.2, using the event inverse depth estimation probability model and event depth fusion strategy, the depth of n events obtained in 9.1 is converted to t k The left-eye event camera image coordinate system at time t is converted to t k The n event depths in the left event camera image coordinate system at time t are fused to obtain k Depth frame M k ; 9.3, the depth frame M k The depth point set in Convert to a three-dimensional space point set For x k The g-th three-dimensional space point in For X k The g-th three-dimensional space point in for The corresponding three-dimensional point in the three-dimensional space, the value range of g is 1≤g≤N k , N k M k The total number of depth points in ; 9.4, based on the depth frame M k , update t k The TSDF representation of the three-dimensional environment at the moment includes the TSDF value and TSDF weight value of the voxel in the three-dimensional environment; 9.5, based on t k The TSDF representation of the three-dimensional environment after the momentary update is the depth frame M k To refine: 9.5.

1. Let variable g = 1; 9.5.2, for M k Depth point in The corresponding three-dimensional space point is Based on t k The TSDF representation of the three-dimensional environment after constant update and right Depth value is refined; 9.5.3, let variable g = g + 1, if g ≤ N k , go to 9.5.2, otherwise go to 9.5.4; 9.5.4, now the depth point set x k The depth frame composed is t k Refine the depth frame M at a moment k '; 9.6, refine the depth frame M k 'Send to the state estimation module; Step 10: If the left-eye and right-eye event camera event streams can still be obtained from the event camera dataset, return to Step 6. If the left-eye and right-eye event camera event streams cannot be obtained from the event camera dataset, go to Step 11; Step 11: End.

2. A binocular visual odometer method based on an event camera as claimed in claim 1, characterized in that The event camera dataset mentioned in Step 2 refers to any one of the event camera datasets "The Event-Camera Dataset and Simulator", "StereoDAVISdataset", and "TheMultiVehicleStereoEventCameraDataset"; "TheEvent-Camera Dataset and Simulator" (i.e., "Event Camera Dataset and Simulator") refers to the public event camera dataset of the University of Zurich; "StereoDAVISdataset" (i.e., "Binocular Dynamic Vision Sensor Dataset") is also a public event camera dataset of the University of Zurich; "TheMultiVehicleStereoEventCameraDataset" (i.e., "Multi-Vehicle Binocular Event Camera Dataset") is a public event camera dataset of the University of Pennsylvania; all three of these public event camera datasets include binocular camera image frames and binocular event camera event streams.

3. A binocular visual odometer method based on an event camera as claimed in claim 1, characterized in that The duration Set to 10ms, the decay rate parameter Set to 30ms, the N th Set to 1500, the n is set to 1500.

4. A binocular visual odometer method based on an event camera as claimed in claim 1, characterized in that Step 4.2.3.3 The method for assigning the TSDF value of the voxel in is: 4.2.3.3.

1. Let variable d = 1; 4.2.3.3.2, Voxel The TSDF value is assigned as follows: 4.2.3.3.2.1, if Include set up TSDF value If it is 0, go to 4.2.3.3.3; 4.2.3.3.2.2, if exist is within the line segment connecting the origin O1 of the camera coordinate system, and if and The distance between the center points is less than 1, set TSDF value Greater than 0 and its absolute value for The distance from the center point of the voxel, go to 4.2.3.3.3; 4.2.3.3.2.3, if exist is within the line segment connecting the origin O1 of the camera coordinate system, and if and The distance between the center points is greater than or equal to 1, set TSDF value If it is 1, go to 4.2.3.3.3; 4.2.3.3.2.4, if exist Connect the line segment with the camera origin O1 On the reverse extension line of one side, and if and The distance between the center points is less than 1, set TSDF value Less than 0 and its absolute value for The distance from the center point of the voxel, go to 4.2.3.3.3; 4.2.3.3.2.5, if the voxel exist Connect the line segment with the camera origin O1 On the reverse extension line of one side, and if and The distance between the center points is greater than or equal to 1, set TSDF value If it is -1, go to 4.2.3.3.3; 4.2.3.3.3, let variable d = d + 1, if Go to 4.2.3.3.2, otherwise end.

5. A binocular visual odometer method based on an event camera as claimed in claim 1, characterized in that The method for assigning TSDF weight values ​​to all voxels in V1 described in step 4.2.3.6 is: 4.2.3.6.1, let variable j = 1; 4.2.3.6.2, Voxel TSDF weight value To assign a value, the method is: In formula (2), ρ is Center point depth, d t is the TSDF cutoff distance, set to 0.2m, ∈ is the voxel side length, set to 0.05m, yes The TSDF value of for The absolute value of 4.2.3.6.3, let variable j = j + 1, if j ≤ n1, go to 4.2.3.6.2, otherwise the TSDF weight values ​​of all voxels in V1 are assigned and the process ends.

6. A binocular visual odometer method based on an event camera as claimed in claim 1, characterized in that In step 8, the state estimation module estimates the left event camera from t k-1 Time to t k The coordinate transformation matrix T at the moment k,k-1 , calculate t k The camera pose matrix T at this moment k The method is: 8.1, t k Time-surface representation of left-eye event camera adaptive event Do the inversion process, that is, subtract the gray value of each pixel from 255 to obtain the new gray value of the pixel, forming t k Moment left eye event camera adaptive event inverse Time-Surface representation 8.2, based on t k Moment left eye event camera adaptive event inverse Time-Surface representation t k-1 Refine the depth frame M at a moment k-1 ', using the 3D-2D registration algorithm, estimate the left event camera from t k-1 Time to t k The coordinate transformation matrix T at the moment k,k-1 , T k,k-1 is a 4×4 matrix, R k,k-1 t k-1 Time to t k The rotation matrix at time t is 3×3 in size. k,k-1 t k-1 Time to t k The translation vector at time t is 3×1 and is calculated based on t k-1 The camera pose matrix T at this moment k-1 , calculate t k The camera pose matrix T at this moment k :T k =T k-1 ·T k,k-1 .

7. A binocular visual odometer method based on an event camera as claimed in claim 1, characterized in that 9.4 step based on the depth frame M k , update t k The method of calculating the TSDF value and TSDF weight value of a voxel in a three-dimensional environment at any moment is: 9.4.1, let variable g = 1; 9.4.2, with the camera origin O k As the starting point, k and Rays Will The voxels that pass through are constructed into voxel subsets for The number of voxels traversed, for The hth voxel in 9.4.3, Update The TSDF value and TSDF weight value of the voxel in are: 9.4.3.1, let variable h = 1; 9.4.3.2, Update Voxels The TSDF value and TSDF weight value are as follows: 9.4.3.2.1, Calculation Temporary TSDF value of In formula (6) for The three-dimensional coordinates of the center point, sign() is the sign function, Indicates acquisition The positive and negative signs of 9.4.3.2.2, Calculation In t k Temporary weight value at the moment In formula (7) for The temporary depth weight of for The temporary uncertainty weight of According to formula (8), we can obtain: In formula (8), ρ is Center point depth, d t is the TSDF cutoff distance, set to 0.2m, ∈ is the voxel size, set to 0.05m; According to formula (9), we can get: In formula (9) for In the depth frame M k The uncertainty value of the corresponding depth point in is provided by the event inverse depth probability model constructed in 9.2, σ th is the uncertainty threshold, which is set to 1, and a and b are set to 20 and 40 respectively; 9.4.3.2.3, Update TSDF value In formula (10) and Before update TSDF value and weight value; 9.4.3.2.4, Update The weight value In formula (11), min() is the minimum function. Indicates taking and W MAX The minimum value in MAX is the upper weight threshold, set to 1; 9.4.3.3, let variable h = h + 1, if Go to 9.4.3.2, otherwise go to 9.4.4; 9.4.4, let variable g = g + 1, if g ≤ N k , go to 9.4.2, otherwise end.

8. A binocular visual odometer method based on an event camera as claimed in claim 1, characterized in that Step 9.5.2 The method for refining the depth value is: 9.5.2.1, with the camera origin O k As the starting point, k and Rays Will The voxels that pass through are constructed into voxel subsets for The total number of voxels traversed; 9.5.2.2, Selection The voxel whose TSDF value is closest to 0 The three-dimensional coordinates of the center point are 9.5.2.3, Calculation and The distance between To refine: 9.5.2.3.1, if the distance is less than or equal to the voxel side length, then it is considered Corresponding depth point The depth value is accurate, no refinement is needed, and the process ends; 9.5.2.3.2, if the distance is greater than the voxel size, calculate exist Projection point on by The coordinates are replaced by The coordinates of In-depth update Corresponding depth point The depth value of the depth point is completed The refinement of the depth value is finished.