Method, device, electronic device and medium for optimizing point cloud mapping quality
By obtaining optimization factor information, calculating residuals and weighting of covariance matrix inverse matrix, and processing abnormal factors, the distortion problem caused by factor conflicts in point cloud graph construction is solved, automatic anomaly detection and correction is realized, and the quality and efficiency of graph construction are improved.
Patent Information
- Application Number
- CN202510252250.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-05
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2045-03-05
AI Technical Summary
The existing technology has conflicts and errors between optimization factors during point cloud mapping construction, resulting in distorted optimization results. Traditional detection methods cannot effectively detect abnormalities, relying on manual inspections is high, making it difficult to meet the fast and efficient needs of engineering applications.
By obtaining optimization factor information, calculating residuals and weighting the covariance matrix inverse matrix, determining whether the residuals exceed the threshold, processing abnormal factors, and realizing automated abnormality monitoring and correction.
The quality and efficiency of point cloud map construction are improved, manual intervention is reduced, the stability and accuracy of point cloud map construction is ensured, and automated abnormal detection and correction are realized.
Smart Images

Figure CN119741461B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image data processing, and specifically relates to a method, device, electronic equipment and medium for optimizing point cloud mapping quality. Background Art
[0002] Point cloud mapping is a core topic in automatic localization and mapping (SLAM) technology. It generates three-dimensional point clouds from environmental data acquired by sensors, constructing environmental maps required by robots or unmanned systems. With the continuous development of SLAM technology, point cloud mapping has made significant progress in various application scenarios, especially in autonomous driving, drones, and robot navigation. Point cloud mapping technology has become a key means of supporting autonomous navigation.
[0003] Currently, the point cloud mapping process typically involves optimizing local maps and performing global optimization by combining optimization factors from various sensors (such as odometry, RTK satellite positioning, IMU, and loop closure detection). Within the graph optimization framework, these optimization factors can be used to fuse the local maps generated by odometry data into the global coordinate system, resulting in an accurate, navigation-capable global map. Graph optimization techniques can eliminate sensor errors and reduce accumulated map errors, thereby improving mapping quality.
[0004] However, existing technologies still face some challenges in optimizing the quality of point cloud mapping. Although graph optimization can effectively fuse local maps with global maps, conflicts between different optimization factors often occur during the optimization process in engineering applications. For example, there are varying degrees of errors between optimization factors such as odometers, IMUs, and RTKs, and they may not fully meet all optimization conditions, resulting in distorted optimization results. In this case, traditional layered detection methods often fail to effectively detect anomalies in point clouds because layered detection usually relies on the assumption that all optimization factors have been correctly integrated. However, conflicts between optimization factors can lead to significant deviations between the optimization results and the actual scene, making layered detection unable to accurately reflect the quality of point cloud mapping.
[0005] Currently, the quality assessment of point cloud mapping in most engineering fields relies on manual inspection. When optimization results show anomalies, manual inspection of the point cloud data is often required to identify distortions or other anomalies and manually annotate the outliers. This process is not only time-consuming but also costly, severely restricting the demand for batch point cloud mapping in engineering. This is especially true when large-scale maps need to be constructed quickly and efficiently, as manual intervention is clearly inefficient.
[0006] Therefore, it is necessary to provide a new solution to the above technical problems. Summary of the Invention
[0007] The purpose of the present invention is to provide a method, device, electronic device and medium for optimizing point cloud mapping quality, which can monitor optimization factor anomalies during point cloud mapping and improve mapping quality.
[0008] To achieve the above objectives, the present invention provides the following technical solutions:
[0009] In a first aspect, the present invention provides a method for optimizing point cloud mapping quality, comprising:
[0010] Obtain optimization factor information for point cloud mapping; optimize the point cloud trajectory based on the optimization factor information; calculate the residual of the optimization factor based on the optimized point cloud trajectory and the optimization factor information; weight the residual of the optimization factor with the inverse matrix of the covariance matrix to determine whether the weighted residual is greater than a first threshold; if so, process the optimization factor information and optimize the point cloud trajectory based on the processed optimization factor information.
[0011] In one or more embodiments, the optimization factors include an odometer factor, an RTK satellite positioning factor, an IMU factor, and a loopback factor.
[0012] In one or more embodiments, before optimizing the point cloud trajectory based on the optimization factor information, the method further includes: calculating the residual of the loop closure factor based on the point cloud trajectory and loop closure factor information before optimization; weighting the residual of the loop closure factor with the inverse matrix of the covariance matrix to determine whether the weighted residual is greater than a second threshold; if so, deleting the corresponding loop closure factor.
[0013] In one or more embodiments, the residual calculation formula of the optimization factor is: ,in, h ( x ) is the theoretical calculated value of the optimization factor measurement equation, Z is the true measured value of the optimization factor.
[0014] In one or more embodiments, the formula for weighting the residual of the optimization factor by the inverse matrix of the covariance matrix is expressed as: ,in, Var is the covariance matrix of the optimization factor information.
[0015] In one or more embodiments, when the optimization factor is a relative constraint factor, ,in, X 1 represents the pose variable of the first trajectory point, X 2 represents the pose variable of the second trajectory point; when the optimization factor is a unilateral constraint factor, ,in, X iRepresents the sensor input at a trajectory point.
[0016] In one or more embodiments, the optimization factor information is processed, including: when the optimization factor information is loop factor information, deleting the optimization factor information; when the optimization factor information is odometer factor information, RTK satellite positioning factor information or IMU factor information, increasing the noise weight of the optimization factor information.
[0017] In a second aspect, the present invention provides a device for optimizing the quality of point cloud mapping, comprising: a sensor, an optimization module, a calculation module, a weighting module and a processing module; the sensor is used to obtain optimization factor information for point cloud mapping; the optimization module is used to optimize the point cloud trajectory based on the optimization factor information; the calculation module is used to calculate the residual of the optimization factor based on the optimized point cloud trajectory and the optimization factor information; the weighting module is used to weight the residual of the optimization factor with the inverse matrix of the covariance matrix, and to determine whether the weighted residual is greater than a first threshold; the processing module processes the optimization factor information, and optimizes the point cloud trajectory based on the processed optimization factor information.
[0018] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for optimizing point cloud mapping quality as described above is implemented.
[0019] In a fourth aspect, the present invention provides a computer-readable medium carrying computer-executable instructions, which, when executed by a processor, are used to implement the method for optimizing point cloud mapping quality as described above.
[0020] Compared with the existing technology, the method, device, electronic device and medium for optimizing point cloud mapping quality provided by the present invention introduce multi-source sensor factors into a unified residual quantitative analysis framework, which can effectively detect abnormal factor information before and after map optimization; by locking the index of abnormal factors, they can be quickly eliminated or weighted corrected, reducing the distortion and flipping of point cloud optimization, and improving the stability and quality of point cloud mapping; this method realizes automated abnormality monitoring and correction in the point cloud mapping process, greatly reducing labor costs and improving mapping quality and efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments described in the present invention. Those skilled in the art can also derive other drawings based on these drawings without inventive effort.
[0022] Figure 1 This is a flow chart of a method for optimizing point cloud mapping quality in one embodiment of the present invention;
[0023] Figure 2 Schematic diagram of an apparatus for optimizing point cloud mapping quality according to an embodiment of the present invention;
[0024] Figure 3 FIG. 1 is a schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0026] With the continuous development of fields such as autonomous driving, drones, and robotics, point cloud mapping technology plays an increasingly important role in autonomous navigation and environmental modeling. During point cloud mapping, sensors generate point clouds by acquiring three-dimensional data to construct accurate environmental maps. Graph optimization technology, on the other hand, globally optimizes point clouds by integrating optimization factors from multiple sensors (such as odometry, IMU, RTK, loop closure factors, etc.) to improve map accuracy and robustness. However, in practical applications, the optimization process often suffers from optimization distortion caused by sensor errors or conflicts in optimization factors, making it difficult to evaluate point cloud quality. Existing point cloud anomaly detection methods (such as layered detection) often cannot effectively address these challenges.
[0027] In existing technologies, quality assessment of point cloud mapping typically relies on traditional layered inspection methods or manual inspection. When conflicts arise between optimization factors, traditional quality assessment methods cannot accurately detect anomalies or distortions in the optimization results, requiring manual intervention during the mapping process, significantly increasing time and costs. Furthermore, existing technologies lack a quantitative, automated means of analyzing point cloud mapping quality, nor do they offer strategies for real-time determination of anomalies during the point cloud optimization process.
[0028] To address these issues, this paper proposes a method for optimizing point cloud mapping quality, aiming to detect and correct optimization distortions that may exist during point cloud mapping through automated means. This method calculates the residuals of the optimization factors in the point cloud trajectory and, combined with a weighted covariance matrix, determines whether the residuals of the optimization factors exceed a set threshold. If the residual exceeds the threshold, it indicates that there may be problems with the optimization process of the point cloud trajectory, requiring further processing. This process not only improves the accuracy of point cloud mapping quality assessment but also effectively avoids the high cost of manual inspection.
[0029] Specifically, the present invention optimizes point cloud mapping quality through the following steps: First, the optimization factor information used for point cloud mapping is obtained, and then the point cloud trajectory is optimized based on this information. Next, the residual of the optimization factor is calculated and evaluated by inverse weighting of the covariance matrix. If the weighted residual exceeds a predetermined threshold, it indicates an anomaly in the optimization process, requiring modification of the optimization factor (such as increasing noise weights or removing outliers) and re-optimization based on the modified factors. This process ensures high precision and robustness in point cloud mapping, especially when faced with optimization factor conflicts and outliers, enabling real-time intervention, avoiding the blind spots inherent in traditional methods.
[0030] Please refer to Figure 1 FIG. 1 is a flow chart of a method for optimizing point cloud mapping quality in an embodiment of the present invention. The method for optimizing point cloud mapping quality specifically includes the following steps:
[0031] S101: Obtain optimization factor information for point cloud mapping.
[0032] In practical applications, point cloud mapping typically relies on multiple sensors to provide position and environmental data. For example, the odometry factor provides displacement information between adjacent time points; the RTK factor provides more accurate global positioning information; the IMU factor provides dynamic data such as acceleration and angular velocity, used to estimate the device's motion state; and the loop closure factor corrects accumulated errors by identifying the device's return to a known position. These factors, in different ways, provide the various constraints needed to optimize point cloud trajectories.
[0033] There are various methods for obtaining these optimization factors. For example, real-time data collected by sensor modules (such as lidar, IMU, and RTK positioning systems) can be transmitted via communication protocols to a computing platform, where the data is processed and fused. Specifically, sensor data may be cleaned and formatted through a series of preprocessing steps (such as filtering and denoising) before being input into the graph optimization system. Obtaining loop factors may rely on vision-based loop detection methods to identify when a device has returned to a previous location and generate constraints.
[0034] For example, in a point cloud mapping task for an autonomous vehicle, the point cloud data provided by the LiDAR (Lidar) scans and measures the distance and angle of objects. Simultaneously, the IMU provides vehicle dynamics information, and the RTK positioning system provides high-precision geographic coordinates. All of this information together constitutes the input data for optimization factors. The effective acquisition and integration of this data is a prerequisite for ensuring the smooth execution of subsequent optimization calculations.
[0035] Odometry factor is a common constraint used in factor graph optimization. It provides pose constraints between adjacent trajectory points based on sensors such as lidar or wheel speedometers. In the factor graph, the odometry factor is usually used as a relative constraint factor (between factors), which links the pose information between two trajectory points and represents the pose changes at adjacent moments. By adding these pose constraints to the factor graph, the error accumulation of the trajectory can be effectively limited and long-term drift can be avoided. For example, when a vehicle passes through a known path, the odometry factor measured by the lidar can help constrain the vehicle's position and pose, ensuring that its trajectory in the global coordinate system does not deviate too much. Therefore, the laser odometry factor is crucial in the optimization process, especially in the absence of an external positioning system. It can provide reliable local constraints and reduce errors caused by sensor noise.
[0036] The loop closure factor is an optimization factor provided by the loop closure detection module. It corrects the trajectory by identifying when the device returns to a known position. When the device returns to an area it has previously passed through, the loop closure factor generates new constraint information based on the pose constraints between the device's current pose and historical trajectory points. This constraint information is introduced into the factor graph optimization as a between factor to help adjust the global consistency of the entire trajectory. The loop closure factor is particularly suitable for scenarios with long-term operation or large-scale mapping. For example, in an application scenario of an autonomous vehicle, if the vehicle passes through the same location during the mapping process, the loop closure detection module can identify this repeated path and generate a corresponding loop closure factor for the trajectory, forcing the optimization algorithm to constrain adjacent poses and correct the offset caused by error accumulation, thereby greatly improving the accuracy of the global map.
[0037] The RTK satellite positioning factor provides accurate position constraints for trajectory points through the high-precision Global Positioning System (GPS). The RTK (Real-Time Kinematic Differential Positioning) factor is a unilateral factor (GPS factor) in graph optimization that specifically constrains the position of specific trajectory points. Due to the high accuracy of the RTK system (the error is typically only a few centimeters), it can provide extremely accurate position information for the optimization process. For example, on urban roads or open areas, RTK positioning can provide accurate latitude and longitude coordinates for each trajectory point, which serves as a benchmark for global optimization. Because GPS signals can be unstable or lost in certain environments (such as underground or in densely populated urban centers), the RTK satellite positioning factor is particularly suitable for areas with good satellite signals, providing strong global constraints for the optimization process.
[0038] The IMU factor is constraint information provided by the inertial measurement unit (IMU). The IMU obtains the device's acceleration and angular velocity information through the accelerometer and gyroscope, thereby inferring the device's motion state. In graph optimization, the IMU factor also serves as a between factor, providing constraints on the position and posture between adjacent trajectory points. The IMU factor is particularly important in highly dynamic environments. It can infer the device's motion trajectory from acceleration and angular velocity when the GPS signal is weak or completely unavailable. For example, in tunnels or indoor environments, the IMU factor provides reliable dynamic constraints for point cloud mapping by continuously tracking the device's motion state. The IMU factor can effectively supplement the shortcomings of GPS and lidar, preventing error accumulation and drift.
[0039] S102: Optimizing the point cloud trajectory based on the optimization factor information.
[0040] In practical implementations, optimizing point cloud trajectories typically relies on graph optimization techniques. In this framework, maps and trajectories are modeled as a graph, where each node represents a trajectory point or map element, and each edge represents a different type of constraint, such as pose constraints or position constraints. The goal of graph optimization is to minimize the error across all edges in the graph, making the relationships between nodes more consistent with the actual trajectory and environmental characteristics.
[0041] Specifically, based on the optimization factor information obtained in step S101, in step S102, these factors are first constructed as constraints in the graph in the form of a mathematical model. For example, the laser odometry factor provides constraints on the pose differences between adjacent track points, the IMU factor provides dynamic constraints on the trajectory based on acceleration and angular velocity information, the RTK factor provides a high-precision reference for the absolute position of the track points, and the loop closure factor provides global position constraints based on loop closure detection information. After introducing this information as constraints into the factor graph, a graph optimization algorithm (such as the Levenberg-Marquardt algorithm or the Gauss-Newton algorithm) is used to calculate and solve the optimal track point pose.
[0042] For example, in an autonomous driving scenario, a vehicle acquires continuous point cloud data using lidar and related trajectory information using an RTK positioning system and an IMU sensor. As the vehicle drives, the IMU factor provides constraints on trajectory continuity by sensing the vehicle's acceleration and angular velocity, while the odometry factor provides relative pose constraints between adjacent frames using radar data. As the vehicle drives, RTK positioning errors may occur due to factors such as signal obstruction, causing the vehicle's trajectory to drift. In this case, the loop closure factor plays a crucial role. If the vehicle traverses a previous path, the loop detection module identifies and provides a constraint to correct the global position of the trajectory, thereby correcting for drift caused by RTK positioning errors. By incorporating all this constraint information into the graph optimization algorithm, the optimization algorithm can adjust the trajectory so that the relative and absolute positions of all trajectory points are more consistent with reality.
[0043] The core purpose of this process is to minimize sensor data errors and noise through the fusion of multi-source data, thereby making the point cloud trajectory more accurate. The optimized trajectory can significantly reduce error accumulation, avoid drift problems caused by long-term sensor use, and improve the accuracy and reliability of point cloud mapping. For example, the optimized point cloud trajectory can more accurately reflect the geometric characteristics of the real environment, providing more precise data support for subsequent map construction and environmental understanding.
[0044] In an exemplary embodiment, before optimizing the point cloud trajectory based on the optimization factor information, the method further includes: calculating the residual of the loop closure factor based on the point cloud trajectory and loop closure factor information before optimization; weighting the residual of the loop closure factor with the inverse matrix of the covariance matrix to determine whether the weighted residual is greater than a second threshold; if so, deleting the corresponding loop closure factor.
[0045] The loop closure factor may produce errors in some cases, especially when the accuracy of loop closure detection is not high enough. The wrong loop closure factor may lead to deviations in the optimization results. Therefore, the loop closure factor needs to be further verified and screened before graph optimization.
[0046] The loop closure factor provides a global position constraint by detecting loops in the point cloud trajectory. If the system detects that the current trajectory point is similar in position to a previous trajectory point, a loop is considered to have occurred, and a constraint is introduced for the relative pose between the two trajectory points. However, during the loop closure detection process, the loop closure factor can sometimes produce errors due to environmental complexity or sensor noise. For example, the sensor may incorrectly identify a loop due to short-term occlusion, signal loss, or computational error, thereby introducing an inappropriate loop constraint.
[0047] To effectively avoid this situation, the present invention adds a step before trajectory optimization, namely calculating the residual of the loop closure factor and screening it. Specifically, this step detects whether it is reasonable by calculating the residual of the loop closure factor. The residual of the loop closure factor refers to the difference between the pose constraints provided by the loop closure factor and the actual optimized trajectory points. If the difference is too large, it means that the loop closure factor may be wrong and should be eliminated.
[0048] When calculating the residual of the loop factor, the system first needs to consider the covariance matrix of the loop factor. The covariance matrix reflects the credibility of the loop factor data. A loop factor with a higher covariance indicates that its data is not reliable enough, which may have a greater impact on the optimization result. For this reason, the present invention adopts the inverse matrix weighting method of the covariance matrix to process the residual of the loop factor. The inverse matrix weighting can be weighted according to the covariance of the loop factor. The residual produced by the loop factor with lower weight has less influence, while the loop factor with higher weight will have a greater impact on the judgment of the residual.
[0049] When the weighted loop closure factor residual is greater than the set second threshold, the system will consider the loop closure factor to be unqualified and may be erroneous loop closure data, and will decide to remove it from the optimization process. This is done to prevent the erroneous loop closure factor from negatively impacting the point cloud trajectory optimization process and prevent the error from being further propagated and accumulated. If the weighted residual is less than or equal to the second threshold, it means that the loop closure factor constraint is reasonable and can continue to participate in the optimization process.
[0050] S103: Calculating the residual of the optimization factor based on the optimized point cloud trajectory and the optimization factor information.
[0051] During point cloud trajectory optimization, optimization factors provide constraints, such as odometry, loopback factors, RTK satellite positioning factors, and IMU factors. These factors reflect the trajectory estimation error through the difference between actual measured values and theoretical values. In step S103, the residual of the optimization factor is calculated by comparing the optimized point cloud trajectory with the measurement equations of the relevant factors. In other words, whether the optimized point cloud trajectory meets the theoretical calculation expectations under the constraints of each factor is determined by calculating the residual.
[0052] In the specific implementation, it is assumed that a set of optimized trajectory data is obtained through the graph optimization algorithm. After these trajectory data are updated, the optimization factors (such as laser odometry, loop closure factor, RTK positioning, etc.) still need to provide constraints on the trajectory. When calculating the residual, the measurement equation is first calculated based on the optimized trajectory and the relevant optimization factors (such as the pose constraint provided by the odometry factor, the loop constraint provided by the loop closure factor, etc.), and the theoretical calculation value corresponding to each factor is obtained. h ( x Then, calculate the theoretical values and the actual measured values. Z The difference between This residual quantifies the deviation between the optimization result and the actual measurement data and is an important basis for evaluating the optimization effect.
[0053] For example, in a SLAM system using lidar, the laser odometry factor provides a constraint on the pose change between two frames. The optimized trajectory data may deviate from the actual measured data, and the residual calculation is used to quantify this deviation. If the optimized trajectory is accurate, the residual should be close to zero. However, a large residual indicates a problem with the trajectory optimization, possibly due to incomplete constraints during the optimization process or poor data quality.
[0054] The calculation of residuals not only helps determine whether the optimization is successful, but also provides feedback for subsequent optimization processes. In actual SLAM systems, factors with large residuals may affect the accuracy of the global map. Therefore, the weights of the optimization factors can be adjusted or the factors can be eliminated based on the residual values. For example, when the residual of the loopback factor is too large, it may indicate that the constraint information of the loopback factor is incorrect, resulting in the accumulation of trajectory errors. In this case, the loopback factor can be weighted, or in extreme cases, the factor can be eliminated to avoid its negative impact on the optimization results.
[0055] In the optimization factor framework, factors provide information for point cloud trajectory optimization through different types of constraints. Specifically, optimization factors are usually divided into relative constraint factors (between factors) and unilateral constraint factors (single factors), and their functions and mathematical expressions in the optimization graph are different.
[0056] Relative constraint factors (such as odometry factor, IMU factor, and loop closure factor) are used to describe the relative pose relationship between two track points. These factors provide constraints between adjacent track points. For example, the odometry factor typically represents the pose change between two consecutive frames, while the IMU factor can represent the relative motion measured by the accelerometer or gyroscope.
[0057] For this type of optimization factor, the calculation formula is ,in, X 1 represents the pose variable of the first trajectory point, X 2 represents the pose variable of the second trajectory point. This formula reflects the relationship between the trajectory points in the optimization. Specifically, it represents the pose variable from the first trajectory point X 1 to the second trajectory point X 2's pose transformation.
[0058] Unilateral constraint factors (such as RTK satellite positioning factors) usually provide constraint information for a single track point. The RTK factor provides global position information of the track point through GPS and is usually expressed as a position constraint. For this type of factor, the calculation formula is ,in, X i Represents the sensor input for a trajectory point (e.g., the specific location of an RTK position). The RTK factor is used to provide a global position constraint, ensuring that certain key locations in the global map have relatively accurate position information.
[0059] S104: performing weighting of the inverse matrix of the covariance matrix on the residual of the optimization factor, and determining whether the weighted residual is greater than a first threshold.
[0060] Because sensors used in real-world applications may have varying measurement accuracy and noise characteristics, it's essential to weight the residuals of each sensor. This weighting process uses the inverse of the covariance matrix, a process derived from the Mahalanobis distance. This approach eliminates noise differences between different sensors and ensures that all residuals are comparable under the same criteria during the optimization process, thereby improving the accuracy and robustness of point cloud mapping.
[0061] Sensors of the same type, such as lidar, IMU, and GPS, have different noise characteristics. These noise characteristics can lead to significant differences in the measurement accuracy and uncertainty of the same sensor under different environments. To effectively compare and evaluate the residuals of all sensors on a unified scale, inspired by the Mahalanobis distance, a weighted information matrix (the inverse of the covariance matrix) is introduced. This weighted information matrix eliminates differences in noise levels between sensors, ensuring that each sensor's residual plays a role consistent with its measurement accuracy during optimization.
[0062] Mahalanobis distance is a metric used to measure the distance between data points. Unlike Euclidean distance, Mahalanobis distance takes into account the covariance structure of the data. Traditional Euclidean distance calculations rely solely on the differences between data points in each dimension, assuming that all dimensions have the same scale and that features are independent of each other. However, in real-world data, especially multidimensional data, features are often correlated, and the variance of each feature may vary. Directly using Euclidean distance in such cases can be misleading because it fails to account for correlation and scale differences between features. Mahalanobis distance addresses this issue by introducing the covariance matrix and its inverse, allowing distance calculations to be performed on a unified scale, eliminating the effects of feature correlation and scale differences.
[0063] In the specific implementation, for the residual generated by each sensor, we first need to obtain the covariance matrix of the sensor Var , which reflects the uncertainty and noise characteristics of the sensor measurement. The inverse matrix of the covariance matrix is Var −1 This is called the information matrix, and it is used to weight the residuals generated by each sensor. The introduction of the information matrix allows different residuals to be weighted using the same criteria, accounting for variations in sensor accuracy under different conditions. For example, in open areas, GPS signal quality is good, resulting in smaller measurement errors. However, in urban canyons, GPS accuracy is affected by building obstructions, resulting in larger measurement errors. In such cases, GPS residuals need to be weighted according to the noise level of the environment to prevent GPS data with excessive errors from being overweighted in the optimization process.
[0064] This weighting method enables the sensor residuals to be compared on a uniform scale, thereby determining whether a residual is greater than a set threshold. In the formula, the weighted residual expression is ,in, Varis the covariance matrix, which reflects the uncertainty of the measurement. By weighting the residual of each sensor factor, the contribution of each sensor to the optimization result can be more accurately evaluated, and the optimization inaccuracy caused by excessive measurement noise can be effectively avoided.
[0065] For example, in a specific application, consider a SLAM system that uses LiDAR, IMU, and GPS simultaneously for point cloud mapping. In this system, the measurement data provided by the LiDAR may be very accurate, and the IMU can also provide relatively reliable relative motion information. However, the GPS signal in urban environments is often blocked by buildings, resulting in large measurement errors. In this case, if the GPS residuals are not weighted, they may affect the optimization results of the entire system. Because GPS measurement errors in urban canyons are large, the unweighted residuals may exceed the set threshold and be mistakenly judged as anomalous data. By introducing the inverse matrix of the covariance matrix for weighting, we can effectively eliminate these noise effects in the GPS measurement residuals, so that their contribution to the optimization results matches their measurement accuracy, thereby ensuring the stability and accuracy of the optimization.
[0066] This weighted residual can also be used to identify outliers. When the weighted residual exceeds a set threshold, the system deems the data abnormal and takes appropriate action, such as removing the loopback factor or re-weighting the sensor. This method effectively eliminates unreliable data caused by sensor failure or extreme environmental conditions, preventing it from unnecessarily interfering with the optimization process.
[0067] S105: If yes, process the optimization factor information, and optimize the point cloud trajectory based on the processed optimization factor information.
[0068] In actual implementation, optimization factors may be affected by various factors, including sensor noise, measurement errors, and external environmental interference. These factors may cause some optimization factors to fail to accurately reflect the actual constraints during trajectory optimization and may even introduce abnormal data, thereby affecting the optimization results. Therefore, in step S105, the optimization factors must first be properly processed to eliminate factors that do not meet the requirements and ensure that only the most effective factors are used for subsequent optimization calculations.
[0069] One possible approach is to optimize by weighting the optimization factors. During this process, each factor can be weighted based on information such as its signal-to-noise ratio and measurement accuracy. For example, the GPS sensor's pose factor can be given a higher weight in open areas due to stronger signals and smaller measurement errors. In contrast, in urban canyons or other obstructed environments, where GPS signals are weaker and measurement errors are larger, a lower weight can be assigned. This weighting approach ensures that the system relies more heavily on high-quality sensor data during optimization, minimizing the impact of low-quality data on the optimization results.
[0070] Another approach is to filter or denoise the optimization factors. Sensor errors or abnormal data often cause some optimization factors to be inconsistent with actual conditions. Therefore, algorithms (such as Kalman filtering and mean filtering) are needed to smooth the optimization factors and remove high-frequency noise and abnormal fluctuations. For example, if the residual of a loopback factor is too large, it may indicate that the factor is affected by environmental interference or sensor failure. In this case, the system can determine whether the factor should be adjusted or eliminated by examining the trend of the residual.
[0071] Furthermore, for certain types of optimization factors, such as loop closure factors or IMU factors, these factors can be further optimized by combining them with pose graph optimization algorithms. For example, through graph optimization methods, the system can convert the optimization factors into a pose graph, where each node represents a trajectory point and each edge represents an optimization factor (such as relative pose, GPS pose, or IMU measurement). During processing, by solving the minimization problem in the graph, the influence of the optimization factors can be effectively incorporated into the optimization calculation of the point cloud trajectory, thereby improving the accuracy of the final optimization result.
[0072] In an exemplary embodiment, when the weighted residual is greater than a first threshold, the optimization factor information is processed, including: when the optimization factor information is loop factor information, deleting the optimization factor information; when the optimization factor information is odometer factor information, RTK satellite positioning factor information or IMU factor information, increasing the noise weight of the optimization factor information.
[0073] Regarding the processing of loop closure factor information, when the optimization factor is a loop closure factor, the system chooses to delete these optimization factors. This is because loop closure factors are typically used to correct the current trajectory based on certain known locations or map information to achieve closed-loop optimization of the trajectory. However, loop closure factors may produce large errors or inconsistencies due to factors such as environmental changes, untimely map updates, or sensor errors. If these errors are not properly handled, they will negatively impact the optimization process of the point cloud trajectory. Therefore, deleting unreliable loop closure factors is an effective way to ensure optimization quality.
[0074] Other optimization factors, such as odometry, RTK satellite positioning, and IMU factors, typically experience varying degrees of noise in different environments and conditions. This noise is particularly pronounced when the sensor operates in low-signal environments (such as urban canyons and tunnels). To prevent these factors from significantly influencing the final optimization results, the system reduces their influence during the optimization process by increasing noise weights.
[0075] In summary, the method for optimizing point cloud mapping quality provided by the present invention introduces multi-source sensor factors into a unified residual quantitative analysis framework, which can effectively detect abnormal factor information before and after map optimization. By locking the index of abnormal factors, they can be quickly eliminated or weighted corrected, reducing the distortion and flipping of point cloud optimization and improving the stability and quality of point cloud mapping. This method realizes automated abnormality monitoring and correction in the point cloud mapping process, greatly reducing labor costs and improving mapping quality and efficiency.
[0076] Please refer to Figure 2 As shown, based on the same inventive concept as the aforementioned method for optimizing point cloud mapping quality, the present invention provides an apparatus 200 for optimizing point cloud mapping quality, which includes: a sensor 201, an optimization module 202, a calculation module 203, a weighting module 204 and a processing module 205.
[0077] Sensor 201 is used to obtain optimization factor information for point cloud mapping. Optimization module 202 is used to optimize the point cloud trajectory based on the optimization factor information. Calculation module 203 is used to calculate the residual of the optimization factor based on the optimized point cloud trajectory and the optimization factor information. Weighting module 204 is used to weight the residual of the optimization factor using the inverse covariance matrix and determine whether the weighted residual is greater than a first threshold. Processing module 205 processes the optimization factor information and optimizes the point cloud trajectory based on the processed optimization factor information.
[0078] Please refer to Figure 3 As shown, an embodiment of the present invention further provides an electronic device 300, which includes at least one processor 301, a memory 302 (e.g., a non-volatile memory), a storage 303, and a communication interface 304. The at least one processor 301, the storage 302, the storage 303, and the communication interface 304 are connected together via an internal bus 305. The at least one processor 301 is configured to call at least one program instruction stored or encoded in the storage 302, so that the at least one processor 301 performs various operations and functions of the method for optimizing point cloud mapping quality described in various embodiments of this specification.
[0079] In the embodiments of the present specification, the electronic device 300 may include but is not limited to: a personal computer, a server computer, a workstation, a desktop computer, a laptop computer, a notebook computer, a mobile electronic device, a smart phone, a tablet computer, a cellular phone, a personal digital assistant (PDA), a handheld device, a messaging device, a wearable electronic device, a consumer electronic device, and the like.
[0080] An embodiment of the present invention further provides a computer-readable medium carrying computer-executable instructions. When the computer-executable instructions are executed by a processor, they can be used to implement the various operations and functions of the method for optimizing point cloud mapping quality described in the various embodiments of this specification.
[0081] The computer-readable medium in the present invention can be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.
[0082] In the present invention, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.
[0083] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0084] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatuses, systems, and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0085] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the invention can be embodied in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the invention is defined by the appended claims, not the foregoing description, and all variations within the meaning and range of equivalents of the claims are intended to be included therein. Any reference sign in a claim should not be construed as limiting the claim to which it relates.
[0086] In addition, it should be understood that although this specification is described in terms of implementation methods, not every implementation method contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.
Claims
1. A method for optimizing point cloud mapping quality, characterized in that: include: Obtain optimization factor information for point cloud mapping; Optimizing the point cloud trajectory based on the optimization factor information; Calculating the residual of the optimization factor based on the optimized point cloud trajectory and the optimization factor information; Performing weighting of the inverse matrix of the covariance matrix on the residual of the optimization factor, and determining whether the weighted residual is greater than a first threshold; If yes, process the optimization factor information and optimize the point cloud trajectory based on the processed optimization factor information; when the optimization factor information is odometer factor information, RTK satellite positioning factor information or IMU factor information, increase the noise weight of the optimization factor information; The residual calculation formula of the optimization factor is: , h ( x ) is the theoretical calculated value of the optimization factor measurement equation, Z is the true measured value of the optimization factor; The formula for weighting the residual of the optimization factor by the inverse matrix of the covariance matrix is expressed as: , Var is the covariance matrix of the optimization factor information.
2. The method for optimizing point cloud mapping quality according to claim 1, characterized in that: The optimization factors include odometer factor, RTK satellite positioning factor, IMU factor and loopback factor.
3. The method for optimizing point cloud mapping quality according to claim 2, characterized in that: Before optimizing the point cloud trajectory based on the optimization factor information, the method further includes: Based on the point cloud trajectory and loop closure factor information before optimization, calculate the residual of the loop closure factor; Performing weighting of the inverse matrix of the covariance matrix on the residual of the loop closure factor, and determining whether the weighted residual is greater than a second threshold; If so, delete the corresponding loop factor.
4. The method for optimizing point cloud mapping quality according to claim 1, wherein: When the optimization factor is a relative constraint factor, ,in, X 1 represents the pose variable of the first trajectory point, X 2 represents the pose variable of the second trajectory point; When the optimization factor is a unilateral constraint factor, ,in, X i Represents the sensor input at a trajectory point.
5. The method for optimizing point cloud mapping quality according to claim 1, wherein: Processing the optimization factor information further includes: When the optimization factor information is loop factor information, the optimization factor information is deleted.
6. A device for optimizing point cloud mapping quality, characterized in that: include: Sensors, used to obtain optimization factor information for point cloud mapping; An optimization module, configured to optimize the point cloud trajectory based on the optimization factor information; A calculation module, configured to calculate the residual of the optimization factor based on the optimized point cloud trajectory and the optimization factor information; a weighting module, configured to perform weighting of the residual of the optimization factor by an inverse matrix of a covariance matrix, and determine whether the weighted residual is greater than a first threshold; a processing module, processing the optimization factor information and optimizing the point cloud trajectory based on the processed optimization factor information; When the weighted residual is greater than a first threshold and the optimization factor information is odometer factor information, RTK satellite positioning factor information, or IMU factor information, increasing the noise weight of the optimization factor information; The residual calculation formula of the optimization factor is: , h ( x ) is the theoretical calculated value of the optimization factor measurement equation, Z is the true measured value of the optimization factor; The formula for weighting the residual of the optimization factor by the inverse matrix of the covariance matrix is expressed as: , Var is the covariance matrix of the optimization factor information.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for optimizing point cloud mapping quality according to any one of claims 1 to 5 is implemented.
8. A computer-readable medium, characterized in that The computer-readable medium carries computer-executable instructions, which, when executed by a processor, are used to implement the method for optimizing point cloud mapping quality according to any one of claims 1 to 5.
Citation Information
Patent Citations
Synchronous positioning and mapping method based on laser radar and inertial navigation joint calibration
CN113781582A
Multi-pose source fusion positioning method based on factor graph
CN119437243A