Method and device for removing dynamic obstacles in point cloud, storage medium and equipment
By using KD trees in the SLAM system to search for nearest neighbors of point cloud data, and judging and removing dynamic obstacles, the problems of high computational complexity, sensitivity to light, and difficulty in data fusion in the prior art are solved, and efficient and robust dynamic obstacle removal effect is achieved.
Patent Information
- Application Number
- CN202510504310.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-05-23
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When dealing with dynamic obstacles, existing SLAM systems have high computational complexity, are sensitive to light, and are difficult to integrate data, resulting in system performance degradation.
By using the KD tree in point cloud data for nearest neighbor search, we can determine whether the data point is a distant isolated point, so as to determine whether it is a dynamic obstacle and remove it.
It realizes efficient identification and filtering of dynamic obstacles without additional sensors, high computing efficiency, suitable for real-time applications, strong robustness, and improves the stability and accuracy of the system.
Smart Images

Figure CN120032346A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a method, device, storage medium and equipment for removing dynamic obstacles in a point cloud. Background Art
[0002] As a key environmental perception sensor, LiDAR is widely used in simultaneous localization and mapping (SLAM) systems in fields such as autonomous driving, robot navigation, and drone technology. SLAM systems achieve real-time modeling of the environment and accurate estimation of their own positions by fusing sensor data. However, dynamic obstacles, such as pedestrians and vehicles, pose significant challenges to SLAM systems. The presence of these dynamic obstacles can cause discontinuities and instabilities in point cloud data, which affects the accuracy of the map and the reliability of navigation.
[0003] In existing SLAM systems, the recognition methods of dynamic obstacles mainly rely on motion modeling or external sensors such as cameras, radars, etc. Although these recognition methods can recognize and process dynamic obstacles to a certain extent, they have some limitations: 1. High computational complexity: Motion modeling usually requires complex algorithms and a lot of computing resources, which may be difficult to implement in real-time systems.
[0004] 2. Sensitive to lighting: Vision-based obstacle detection methods (such as cameras) are easily affected by lighting conditions, resulting in degraded performance at night or in bad weather.
[0005] 3. Data fusion is difficult: Multi-sensor data fusion requires solving problems such as data synchronization and timestamp alignment, which increases the complexity of the system. Summary of the invention
[0006] This application provides a method, device, storage medium and equipment for removing dynamic obstacles in a point cloud, which is used to solve the problems of high computational complexity, sensitivity to illumination and difficulty in data fusion when removing dynamic obstacles. The technical solution is as follows: According to a first aspect of the present application, a method for removing dynamic obstacles in a point cloud is provided, the method comprising: For each data point extracted from a current frame of point cloud data, obtaining the coordinates of the data point in a world coordinate system, and calculating the Euclidean distance between the data point and a radar according to the coordinates, wherein the point cloud data is collected by the radar; Determining whether the data point is a candidate point of a dynamic obstacle according to the Euclidean distance; If the data point is a candidate point of the dynamic obstacle, searching for the nearest neighbor point of the data point based on the KD tree, and judging whether the data point is a distant isolated point according to the search result; If the data point is a distant isolated point, the data point is determined as a point in a dynamic obstacle and is removed.
[0007] In a possible implementation, searching for the nearest neighbor point for the data point based on the KD tree, and judging whether the data point is a distant isolated point according to the search result, includes: Get the preset maximum number of neighbor points n, where n is a positive integer; Based on the KD tree, the nearest neighbor point of the data point is searched in the current frame of point cloud data to obtain m nearest neighbor points, where m is a positive integer and m≤n; Whether the data point is a distant isolated point is determined according to the m nearest neighbor points and the height of the data point.
[0008] In a possible implementation, judging whether the data point is a distant isolated point according to the m nearest neighbor points and the height of the data point includes: Determine whether a first distance between the data point and the nearest data point among the m nearest neighboring points is greater than a first distance threshold; Determine whether a second distance between the data point and the farthest data point among the m nearest neighboring points is greater than a second distance threshold, and the second distance threshold is greater than the first distance threshold; Determine whether the height of the data point is greater than a height threshold; If the first distance is greater than the first distance threshold, the second distance is greater than the second distance threshold, and the height is greater than the height threshold, it is determined that the data point is a distant isolated point.
[0009] In a possible implementation, the method further includes: Determine whether the data point is an unstable point according to the m nearest neighbor points; If the data point is an unstable point, the step of determining whether the data point is a distant isolated point based on the m nearest neighbor points and the height of the data point is triggered.
[0010] In a possible implementation manner, judging whether the data point is an unstable point according to the m nearest neighbor points includes: Determine whether m is less than n; Determine whether the square of the distance between the data point and the farthest data point among the m nearest neighboring points is greater than a third distance threshold; If m is smaller than n, or the squared distance value is larger than the third distance threshold, it is determined that the data point is an unstable point.
[0011] In a possible implementation manner, judging whether the data point is a candidate point of a dynamic obstacle according to the Euclidean distance includes: Determining whether the Euclidean distance is greater than a fourth distance threshold; If the Euclidean distance is greater than the fourth distance threshold, it is determined that the data point is a candidate point of a dynamic obstacle.
[0012] In a possible implementation, the method further includes: Determine whether the data point is a feature point, where the feature point is a point whose nearest neighbor point can be fitted into a plane; If the data point is the feature point, it is determined that the data point is a candidate point of a dynamic obstacle.
[0013] According to a second aspect of the present application, a device for removing dynamic obstacles in a point cloud is provided, the device comprising: a calculation module, configured to obtain, for each data point extracted from a current frame of point cloud data, a coordinate of the data point in a world coordinate system, and calculate a Euclidean distance between the data point and a radar according to the coordinate, wherein the point cloud data is collected by the radar; A judging module, used for judging whether the data point is a candidate point of a dynamic obstacle according to the Euclidean distance; The judgment module is further configured to search for a nearest neighbor point for the data point based on a KD tree if the data point is a candidate point of the dynamic obstacle, and judge whether the data point is a distant isolated point according to the search result; The removal module is used to determine the data point as a point in a dynamic obstacle and remove it if the data point is a distant isolated point.
[0014] According to a third aspect of the present application, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, and the at least one instruction is loaded and executed by a processor to implement the method for removing dynamic obstacles in a point cloud as described above.
[0015] According to a fourth aspect of the present application, an electronic device is provided, comprising the device for removing dynamic obstacles in the point cloud.
[0016] The beneficial effects of the technical solution provided by this application include at least: Based on the KD tree, a nearest neighbor search is performed on each data point in the point cloud data. According to the nearest neighbor point and the data point, it is determined whether the data point is a distant isolated point. If it is a distant isolated point, it is determined that the data point is a point in the obstacle. In this way, dynamic obstacles can be efficiently identified and filtered without additional sensors, and complex calculations or large amounts of data processing are not required. The calculation efficiency is high, it is suitable for real-time applications, and it is robust, which improves the stability and accuracy of the system.
[0017] Whether a data point is a dynamic obstacle is analyzed based on the number of nearest neighbor points searched and the distance between the nearest neighbor point and the data point. This avoids the misjudgment problem caused by traditional methods that only rely on single distance information, and improves the accuracy and robustness of data point detection in dynamic obstacles.
[0018] By judging the distance and height, we ensure that only obvious data points are eliminated, thereby protecting the data points of static structures from being misidentified and improving the accuracy of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0020] Figure 1 is a flow chart of a method for removing dynamic obstacles in a point cloud provided by an embodiment of the present application; Figure 2 is a flow chart of a method for removing dynamic obstacles in a point cloud provided by an embodiment of the present application; Figure 3 is a top view of point cloud data before dynamic obstacles are removed provided by an embodiment of the present application; Figure 4 is a top view of point cloud data after dynamic obstacles are removed provided by an embodiment of the present application; Figure 5 is a side view of point cloud data before dynamic obstacles are removed provided by an embodiment of the present application; Figure 6 is a side view of point cloud data after dynamic obstacles are removed provided by an embodiment of the present application; Figure 7 It is a structural block diagram of a device for removing dynamic obstacles in a point cloud provided by an embodiment of the present application. DETAILED DESCRIPTION
[0021] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0022] like Figure 1 As shown, it shows a method flow chart of a method for removing dynamic obstacles in a point cloud provided by an embodiment of the present application, and the method for removing dynamic obstacles in a point cloud can be applied to electronic devices. The method for removing dynamic obstacles in a point cloud may include: Step 101, for each data point extracted from the current frame of point cloud data, obtain the coordinates of the data point in the world coordinate system, and calculate the Euclidean distance between the data point and the radar according to the coordinates. The point cloud data is collected by the radar.
[0023] The radar can periodically collect data about the external environment and combine the data points collected each time into a frame of point cloud data.
[0024] For each frame of point cloud data, the laser inertial odometer in the electronic device extracts a data point from the point cloud data each time to determine whether the data point is a point in a dynamic obstacle; if the data point is a point in a dynamic obstacle, the data point is removed; if the data point is not a point in a dynamic obstacle, the data point is retained. After traversing all the data points in a frame of point cloud data, all the retained valid data points are combined into a new frame of point cloud data to prepare for online laser inertial odometer matching.
[0025] For each extracted data point, the laser inertial odometer converts the coordinates of the data point from the radar coordinate system to the world coordinate system, and then calculates the Euclidean distance based on the converted coordinates and the radar coordinates.
[0026] Step 102: Determine whether the data point is a candidate point of a dynamic obstacle based on the Euclidean distance.
[0027] Step 103: If the data point is a candidate point of a dynamic obstacle, the nearest neighbor point is searched for the data point based on the KD tree, and whether the data point is a distant isolated point is determined based on the search results.
[0028] Nearest neighbor search refers to finding the element with the smallest distance to a given query point within a certain distance metric and a search space.
[0029] KD tree (K-Dimensional Tree) is a multidimensional data structure used to organize point data for fast nearest neighbor search. KD tree recursively divides the data space into a series of hyper-rectangular regions, each node represents a hyper-rectangular region, and each node has a partition axis and a partition value, which is used to split the data space into two subspaces.
[0030] In a static environment, point cloud data is usually dense and continuous, and the distance between adjacent points is small; however, dynamic obstacles may leave their original positions during movement, resulting in a small number of data points in the local area and a large distance between adjacent points. In this way, based on the distribution characteristics of data points in point cloud data, data points that may be dynamic obstacles can be effectively identified.
[0031] In this embodiment, a nearest neighbor search is performed on the data point based on the KD tree to obtain multiple nearest neighbor points, and then determine whether the data point is a distant isolated point based on the positional relationship between these nearest neighbor points and the data point; if the data point is a distant isolated point, it is determined that the data point is a point in a dynamic obstacle, and step 104 is executed; if the data point is not a distant isolated point, it is determined that the data point is not a point in a dynamic obstacle, and the traversal continues to the next data point.
[0032] Step 104: If the data point is a distant isolated point, the data point is determined as a point in a dynamic obstacle and is removed.
[0033] The dynamic obstacle removal method of the present invention is not only applicable to high-precision positioning scenarios such as autonomous driving and robot navigation, but also has wide applicability to other fields such as industrial automation and three-dimensional modeling. The present invention can significantly improve the accuracy, efficiency and robustness of point cloud registration, and provide a more reliable solution for three-dimensional spatial positioning and map construction in the fields of computer vision and robotics.
[0034] In the matching process of Laser Inertial Odometry (LIO), dynamic obstacles are identified and removed in real time without having to be executed as a separate step. This ensures the real-time and accuracy of the LIO, effectively reduces the drift of the LIO, and improves the reliability of navigation.
[0035] In summary, the method for removing dynamic obstacles in the point cloud provided in the embodiment of the present application performs a nearest neighbor search for each data point in the point cloud data based on the KD tree, and determines whether the data point is a distant isolated point based on the nearest neighbor point and the data point. If it is a distant isolated point, it is determined that the data point is a point in the obstacle. In this way, dynamic obstacles can be efficiently identified and filtered without the need for additional sensors, and no complex calculations or large amounts of data processing are required. The method has high computational efficiency, is suitable for real-time applications, and has strong robustness, thereby improving the stability and accuracy of the system.
[0036] like Figure 2 As shown, it shows a flow chart of a method for removing dynamic obstacles in a point cloud provided by an embodiment of the present application, and the method for removing dynamic obstacles in a point cloud can be applied to electronic devices. The method for removing dynamic obstacles in a point cloud may include: Step 201, for each data point extracted from the current frame of point cloud data, obtain the coordinates of the data point in the world coordinate system, and calculate the Euclidean distance between the data point and the radar according to the coordinates. The point cloud data is collected by the radar.
[0037] The radar can periodically collect data about the external environment and combine the data points collected each time into a frame of point cloud data.
[0038] For each frame of point cloud data, the laser inertial odometer in the electronic device extracts a data point from the point cloud data each time to determine whether the data point is a point in a dynamic obstacle; if the data point is a point in a dynamic obstacle, the data point is removed; if the data point is not a point in a dynamic obstacle, the data point is retained. After traversing all the data points in a frame of point cloud data, all the retained valid data points are combined into a new frame of point cloud data to prepare for online laser inertial odometer matching.
[0039] For each extracted data point, the laser inertial odometer converts the coordinates of the data point from the radar coordinate system to the world coordinate system, and then calculates the Euclidean distance based on the converted coordinates and the radar coordinates.
[0040] Step 202: Determine whether the data point is a candidate point of a dynamic obstacle based on the Euclidean distance.
[0041] In this embodiment, judging whether the data point is a candidate point for a dynamic obstacle based on the Euclidean distance may include: judging whether the Euclidean distance is greater than a fourth distance threshold; if the Euclidean distance is greater than the fourth distance threshold, determining that the data point is a candidate point for a dynamic obstacle. The fourth distance threshold may be set according to business needs, such as 3 meters. Then, when the Euclidean distance is greater than 3 meters, the data point is retained; when the Euclidean distance is less than or equal to 3 meters, the data point is ignored and the next data point is traversed to avoid interference from close-range dynamic obstacles, and close-range data points have little effect on matching.
[0042] In this embodiment, it can also be determined whether the data point is a feature point, where a feature point is a point whose nearest neighboring point can be fitted into a plane; if the data point is a feature point, the data point is determined to be a candidate point for a dynamic obstacle; if the data point is not a feature point, the data point is ignored and traversal continues to the next data point.
[0043] Step 203: If the data point is a candidate point of a dynamic obstacle, a preset maximum number of neighboring points n is obtained.
[0044] The maximum number of nearest neighbor points is pre-configured and is used to indicate the number of nearest neighbor points that need to be searched. Where n is a positive integer.
[0045] In one embodiment, n can be set to 5, and the laser inertial odometer needs to search for 5 nearest neighbor points.
[0046] Step 204 : searching for the nearest neighbor point of the data point in the current frame of point cloud data based on the KD tree to obtain m nearest neighbor points.
[0047] In a static environment, point cloud data is usually dense and continuous, with a small distance between adjacent points; however, dynamic obstacles may leave their original positions during movement, resulting in a small number of data points in a local area and a large distance between adjacent points. For example, when a car is moving, the data points scanned by the radar may be scattered in different locations, resulting in a small number of data points in a local area. In this way, based on the distribution characteristics of data points in point cloud data, data points that may be dynamic obstacles can be effectively identified.
[0048] In this embodiment, a nearest neighbor search is performed on the data point based on the KD tree to obtain m nearest neighbor points, and then whether the data point is a distant isolated point is determined based on the positional relationship between these nearest neighbor points and the data point; if the data point is a distant isolated point, it is determined that the data point is a point in a dynamic obstacle; if the data point is not a distant isolated point, it is determined that the data point is not a point in a dynamic obstacle, and the traversal continues to the next data point.
[0049] When the number of data points in the local area where the data point is located is large, n nearest neighbor points can be searched, and m=n; when the number of data points in the local area where the data point is located is small, only m nearest neighbor points may be searched, and m<n. That is, m is a positive integer and m≤n.
[0050] Step 205: determine whether the data point is an unstable point based on the m nearest neighbor points.
[0051] Specifically, judging whether the data point is an unstable point based on the m nearest neighboring points may include: judging whether m is less than n; judging whether the squared value of the distance between the data point and the farthest data point among the m nearest neighboring points is greater than a third distance threshold; if m is less than n, or the squared value of the distance is greater than the third distance threshold, then determining that the data point is an unstable point.
[0052] When m is less than n, or the square value of the distance between the data point and the farthest data point among the m nearest neighboring points is greater than the third distance threshold, it means that the number of nearest neighboring points of the data point is insufficient, that is, there are not enough data points around the data point to form a stable local structure. This situation usually occurs on dynamic obstacles. Therefore, it can be considered that the data point is an unstable point and is likely to be a dynamic obstacle. At this time, step 206 is executed; when m=n, and the square value of the distance between the data point and the farthest data point among the m nearest neighboring points is less than or equal to the third distance threshold, it can be considered that the data point is not an unstable point, then ignore the data point, and continue to traverse the next data point.
[0053] Step 206: If the data point is an unstable point, determine whether the data point is a distant isolated point based on the m nearest neighbor points and the height of the data point.
[0054] Specifically, judging whether the data point is a distant isolated point according to the m nearest neighbor points and the height of the data point may include: (1) Determine whether the first distance between the data point and the nearest data point among the m nearest neighboring points is greater than a first distance threshold.
[0055] In a static environment, the distance between two adjacent points is usually small. If the first distance between the data point and the nearest data point is greater than the first distance threshold, it means that the data point may be located in a sparse area, which is more common on dynamic obstacles (such as moving vehicles or pedestrians). The first distance threshold can be set according to business needs, such as 0.2 meters.
[0056] (2) Determine whether the second distance between the data point and the farthest data point among the m nearest neighboring points is greater than a second distance threshold, and the second distance threshold is greater than the first distance threshold.
[0057] In a static environment, the second distance between the data point and the farthest data point should also be less than a certain threshold. If the second distance is large, this further supports the assumption that the data point may be a dynamic obstacle. The second distance threshold can be set according to business needs, such as 0.5 meters.
[0058] (3) Determine whether the height of the data point is greater than the height threshold.
[0059] The height threshold here usually refers to 0.0 meters, which is used to exclude ground points. This is because dynamic obstacles are usually above the ground. For example, moving vehicles or pedestrians will not leave point cloud data on the ground, and ground points are unlikely to be dynamic obstacles.
[0060] (4) If the first distance is greater than the first distance threshold, the second distance is greater than the second distance threshold, and the height is greater than the height threshold, it is determined that the data point is a distant isolated point.
[0061] Assume that the first distance is represented by point_search_dis[0], the second distance is represented by point_search_dis[NUM_MATCH_POINTS - 1], NUM_MATCH_POINTS is the maximum number of neighboring points, and the height of the data point is represented by point_body.z. Then when point_search_dis[0]>0.2 and point_search_dis[NUM_MATCH_POINTS- 1]>0.5 and point_body.z>0.0, the data point is determined to be a distant isolated point.
[0062] Step 207: If the data point is a distant isolated point, the data point is determined as a point in a dynamic obstacle and removed.
[0063] If the data point is a distant isolated point, it is determined that the data point is a point in a dynamic obstacle and needs to be removed; if the data point is not a distant isolated point, it is determined that the data point is not a point in a dynamic obstacle and needs to be retained.
[0064] After traversing a frame of point cloud data, all the retained valid data points can be combined into a new frame of point cloud data to prepare for online laser inertial odometer matching.
[0065] In summary, the method for removing dynamic obstacles in the point cloud provided in the embodiment of the present application performs a nearest neighbor search for each data point in the point cloud data based on the KD tree, and determines whether the data point is a distant isolated point based on the nearest neighbor point and the data point. If it is a distant isolated point, it is determined that the data point is a point in the obstacle. In this way, dynamic obstacles can be efficiently identified and filtered without the need for additional sensors, and no complex calculations or large amounts of data processing are required. The method has high computational efficiency, is suitable for real-time applications, and has strong robustness, thereby improving the stability and accuracy of the system.
[0066] Whether a data point is a dynamic obstacle is analyzed based on the number of nearest neighbor points searched and the distance between the nearest neighbor point and the data point. This avoids the misjudgment problem caused by traditional methods that only rely on single distance information, and improves the accuracy and robustness of data point detection in dynamic obstacles.
[0067] By judging the distance and height, we ensure that only obvious data points are eliminated, thereby protecting the data points of static structures from being misidentified and improving the accuracy of the algorithm.
[0068] Figure 3This is a top view of the point cloud data created by a normal laser inertial odometer. It can be seen that the part marked by the box is the moving vehicle shadow. After removing the dynamic obstacles using the dynamic obstacle removal method of the present invention, the vehicle shadow in the box is removed, and the point cloud data still retains important wall and ground features, such as Figure 4 It can be seen that after the dynamic obstacle removal method of the present invention is used to remove the dynamic obstacles, very few data points are deleted by mistake, thereby improving the online matching accuracy of the laser inertial odometer.
[0069] Figure 5 This is a side view of the point cloud data before removing dynamic obstacles. Figure 6 It is a side view of the point cloud data after removing dynamic obstacles. By comparison, it can be seen that the present invention can efficiently identify and remove dynamic obstacles, thereby improving the accuracy and robustness of map construction.
[0070] like Figure 7 As shown, it shows a structural block diagram of a device for removing dynamic obstacles in a point cloud provided by an embodiment of the present application, and the device for removing dynamic obstacles in a point cloud can be applied to electronic devices. The device for removing dynamic obstacles in a point cloud may include: The calculation module 710 is used to obtain the coordinates of each data point extracted from the current frame of point cloud data in the world coordinate system, and the point cloud data is collected by the radar according to the Euclidean distance between the coordinate data point and the radar; A determination module 720, configured to determine whether the data point is a candidate point of a dynamic obstacle according to the Euclidean distance; The judgment module 720 is further configured to search for a nearest neighbor point for the data point based on the KD tree if the data point is a candidate point of a dynamic obstacle, and judge whether the data point is a distant isolated point according to the search result; The removal module 730 is used to determine the data point as a point in a dynamic obstacle and remove it if the data point is a distant isolated point.
[0071] In an optional embodiment, the determination module 720 is further configured to: Get the preset maximum number of neighbor points n, where n is a positive integer; Based on the KD tree, search for the nearest neighbor of the data point in the current frame of point cloud data to obtain m nearest neighbor points, where m is a positive integer and m≤n; Whether a data point is a distant isolated point is determined based on the m nearest neighbor points and the height of the data point.
[0072] In an optional embodiment, the determination module 720 is further configured to: Determine whether a first distance between the data point and the nearest data point among the m nearest neighboring points is greater than a first distance threshold; Determine whether a second distance between the data point and the farthest data point among the m nearest neighboring points is greater than a second distance threshold, and the second distance threshold is greater than the first distance threshold; Determine whether the height of the data point is greater than the height threshold; If the first distance is greater than a first distance threshold, the second distance is greater than a second distance threshold, and the height is greater than a height threshold, it is determined that the data point is a distant isolated point.
[0073] In an optional embodiment, the determination module 720 is further configured to: Determine whether the data point is an unstable point based on the m nearest neighbor points; If the data point is an unstable point, a step is triggered to determine whether the data point is a distant isolated point based on the m nearest neighbor points and the height of the data point.
[0074] In an optional embodiment, the determination module 720 is further configured to: Determine whether m is less than n; Determine whether the square value of the distance between the data point and the farthest data point among the m nearest neighboring points is greater than a third distance threshold; If m is less than n, or the squared distance value is greater than the third distance threshold, it is determined that the data point is an unstable point.
[0075] In an optional embodiment, the determination module 720 is further configured to: Determine whether the Euclidean distance is greater than a fourth distance threshold; If the Euclidean distance is greater than the fourth distance threshold, it is determined that the data point is a candidate point of a dynamic obstacle.
[0076] In an optional embodiment, the determination module 720 is further configured to: Determine whether the data point is a feature point. A feature point is a point whose nearest neighbor can be fitted into a plane. If the data point is a feature point, the data point is determined to be a candidate point of a dynamic obstacle.
[0077] In summary, the device for removing dynamic obstacles in the point cloud provided in the embodiment of the present application performs a nearest neighbor search for each data point in the point cloud data based on the KD tree, and determines whether the data point is a distant isolated point based on the nearest neighbor point and the data point. If it is a distant isolated point, it is determined that the data point is a point in the obstacle. In this way, dynamic obstacles can be efficiently identified and filtered without additional sensors, and no complex calculations or large amounts of data processing are required. The calculation efficiency is high, the device is suitable for real-time applications, and the robustness is strong, thereby improving the stability and accuracy of the system.
[0078] Whether a data point is a dynamic obstacle is analyzed based on the number of nearest neighbor points searched and the distance between the nearest neighbor point and the data point. This avoids the misjudgment problem caused by traditional methods that only rely on single distance information, and improves the accuracy and robustness of data point detection in dynamic obstacles.
[0079] By judging the distance and height, we ensure that only obvious data points are eliminated, thereby protecting the data points of static structures from being misidentified and improving the accuracy of the algorithm.
[0080] An embodiment of the present application provides a computer-readable storage medium, wherein the storage medium stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement the method for removing dynamic obstacles in a point cloud as described above.
[0081] An embodiment of the present application provides an electronic device, which includes a device for removing dynamic obstacles in any point cloud as described above.
[0082] It should be noted that: the device for removing dynamic obstacles in point clouds provided in the above embodiments only uses the division of the above functional modules as an example to illustrate when removing dynamic obstacles in point clouds. In actual applications, the above functional distribution can be completed by different functional modules as needed, that is, the internal structure of the device for removing dynamic obstacles in point clouds is divided into different functional modules to complete all or part of the functions described above. In addition, the device for removing dynamic obstacles in point clouds provided in the above embodiments and the method for removing dynamic obstacles in point clouds are of the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0083] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0084] The above description is not intended to limit the embodiments of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the protection scope of the embodiments of the present application.
Claims
1. A method for removing dynamic obstacles in a point cloud, characterized in that: The method comprises: For each data point extracted from a current frame of point cloud data, obtaining the coordinates of the data point in a world coordinate system, and calculating the Euclidean distance between the data point and a radar according to the coordinates, wherein the point cloud data is collected by the radar; Determining whether the data point is a candidate point of a dynamic obstacle according to the Euclidean distance; If the data point is a candidate point of the dynamic obstacle, searching for the nearest neighbor point of the data point based on the KD tree, and judging whether the data point is a distant isolated point according to the search result; If the data point is a distant isolated point, the data point is identified as a point in a dynamic obstacle and is removed.
2. The method for removing dynamic obstacles in a point cloud according to claim 1, characterized in that: The step of searching for the nearest neighbor point for the data point based on the KD tree and determining whether the data point is a distant isolated point according to the search result includes: Get the preset maximum number of neighbor points n, where n is a positive integer; Based on the KD tree, the nearest neighbor point of the data point is searched in the current frame of point cloud data to obtain m nearest neighbor points, where m is a positive integer and m≤n; Whether the data point is a distant isolated point is determined based on the m nearest neighbor points and the height of the data point.
3. The method for removing dynamic obstacles in a point cloud according to claim 2, characterized in that: The determining whether the data point is a distant isolated point according to the m nearest neighbor points and the height of the data point includes: Determine whether a first distance between the data point and the nearest data point among the m nearest neighboring points is greater than a first distance threshold; Determine whether a second distance between the data point and the farthest data point among the m nearest neighboring points is greater than a second distance threshold, and the second distance threshold is greater than the first distance threshold; Determine whether the height of the data point is greater than a height threshold; If the first distance is greater than the first distance threshold, the second distance is greater than the second distance threshold, and the height is greater than the height threshold, it is determined that the data point is a distant isolated point.
4. The method for removing dynamic obstacles in a point cloud according to claim 2, characterized in that: The method further comprises: Determine whether the data point is an unstable point according to the m nearest neighbor points; If the data point is an unstable point, the step of determining whether the data point is a distant isolated point based on the m nearest neighbor points and the height of the data point is triggered.
5. The method for removing dynamic obstacles in a point cloud according to claim 4, characterized in that: The determining whether the data point is an unstable point according to the m nearest neighbor points includes: Determine whether m is less than n; Determine whether the square value of the distance between the data point and the farthest data point among the m nearest neighbor points is greater than a third distance threshold; If m is smaller than n, or the squared distance value is larger than the third distance threshold, it is determined that the data point is an unstable point.
6. The method for removing dynamic obstacles in a point cloud according to any one of claims 1 to 5, characterized in that: The determining, according to the Euclidean distance, whether the data point is a candidate point of a dynamic obstacle includes: Determining whether the Euclidean distance is greater than a fourth distance threshold; If the Euclidean distance is greater than the fourth distance threshold, it is determined that the data point is a candidate point of a dynamic obstacle.
7. The method for removing dynamic obstacles in a point cloud according to claim 6, characterized in that: The method further comprises: Determine whether the data point is a feature point, where the feature point is a point whose nearest neighbor point can be fitted into a plane; If the data point is the feature point, it is determined that the data point is a candidate point of a dynamic obstacle.
8. A device for removing dynamic obstacles in a point cloud, characterized in that: The device comprises: a calculation module, configured to obtain, for each data point extracted from a current frame of point cloud data, a coordinate of the data point in a world coordinate system, and calculate a Euclidean distance between the data point and a radar according to the coordinate, wherein the point cloud data is collected by the radar; A judging module, used for judging whether the data point is a candidate point of a dynamic obstacle according to the Euclidean distance; The judgment module is further configured to search for a nearest neighbor point for the data point based on a KD tree if the data point is a candidate point of the dynamic obstacle, and judge whether the data point is a distant isolated point according to the search result; The removal module is used to determine the data point as a point in a dynamic obstacle and remove it if the data point is a distant isolated point.
9. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the method for removing dynamic obstacles in a point cloud as described in any one of claims 1 to 7.
10. An electronic device, characterized in that: The electronic device comprises: the device for removing dynamic obstacles in the point cloud as described in claim 8.
Citation Information
Patent Citations
Point cloud processing method and device for obstacle avoidance in rainy and snowy weather, and robot
CN115311431A
Dynamic obstacle removing method and apparatus for laser point cloud, and electronic device
WO2024027587A1