Visual inertial navigation odometer method and device based on SuperPoint and line features, electronic equipment and storage medium
By combining SuperPoint and line feature detection, a visual inertial navigation odometry framework is established, and deep learning and geometric constraint optimization are used to solve the stability problem of visual inertial navigation odometry in harsh environments and improve navigation accuracy and robustness.
Patent Information
- Application Number
- CN202410891604.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-04
- Publication Date
- 2024-10-18
AI Technical Summary
Visual inertial navigation odometry has poor stability in harsh environments, and traditional algorithms are difficult to effectively utilize line features, resulting in insufficient navigation accuracy and robustness.
The SuperPoint feature point extraction algorithm and line feature detection based on deep learning are used, combined with IMU measurement data, and represented by Plucker coordinates and orthogonal coordinates to triangulate the two-dimensional point features and line features, establish geometric constraints, and optimize the position. posture to reduce the impact of noise.
It effectively overcomes sensor errors and environmental interference, improves navigation accuracy and robustness, and is suitable for indoor positioning, autonomous drone flight and robot navigation.
Smart Images

Figure CN118794430A_ABST
Abstract
Description
Technical Field
[0001] The present invention generally relates to the field of navigation technology, and in particular to visual inertial navigation, and specifically to a visual inertial navigation odometer method, device, electronic device and storage medium based on SuperPoint and line features. Background Art
[0002] Nowadays, with the development of computer vision technology, visual odometry has become an important choice for autonomous mobile navigation systems due to its strong adaptability. However, the environment faced by unmanned systems is becoming more and more complex, and visual feature extraction is inevitably affected by environmental interference, which has a great impact on the stability of visual inertial navigation odometry in harsh environments. Algorithms based on deep learning have data-driven characteristics and are naturally capable of resisting harsh environments, achieving results that traditional algorithms cannot achieve.
[0003] In addition, usually, the front end of the visual inertial odometry only extracts visual point features, while the more stable line features in the environment are ignored by many people, which can provide additional geometric constraints and thus improve numerical stability.
[0004] Therefore, it is necessary to conduct in-depth research on visual inertial odometry methods based on deep learning to at least partially solve the technical problems existing in the prior art. Summary of the invention
[0005] According to an exemplary embodiment of the present invention, a visual inertial navigation odometer method, apparatus, electronic device and storage medium based on SuperPoint and line features are provided to effectively overcome the interference of sensor errors and environmental changes and improve navigation accuracy and robustness.
[0006] In the first aspect of the present invention, a visual inertial navigation odometer method based on SuperPoint and line features is first provided, including: obtaining IMU measurement data and image data; pre-integrating the IMU measurement data, performing SuperPoint feature point detection and tracking on the image, and performing line feature detection and tracking to extract two-dimensional point features and line features; geometrically expressing the straight line, and establishing the Plücker coordinate representation and orthogonal coordinate representation of the straight line respectively; based on the Plücker coordinate representation of the straight line, triangulating the two-dimensional point features and line features to obtain three-dimensional space point features and line features; constructing geometric constraints for the IMU measurement data, three-dimensional space point features and line features to reduce the influence of noise; based on the orthogonal coordinate representation of the straight line, optimizing the camera's posture within the sliding window to obtain the optimized posture.
[0007] According to the visual inertial navigation odometry method provided by the present invention, a visual inertial navigation odometry framework using a feature point extraction algorithm SuperPoint based on deep learning and line features is used. In the front-end feature extraction part, SuperPoint feature points and line features are extracted from the input image respectively. In the back-end optimization part, geometric constraints are established for the point features and line features respectively to reduce the impact of noise and improve navigation accuracy and robustness.
[0008] Preferably, the SuperPoint feature point detection and tracking of the image includes:
[0009] Feature point detection: The network directly outputs the pixel coordinates with the highest confidence in the image as feature points, and also generates a descriptor for the feature point to distinguish it from other feature points.
[0010] Tracking uses the nearest neighbor matching method to match the feature points detected in two frames.
[0011] Preferably, the detecting and tracking of line features on an image includes:
[0012] Design non-maximum suppression (NMS) of line features, and when multiple lines are close, only retain the line with the longest length; preferably, the non-maximum suppression (NMS) of line features includes:
[0013] There are two straight lines L 1 and L 2 , calculate L 1 The starting and ending points are L 2 The distance d 1 and d 2 ;
[0014] Calculate L 1 The midpoint to L 2 The distance d from the midpoint 3 , where the distance formula from point (X, Y) to the straight line Ax+By+C=0 is:
[0015]
[0016] Add a deletion judgment logic. When d 1 , d 2 , d 3 <d thre When thre Indicates the minimum length threshold, delete L 1 and L 2 The shorter line in the middle.
[0017] Preferably, the step of geometrically expressing the straight line and establishing the Plücker coordinate representation of the straight line includes:
[0018] For a 3D line segment Lw ∈π w , expressed in Plücker coordinates:
[0019]
[0020] in is the direction vector of the line determined by its starting and ending points, n w is the line segment and π w The normal vector of the plane determined by the origin is calculated as follows:
[0021] Assume that the coordinates of the two endpoints of a space line segment are P 1 (x 1 ,y 1 , z 1 ) and P 2 (x 2 ,y 2 , z 2 ), then we have:
[0022] d ω =(x 2 -x 1 ,y 2 -y 1 , z 2 -z 1 ) (3)
[0023] n ω =P 1 ×d ω .
[0024] Preferably, the geometric expression of the straight line and the establishment of the orthogonal coordinate representation of the straight line include:
[0025] The orthogonal coordinates of the straight line can be expressed as L w =(U, W)∈SO(3)×SO(2), first define the rotation between the line coordinate system and the camera coordinate system as U, where U is a three-dimensional vector, denoted as:
[0026]
[0027] At the same time, the Plücker coordinate system is transformed into the following form:
[0028]
[0029] Combining equation (4) and equation (5), we can obtain:
[0030]
[0031] Define the distance W from the origin to the 3D line. W can be expressed by the trigonometric function of φ. The conversion relationship between W and the Plücker coordinate system is as follows:
[0032]
[0033] Therefore, a 3D line can be expressed in an orthogonal coordinate system using four degrees of freedom, namely o T =(u 1 ,u 2 ,u 3 , φ), where φ is the angle between vector n and vector d in the Plücker coordinate system.
[0034] Preferably, the triangulation processing of the two-dimensional point features and line features includes:
[0035] Assume that the camera origins of the two frames are P 1 and P 2 , the observations of the straight line in the two frames are I 1 and I 2 ;
[0036] First, I 1 and I 2 Back-project from the pixel coordinate system to the camera coordinate system, and then use P 1 and I 1 , P 2 and I 2 Determine the two planes π separately 1 and π 2 ;
[0037] Finally, the Plücker coordinates of the spatial straight line are determined by obtaining the intersection of the two planes, the three-dimensional spatial coordinates of the line are obtained, and the triangulation of the line is completed.
[0038] Preferably, the constructing geometric constraints for line features includes:
[0039] First, define the transformation equation of the line from the world coordinate system to the camera coordinate system, and let the transformation matrix be T cw =[R cw , t cw ], where R cw ∈SO(3),t cw is a three-dimensional vector, T cw Expressing the rotation and translation transformation relationship between the world coordinate system and the camera coordinate system, the transformation relationship of the line is:
[0040]
[0041] Next, transform the line from the camera coordinate system to the pixel coordinate system:
[0042]
[0043] Where K Lis the deformation of the camera intrinsic parameter matrix; n c and d c represents the Plücker coordinates of the line in the camera coordinate system; f x and f y Respectively represent the camera focal length in the x and y directions; c x and c y Respectively represent the coordinates of the center point of the pixel coordinate system in the x and y directions;
[0044] Finally, the reprojection error is calculated by calculating the point-to-line distance from the midpoint m of a line to another line. The final reprojection error can be written as:
[0045] r repro =d(m, l) (10)
[0046] Where d(m, l) represents the point-to-line distance from the midpoint m to the line l.
[0047] In a second aspect of the present invention, a visual inertial navigation odometer device based on SuperPoint and line features is provided, comprising:
[0048] A data acquisition module is configured to acquire IMU measurement data and image data;
[0049] A feature extraction module is configured to pre-integrate the IMU measurement data, perform SuperPoint feature point detection and tracking on the image, and perform line feature detection and tracking to extract two-dimensional point features and line features;
[0050] A triangulation processing module is configured to triangulate two-dimensional point features and line features to obtain three-dimensional space point features and line features;
[0051] A geometric constraint building module is configured to build geometric constraints on IMU measurement data, three-dimensional space point features and line features to reduce the impact of noise;
[0052] The sliding window optimization module is configured to optimize the camera's posture within the sliding window to obtain an optimized posture.
[0053] In a third aspect of the present invention, an electronic device is provided, the device comprising:
[0054] one or more processors; and
[0055] The memory is used to store one or more programs, and when the one or more programs are executed by the one or more processors, the method according to the first aspect of the present invention is implemented.
[0056] In a fourth aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the method according to the first aspect of the present invention is implemented.
[0057] Beneficial effects: The visual inertial navigation odometer method based on SuperPoint and line features provided by the present invention combines a visual sensor with an inertial measurement unit (IMU), uses a feature point extraction algorithm SuperPoint based on deep learning and a visual inertial navigation odometer framework based on line features, extracts SuperPoint feature points and line features from the input image in the front-end feature extraction part, and establishes geometric constraints for point features and line features in the back-end optimization part to reduce the impact of noise. Compared with navigation using a visual sensor or an inertial measurement unit alone, it can effectively overcome the interference of sensor errors and environmental changes, improve navigation accuracy and robustness, and can be used to achieve tasks such as indoor positioning, autonomous flight of drones, and robot navigation.
[0058] It should be understood that the contents described in the Summary of the Invention section are not intended to limit the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easy to understand through the following description. In addition, the implementation of any embodiment of the present invention does not mean that multiple or all of the above-mentioned beneficial effects must be possessed or achieved at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.
[0060] The structures, proportions, sizes, etc. illustrated in this specification are only used to match the contents disclosed in the specification so as to facilitate understanding and reading by persons familiar with the technology. They are not used to limit the conditions under which the present invention can be implemented, and therefore have no substantial technical significance. Any structural modification, change in proportion or adjustment in size shall still fall within the scope of the technical contents disclosed in the present invention without affecting the effects and purposes that can be achieved by the present invention.
[0061] Figure 1 A schematic diagram of the overall framework structure of a visual inertial navigation odometer method according to some embodiments of the present invention is shown;
[0062] Figure 2 A flowchart of a visual inertial odometer method according to some embodiments of the present invention is shown;
[0063] Figure 3 Schematic diagrams showing the comparison before and after non-maximum suppression (NMS) of a straight line according to some embodiments of the present invention are shown, wherein (a) shows the effect before NMS, and (b) shows the effect after NMS;
[0064] Figure 4 A schematic diagram of factors for sliding window optimization according to some embodiments of the present invention is shown;
[0065] Figure 5 A schematic block diagram of a visual inertial odometer device according to some embodiments of the present invention is shown;
[0066] Figure 6 A schematic block diagram of an electronic device according to some embodiments of the present invention is shown; and
[0067] Figure 7 A block diagram of a computing device capable of implementing various embodiments of the present invention is shown.
[0068] In the various drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION
[0069] In order to make the purpose, technical solution and advantages of the embodiments of the present invention more clearly understood, the embodiments of the present invention are further described in detail below in conjunction with the embodiments and drawings. Here, the illustrative embodiments of the present invention and their description are used to explain the present invention, but are not intended to limit the present invention.
[0070] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0071] It should be understood that the terms "include / comprise", "consist of..." or any other variations are intended to cover non-exclusive inclusion, so that a product, device, process or method that includes a series of elements includes not only those elements, but also may include other elements not explicitly listed when necessary, or also includes elements inherent to such product, device, process or method. In the absence of more restrictions, the elements defined by the sentence "include / comprise...", "consist of..." do not exclude the presence of other identical elements in the product, device, process or method that includes the elements.
[0072] It is also necessary to understand that terms such as "upper", "lower", "front", "back", "left", "right", "top", "bottom", "inside" and "outside" to indicate directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the referred device, component or structure must have a specific direction, be constructed or operate in a specific direction, and should not be understood as a limitation on the present invention.
[0073] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0074] Visual inertial navigation, as the name implies, is a combination of vision navigation and inertial navigation. It is a navigation technology that combines visual sensors with inertial measurement units (IMUs), and can be used to achieve indoor positioning, autonomous flight of drones, robot navigation, etc. Compared with navigation using visual sensors or inertial measurement units (IMUs) alone, visual inertial navigation can effectively overcome the interference of sensor errors and environmental changes, and improve navigation accuracy and robustness.
[0075] Based on this, the present invention designs a visual inertial odometry framework using a feature point extraction algorithm SuperPoint based on deep learning and line features, such as Figure 1 As shown in the figure, based on the Vins Mono framework, first in the front-end feature extraction part, SuperPoint feature points and line features are extracted from the input image respectively, and then in the back-end optimization part, geometric constraints are established for the point features and line features respectively to reduce the impact of noise and achieve higher accuracy and robustness.
[0076] As used in the present invention, the term "vision navigation" is a navigation technology that uses sensors to perceive surrounding environment information as the basis for aircraft flight. The term "inertial navigation" is a technology that obtains the instantaneous speed and position data of the aircraft by measuring the acceleration of the aircraft and automatically performing integration operations. The term "inertial measurement unit (IMU)" is a device that measures the three-axis attitude angle (or angular rate) and acceleration of an object.
[0077] As used herein, the term “visual-inertial odometry (VIO)” is also referred to as “visual-inertial odometry” and sometimes also called visual-inertial system (VINS).
[0078] The following will combine Figures 1 to 7 Exemplary embodiments according to the present invention are described in more detail.
[0079] See first Figure 2 , which exemplarily shows the overall process of a visual inertial navigation odometer method 100 based on SuperPoint and line features in an embodiment of the present invention, mainly including: S101, obtaining IMU measurement data and image data; S103, pre-integrating the IMU measurement data, performing SuperPoint feature point detection and tracking on the image, and performing line feature detection and tracking to extract two-dimensional point features and line features; S105, geometrically expressing the straight line, and establishing the Plücker coordinate representation and orthogonal coordinate representation of the straight line respectively; S107, based on the Plücker coordinate representation of the straight line, triangulating the two-dimensional point features and line features to obtain three-dimensional space point features and line features; S109, constructing geometric constraints for the IMU measurement data, three-dimensional space point features and line features to reduce the influence of noise; S111, based on the orthogonal coordinate representation of the straight line, optimizing the camera posture in the sliding window to obtain the optimized posture.
[0080] It should be understood that Figure 1 The general process of the visual inertial odometer method 100 is described only for exemplary purposes, and does not imply any limitation on the scope of the present invention. The embodiments of the present invention may also include other preceding links and / or subsequent links according to specific circumstances and needs, such as calibration and debugging of the device before data collection, input after data collection, initialization after front-end feature extraction, and necessary loop detection in the entire process, etc.
[0081] In block 101 , IMU measurement data and image data are first acquired.
[0082] Specifically, IMU measurement data can obtain angular velocity and linear acceleration information from the IMU, and image data can be obtained from the mounted camera.
[0083] Combination Figure 1 In block 103, the embodiment of the present invention pre-integrates the IMU measurement data.
[0084] The process quantity in the normal IMU integration formula is related to the state quantity. When optimizing later, the state value at the historical moment is usually modified, which causes all subsequent state quantities to be re-integrated, which takes a lot of time to calculate, thus introducing the concept of pre-integration.
[0085] The principle of pre-integration is the same as that of direct integration. The only difference is that pre-integration describes the IMU cumulative value of the left and right intervals between two key frame moments, but does not include the estimated value at the endpoints of the interval. In this way, when the state value at the endpoint changes, it is only necessary to add the pre-integration value to the modified value without re-integration calculation, thus saving computational overhead.
[0086] So the pre-integral is defined as:
[0087]
[0088] It can be seen that compared with direct integration, pre-integration moves the state values of the two moments to the left side of the equation to distinguish them from the observed values when calculating the integral from time i to j, thereby achieving the purpose of distinguishing the state quantity from the observed quantity. Pre-integration assumes that the bias of the IMU remains unchanged during the time period, but this is obviously unrealistic, so the accurate system also needs to calculate the partial derivative with respect to the bias to consider the change of the bias.
[0089] In block 103 , the embodiment of the present invention further performs SuperPoint feature point detection and tracking on the image to extract two-dimensional point features.
[0090] The feature point detection algorithm is a very important module in computer vision. It usually acts as the front end of other computer vision tasks, such as SFM, SLAM, etc. It is responsible for extracting pixels with obvious features, accurate positioning, and easy to distinguish from the images captured by the camera to serve downstream fields. With the increasing complexity of application scenarios, traditional feature point extraction algorithms are increasingly unable to meet actual application needs.
[0091] In recent years, feature point detection algorithms have begun to transition from traditional algorithms to deep learning-based methods. SuperPoint is one of the very excellent algorithms and one of the earliest algorithms that combines deep learning with feature point extraction.
[0092] In the embodiment of the present invention, detecting and tracking SuperPoint feature points on an image includes:
[0093] Feature point detection: The network directly outputs the pixel coordinates with the highest confidence in the image as feature points, and also generates a descriptor for the feature point to distinguish it from other feature points.
[0094] Tracking uses the nearest neighbor matching method to match the feature points detected in two frames.
[0095] By performing SuperPoint feature point detection and tracking on the image, two-dimensional point features are extracted, which is more robust in extreme environments.
[0096] At the same time, in frame 103, the embodiment of the present invention also performs line feature detection and tracking on the image to extract two-dimensional line features.
[0097] In this process, when detecting and tracking line features in an image, the LSD algorithm is used to detect line features, and the LBD description method is used to generate line descriptors. Line features are often detected in large quantities at repeated features, but the line feature description cannot effectively distinguish them, resulting in an increased probability of line feature matching errors.
[0098] To this end, an embodiment of the present invention designs an NMS (non-maximum suppression) algorithm for line features, which performs non-maximum suppression on straight lines. When multiple lines are too close, only the line with the longest length is retained. The purpose is to avoid line features being too dense at repeated features, making line feature detection more uniform while also suppressing the reporting of unstable short lines.
[0099] In some embodiments, non-maximum suppression (NMS) of line features includes:
[0100] There are two straight lines L 1 and L 2 , calculate L 1 The starting and ending points are L 2 The distance d 1 and d 2 ;
[0101] Calculate L 1 The midpoint to L 2 The distance d from the midpoint 3 , where the distance formula from point (X, Y) to the line Ax+By+C=0 is:
[0102]
[0103] Add a deletion judgment logic. When d 1 ,d 2 ,d 3 <d thre When thre Indicates the minimum length threshold, delete L 1 and L 2 The shorter line in the middle. Figure 3 As shown, Figure 3 The figure shows the comparison effect before and after NMS. It is obvious that in the area where two or more straight lines appear in the figure, only the longest straight line is retained after NMS, which increases the distinguishability of the descriptor and improves the matching accuracy.
[0104] In the subsequent straight line projection and straight line triangulation processes, as well as in the posture optimization process, a coordinate system is required to geometrically express the straight line in three-dimensional space. Therefore, in frame 105, the present invention geometrically expresses the straight line and establishes the Plücker coordinate representation and orthogonal coordinate representation of the straight line respectively.
[0105] In some embodiments, geometrically expressing the straight line and establishing the Plücker coordinate representation of the straight line includes:
[0106] For a 3D line segment L w ∈π w , expressed in Plücker coordinates:
[0107]
[0108] in is the direction vector of the line determined by its starting and ending points, n w is the line segment and π w The normal vector of the plane determined by the origin.
[0109] n w and π w The specific calculation method is:
[0110] Assume that the coordinates of the two endpoints of a space line segment are P 1 (x 1 ,y 1 ,z 1 ) and P 2 (x 2 ,y 2 ,z 2 ), then we have:
[0111] d ω =(x 2 -x 1 ,y 2 -y 1 ,z 2 -z 1 ) (3)
[0112] n ω =P 1 ×d ω
[0113] However, a 3D line has 6 degrees of freedom in the Plücker coordinate system, while a 3D line can be represented by at least 4 degrees of freedom. The increased number of degrees of freedom will slow down the convergence speed in the optimization stage and reduce the numerical stability. Therefore, the present invention introduces an orthogonal expression of 3D lines, which has only four degrees of freedom and converges faster than the Plücker coordinate system.
[0114] In some embodiments, geometrically expressing the straight line and establishing an orthogonal coordinate representation of the straight line include:
[0115] The orthogonal coordinates of the straight line can be expressed as L w =(U,W)∈SO(3)×SO(2), first define the rotation between the line coordinate system and the camera coordinate system as U, where U is a three-dimensional vector, denoted as:
[0116]
[0117] At the same time, the Plücker coordinate system is transformed into the following form:
[0118]
[0119] Combining equation (4) and equation (5), we can obtain:
[0120]
[0121] Define the distance W from the origin to the 3D line. The degree of freedom of W is 1 and can be expressed by the trigonometric function of φ. The conversion relationship between W and the Plücker coordinate system is as follows:
[0122]
[0123] Therefore, a 3D line can be expressed in an orthogonal coordinate system using four degrees of freedom, namely o T =(u 1 ,u 2 ,u 3 ,φ), where φ is the angle between vector n and vector d in the Plücker coordinate system.
[0124] Similarly, the Plücker coordinate system can be obtained from the orthogonal coordinate system:
[0125]
[0126] It should be noted that the Plücker coordinate system and the orthogonal coordinate system each have their own advantages and disadvantages. The Plücker line can more conveniently express the projection relationship of the straight line, while the orthogonal coordinate system has the advantage of fewer variables to be optimized during the optimization process. Therefore, the present invention uses the Plücker coordinate system to represent straight line projection and straight line triangulation, and uses the orthogonal coordinate system in the posture optimization process.
[0127] Similar to point features, line features need to determine their spatial depth for subsequent optimization. If it is a monocular camera, it also needs to be triangulated between multiple images. Therefore, in box 107, the present invention continues to triangulate the two-dimensional line features.
[0128] The triangulation of a line requires at least two frames to observe the same spatial line. Since the Plücker line can more conveniently express the projection relationship of the line, in some embodiments, the present invention uses the Plücker coordinate representation of the line to triangulate the two-dimensional line feature by determining a line through the intersection of two planes. The details are as follows:
[0129] Assume that the camera origins of the two frames are P 1 and P 2 , the observations of the straight line in the two frames are I 1 and I 2 ;
[0130] First, I 1 and I 2 Back-project from the pixel coordinate system to the camera coordinate system, and then use P 1 and I 1 , P 2 and I 2 Determine the two planes π separately 1 and π 2 ;
[0131] Finally, the Plücker coordinates of the spatial straight line are determined by obtaining the intersection of the two planes, the three-dimensional spatial coordinates of the line are obtained, and the triangulation of the line is completed.
[0132] Continue to combine Figure 1 ,The visual residual includes point error and line error, and it is necessary to optimize the three residuals including IMU residual, point reprojection error and line reprojection error.
[0133] In block 109 , the embodiment of the present invention constructs geometric constraints on the IMU measurement data, three-dimensional space point features, and line features to reduce the impact of noise.
[0134] The calculation form of the reprojection error of point features is already very stable and mature, but there is no standard method for the reprojection error of line features.
[0135] In some embodiments, geometric constraints on line features are constructed by modeling the distance from a point to a straight line, including:
[0136] First, define the transformation equation of the line from the world coordinate system to the camera coordinate system, and let the transformation matrix be T cw =[R cw ,t cw ], where R cw ∈SO(3),t cw is a three-dimensional vector, T cw Expressing the rotation and translation transformation relationship between the world coordinate system and the camera coordinate system, the transformation relationship of the line is:
[0137]
[0138] Next, transform the line from the camera coordinate system to the pixel coordinate system:
[0139]
[0140] Where K L is the deformation of the camera intrinsic parameter matrix; n c and d c represents the Plücker coordinates of the line in the camera coordinate system; f x and f y Respectively represent the camera focal length in the x and y directions; c x and c y Respectively represent the coordinates of the center point of the pixel coordinate system in the x and y directions;
[0141] Finally, the reprojection error is calculated by calculating the point-to-line distance from the midpoint m of a line to another line. The final reprojection error can be written as:
[0142] r repro =d(m,l) (11)
[0143] Where d(m,l) represents the point-to-line distance from the midpoint m to the line l, and the specific content is shown in formula (1).
[0144] Continue to combine Figure 1 In box 111, since the orthogonal coordinate system has the advantage of fewer variables to be optimized during the optimization process, the embodiment of the present invention is based on the orthogonal coordinate representation of the straight line, and optimizes the camera posture in the sliding window. The sliding window optimization will optimize the three residuals of IMU residual, point reprojection error, and line reprojection error. The sum of these three residuals is minimized using the least squares method to obtain the optimized posture.
[0145] The construction of constraints between various elements is as follows Figure 4 As shown in the figure, the camera can observe the point features and line features in the image, which establishes constraints between the camera poses that can observe them. The IMU pre-integration can establish constraints between the pose changes between two key frames. When a loop is detected, global optimization is performed.
[0146] In order to limit the amount of calculation, the constraints of the embodiment of the present invention are limited to the range of the sliding window, which slides forward over time. Specifically, the sliding window size can be set to 10 frames. The pose optimization is specifically performed as follows:
[0147] Assume that the total optimized residual within the sliding window is e, which consists of four items: visual factor, inertial factor, parameter marginalization and closed-loop detection factor:
[0148] e=e visual +e IMU+e loop +e marg (1)
[0149] The nonlinear optimization library used is ceres, the nonlinear optimization method used is LM method, and the maximum single optimization time is set to 0.04ms.
[0150] Figure 5 FIG. 3 is a schematic block diagram of a visual inertial navigation odometer device 300 based on SuperPoint and line features according to some embodiments of the present invention. Figure 5 As shown, the visual inertial navigation odometer device 300 includes a data acquisition module 301, a feature extraction module 303, a triangulation processing module 305, a geometric constraint construction module 307, and a sliding window optimization module 309.
[0151] The data acquisition module 301 is configured to acquire IMU measurement data and image data;
[0152] The feature extraction module 303 is configured to be able to pre-integrate the IMU measurement data, perform SuperPoint feature point detection and tracking on the image, and perform line feature detection and tracking to extract two-dimensional point features and line features;
[0153] The triangulation processing module 305 is configured to triangulate the two-dimensional point features and line features to obtain three-dimensional space point features and line features;
[0154] The geometric constraint building module 307 is configured to build geometric constraints on IMU measurement data, three-dimensional space point features and line features to reduce the impact of noise;
[0155] The sliding window optimization module 309 is configured to perform optimization within the sliding window to obtain an optimized pose.
[0156] Figure 6 1 is a schematic block diagram of an example electronic device 500 that can be used to implement an embodiment of the present invention. The electronic device 500 can be used to implement Figure 2 The operations in the visual inertial odometer method 100 shown. The electronic device 500 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown in the present invention, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required in the present invention.
[0157] like Figure 7 As shown, the electronic device 500 is a computing device, or a computer system, which may include a CPU 501 (computing unit), which can perform various appropriate actions and processes according to a computer program stored in a ROM 502 (read-only memory) or a computer program loaded from a storage unit 508 into a random access RAM 503 (memory). In the RAM 503, various programs and data required for the operation of the device 500 may also be stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An I / O interface 505 (input / output interface) is also connected to the bus 504.
[0158] A number of components in the electronic device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0159] CPU 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of CPU 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. CPU 501 performs the various methods and processes described above, such as the visual inertial odometer method 100. For example, in some embodiments, the visual inertial odometer method 100 may be implemented as a computer software program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by CPU 501, one or more steps of the visual inertial odometer method 100 described above may be performed. Alternatively, in other embodiments, the CPU 501 may be configured to execute the visual inertial odometry method 100 in any other suitable manner (eg, by means of firmware).
[0160] Various embodiments of the systems and techniques described above in the present invention can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0161] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0162] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may be a machine-readable signal medium or a machine-readable storage medium. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a computer-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0163] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0164] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0165] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server for a distributed system, or a server combined with a blockchain.
[0166] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in the present disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution disclosed in the present disclosure can be achieved, and the present invention is not limited here.
[0167] The embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used in the present invention is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed in the present invention.
[0168] Although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present invention. Certain features described in the context of separate embodiments may also be implemented in a single implementation in combination. On the contrary, the various features described in the context of a single implementation may also be implemented in multiple implementations individually or in any suitable sub-combination.
Claims
1. A visual inertial navigation odometer method based on SuperPoint and line features, characterized in that: include: Obtain IMU measurement data and image data; Pre-integrate IMU measurement data, perform SuperPoint feature point detection and tracking on the image, perform line feature detection and tracking, and extract two-dimensional point features and line features; To express the straight line geometrically, establish the Plücker coordinate representation and orthogonal coordinate representation of the straight line respectively; Based on the Plücker coordinate representation of the straight line, the two-dimensional point features and line features are triangulated to obtain the three-dimensional space point features and line features; Construct geometric constraints on IMU measurement data, 3D space point features and line features to reduce the impact of noise; Based on the orthogonal coordinate representation of the straight line, the camera's pose is optimized within the sliding window to obtain the optimized pose.
2. The method according to claim 1, characterized in that The SuperPoint feature point detection and tracking of the image includes: Feature point detection: The network directly outputs the pixel coordinates with the highest confidence in the image as feature points, and also generates a descriptor for the feature point to distinguish it from other feature points. Tracking uses the nearest neighbor matching method to match the feature points detected in two frames.
3. The method according to claim 1, characterized in that The line feature detection and tracking of the image comprises: Design non-maximum suppression (NMS) of line features, and when multiple lines are close, only retain the line with the longest length; preferably, the non-maximum suppression (NMS) of line features includes: Suppose there are two straight lines L1 and L2, calculate the distances d1 and d2 from the starting point and end point of L1 to L2 respectively; Calculate the distance d3 from the midpoint of L1 to the midpoint of L2, where the distance formula from point (X, Y) to the line Ax+By+C=0 is: Add a deletion judgment logic, when d1, d2, d3 < d thre When thre Indicates the minimum length threshold, and deletes the shorter line between L1 and L2.
4. The method according to claim 1, characterized in that: The geometric expression of the straight line and the establishment of the Plücker coordinate representation of the straight line include: For a 3D line segment L w ∈π w , expressed in Plücker coordinates: in is the direction vector of the line determined by its starting and ending points, n w is the line segment and π w The normal vector of the plane determined by the origin is calculated as follows: Assume that the coordinates of the two endpoints of a space line segment are P1(x1,y1,z1) and P2(x2,y2,z2), then: <h2 style=";text-align:left;direction:ltr">d<h2 style=";text-align:left;direction:ltr"> ω <h2 style=";text-align:left;direction:ltr"> (x2-x1,y2-y1,z2-z1)(3)n<h2 style=";text-align:left;direction:ltr"> ω <h2 style=";text-align:left;direction:ltr"> =P1×d<h2 style=";text-align:left;direction:ltr"> ω <h2 style=";text-align:left;direction:ltr"> 。 5. The method according to claim 1, characterized in that The geometric expression of the straight line and the establishment of the orthogonal coordinate representation of the straight line include: The orthogonal coordinates of the straight line can be expressed as L w =(U,W)∈SO(3)×SO(2), first define the rotation between the line coordinate system and the camera coordinate system as U, where U is a three-dimensional vector, denoted as: At the same time, the Plücker coordinate system is transformed into the following form: Combining equation (4) and equation (5), we can obtain: Define the distance W from the origin to the 3D line. W can be expressed by the trigonometric function of φ. The conversion relationship between W and the Plücker coordinate system is as follows: Therefore, a 3D line can be expressed in an orthogonal coordinate system using four degrees of freedom, namely o T =(u1,u2,u3,φ), where φ is the angle between vector n and vector d in the Plücker coordinate system.
6. The method according to claim 1, characterized in that The triangulation processing of the two-dimensional point features and line features includes: Assume that the camera origins of the two frames are P1 and P2 respectively, and the observations of the straight line in the two frames are I1 and I2 respectively; First, I1 and I2 are back-projected from the pixel coordinate system to the camera coordinate system, and then two planes π1 and π2 are determined respectively using P1 and I1, P2 and I2; Finally, the Plücker coordinates of the spatial straight line are determined by obtaining the intersection of the two planes, the three-dimensional spatial coordinates of the line are obtained, and the triangulation of the line is completed.
7. The method according to claim 1, characterized in that The geometric constraints for the line features include: First, define the transformation equation of the line from the world coordinate system to the camera coordinate system, and let the transformation matrix be T cw =[R cw ,t cw ], where R cw ∈SO(3),t cw is a three-dimensional vector, T cw Expressing the rotation and translation transformation relationship between the world coordinate system and the camera coordinate system, the transformation relationship of the line is: Next, transform the line from the camera coordinate system to the pixel coordinate system: Where K L is the deformation of the camera intrinsic parameter matrix; n c and d C represents the Plücker coordinates of the line in the camera coordinate system; f x and f y Respectively represent the camera focal length in the x and y directions; c x and c y Respectively represent the coordinates of the center point of the pixel coordinate system in the x and y directions; Finally, the reprojection error is calculated by calculating the point-to-line distance from the midpoint m of a line to another line. The final reprojection error can be written as: r repro =d(m,l)(10)where d(m,l) represents the point-to-line distance from the midpoint m to the line l.
8. A visual inertial navigation odometer device based on SuperPoint and line features, characterized in that: include: A data acquisition module is configured to acquire IMU measurement data and image data; A feature extraction module is configured to pre-integrate the IMU measurement data, perform SuperPoint feature point detection and tracking on the image, and perform line feature detection and tracking to extract two-dimensional point features and line features; A triangulation processing module is configured to triangulate two-dimensional point features and line features to obtain three-dimensional space point features and line features; A geometric constraint building module is configured to build geometric constraints on IMU measurement data, three-dimensional space point features and line features to reduce the impact of noise; The sliding window optimization module is configured to optimize the camera's posture within the sliding window to obtain an optimized posture.
9. An electronic device, comprising: one or more processors; as well as A memory for storing one or more programs, which implements the method according to any one of claims 1 to 7 when the one or more programs are executed by the one or more processors.
10. A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method according to any one of claims 1 to 7 when executed by a processor.
