Visual-inertial state estimation method, apparatus, device, and medium
By using real-time feature matching and dynamic weight adjustment, the problem of visual constraint degradation in visual-inertial SLAM systems during rapid rotation is solved, improving positioning accuracy and robustness, and achieving high-precision navigation in visually degraded scenarios.
Patent Information
- Application Number
- CN202611227812.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-13
- Publication Date
- 2026-11-27
AI Technical Summary
Existing vision-inertial SLAM systems suffer severe degradation of visual reprojection constraints when the carrier rotates rapidly, leading to decreased positioning accuracy, increased cumulative drift, and even tracking loss.
By acquiring images and inertial measurement data in real time, feature matching and tracking are performed. The number of long-tracking feature points and new feature points is counted to determine the degree of visual degradation. Visual and inertial weights are dynamically adjusted, inertial pre-integration residuals and visual reprojection residuals are constructed, and the objective function is iteratively solved to improve positioning accuracy.
Under visual degradation conditions, the positioning accuracy and system robustness are improved, avoiding the problem of visual constraint degradation caused by rapid rotation, and ensuring the accuracy of real-time positioning.
Smart Images

Figure CN123175255A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of navigation technology, and in particular to a visual inertial state estimation method, apparatus, device, and medium. Background Technology
[0002] Simultaneous Localization and Mapping (SLAM) is key to enabling robots to navigate autonomously in unknown environments and has broad application prospects in fields such as augmented reality, drones, and autonomous driving.
[0003] Limited by current hardware performance and the high throughput of visual data, mainstream vision-inertial SLAM systems typically employ low image sampling rates. When the vehicle undergoes rapid rotation, the overlapping area of the field of view between adjacent frames decreases drastically, resulting in a sharp reduction or even complete loss of the number of stable feature points available for matching. Simultaneously, high angular velocity motion causes severe motion blur in the image, significantly degrading the detection and tracking quality of feature points. These two factors lead to severe degradation or even complete interruption of visual reprojection constraints, resulting in decreased tracking accuracy, increased cumulative drift, and even tracking loss. Summary of the Invention
[0004] This invention provides a visual inertial state estimation method, apparatus, device, and medium that can improve positioning accuracy.
[0005] According to one aspect of the present invention, a visual inertial state estimation method is provided, the method comprising: Real-time acquisition of current image and aligned current inertial measurement data during task execution; Feature matching and tracking are performed on the current image and historical images of the same task to determine the tracking feature point information of the current image; Based on the tracking feature point information of the current image, the first number of long-tracking feature points and the second number of newly appearing feature points are counted, and the degree of visual degradation is determined based on the first number and the second number. Based on the degree of visual degradation, visual weights and inertial weights are determined. The visual weights are negatively correlated with the degree of visual degradation, and the inertial weights are positively correlated with the degree of visual degradation. The current inertial measurement data and the historical inertial measurement data between the current image and the previous key image are pre-integrated to construct the inertial pre-integration residual; Based on the tracked feature point information, a visual reprojection residual is constructed; Based on the visual weights, the inertial weights, the inertial pre-integration residuals, the visual reprojection residuals, and the marginalization prior constraints, an objective function is constructed. The objective function is solved iteratively to obtain the motion state estimation result of the current image, which includes the current position, current velocity, and current attitude.
[0006] According to one aspect of the present invention, a visual inertial state estimation device is provided, the device comprising: The data acquisition module is used to collect the current image and aligned current inertial measurement data in real time during task execution; The feature tracking module is used to perform feature matching and tracking on the current image and historical images of the same task, and to determine the tracking feature point information of the current image; The visual degradation assessment module is used to count the first number of long-tracking feature points and the second number of newly appearing feature points based on the tracking feature point information of the current image, and to determine the degree of visual degradation based on the first number and the second number. A weight generation module is used to determine visual weights and inertial weights based on the degree of visual degradation, wherein the visual weights are negatively correlated with the degree of visual degradation, and the inertial weights are positively correlated with the degree of visual degradation. The first residual construction module is used to pre-integrate the current inertial measurement data and the historical inertial measurement data between the current image and the previous key image to construct the inertial pre-integration residual. The second residual construction module is used to construct a visual reprojection residual based on the tracking feature point information; The objective function construction module is used to construct an objective function based on the visual weights, the inertial weights, the inertial pre-integration residuals, the visual reprojection residuals, and the marginalization prior constraints. The optimization solution module is used to iteratively solve the objective function to obtain the motion state estimation result of the current image, which includes the current position, current velocity, and current attitude.
[0007] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the visual inertial state estimation method according to any embodiment of the present invention.
[0008] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the visual inertial state estimation method according to any embodiment of the present invention.
[0009] The technical solution of this invention acquires current image and inertial measurement data in real time, and performs feature matching and tracking between the current image and historical images to determine tracking feature point information, providing a data foundation for subsequent visual degradation assessment and residual construction. The degree of visual degradation is determined by statistically analyzing the first number of long-tracking feature points and the second number of newly appearing feature points. This degree of visual degradation reflects the stability and reliability of the current visual observation; typically, the degree of visual degradation increases when the number of long-tracking feature points decreases and the number of new feature points increases. Based on this, visual weights and inertial weights are determined, making the visual weights negatively correlated with the degree of visual degradation and the inertial weights positively correlated. This reduces the impact of visual observation on pose estimation and enhances the contribution of inertial measurement during visual degradation, solving the problem of visual degradation caused by rapid rotation. This addresses the issue of decreased positioning accuracy due to visual degradation. By pre-integrating current inertial measurement data and historical inertial measurement data between the current image and the previous key image to construct an inertial pre-integration residual, and constructing a visual reprojection residual based on tracking feature point information, an objective function is iteratively solved based on visual weights, inertial weights, inertial pre-integration residuals, visual reprojection residuals, and marginalization prior constraints. This allows the inertial pre-integration residuals and visual reprojection residuals to participate in optimization after being adjusted by differentiated weights related to the degree of visual degradation. As a result, when visual constraints weaken, inertial measurement can take over the dominant role in state estimation, solving the problem of increased cumulative drift and even tracking loss under visual degradation conditions. Therefore, while ensuring real-time performance, this improves positioning accuracy and system robustness in visual degradation scenarios such as rapid rotation.
[0010] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a flowchart of a visual inertial state estimation method provided according to an embodiment of the present invention; Figure 2 This is a scene diagram of a visual inertial state estimation method provided according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of a visual inertial state estimation device according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device that implements the visual inertial state estimation method of the present invention. Detailed Implementation
[0013] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0014] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0015] Figure 1 This is a flowchart illustrating a visual inertial state estimation method provided in an embodiment of the present invention. This invention is applicable to integrated navigation and positioning in land and low-altitude scenarios, and is particularly suitable for robots equipped with binocular cameras and inertial measurement units to perform positioning and navigation in scenarios where rapid rotation or drastic changes in viewing angle cause visual constraint degradation. The method can be executed by a visual inertial state estimation device, which can be implemented in hardware and / or software. The visual inertial state estimation device can be configured in a robot, terminal device, or server.
[0016] See Figure 1 The visual inertial state estimation method shown includes: S101. Real-time acquisition of the current image and aligned current inertial measurement data during task execution.
[0017] The images are acquired by an image acquisition device, which can be a monocular camera, a binocular camera, or a depth camera, and there can be one or more of these devices. Inertial measurement data is acquired by an Inertial Measurement Unit (IMU), which incorporates a three-axis accelerometer and a three-axis gyroscope to measure the three-axis acceleration and angular velocity of the carrier. Accordingly, the inertial measurement data can include three-axis acceleration and three-axis angular velocity, etc. Real-time refers to the image acquisition device continuously acquiring image data at a set frame rate, while the IMU continuously acquires inertial measurement data at a frequency higher than the image frame rate. The acquisition action is synchronized with the carrier's movement. During task execution, this can refer to the entire operational period from when the carrier receives the navigation task command to when the task is completed. During this period, image acquisition and inertial measurement continue, providing continuous sensor data input for navigation and positioning. The sensor data can include both image and inertial measurement data. Alignment refers to marking each frame of image data and each frame of inertial measurement data with a timestamp from the same clock source, synchronizing the image data and inertial measurement data in time for subsequent fusion processing. In one example, a robot equipped with a binocular camera and an inertial measurement unit (IMU) performs a transport task. The binocular camera acquires images from both eyes at a frequency of 30 frames per second, while the IMU acquires acceleration and angular velocity data at a frequency of 200 Hz. The system marks each frame of image and each piece of inertial measurement data with a timestamp from the same clock source and caches them in the image queue and inertial measurement queue respectively, sorted by timestamp. "Current" can refer to the most recently acquired sensor data.
[0018] In some embodiments, observation information from the Global Navigation Satellite System (GNSS) can also be acquired; the GNSS observation information is synchronized with the image and the inertial measurement data in time and used as a third navigation source for auxiliary navigation and positioning in outdoor environments.
[0019] S102. Perform feature matching and tracking on the current image and historical images of the same task to determine the tracking feature point information of the current image.
[0020] In this context, historical images for the same task refer to all images acquired from the start of the current task up to the current frame (the time corresponding to the current image). These historical images contain the trajectory information of extracted and tracked feature points, and are used to establish a temporal association with the current image. Feature matching refers to establishing a correspondence between feature points extracted from the current image and existing feature points in historical images. Feature tracking refers to continuously tracking the pixel position changes of the same feature point between adjacent frames. Feature matching and tracking can be implemented using optical flow or feature descriptor matching. Optical flow infers the position changes of feature points by calculating the gray-level gradient changes of pixels between adjacent frames. Feature descriptor matching achieves matching by calculating the descriptors of the local pixel textures around the feature point and comparing their similarity. Tracked feature point information can refer to the attribute data of each effective feature point in the current image. Tracked feature point information can include the pixel coordinates, feature identifier, first observation frame (first image) number, and continuous tracking length of each effective feature point in the current image.
[0021] By performing inter-frame association between the current image and historical images, the system determines which feature points in the current image are traced from historical images, as well as the unique identifier and continuous tracking length of each feature point. This provides a basis for the identification and statistical analysis of subsequent long-tracking features and new features. In one example, the system uses a sparse optical flow algorithm to track feature points between the current and previous frames. It projects the feature points existing in the previous frame into the current frame to obtain the pixel coordinates of each feature point in the current frame and maintains the continuous tracking length for each successfully matched feature point.
[0022] S103. Based on the tracking feature point information of the current image, count the first number of long-tracking feature points and the second number of newly appearing feature points, and determine the degree of visual degradation based on the first number and the second number.
[0023] Among them, long-tracking feature points refer to feature points whose continuous tracking length is greater than or equal to a preset threshold. The preset threshold can be 5 frames, i.e., 5 images or 5 acquisition intervals. The number of long-tracking feature points reflects the stability of visual observation. A higher number indicates that more feature points can be continuously tracked over a longer time span, indicating relatively stable carrier movement and good image quality. A lower number indicates that feature points are lost quickly, indicating that the carrier is in a state of rapid movement or deteriorating image quality, and insufficient stability of visual observation. Newly appearing feature points can refer to feature points extracted in the current image but not present in the effective feature identifier set of the previous image or the previous key image. The number of new feature points reflects the degree of change in visual observation. A higher number indicates that more old features are lost and new features are introduced, indicating a drastic change in perspective. A lower number indicates that most feature points in the current frame are from historical tracking, indicating a gradual change in perspective, less new content entering the field of view, and a low degree of change in visual observation. Visual degradation degree is used to quantify the reliability of the current visual observation. The degree of visual degradation can be considered the reliability of the current visual observation. An increased degree of visual degradation indicates a decrease in visual observation quality, while a decreased degree of visual degradation indicates an increase in visual observation quality. In one example, a total of 200 valid feature points were tracked in the current frame. Among them, 50 feature points were tracked continuously for more than 5 frames, so the proportion of long-tracked feature points was 25%; 80 new feature points appeared for the first time, so the proportion of new feature points was 40%. The two were weighted and fused to obtain the degree of visual degradation. The higher the degree of visual degradation, the more severe the visual degradation, and the lower the degree of visual degradation, the milder the visual degradation.
[0024] In some embodiments, the degree of visual degradation is determined by statistically analyzing the proportion of long-tracking feature points and the proportion of new feature points and then weighting and fusing them. An equivalent alternative can be adopted: an end-to-end visual-inertial fusion method based on deep learning is used to construct an end-to-end visual-inertial fusion model; a neural network is trained to learn the mapping relationship between visual features and inertial data; and pose estimation is obtained through end-to-end training, where the degree of visual degradation is implicit in the pose estimation confidence output of the neural network.
[0025] S104. Based on the degree of visual degradation, determine the visual weight and the inertial weight, wherein the visual weight is negatively correlated with the degree of visual degradation and the inertial weight is positively correlated with the degree of visual degradation.
[0026] In this system, visual weights adjust the influence of visual reprojection residuals on the objective function, determining the level of trust in visual observations. Inertial weights adjust the influence of inertial pre-integration residuals on the objective function, determining the level of trust in inertial measurements. A negative correlation means that as visual degradation increases, visual weights decrease, reducing trust in visual observations; conversely, as visual degradation decreases, visual weights increase, increasing trust in inertial measurements. The two correlations move in opposite directions. A positive correlation means that as visual degradation increases, inertial weights increase, increasing trust in inertial measurements; as visual degradation decreases, inertial weights decrease, reducing trust in visual observations. The two correlations move in the same direction.
[0027] In one example, as the visual degradation score increases from 0.2 to 0.8, the visual weight decreases from 1.0 to 0.3, while the inertia weight increases from 1.0 to 1.8, achieving a smooth switch from relying on vision to relying on inertia.
[0028] In some embodiments, determining visual weights and inertial weights based on the degree of visual degradation includes: determining visual weights and inertial weights through continuous Gaussian function mapping; and using an equivalent replacement of the measurement noise covariance adaptive adjustment method based on adaptive Kalman filtering: in the measurement update step of Kalman filtering, introducing an adaptive algorithm or an innovation-based adaptive estimation to estimate and adjust the measurement noise covariance matrix online in real time; when a large number of mismatches or losses occur in visual feature tracking, the impact of unreliable visual observations on state updates is automatically reduced by increasing the measurement noise covariance.
[0029] S105. Perform pre-integration on the current inertial measurement data and the historical inertial measurement data between the current image and the previous key image to construct the inertial pre-integration residual.
[0030] The preceding key image can be the most recent image identified as a key image before the current image. Key images are representative images selected from the image sequence; only key images participate in the back-end optimization. Multiple ordinary images may exist between adjacent key images. These ordinary images are not added to the optimization window, but their corresponding inertial measurement data still participate in the pre-integration calculation. Historical inertial measurement data can be all inertial measurement data collected from the time of the previous key image to the time of the current image. This interval may contain dozens to hundreds of IMU data points. Pre-integration involves integrating all inertial measurement data over a continuous time period in the carrier coordinate system to obtain the relative rotation increment, velocity increment, and position increment. The pre-integration result does not depend on the absolute pose and velocity of the key image; therefore, re-integration is not required when the back-end optimization corrects the pose of the key image. The inertial pre-integration residual can be the difference between the pre-integrated measurement value and the relative motion derived from the current state estimate. The inertial pre-integration residual is used to constrain the relative pose and velocity relationship between adjacent key images.
[0031] In one example, there is a 0.5-second interval between the previous key image and the current key image. During this time, the inertial measurement unit outputs 100 data points. The system pre-integrates these 100 data points into a relative motion increment, compares it with the relative motion derived from the current pose estimation, and the difference is the inertial pre-integration residual.
[0032] S106. Based on the tracking feature point information, construct the visual reprojection residual.
[0033] The visual reprojection residual is used to constrain the observation consistency of the same map point between two key images with a co-observation relationship. Specifically, for the same map point observed by both key images, its 3D coordinates are recovered from the observed pixel coordinates and inverse depth of the map point in the reference (historical) key image. Then, these 3D coordinates are projected onto the image plane of the current key image according to the estimated pose of the current key image to obtain the theoretical projection coordinates. The difference between the theoretical projection coordinates and the actual observed pixel coordinates is the visual reprojection residual.
[0034] In one example, a feature point is observed in both the i-th and j-th key images. The system recovers the 3D coordinates of the feature point based on the pixel coordinates and inverse depth in the i-th key image, then projects the 3D coordinates onto the j-th key image, and calculates the pixel difference between the projected position and the actual detection position as the reprojection residual.
[0035] S107. Construct an objective function based on the visual weights, the inertial weights, the inertial pre-integration residuals, the visual reprojection residuals, and the marginalization prior constraints.
[0036] The objective function is the core expression for the backend optimization of visual-inertial SLAM, used to uniformly describe the relationship between all variables to be optimized and all measurement constraints. The objective function is also the optimization problem to be solved. It is constructed as follows: multiplying the inertial weights by the original information matrix of the inertial pre-integration residual yields a weighted inertial information matrix; multiplying the visual weights by the original information matrix of the visual reprojection residual yields a weighted visual information matrix; and substituting the weighted inertial and visual information matrices into the corresponding Mahalanobis distance terms in the objective function, together with the marginalization prior constraints, constitutes a complete nonlinear least squares problem. The marginalization prior constraints are prior terms obtained by compressing the constraint information of removed historical key images in the sliding window after Schur complement transformation. These constraints are used to preserve the constraints of historical information on the current state within the window. In one example, the constructed objective function includes three terms: marginalization prior residual, weighted inertial pre-integration residual, and weighted visual reprojection residual. The inertial and visual weights are uniquely determined by the degree of visual degradation.
[0037] S108. Iteratively solve the objective function to obtain the motion state estimation result of the current image. The motion state estimation result includes the current position, current velocity, and current attitude.
[0038] The algorithm iteratively solves the objective function to obtain the optimal state estimate at the current moment, outputting the carrier's position, velocity, and attitude as the motion state estimation results. The Levenburg-Marquardt algorithm is used for the iterative solution. This algorithm combines the advantages of the Gauss-Newton method and gradient descent. Gradient descent is used to ensure convergence when far from the optimal solution, while the Gauss-Newton method is switched to accelerate convergence when approaching the optimal solution. During the solution process, the algorithm iteratively updates the pose, velocity, attitude, inertial measurement unit bias, and inverse depth of feature points for all key images within the sliding window, causing the objective function value to continuously decrease until it converges to the optimal solution. The motion state estimation result can be the carrier state at the current moment extracted from the optimized state vector. The motion state estimation result includes at least three degrees of freedom: position, velocity, and attitude. Current position: The three-dimensional spatial coordinates of the carrier in the world coordinate system. Current velocity: The three-dimensional linear velocity of the carrier in the world coordinate system. Current attitude: The orientation of the carrier, usually represented by roll angle, pitch angle, and yaw angle. After the solution is completed, the position, velocity and attitude corresponding to the current image are extracted from the optimized state vector and output as the motion state estimation result.
[0039] In one example, the objective function converges after five iterations. The current position coordinates of the robot are extracted from the state vector as three-dimensional coordinates, the speed is 0.5 meters per second, and the yaw angle is 45 degrees, which are then used by the path tracking controller to execute the next motion control.
[0040] The technical solution of this invention acquires current image and inertial measurement data in real time, and performs feature matching and tracking between the current image and historical images to determine tracking feature point information, providing a data foundation for subsequent visual degradation assessment and residual construction. The degree of visual degradation is determined by statistically analyzing the first number of long-tracking feature points and the second number of newly appearing feature points. This degree of visual degradation reflects the stability and reliability of the current visual observation; typically, the degree of visual degradation increases when the number of long-tracking feature points decreases and the number of new feature points increases. Based on this, visual weights and inertial weights are determined, making the visual weights negatively correlated with the degree of visual degradation and the inertial weights positively correlated. This reduces the impact of visual observation on pose estimation and enhances the contribution of inertial measurement during visual degradation, solving the problem of visual degradation caused by rapid rotation. This addresses the issue of decreased positioning accuracy due to visual degradation. By pre-integrating current inertial measurement data and historical inertial measurement data between the current image and the previous key image to construct an inertial pre-integration residual, and constructing a visual reprojection residual based on tracking feature point information, an objective function is iteratively solved based on visual weights, inertial weights, inertial pre-integration residuals, visual reprojection residuals, and marginalization prior constraints. This allows the inertial pre-integration residuals and visual reprojection residuals to participate in optimization after being adjusted by differentiated weights related to the degree of visual degradation. As a result, when visual constraints weaken, inertial measurement can take over the dominant role in state estimation, solving the problem of increased cumulative drift and even tracking loss under visual degradation conditions. Therefore, while ensuring real-time performance, this improves positioning accuracy and system robustness in visual degradation scenarios such as rapid rotation.
[0041] In an optional embodiment, determining the degree of visual degradation based on the first quantity and the second quantity includes: obtaining a third quantity of effective feature points in the current image; calculating the proportion of long-tracking feature points based on the first quantity and the third quantity; calculating the proportion of new feature points based on the second quantity and the third quantity; and performing a weighted fusion of the proportion of long-tracking feature points and the proportion of new feature points to obtain the degree of visual degradation.
[0042] In this context, "valid feature points" refers to feature points in the current image that have completed inter-image association and passed the geometric consistency test. The geometric consistency test can use a random sampling consistency algorithm to exclude false matches. The third quantity is the total number of valid feature points in the current image. The proportion of long-tracking feature points equals the first quantity divided by the third quantity, reflecting the proportion of stably tracked feature points in the current image's visual features. The proportion of new feature points equals the second quantity divided by the third quantity, reflecting the proportion of newly appearing feature points in the current image that have not been validated through long-term tracking. The degree of visual degradation is a weighted fusion result of the proportion of long-tracking feature points and the proportion of new feature points, where the weight coefficient for the proportion of new feature points is positive and the weight coefficient for the proportion of long-tracking feature points is negative. That is, a higher proportion of new feature points or a lower proportion of long-tracking feature points results in a higher degree of visual degradation, and vice versa.
[0043] In some embodiments, a third quantity is obtained as the statistical denominator, the proportion of long-tracking feature points is calculated using the first and third quantities to reflect the stability of visual observation, the proportion of new feature points is calculated using the second and third quantities to reflect the degree of change in visual observation, and then the two are weighted and fused to obtain the degree of visual degradation, so that the calculation of the degree of visual degradation has a clear data basis and a quantifiable calculation path.
[0044] It is evident that by obtaining the third number of effective feature points in the current image as a statistical benchmark, the calculation of the proportion of long-tracking feature points and the proportion of new feature points has a unified benchmark, avoiding misjudgments caused by fluctuations in the total number of feature points between different images when only absolute numbers are used. By weighted fusion of the proportion of long-tracking feature points and the proportion of new feature points, the degree of visual degradation can simultaneously reflect the stability change and the degree of change of visual observation, comprehensively characterizing the quality of visual observation from two dimensions, and providing accurate and reliable quantitative input for subsequent weight adjustment.
[0045] In an optional embodiment, determining the visual weight and inertial weight based on the degree of visual degradation includes: performing a continuous Gaussian function mapping on the degree of visual degradation to obtain a degradation mapping value; determining the inertial weight based on the degradation mapping value, the inertial reference weight, and the weight enhancement coefficient; and determining the visual weight based on the degradation mapping value, the visual reference weight, and the visual weight suppression coefficient; wherein the inertial weight is positively correlated with the degradation mapping value, and the visual weight is negatively correlated with the degradation mapping value.
[0046] The Gaussian function is an exponential function based on the natural constant, and its curve is bell-shaped. Continuous mapping can be achieved by mathematically transforming the degree of visual degradation (independent variable) into the degradation mapping value. The bell-shaped curve of the Gaussian function exhibits smooth decay characteristics, enabling a continuous response to changes in the degree of visual degradation without abrupt changes. The smooth decay characteristic of the Gaussian function naturally characterizes the gradual impact of visual degradation on the visual system. The degradation mapping value represents the degree of influence of visual degradation on weight adjustment; its range is related to the degree of visual degradation but exhibits smooth numerical characteristics after the Gaussian transformation. A higher degradation mapping value indicates a greater influence of visual degradation on weight adjustment, while a lower value indicates a smaller influence. The degradation mapping value increases as the degree of visual degradation deviates from the preset stability center. The inertial reference weight is the baseline confidence level of the inertial measurement data of the carrier in a visually stable state. Inertial weights are coefficients used to adjust the influence of the inertial pre-integration residuals on the objective function, determining the system's level of confidence in inertial measurements. Inertial weights are positively correlated with the degenerate mapping value, meaning that an increase in the degenerate mapping value leads to an increase in inertial weights, and a decrease in the degenerate mapping value leads to a decrease in inertial weights. Weight enhancement coefficients are amplification factors used to map the degenerate mapping value to an increment in the inertial weights. Visual reference weights represent the baseline confidence level of visual observations by the carrier in a visually stable state. Visual weight suppression coefficients are reduction factors used to map the degenerate mapping value to a reduction in the visual weights. Visual weights are coefficients used to adjust the influence of the visual reprojection residuals on the objective function, determining the system's level of confidence in visual observations. Visual weights are negatively correlated with the degenerate mapping value, meaning that an increase in the degenerate mapping value leads to a decrease in visual weights, and a decrease in the degenerate mapping value leads to an increase in visual weights.
[0047] First, the degree of visual degradation is continuously mapped using a Gaussian function. Then, inertial weights and visual weights are determined based on the mapped values. The inertial weight is determined by adding the product of the enhancement coefficient and the mapped value to the baseline weight, and it increases positively as the mapped value increases. The visual weight is determined by subtracting the product of the inhibition coefficient and the mapped value from the baseline weight, and it decreases negatively as the mapped value increases. The two weights are determined independently but change in opposite directions, together forming a synchronous reverse adjustment.
[0048] As can be seen, by continuously mapping the degree of visual degradation using a Gaussian function, threshold-based abrupt switching is avoided, giving the weight adjustment a smooth transition characteristic. The inertial weight increases positively when the degradation mapping value increases, while the visual weight decreases negatively when the degradation mapping value increases. The two weights change in opposite directions, realizing synchronous and continuous reverse adjustment of the visual and inertial weights. This allows the inertial measurement to smoothly take over the dominant role of state estimation when the visual constraints weaken, avoiding pose estimation jumps caused by abrupt weight changes.
[0049] In an optional embodiment, before constructing the visual reprojection residual based on the tracking feature point information, the method further includes: calculating the average disparity between the current image and the previous key image; determining the current image as a key image when the average disparity is greater than a disparity threshold; and determining the current image as a key image when the third number of effective tracking feature points in the current image is less than an effective number threshold, wherein the visual reprojection residual is constructed based on the tracking feature point information of each existing key image.
[0050] The average disparity refers to the average pixel displacement of all effective tracked feature points between the current image and the previous key image. The disparity threshold, which can be a critical value for pixel displacement, is used to determine whether the carrier has moved a sufficient distance to detect whether the current image is a key image; a value of 20 pixels is acceptable. When the average disparity exceeds this threshold, the field of view is considered to have changed significantly, and the current image needs to be designated as a key image. Key images are the basic units involved in backend optimization and residual construction. Only images designated as key images will establish a co-view relationship with historical key images and construct visual reprojection residuals. The number of effective tracked feature points refers to the total number of feature points that can be successfully tracked in the current image. The effective number threshold, which can be a critical value for the number of effective tracked feature points, is used to determine whether the visual tracking quality has severely deteriorated; a value of 100 is acceptable. When the average disparity is greater than the disparity threshold, it indicates that the carrier has moved far enough and the field of view has changed significantly, requiring the current image to be designated as a key image to record new spatial information. When the number of effective tracking feature points falls below a threshold, it indicates a severe degradation in visual tracking quality. The current image needs to be designated as a critical image to salvage the current information and prevent the system from completely losing tracking. The visual reprojection residual is constructed based on the tracking feature point information of each critical image in the established set of critical images. These critical images can be any set of critical images that have already been identified and retained.
[0051] In fact, average disparity is a direct quantitative indicator of the change in the overlapping area between two consecutive images. When the average disparity is greater than the disparity threshold, it indicates that the carrier has undergone a sufficiently large displacement or rotation, and the common visible area between the current image and the previous key image has been significantly reduced. At this point, if map points from the previous key image are still used to constrain the current image, the reliability of visual constraints will decrease due to insufficient visual overlap and a limited number of shared feature points. Simultaneously, the current image contains a large amount of new environmental content; if this new information is not recorded, it will lead to hindered map expansion and increased long-term positioning drift. An average disparity greater than the threshold indicates that the current image has entered a new area not covered by the previous key image, requiring the addition of a new key image to record new spatial structure and pose information to ensure continuous map expansion and accurate pose estimation. When the disparity is large enough, the newly added key image can provide new geometric constraints, avoiding degradation in backend optimization due to information redundancy between images, while also providing more matching references for subsequent images.
[0052] Before constructing the visual reprojection residual, two conditions are used to determine whether the current image should be identified as a key image: average disparity determination and effective tracking feature point count determination. Average disparity determination is based on motion displacement, ensuring that new spatial information is recorded when the carrier moves sufficiently far; effective tracking feature point count determination is based on visual tracking quality, ensuring emergency insertion when a large number of visual features are lost. Either condition must be met for an image to be identified as a key image. Furthermore, the visual reprojection residual is constructed only among already identified key images, giving the key image determination process scene-adaptive capabilities. This covers both the key image selection requirements under normal motion and the emergency insertion requirements under visual degradation conditions.
[0053] It is evident that by combining the two conditions of average disparity determination and effective tracking feature point quantity determination, the determination of key images depends not only on the disparity changes caused by carrier motion but also on the changes in visual tracking quality. Under normal motion conditions, key images are determined when the average disparity exceeds a threshold, ensuring timely recording of new spatial information. Under visual degradation conditions caused by rapid rotation or drastic changes in viewing angle, key images are determined even if the average disparity does not exceed the threshold, but the number of effective tracking feature points is below the threshold, enabling the insertion of salvage key images under visual degradation conditions. The two conditions complement each other, preventing the system from completely losing tracking due to severe degradation in visual tracking quality, while limiting the construction of visual reprojection residuals only among the determined key images, ensuring the legitimacy of the data source for subsequent visual reprojection residual construction.
[0054] It should be noted that after the current image is identified as a key image, it is added to the sliding window. The sliding window is a data structure used in the visual-inertial SLAM backend optimization to store the most recent preset number of key images. The sliding window can be a fixed-size buffer used to store the most recent key images and their associated state variables, including the pose, velocity, attitude, inertial measurement unit bias, and inverse depth of each feature point. The sliding window has a fixed length, which is the preset window length, for example, it can be 10 key images. When a new key image is identified, it is added to the tail of the sliding window. When the number of key images in the sliding window has not reached the preset window length, the new key image is directly appended to the tail of the sliding window without removing any historical key images; when the number of key images in the sliding window has reached the preset window length, an old key image needs to be removed from the window to make room. The removed key image retains its constraint information as a marginalization prior constraint after the marginalization operation is converted into a marginalization constraint. The sliding window method limits the dimensionality of the state variables in the backend nonlinear optimization to a preset window length, keeping the computational cost constant for each optimization and ensuring that the system can run in real time on resource-constrained edge devices. Simultaneously, by preserving the constraint information of removed key images through edge-mapping operations, it avoids the decrease in positioning accuracy caused by simply discarding historical information.
[0055] In an optional embodiment, the visual inertial state estimation method further includes: when the current image is determined to be a key image and the number of key images meets the removal condition, the earliest key image is taken as the image to be removed; when the current image is not a key image or the average disparity is less than the disparity threshold, the second newest key image is taken as the image to be removed; when the image to be removed is a degraded image, a marginalization prior constraint is determined based on the inertial pre-integration residual of the image to be removed and the visual reprojection residual of long-tracking feature points; when the image to be removed is a stable image, a marginalization prior constraint is determined based on the inertial pre-integration residual of the image to be removed and the visual reprojection residual of all feature points.
[0056] The removal condition refers to the judgment condition that the number of key images within the sliding window has reached the preset window length. Removal can refer to the operation of deleting key images from the sliding window. The removal operation does not simply discard the data of the key image, but rather retains its constraint information by marginalizing it into marginalized prior constraints, thus maintaining the constraint effect of historical information on the current state within the window. The preset window length can be 10 key images. Limiting the state dimension of the nonlinear optimization to within the preset window length keeps the computational cost of each optimization constant, ensuring the system can run in real time on resource-constrained edge devices. Simultaneously, retaining the constraint information of the removed key images through marginalization avoids the decrease in positioning accuracy caused by simply discarding historical information.
[0057] The number of key images refers to the total number of key images stored in the sliding window at the current moment. The earliest key image is the key image with the smallest timestamp in the sliding window. The second newest key image is the key image with the second largest timestamp in the sliding window, that is, the key image whose timestamp is only smaller than the newest key image. For example, the key images stored in the sliding window in chronological order of their timestamps are i1 (earliest, first, or smallest), i2 (second earliest), i3 (middle), i4 (second newest), and i5 (newest, last, or largest). Correspondingly, the earliest key image is i1, and the second newest key image is i4. A degraded image is a key image in which the proportion of new feature points continuously increases and the proportion of long-tracking features continuously decreases within the time period of the key image. A degraded image indicates that the visual observation near the image is unstable. A stable image is a key image that does not meet the degradation criteria. When the image to be removed is a degraded image, only the inertial pre-integration residual and the visual reprojection residual of long-tracking feature points of the image to be removed are retained for marginalization, while the visual reprojection residual of short-lifetime new features is suppressed; when the image to be removed is a stable image, all the residuals of the image to be removed are retained for marginalization.
[0058] The inertial pre-integration residual can be the difference between the pre-integrated measurement and the relative motion derived from the current state estimate, used to constrain the relative pose and velocity relationships of adjacent key images. The visual reprojection residual of long-tracking feature points can be the visual reprojection residual formed only by feature points with a continuous tracking length greater than or equal to a preset threshold. These feature points have been validated over a long period, and their visual observation reliability is high. The visual reprojection residual of all feature points can be the visual reprojection residual formed by all feature points, including long-tracking feature points and short-lifespan new feature points. The marginalization prior constraint can be a prior term obtained by compressing the constraint information of removed key images after Schur complement transformation, used to preserve the constraint of historical information on the state within the current window.
[0059] Based on the critical state and disparity state of the current image, different images to be removed are selected. When the window is full and the current image is a critical image, the oldest critical image is marginalized to ensure the window slides forward; when the current image is not a critical image or the disparity is insufficient, the second most recent critical image is marginalized, while the oldest critical image is retained to maintain the window's coverage on the timeline. During the marginalization process, differentiated processing is applied based on the quality label of the image to be removed: degraded images retain only the inertial pre-integration residual and the visual reprojection residual of long-tracking feature points, while stable images retain all constraints. This step applies the critical image quality label to sliding window management, realizing differentiated information transmission based on the reliability of visual observation.
[0060] As can be seen, by using the edge management of the sliding window to apply key images to the constraint propagation stage, when the image to be removed is a degenerate image, only its inertial pre-integration residual and visual reprojection residual of long-tracking feature points are retained to determine the edge prior constraints. This suppresses unstable visual constraints formed only by short-lifetime new features and avoids passing on erroneous visual information caused by rapid rotation or drastic changes in viewpoint to subsequent optimization. When the image to be removed is a stable image, all its constraint information is retained to ensure the continuous constraint effect of reliable visual observation on subsequent optimization. The distinction between the two strategies makes the quality of the edge prior constraints match the visual observation quality of the key image to be removed. The complete information of the stable image is retained, and the unreliable information of the degenerate image is filtered out, avoiding the pollution of subsequent optimization process by compressing unreliable visual information into the prior constraints.
[0061] In an optional embodiment, the visual inertial state estimation method further includes: acquiring continuous quantity change information associated with the current image, the continuous quantity change information including: continuous quantity change information of the first quantity and continuous quantity change information of the second quantity; performing degradation detection on the current image based on the continuous quantity change information to obtain a degradation detection result of the current image, the degradation detection result including stability or degradation.
[0062] The continuous change information in quantity refers to the trend data of the number of long-tracking feature points and the number of new feature points in consecutive multiple images. This continuous change information characterizes the direction of change in visual observation quality over time. Correlation refers to the correspondence between the continuous change information in quantity and the current image, i.e., the trend of quantity changes in consecutive multiple images near the current image's time. The first continuous change information in quantity refers to the trend of the number of long-tracking feature points in consecutive multiple images, which can include an upward trend, a downward trend, or a flat trend. The second continuous change information in quantity can refer to the trend of the number of new feature points in consecutive multiple images. When the second quantity continuously increases, it indicates that more and more old features are being lost and new features are being added, and the degree of change in visual observation is continuously intensifying. When the second quantity continuously decreases, it indicates that the loss of old features is decreasing and the influx of new features is decreasing, and the degree of change in visual observation is continuously weakening.
[0063] Degradation detection refers to determining whether the current image is in a state of visual degradation based on the aforementioned continuous change information: if the first quantity continuously decreases and the second quantity continuously increases in multiple consecutive images, the degradation detection result is degradation. In the remaining cases, the degradation detection result can be determined as stable. Additionally, the remaining cases can also determine the state to be observed. The essence of degradation detection is to classify the temporal change trend into two states: stable or degrading. The degradation detection result can include both degradation and stability. Optionally, the degradation detection result can also include the state to be observed. The degradation detection result is used to identify whether the current image is in a state of visual degradation. A stable degradation detection result corresponds to a period where the proportion of long-tracking feature points tends to stabilize or increase, and the proportion of new feature points tends to stabilize or decrease. In a stable state, the visual observation quality is good, and the visual measurement data can be trusted. A degradation detection result corresponds to a period where the proportion of long-tracking feature points continuously decreases, and the proportion of new feature points continuously increases. In a degrading state, the visual observation quality is poor, and the visual measurement data should not be overly trusted.
[0064] The changing trends of the number of long-tracking feature points and the number of new feature points in consecutive images are monitored to identify whether the current image is in a state of visual degradation. A continuous decrease in the number of long-tracking feature points indicates that the stability of visual observation is continuously deteriorating, while a continuous increase in the number of new feature points indicates that the degree of change in visual observation is continuously intensifying. When both occur simultaneously, the degree of visual degradation continues to rise. The degradation detection results are labeled on the current image, providing a basis for judging the quality labeling and differential edge-cutting strategies of subsequent key images.
[0065] As can be seen, by acquiring the changing trends of the number of long-tracking feature points and the number of new feature points in consecutive multiple images, degradation detection gains temporal judgment capabilities, avoiding misjudgments that may be caused by instantaneous judgment based solely on the number of points in a single image. Occasional fluctuations in the number of points in a single image do not trigger degradation marking; degradation is only identified when consecutive multiple images show a decreasing trend in the number of long-tracking points and an increasing trend in the number of new features, thus improving the reliability of degradation detection. The degradation detection result is stored as a quality marker in the attributes of the key image. When the key image is subsequently removed from the sliding window, this marker is read and used to determine the marginalization strategy. Degraded images retain only the inertial pre-integration residual and the visual reprojection residual of long-tracking feature points, while stable images retain all constraints. This ensures that the quality of the marginalization prior constraints matches the visual observation quality of the key image in the same time period, avoiding the impact of erroneous markings caused by fluctuations in a single image on subsequent optimization.
[0066] In an optional embodiment, the real-time acquisition of current images and aligned current inertial measurement data during task execution includes: acquiring images acquired in real time by the robot based on a binocular camera during the robot's handling task; acquiring inertial measurement data acquired in real time by the robot; synchronizing each image and each inertial measurement data, and acquiring the current image and aligned current inertial measurement data.
[0067] The robot can be a mobile carrier performing a handling task, equipped with a binocular camera and an inertial measurement unit (IMU). The robot is the primary implementer of the navigation and positioning method, and its motion state determines the acquisition environment for image and inertial measurement data. The handling task can be a complete operation process of moving from a starting position to a target position and completing the transport of goods. Handling tasks include various motion types such as straight-line movement, turning, handling shelf obstructions, weakly textured walls, and rapid in-situ turning, covering typical degradation conditions such as sudden decreases in visual features and sudden increases in new features. The binocular camera can be a stereo vision sensor composed of two cameras with parallel optical axes, capable of simultaneously acquiring images from both the left and right eyes. The binocular camera calculates the depth information of feature points based on the parallax of the left and right images, providing a basis for the initialization of subsequent inverse depth features. The real-time acquired images can be the left and right eye image data output by the binocular camera at a set frame rate. The image data contains texture, edge, and corner information of the scene, serving as the raw input for feature extraction and tracking. The inertial measurement data can be the triaxial acceleration and triaxial angular velocity measurements output by the IMU, reflecting the carrier's motion state in three-dimensional space.
[0068] The current image can be the latest frame after synchronization processing, serving as the input for visual observation at the current moment. The aligned current inertial measurement data can be the inertial measurement data that corresponds to the current image in time after synchronization processing, ensuring that the image data and inertial measurement data at the current moment reflect the carrier state at the same moment.
[0069] The images acquired in real time by the binocular camera provide the texture and geometric information of the scene, while the data acquired in real time by the inertial measurement unit provides the motion information of the carrier. By marking each frame of image and each frame of inertial measurement data with the timestamp of the same clock source, the time synchronization of the two types of data is achieved. The current image and the current inertial measurement data aligned with its time are output, providing the time-corresponding raw data input for subsequent feature tracking and IMU pre-integration.
[0070] As can be seen, real-time acquisition by the binocular camera and inertial measurement unit provides continuous image data and inertial measurement data input for navigation and positioning. By synchronizing each image and each inertial measurement data, the two types of data are aligned on the time reference, avoiding fusion errors caused by time mismatch between image data and inertial measurement data. The synchronized current image and aligned current inertial measurement data provide a unified time reference for the inter-frame matching and pre-integration time interval division of feature tracking in subsequent steps, ensuring that the image frames and IMU data used for subsequent feature tracking and IMU pre-integration correspond in time, thereby improving the accuracy of data fusion.
[0071] In a scenario where a robot performs a transport task, such as Figure 2 As shown, the following example, using a single task of an indoor warehouse handling robot moving from the pickup point to the unloading point, illustrates the acquisition, processing, fusion, and output of data during a complete run. This scenario includes straight-line movement, narrow aisle turns, shelf obstructions, weakly textured walls, and rapid in-situ turning, covering typical degradation conditions where visual features suddenly decrease and new features suddenly increase.
[0072] Before performing the following steps, the robot system enters the initialization phase. After system startup, the initialization phase is executed first. During the initialization phase, initial state estimates, including initial pose, velocity, and feature point map, are obtained through visual motion recovery structure reconstruction and visual-inertial alignment. After initialization is complete, the system enters the continuous operation phase and begins executing the following steps.
[0073] Step 1: Constructing the System State Equations: Constructing state vectors in the world coordinate system. The construction of the state equations depends on the error type, combination method, and coordinate system definition of the inertial sensors. For multi-source sensor systems, the common parts of different state vectors also need to be fused. The constructed state vectors in the world coordinate system include state quantities related to the inertial measurement unit (IMU), which include the IMU's position, velocity, and orientation in the world coordinate system, as well as the accelerometer and gyroscope biases in the IMU's volume coordinate system. The state vectors also include the total number of key images, the total number of feature points in the sliding window, and the inverse depth at the first observation of each feature point. The state vectors constructed in the World Coordinate System (WCS) are as follows: Where, x k This represents the state variables associated with the IMU at time k, including the IMU's position in the world coordinate system. ,speed and direction and accelerometer bias in the IMU body coordinate system and gyroscope deviation n is the total number of key images, and m is the total number of feature points in the sliding window. It is the inverse depth at the first observation of the l-th feature.
[0074] Step 2: Real-time acquisition of current images and aligned current inertial measurement data during task execution: During the robot's handling task, images acquired in real-time by the binocular camera and inertial measurement unit (IMU) data are obtained. The binocular camera acquires left and right images at a set frame rate, while the IMU acquires triaxial angular velocity and triaxial acceleration at a frequency higher than the image frame rate. Each frame and each piece of IMU data is marked with a timestamp from the same clock source, and the timestamps are sorted and cached into an image queue and an IMU queue, respectively. The current image and aligned current IMU data are then output.
[0075] Step 3: Perform feature matching and tracking on the current image and historical images of the same task to determine the tracking feature point information of the current image: Perform distortion removal, grayscale conversion and scale normalization on the current left and right images; obtain feature point associations between adjacent image frames using KLT (Kanade-Lucas-Tomasi) optical flow or ORB (Oriented Features from Accelerated Segment Test and Rotated Binary Robust Independent Elementary Features) feature matching methods, and assign a unique feature identifier ID to each feature point, recording the feature point coordinates, feature ID, matching relationship, first observation frame number and continuous tracking length.
[0076] Step 4: Establish a feature lifecycle table and update the lifecycle after the current image arrives: For each feature point, record the feature identifier, the first observed image number, the latest observed image number, the continuous tracking length, the inverse depth, and the status label. The status label must include at least five states: new feature, tracking in progress, long tracking, lost, and marginalized. After the current image arrives, if the current feature identifier already exists, increment the continuous tracking length by 1 and update the latest observed image number; if the current feature identifier does not exist, create a new entry, set the continuous tracking length to 1, set the status label to new feature, and initialize the inverse depth; if the feature exists in the previous image but is not matched in the current image, set its status label to lost or waiting for marginalization. The lifecycle table does not replace geometric matching alone in filtering valid feature points; validity is first determined by matching and geometric consistency checks. The lifecycle table is used to maintain feature identifiers, statistically analyze the proportion of new feature points in the current image, and provide a status basis for subsequent window sliding and marginalization.
[0077] Step 5: Determine valid feature points and count the first number of long-tracking feature points and the second number of newly appearing feature points: First, detect feature point assignment or matching feature identifiers. Only features that are successfully matched and not judged as outliers are included in the valid feature set of the current image. All feature points in the current image that have completed feature extraction and inter-image association, and have passed the matching distance, optical flow residual, or RANSAC (Random Sample Consensus) geometric consistency test, can be used to construct visual reprojection constraints, and are thus considered valid feature points. Long-tracking feature points refer to feature points whose continuous tracking length is greater than or equal to a preset threshold, preferably 5 images. If a feature identifier has been continuously tracked for no less than the threshold since its first observation in the current image, it is recorded as a long-tracking feature point. Newly appearing feature points refer to feature points whose feature identifiers did not appear in the valid feature identifier set of the previous image or the previous key image.
[0078] Step 6: Obtain the third number of valid feature points in the current image, and determine the degree of visual degradation based on the first, second, and third numbers: Obtain the third number of valid feature points in the current image. Calculate the Long Track Feature Ratio (LTFR) based on the first and third numbers, and calculate the New Feature Ratio (NFR) based on the second and third numbers. The New Feature Ratio is calculated by dividing the number of newly initialized valid feature points in the current image by the total number of valid feature points in the current image. The LTFR and NFR are weighted and fused to obtain a visual degradation score. This visual degradation score is used to quantify the reliability of the current visual observation. A low LTFR indicates that feature points are rapidly lost due to motion blur or sudden changes in viewpoint, reflecting a decrease in observation stability; a high NFR means that a large number of features in the current image are instantaneously added, and their depth estimation and tracking reliability have not yet been verified, indicating that the visual observation is in an unstable state.
[0079] In one example, suppose the set of feature points F in the current image at time t is... t for , N represents the i-th valid feature point; t This represents the total number of valid feature points in the current image, i.e., the third quantity. Long Tracking Feature Point Ratio (LTFRt): in, Let be the continuous tracking length of the i-th feature point from its first observation in the current image. The long-tracking threshold is 5 (tested at 5), and I(·) is an indicator function that takes the value 1 when the condition is met and 0 otherwise. LTFR tA low value indicates that feature points are rapidly lost due to motion blur or sudden changes in viewpoint, reflecting a decrease in observation stability. t For F t The number of elements in the middle. It is the first quantity.
[0080] New Feature Point Ratio (NFR) t Calculated by comparing adjacent images: Where, N new,t This represents the number of newly appearing feature points in the current image, i.e., the second number. The current time is time t. ID is the unique identifier of the i-th feature of the current image (the current image at time t). t-1 It is the set of valid feature point IDs from the previous image (time t-1) or the previous key image. This indicates that the i-th feature of the current image does not belong to the set of valid feature points of the previous image (time t-1) or the previous key image. A new feature is a feature point whose ID is different from any existing or historical feature. NFR t A high value means that a large number of features in the current frame are added instantaneously, and the reliability of its depth estimation and tracking has not yet been verified, indicating that the visual observation is in an unstable state.
[0081] It should be noted that the system uses the feature ID lifecycle table maintained during system operation, not just the current sliding window. In the current image, if a feature ID has never appeared before, it is recorded as a new feature; if a feature has been marked as lost, it will be assigned a new feature ID during subsequent extraction and is also recorded as a new feature. If it is only a short-term missed match, but the trajectory of the original ID is still preserved and successfully recovered, it will not be counted as a new feature again. The numerator of NFR only counts the number of newly initialized valid feature points mentioned above.
[0082] Step 7: Determine visual weights and inertial weights based on the degree of visual degradation: A Gaussian function is used to continuously map the degree of visual degradation to obtain degradation mapping values. The Gaussian function has smooth decay characteristics, which can naturally characterize the gradual impact of visual degradation on the visual system. The expression for the degree of visual degradation is D. t : D t Indicates the degree of visual degradation; α and β are weighting coefficients.
[0083] A Gaussian function is used to nonlinearly fit the rotation speed-observation reliability relationship. This function has a smooth decay characteristic, which can naturally characterize the gradual influence of rotation intensity on the visual system. The degenerate mapping value G is obtained by defining a gradient function. t The degree of visual degradation is D.t The continuous mapping is expressed as: Where b represents the degradation score center parameter; c represents the Gaussian function width parameter; when D t When G deviates from the center of the steady state and exceeds the threshold, t Increase. b=0, c=0.6.
[0084] The inertial weight is determined based on the degradation mapping value, the inertial reference weight, and the weight enhancement coefficient. The visual weight is determined based on the degradation mapping value, the visual reference weight, and the visual weight suppression coefficient. The inertial weight is positively correlated with the degradation mapping value, while the visual weight is negatively correlated with the degradation mapping value.
[0085] Inertial weight w IMU,t for: Among them, w IMU,0 represents the IMU baseline weight; 'a' represents the weight enhancement factor.
[0086] Visual weight w VIS,t for: Among them, w VIS, 0 η represents the visual baseline weight; η represents the visual weight suppression coefficient.
[0087] Step 8: Pre-integrate the current inertial measurement data and the historical inertial measurement data between the current image and the previous key image to construct the inertial pre-integration residual: Read the inertial measurement data (angular velocity and acceleration) between the previous key image and the current image, as well as the input time interval and zero bias estimates (accelerometer zero bias and gyroscope zero bias), subtract the accelerometer zero bias and gyroscope zero bias from the inertial measurement data, calculate the rotation increment, velocity increment and position increment according to the pre-integration equation, propagate the pre-integration covariance, and output the IMU pre-integration increment, covariance information and the Jacobian term required for the IMU pre-integration residual.
[0088] The IMU pre-integration formula is constructed using the pre-integration method. The IMU pre-integration term includes the rotation increment of the volume coordinate system from the previous key image time to the current image time, as well as the observations, bias, and noise terms of the accelerometer and gyroscope at time 1. It is typically assumed that the noise from the accelerometer and gyroscope is Gaussian white noise. The IMU pre-integration term is as follows: Where, ΔR ij This represents the rotation increment of the volume coordinate system from time i to time j (pre-integrated rotation); Δv ijThe velocity increment (pre-integrated velocity) in the body coordinate system from time i to time j; Δp ij For the position increment of the body coordinate system from time i to time j (pre-integrated position quantity), Exp(⋅) is the exponential mapping from the rotation vector to the rotation matrix, and ω is the position increment of the body coordinate system from time i to time j. k Let a be the angular velocity observation value of the gyroscope at time k (three-axis angular velocity). k Accelerometer readings at time k (three-axis acceleration). For the accelerometer zero bias at time k The gyroscope has zero bias at time k; For accelerometer measurement noise, For the measurement noise of the gyroscope, Δv ik Let Δt be the velocity increment in the body coordinate system from time i to time k. k ΔR is the time interval between two adjacent IMU measurement times. ik Let be the rotation increment of the body coordinate system from time i to time k.
[0089] The IMU pre-integration residual is defined as the difference between the pre-integrated measurement and the relative motion derived from the current state estimate, used to constrain the relative pose and velocity relationships between adjacent key images. Specifically: Where, r B It is the IMU pre-integration residual, used to measure the degree of inconsistency between the pre-integration measurement and the state estimate, p i Let p be the position of the inertial measurement unit in the world coordinate system at time i. j Let v be the position of the inertial measurement unit in the world coordinate system at time j. i Let v be the velocity of the inertial measurement unit in the world coordinate system at time i. j Let R be the velocity of the inertial measurement unit in the world coordinate system at time j. i Let R be the rotation matrix (attitude) from the body coordinate system to the world coordinate system at time i. j Let $\mathbf{j}$ be the rotation matrix (attitude) from the body coordinate system to the world coordinate system at time $j$, $g$ be the gravitational acceleration in the world coordinate system, and $\mathbf{t}$ be the value of $\mathbf{j}$. ij Let Δp be the time interval from time i to time j. ij Let Δv be the pre-integral position increment from time i to time j. ij Let ΔR be the pre-integral velocity increment from time i to time j. ij Let i be the pre-integral rotation increment from time i to time j. The accelerometer bias is zero at time j. The accelerometer bias is zero at time i. The gyroscope has zero bias at time j. The gyroscope bias is zero at time i. `vec` extracts the imaginary part of the quaternion (i.e., the rotation vector part) to calculate the attitude residual.
[0090] Step 9: Determine if the current image is a key image and add it to the sliding window: Calculate the average disparity between the current image and the previous key image. When the average disparity is greater than the disparity threshold, the current image is identified as a key image. When the number of effective tracked feature points in the current image is less than the effective number threshold, the current image is identified as a key image. In the initial stage of system startup, when the window is not yet full, only appending operations are performed, and historical images are not removed; when the number of key images in the window reaches the preset window length, a fixed-length sliding window mode is entered. Key images are added to the sliding window after identification. Specifically, the first key image is set as the window starting point, and subsequent key images are continuously added to the window. During the period when the number of key images in the window has not reached the preset window length, only the feature lifecycle table, IMU pre-integration output, and initial visual map (visual point cloud map) are updated; no edge-setting operations are performed. When the number of key images in the window reaches the preset window length, the system completes visual inertia initialization, forming an optimizable state vector. Whenever a new key image is added to the window, the system first calculates the inertial pre-integration residual between the new key image and the previous key image, then calculates the visual reprojection residual between the new key image and the co-view key images in the window, and updates the proportion of long-tracking feature points, the proportion of new feature points, and the degree of visual degradation.
[0091] Step 10: Obtain continuous change information of the quantity associated with the current image, and perform degradation detection on the current image based on the continuous change information: Obtain continuous change information of the quantity associated with the current image, the continuous change information of the quantity includes continuous change information of a first quantity and continuous change information of a second quantity. When the proportion of new feature points exceeds a preset threshold, the visual observation is determined to be in a degraded state. Specifically, if the proportion of new feature points in a key image exceeds the threshold, or if the proportion of new feature points in several consecutive images exceeds the threshold, the key image is marked as a degraded key image. The degradation detection result is used as a quality marker for the key image and stored in the attributes of the key image.
[0092] Step 11: Construct visual reprojection residuals based on tracked feature point information: For any two key images with a co-existing relationship, obtain the observed pixel coordinates and inverse depth of the same feature point in the reference key image, and recover the 3D coordinates of the feature point in the world coordinate system. Project the 3D coordinates onto the image plane of the current key image according to the estimated pose of the current key image to obtain the theoretical projected coordinates. The difference between the theoretical projected coordinates and the actual observed pixel coordinates of the feature point in the current key image is used as the visual reprojection residual. The visual reprojection residual is used to constrain the observation consistency of the same map point between two key images with a co-existing relationship.
[0093] If the l-th feature point is observed simultaneously in both the i-th and j-th key images, and the first observation occurs in the i-th key image, the visual reprojection equation on the normalized image plane can be expressed as: in, This represents the actual pixel coordinates of feature point l in the camera coordinate system of the i-th frame. Let be the actual observed pixel coordinates of feature point l in the camera coordinate system of frame j, and let be the theoretical pixel coordinates obtained by projecting the pose of feature point l in frame i. It is a projection function. This is the camera's back projection function. 'b' represents the IMU coordinate system (volume coordinate system), which is fixed to the carrier itself. 'w' represents the world coordinate system, which is a global reference system fixed to the environment. It is the transformation matrix that transforms a 3D point from the camera coordinate system at time i to the IMU coordinate system at time i (camera-to-IMU extrinsic parameter transformation). It is the transformation matrix that transforms a 3D point from the IMU coordinate system at time i to the world coordinate system (determined by the pose at time i). It is the transformation matrix that transforms a 3D point from the world coordinate system to the IMU coordinate system at time j (determined by the pose at time j). The transformation matrix that transforms a 3D point from the IMU coordinate system at time j to the camera coordinate system at time j (external parameter transformation from IMU to camera).
[0094] Taking the reprojection of feature point l from the i-th frame of the left camera to the j-th frame of the right camera as an example, the visual reprojection residual can be expressed as the difference r between the theoretical projection coordinates and the actual observed pixel coordinates. c : in, This represents the actual pixel coordinates of feature point l in the camera coordinate system at frame j.
[0095] Step 12: Construct the objective function based on visual weights, inertial weights, inertial pre-integration residuals, visual reprojection residuals, and marginalization prior constraints: Multiply the inertial weights by the inertial information matrix (the inverse matrix of the covariance obtained from IMU pre-integration) to obtain the weighted inertial information matrix; multiply the visual weights by the visual information matrix to obtain the weighted visual information matrix. The pixel coordinate observation noise of feature points follows a zero-mean Gaussian distribution. The standard deviation of pixel noise can be determined based on experiments or visual sensor characteristics to construct the pixel covariance matrix. Based on the pixel covariance matrix, the inverse matrix is obtained to obtain the visual information matrix. The objective function includes marginalization prior constraint residuals, weighted IMU pre-integration constraint residuals, and weighted visual constraint residuals. Among them, the marginalization prior constraint residuals, IMU pre-integration constraint residuals, and visual constraint residuals are jointly quantified by weights generated by a dynamically adaptive weighting function to quantify the degree of degradation of visual observations. The nonlinear optimization solution is calculated using the Levenberg-Marquardt algorithm.
[0096] In navigation tasks, robots need to perform the next motion control step through state estimation. State estimation actually determines the motion state estimation results: position, velocity, and attitude. State estimation is essentially a maximum likelihood estimation (MLE) problem. Assuming all measurements are independent, the maximum likelihood estimation problem can be written as: in, This is the result of motion state estimation, z k This represents the k-th (frame) observation data from cameras, IMUs, and other types of sensors, where K is the total number of observation data. It is assumed that the observation noise follows a Gaussian distribution. The above equation can be written in logarithmic form as follows: in, H represents the Markov norm. k (x) is the sensor measurement model. In the back-end nonlinear optimization process of vision-inertial SLAM, the back-end nonlinear optimization with adaptive weights typically constructs the following objective function: Where, r p H represents the marginalized prior constraint residual. p Let r represent the prior Jacobian matrix. IMU,t Let r represent the IMU pre-integration residual at time t. VIS,t This represents the visual reprojection residual at time t. This is a robust kernel function. and It is generated by a dynamic adaptive weighting function. The nonlinear optimization solution is calculated using the Levenberg-Marquardt algorithm.
[0097] The information matrix is weighted and adjusted as follows: Represents the inertial information matrix. Represents a visual information matrix; This represents the inertial information matrix after dynamic adjustment based on inertial weights. This represents the inertial information matrix after dynamic adjustment based on visual weights.
[0098] Step 13: Iteratively solve the objective function to obtain the motion state estimation result of the current image: Use the Levenberg-Marquardt algorithm to iteratively solve for the pose, velocity, attitude, inertial measurement unit bias, and feature inverse depth within the window. Extract the motion state estimation result of the current image from the optimized state vector. The motion state estimation result includes the current position, current velocity, and current attitude, and outputs the visual degradation degree for the path tracking controller to execute the next motion.
[0099] Step 14: Window Sliding and Looping Processing: When a new key image is added and the window length exceeds the preset window length, if the current image is a key image, the earliest key image and its associated feature states are included in the set to be marginalized; if the current image is not a key image, the second newest image is removed first to maintain the latest visual constraints. When the image to be removed is a degraded key image, the marginalization prior constraints are determined based on the inertial pre-integration residual and the visual reprojection residual of long-tracking feature points of the image to be removed, retaining the constraints related to IMU pre-integration and long-tracking features, and suppressing unstable visual constraints formed only by short-lifetime new features. Marginalization is prioritized during window sliding and marginalization to avoid observation-dominated prior constraints formed by short-lifetime new features of the image. When the image to be removed is a stable key image, the marginalization prior constraints are determined based on the inertial pre-integration residual and the visual reprojection residual of all feature points of the image to be removed, converting all its visual constraints and inertial constraints into marginalization prior constraints.
[0100] During marginalization, the states to be removed and the remaining states are reordered, and a joint quadratic form is constructed with respect to the states to be removed and the remaining states. Schur complement processing is performed on the states to be removed to obtain new prior constraints only concerning the remaining states. These prior constraints are added to the objective function as marginalization prior factors for the next round of window optimization. During feature processing, if a feature is only observed by the key image to be removed and has not formed stable long-term tracking, the feature is deleted; if a feature is observed by the remaining key images, its inverse depth and lifecycle records are retained; if a feature is inactive but has previously met the long-term tracking condition, its historical constraints are retained through marginalization priors.
[0101] After estimating the state of the current window, the sliding window moves forward, requiring the removal of the earliest key image data within the window. To preserve the historical constraint information carried by the removed frames, a marginalization operation is used to transform them into prior constraints through matrix transformation. The set of states to be marginalized is denoted as X. m The set of remaining state variables retained within the window is denoted as X. r Sum all the constraint factors to be marginalized to construct a condition regarding X. m and X r The joint quadratic form, and rearranged the state order: Among them, A mm A is the self-information matrix of the state to be marginalized. mr It is the cross-information matrix of the state to be marginalized and the remaining state, A rm It is the cross-information matrix of the remaining states and the states to be marginalized, A rr It is the self-information matrix of the remaining states, b m b is the information vector corresponding to the state to be marginalized. r X is the information vector corresponding to the remaining states. r Using Shure complement X m Marginalization is performed to obtain information only about the remaining state X. r Simplified quadratic form: in, It is the remaining state X after marginalization. r The updated information matrix, It is the remaining state X after marginalization. r The updated information vector. After marginalization, the removed state X m The information is converted into information about the remaining state X r From the prior information, a new prior information matrix is obtained. and information vector b p This constitutes a marginalized prior constraint: Among them, H p It is the updated information matrix The square root factor. Prior constraints are added as constants to the subsequent optimization objective function, ensuring that historical information from the removed key images continues to constrain the optimization of the remaining states within the window.
[0102] Then return to process the next image until the task is completed, such as until the robot reaches the unloading point.
[0103] This invention addresses visual degradation scenarios caused by rapid rotation by establishing a joint evaluation mechanism based on the proportion of long-tracking feature points and the proportion of new feature points, using feature lifecycles as the basis. This allows visual observation quality to be obtained through executable data statistical steps, unlike methods that determine visual observation quality solely based on grayscale difference, single tracking count, or angular velocity amplitude. The proportion of long-tracking feature points, the proportion of new feature points, and angular velocity intensity are used to form the degree of visual degradation, and the information matrix weights of visual reprojection residuals and inertial pre-integration residuals are adjusted accordingly in the back-end nonlinear optimization. Throughout the entire process of sliding window initiation, window filling, key image addition, old state marginalization, and prior constraint reinjection, the unique identifier, first observation frame, continuous tracking length, newly added or inactive state, and inverse depth state of each feature point are retained, enabling the proportion of long-tracking feature points and the proportion of new feature points to participate in each round of window optimization. Finally, the invention outputs navigation and positioning results that include position, velocity, attitude, and degree of visual degradation. The point to be protected is the complete implementation process of visual degradation recognition, weight generation, factor graph optimization, sliding window management, and its application in the visual inertial state estimation system based on the ratio of long-tracking feature points and the ratio of new feature points.
[0104] Figure 3 This is a schematic diagram of a visual inertial state estimation device provided in an embodiment of the present invention. The embodiments of the present invention are applicable to combined navigation and positioning in land and low-altitude scenarios, and are particularly suitable for robots equipped with binocular cameras and inertial measurement units to perform positioning and navigation in scenarios where rapid rotation or drastic changes in viewing angle cause visual constraints to degrade. The device can perform visual inertial state estimation methods and can be implemented in hardware and / or software.
[0105] See Figure 3 The visual inertial state estimation device shown includes: The data acquisition module 301 is used to collect the current image and the current inertial measurement data of the alignment during the task execution process in real time; The feature tracking module 302 is used to perform feature matching and tracking on the current image and historical images of the same task, and to determine the tracking feature point information of the current image; The visual degradation assessment module 303 is used to count the first number of long-tracking feature points and the second number of newly appearing feature points based on the tracking feature point information of the current image, and to determine the degree of visual degradation based on the first number and the second number. The weight generation module 304 is used to determine visual weight and inertial weight based on the degree of visual degradation, wherein the visual weight is negatively correlated with the degree of visual degradation and the inertial weight is positively correlated with the degree of visual degradation. The first residual construction module 305 is used to pre-integrate the current inertial measurement data and the historical inertial measurement data between the current image and the previous key image to construct the inertial pre-integration residual. The second residual construction module 306 is used to construct a visual reprojection residual based on the tracking feature point information; The objective function construction module 307 is used to construct an objective function based on the visual weights, the inertial weights, the inertial pre-integration residuals, the visual reprojection residuals, and the marginalization prior constraints. The optimization solution module 308 is used to iteratively solve the objective function to obtain the motion state estimation result of the current image, which includes the current position, current velocity and current attitude.
[0106] In an optional embodiment, the visual degradation assessment module 303 is specifically used for: Obtain the third number of valid feature points in the current image; Calculate the proportion of long-tracking feature points based on the first quantity and the third quantity; Calculate the proportion of new feature points based on the second quantity and the third quantity; The visual degradation degree is obtained by weighted fusion of the proportion of long-tracking feature points and the proportion of new feature points.
[0107] In an optional embodiment, the weight generation module 304 is specifically used for: The degree of visual degradation is continuously mapped using a Gaussian function to obtain the degradation mapping value; The inertial weight is determined based on the degraded mapping value, the inertial reference weight, and the weight enhancement coefficient. The visual weights are determined based on the degradation mapping value, the visual reference weight, and the visual weight suppression coefficient; wherein the inertial weight is positively correlated with the degradation mapping value, and the visual weight is negatively correlated with the degradation mapping value.
[0108] In an optional embodiment, the apparatus further includes a key image detection module; the key image detection module is configured to: Before constructing the visual reprojection residual based on the tracking feature point information, the average disparity between the current image and the previous key image is calculated; When the average disparity is greater than the disparity threshold, the current image is identified as a key image; When the number of effective tracking feature points in the current image is less than the effective number threshold, the current image is determined as a key image, and the visual reprojection residual is constructed based on the tracking feature point information of each existing key image.
[0109] In an optional embodiment, the apparatus further includes an edge-processing module; the edge-processing module is configured to: When the current image is determined to be a key image and the number of key images meets the removal condition, the key image with the earliest time is selected as the image to be removed. When the current image is not a key image or the average disparity is less than the disparity threshold, the second newest key image is selected as the image to be removed. When the image to be removed is a degraded image, the marginalization prior constraint is determined based on the inertial pre-integration residual of the image to be removed and the visual reprojection residual of the long-tracking feature points. When the image to be removed is a stable image, the marginalization prior constraint is determined based on the inertial pre-integration residual of the image to be removed and the visual reprojection residual of all feature points.
[0110] In an optional embodiment, the apparatus further includes a degradation detection module; the degradation detection module is configured to: Obtain the continuous change information of the quantity associated with the current image, wherein the continuous change information includes: the continuous change information of the first quantity and the continuous change information of the second quantity; Degradation detection is performed on the current image based on the continuously changing quantity information to obtain the degradation detection result of the current image, wherein the degradation detection result includes stability or degradation.
[0111] In an optional embodiment, the data acquisition module 301 is specifically used for: During the robot's handling task, images are acquired in real time by the robot using a binocular camera. Acquire the inertial measurement data collected by the robot in real time; The images and inertial measurement data are synchronized, and the current image and aligned current inertial measurement data are acquired.
[0112] The acquisition, storage, and application of data involved in the technical solutions of this invention comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0113] The visual inertial state estimation device provided in the embodiments of the present invention can execute the visual inertial state estimation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the method.
[0114] Figure 4 A schematic diagram of the structure of an electronic device 400 that can be used to implement an embodiment of the present invention is shown.
[0115] like Figure 4 As shown, the electronic device 400 includes at least one processor 401 and a memory, such as a read-only memory 402 or a random access memory 403, communicatively connected to the at least one processor 401. The memory stores computer programs executable by the at least one processor. The processor 401 can perform various appropriate actions and processes based on the computer program stored in the read-only memory 402 or loaded from storage unit 408 into the random access memory 403. The random access memory 403 may also store various programs and data required for the operation of the electronic device 400. The processor 401, read-only memory 402, and random access memory 403 are interconnected via a bus 404. An input / output interface 405 is also connected to the bus 404.
[0116] Multiple components in electronic device 400 are connected to input / output interface 405, including: input unit 406, such as keyboard, mouse, etc.; output unit 407, such as various types of monitors, speakers, etc.; storage unit 408, such as disk, optical disk, etc.; and communication unit 409, such as network card, modem, wireless transceiver, etc. Communication unit 409 allows electronic device 400 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0117] Processor 401 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 401 include, but are not limited to, central processing units, graphics processing units, various special-purpose artificial intelligence computing chips, various processors running machine learning model algorithms, digital signal processors, and any suitable processor, controller, microcontroller, etc. Processor 401 performs the various methods and processes described above, such as visual inertial state estimation methods.
[0118] In some embodiments, the visual-inertial state estimation method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 400 via read-only memory 402 and / or communication unit 409. When the computer program is loaded into random access memory 403 and executed by processor 401, one or more steps of the visual-inertial state estimation method described above may be performed. Alternatively, in other embodiments, processor 401 may be configured to perform the visual-inertial state estimation method by any other suitable means (e.g., by means of firmware).
[0119] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays, application-specific integrated circuits (ASICs), application-specific standard products (ASICs), systems-on-a-chip (SoCs), complex programmable logic devices, computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0120] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0121] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory, flash memory, optical fiber, portable compact disk read-only memory, optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0122] To provide interaction with the user, the systems and techniques described herein can be implemented on an operational detection device. This call response processing device includes: a display device (e.g., a cathode ray tube or 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 provides input to the call response processing device. Other types of devices can also be used to provide interaction with the user; for example, 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 voice input, speech input, or tactile input).
[0123] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0124] A computing system can include target user terminals and servers. Target user terminals and servers are generally geographically separated and typically interact via communication networks. The relationship between target user terminals and servers is created by computer programs running on the respective computers and establishing a target user-server relationship between them. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product within the cloud computing service system. It addresses the shortcomings of traditional physical hosts and virtual private servers, such as high management difficulty and weak business scalability.
[0125] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0126] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A visual-inertial state estimation method, characterized in that, include: Real-time acquisition of current image and aligned current inertial measurement data during task execution; Feature matching and tracking are performed on the current image and historical images of the same task to determine the tracking feature point information of the current image; Based on the tracking feature point information of the current image, the first number of long-tracking feature points and the second number of newly appearing feature points are counted, and the degree of visual degradation is determined based on the first number and the second number. Based on the degree of visual degradation, visual weights and inertial weights are determined. The visual weights are negatively correlated with the degree of visual degradation, and the inertial weights are positively correlated with the degree of visual degradation. The current inertial measurement data and the historical inertial measurement data between the current image and the previous key image are pre-integrated to construct the inertial pre-integration residual; Based on the tracking feature point information, a visual reprojection residual is constructed; Based on the visual weights, the inertial weights, the inertial pre-integration residuals, the visual reprojection residuals, and the marginalization prior constraints, an objective function is constructed. The objective function is solved iteratively to obtain the motion state estimation result of the current image, which includes the current position, current velocity, and current attitude.
2. The method according to claim 1, characterized in that, Determining the degree of visual degradation based on the first quantity and the second quantity includes: Obtain the third number of valid feature points in the current image; Calculate the proportion of long-tracking feature points based on the first quantity and the third quantity; Calculate the proportion of new feature points based on the second quantity and the third quantity; The visual degradation degree is obtained by weighted fusion of the proportion of long-tracking feature points and the proportion of new feature points.
3. The method according to claim 1, characterized in that, The step of determining visual weights and inertial weights based on the degree of visual degradation includes: The degree of visual degradation is continuously mapped using a Gaussian function to obtain the degradation mapping value; The inertial weight is determined based on the degraded mapping value, the inertial reference weight, and the weight enhancement coefficient. The visual weights are determined based on the degradation mapping value, the visual reference weight, and the visual weight suppression coefficient; wherein the inertial weight is positively correlated with the degradation mapping value, and the visual weight is negatively correlated with the degradation mapping value.
4. The method according to claim 1, characterized in that, Before constructing the visual reprojection residual based on the tracked feature point information, the method further includes: Calculate the average disparity between the current image and the previous key image; When the average disparity is greater than the disparity threshold, the current image is identified as a key image; When the number of effective tracking feature points in the current image is less than the effective number threshold, the current image is determined as a key image, and the visual reprojection residual is constructed based on the tracking feature point information of each existing key image.
5. The method according to claim 4, characterized in that, Also includes: When the current image is determined to be a key image and the number of key images meets the removal condition, the key image with the earliest time is selected as the image to be removed. When the current image is not a key image or the average disparity is less than the disparity threshold, the second newest key image is selected as the image to be removed. When the image to be removed is a degraded image, the marginalization prior constraint is determined based on the inertial pre-integration residual of the image to be removed and the visual reprojection residual of the long-tracking feature points. When the image to be removed is a stable image, the marginalization prior constraint is determined based on the inertial pre-integration residual of the image to be removed and the visual reprojection residual of all feature points.
6. The method according to claim 4, characterized in that, Also includes: Obtain the continuous change information of the quantity associated with the current image, wherein the continuous change information includes: the continuous change information of the first quantity and the continuous change information of the second quantity; Degradation detection is performed on the current image based on the continuously changing quantity information to obtain the degradation detection result of the current image, wherein the degradation detection result includes stability or degradation.
7. The method according to claim 1, characterized in that, The current image and aligned current inertial measurement data during the execution of the real-time acquisition task include: During the robot's handling task, images are acquired in real time by the robot using a binocular camera. Acquire the inertial measurement data collected by the robot in real time; The images and inertial measurement data are synchronized, and the current image and aligned current inertial measurement data are acquired.
8. A visual-inertial state estimation device, characterized in that, The device includes: The data acquisition module is used to collect the current image and aligned current inertial measurement data in real time during task execution; The feature tracking module is used to perform feature matching and tracking on the current image and historical images of the same task, and to determine the tracking feature point information of the current image; The visual degradation assessment module is used to count the first number of long-tracking feature points and the second number of newly appearing feature points based on the tracking feature point information of the current image, and to determine the degree of visual degradation based on the first number and the second number. A weight generation module is used to determine visual weights and inertial weights based on the degree of visual degradation, wherein the visual weights are negatively correlated with the degree of visual degradation, and the inertial weights are positively correlated with the degree of visual degradation. The first residual construction module is used to pre-integrate the current inertial measurement data and the historical inertial measurement data between the current image and the previous key image to construct the inertial pre-integration residual. The second residual construction module is used to construct a visual reprojection residual based on the tracking feature point information; The objective function construction module is used to construct an objective function based on the visual weights, the inertial weights, the inertial pre-integration residuals, the visual reprojection residuals, and the marginalization prior constraints. The optimization solution module is used to iteratively solve the objective function to obtain the motion state estimation result of the current image, which includes the current position, current velocity, and current attitude.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the visual inertial state estimation method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the visual inertial state estimation method according to any one of claims 1-7.
