Point cloud data filtering method, equipment and vehicle

By constructing a binary search tree to perform noise point filtering on point cloud data, the problem that noise filtering in the existing technology depends on lidar scanning method is solved, and efficient and universal noise point removal is achieved.

CN119809964APending Publication Date: 2025-04-11BYD CO LTD

Patent Information

Application Number
CN202411551947.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

In the prior art, noise filtering technology relies on the scanning method of lidar, lacks universality, and if prior information cannot be obtained, it will fail, affecting the use of point cloud data.

Method used

By obtaining point cloud data and building a binary search tree (such as KD tree), and filtering the point cloud data, it can quickly identify and remove noise points without relying on the scanning method of lidar.

Benefits of technology

This method realizes the universality of noise point filtering on point cloud data, avoids dependence on prior information, and improves the quality and use efficiency of point cloud data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119809964A_ABST
    Figure CN119809964A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a point cloud data filtering method and device and a vehicle, and the method comprises the steps: obtaining point cloud data, constructing a binary search tree according to the point cloud data, searching the binary search tree to obtain noise points in the point cloud data, carrying out the noise point filtering of the point cloud data, and obtaining the noise points in the point cloud data. The point cloud data after noise point filtering is obtained, noise point filtering is carried out on the point cloud data by constructing the binary search tree, dependence on prior information is not needed, and universality is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of point cloud processing, and in particular to a method, device and vehicle for filtering point cloud data. Background Art

[0002] Point cloud processing technology is a technology that processes, analyzes and utilizes a large number of discrete point data (i.e. point cloud data) in three-dimensional space. These point cloud data are usually acquired by laser scanning equipment (such as lidar). Point cloud data contains the three-dimensional coordinate information of the object and may also contain attributes such as color and reflection intensity.

[0003] The main purpose of point cloud processing technology is to extract useful information from raw point cloud data for various applications such as autonomous driving, object recognition, 3D modeling, and environmental perception. This process usually includes multiple steps such as data preprocessing, point cloud segmentation, feature extraction, surface reconstruction, and data analysis.

[0004] In the existing technology, the noise filtering technology installed on the lidar usually reduces the generated three-dimensional point cloud data into a two-dimensional image through the prior information of the lidar's scanning method, and then filters out the outlier noise points in the space based on methods such as K nearest neighbors.

[0005] However, this method relies on the prior information of the laser radar's scanning method, but different types or models of laser radars have different scanning methods. For each specific laser radar, a method needs to be developed based on its scanning method. It does not have good universality, and if the prior information of the laser radar cannot be obtained, this method will fail, affecting the use of point cloud data. Summary of the invention

[0006] In view of the above problems, a method, device and vehicle for point cloud data filtering are proposed to overcome the above problems or at least partially solve the above problems, including:

[0007] A method for filtering point cloud data, the method comprising:

[0008] Acquire point cloud data, and construct a binary search tree based on the point cloud data;

[0009] Searching the binary search tree to obtain noise points in the point cloud data;

[0010] Noise point filtering is performed on the point cloud data to obtain point cloud data after noise point filtering.

[0011] Optionally, constructing a binary search tree according to the point cloud data includes:

[0012] In the process of constructing the binary search tree, the data points in each frame of point cloud data are stored in an array, and the data points in the array are grouped to obtain two sub-arrays, and a subtree of the two sub-arrays is constructed;

[0013] The data points in the upper layer sub-array are grouped to obtain two lower layer sub-arrays, and sub-trees of the two lower layer sub-arrays are constructed until the array length of the lower layer sub-arrays reaches a preset length.

[0014] Optionally, grouping the data points in the array to obtain two sub-arrays, and constructing a subtree of the two sub-arrays includes:

[0015] According to a preset dimension, sorting the data points in the array and determining a first middle point therefrom;

[0016] According to the first middle point, the data points in the array are grouped to obtain two sub-arrays, and subtrees of the two sub-arrays are constructed with the first middle point as a root node;

[0017] The step of grouping the data points in the upper layer sub-array to obtain two lower layer sub-arrays and constructing sub-trees of the two lower layer sub-arrays includes:

[0018] According to the preset dimension, sort the data points in the upper sub-array and determine the second middle point therefrom;

[0019] According to the second middle point, the data points in the upper layer sub-array are grouped to obtain two lower layer sub-arrays, and a subtree of the two lower layer sub-arrays is constructed with the second middle point as the root node.

[0020] Optionally, the preset dimensions include a horizontal coordinate dimension, a vertical coordinate dimension, and a vertical coordinate dimension. When sorting data points in different arrays, one dimension is selected from the horizontal coordinate dimension, the vertical coordinate dimension, and the vertical coordinate dimension according to a preset strategy.

[0021] Optionally, it also includes: when constructing a subtree, if the number of created threads is less than the thread threshold, using a multi-threaded parallel tree building mode to create two subtrees in parallel; if the number of created threads is greater than or equal to the thread threshold, using a single-threaded recursive mode to create two subtrees in succession.

[0022] Optionally, before constructing a binary search tree based on the point cloud data, the method further includes: performing frame processing on the acquired point cloud data.

[0023] Optionally, searching the binary search tree to obtain noise points in the point cloud data includes:

[0024] Determine a target point from the point cloud data, and perform a neighbor point search on the target point in the binary search tree to obtain the number of neighbor points of the target point;

[0025] If the number of neighbor point searches for the target point reaches a preset number and the number of neighbor points is less than a preset number, it is determined that the target point is a noise point in the point cloud data.

[0026] Optionally, the preset number is less than the number of data points in each frame of point cloud data.

[0027] Optionally, performing neighboring point search on the target point in the binary search tree to obtain the number of neighboring points of the target point includes:

[0028] Starting from the root node of the binary search tree, searching for neighboring points of the target point;

[0029] When searching for neighboring points of the target point, the Euclidean distance between the current search node and the target point is calculated. If the Euclidean distance between the current search node and the target point is less than or equal to a preset distance, the number of neighboring points of the target point is increased.

[0030] Optionally, it also includes:

[0031] When the current search node is a non-leaf node, a node on one side of the current search node is determined as the next search node based on a comparison result between the current search node and a preset dimension value of the target point.

[0032] Optionally, it also includes:

[0033] Calculate the Euclidean distance between the node on the other side of the current search node and the target point, and store the node on the other side into the top heap according to the Euclidean distance between the node on the other side of the current search node and the target point;

[0034] When the current search node is a leaf node, the next search node is determined from the top heap.

[0035] Optionally, the binary search tree is a KD tree.

[0036] Optionally, the point cloud data is point cloud data collected by a laser radar.

[0037] An electronic device comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the method described above when executed by the processor.

[0038] A vehicle comprises the electronic device as described above.

[0039] The embodiments of the present invention have the following advantages:

[0040] In an embodiment of the present invention, point cloud data is acquired, and a binary search tree is constructed based on the point cloud data. The binary search tree is searched to obtain noise points in the point cloud data, and noise point filtering is performed on the point cloud data to obtain point cloud data after noise point filtering. This achieves noise point filtering of point cloud data by constructing a binary search tree, without relying on prior information, and has universal applicability. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0042] Figure 1 is a flowchart of the steps of a method for filtering point cloud data provided by some embodiments of the present invention;

[0043] Figure 2a is a flowchart of another method for filtering point cloud data provided by some embodiments of the present invention;

[0044] Figure 2b is a flowchart of another method for filtering point cloud data provided by some embodiments of the present invention;

[0045] Figure 2c is a flowchart of another method for filtering point cloud data provided by some embodiments of the present invention;

[0046] Figure 3 is a flowchart of another method for filtering point cloud data provided by some embodiments of the present invention;

[0047] Figure 4 It is a flowchart of the steps of another method for filtering point cloud data provided by some embodiments of the present invention. DETAILED DESCRIPTION

[0048] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0049] In the related art, after acquiring the three-dimensional point cloud, a two-dimensional image is constructed through prior information, and a number of points are selected in the two-dimensional image through the K nearest neighbor filter template, and the Euclidean distance between the center point and the K nearest neighbors is calculated, and then the center point is judged to be a noise point based on the Euclidean distance and the pre-set distance threshold and ratio threshold. For the center point that meets the distance threshold and the ratio threshold, the number of K neighboring points in the template is counted based on the number threshold, and the center point whose number is less than the number threshold is set as an outlier noise point.

[0050] In an embodiment of the present invention, a KD tree (K-Dimensional Tree) is constructed for the three-dimensional point cloud data to replace the process of reducing the dimension of the three-dimensional point cloud data to two-dimensional image matrix data, thereby avoiding the dependence on the prior information of the laser radar scanning information. The three-dimensional spatial structure of the point cloud can be quickly constructed through the KD tree for any disordered point cloud, and the k-nearest neighbor method can be used to quickly filter out noise points, thereby improving the universality of the point cloud noise filtering algorithm and being adaptable to any laser radar scanning method.

[0051] Moreover, the embodiment of the present invention proposes two main solutions to improve the operation efficiency of the algorithm in order to solve the problem that the two operations of KD tree construction and KD tree search are relatively time-consuming:

[0052] 1. In order to solve the problem that it is time-consuming to build a KD tree for a three-dimensional point cloud and search for outliers in the KD tree, multi-threaded programming is used to parallelize the KD tree building process and the KD tree K-nearest neighbor search process, which greatly improves the execution efficiency of the algorithm.

[0053] Moreover, during the tree building process, the number of sub-threads created by the algorithm can be limited to no more than T, according to the maximum number of parallel threads T that the CPU can actually carry, thus avoiding the waste of system resources caused by creating more threads than the maximum number of parallel threads that the CPU can actually carry. The details are as follows:

[0054] During the KD tree construction process, for each sub-thread and its corresponding sub-tree: if the number of sub-threads created by the system at this time does not reach T, two sub-threads are created to build the left and right sub-trees in parallel; if the number of sub-threads created at this time reaches T, the tree construction mode is switched from parallel mode to single-thread recursive mode. When it is detected that other threads have completed the construction of the sub-tree and the number of threads is reduced to less than T, the thread in the recursive mode to build the sub-tree will immediately switch to parallel mode to speed up the sub-tree construction.

[0055] By dynamically switching between parallel mode and recursive mode according to the number of threads running in real time, the algorithm can ensure that the CPU reaches full load while avoiding the waste of system resources caused by creating too many threads. The above method effectively improves the operating efficiency of the algorithm, enabling the algorithm to meet the requirements of real-time processing and thus be successfully installed on LiDAR products.

[0056] 2. To address the problem that the KD tree search process is time-consuming, the data structure of the heap is maintained to record the first k points with the closest Euclidean distance to the target node during the search process. That is, when searching for the K nearest neighbors of each target child node, the iterated nodes are stored in this heap according to the Euclidean distance value with the target child node.

[0057] When backtracking access is required during the search process, the next node is not selected based on the shortest distance to the target subnode in a single dimension of X, Y, or Z. Instead, the point with the closest Euclidean distance to the target subnode is directly selected for search based on the maintained heap structure. This can effectively reduce the number of searches for each point, allowing the algorithm to accurately search for the K nearest neighbors of each target point in a shorter time, improving the algorithm's search efficiency and enabling the algorithm to meet the requirements of real-time processing of lidar.

[0058] The present invention is exemplarily described below with reference to the accompanying drawings:

[0059] Reference Figure 1 , shows a flowchart of a method for filtering point cloud data provided by some embodiments of the present invention, which may specifically include the following steps:

[0060] Step 101: Acquire point cloud data, and construct a binary search tree based on the point cloud data.

[0061] Among them, point cloud is a data set. A frame of point cloud data consists of a large number of points, and each point represents a specific set of spatial information. Specifically, each point in the point cloud usually contains the following information:

[0062] (1) Three-dimensional coordinates (X, Y, Z): These are the basis of point cloud data and represent the location of a point in three-dimensional space. (2) Intensity: This value records the intensity of the return signal based on the reflectivity of the object's surface. When these points are combined together, they form a point cloud, which is a collection of data points in space that represent a 3D shape or object.

[0063] As an example, the point cloud data is point cloud data collected by a laser radar. LiDAR (Light Detection and Ranging) is an advanced sensor technology that obtains characteristic information such as the position, shape, and speed of a target by emitting a laser beam and measuring the reflection time and intensity. Specifically, the laser radar system emits a laser beam to the target and then receives the laser signal (target echo) reflected from the target. By comparing parameters such as the time difference and phase difference between the transmitted signal and the received signal, the laser radar calculates information such as the distance and speed of the target. At the same time, by measuring the intensity, frequency and other characteristics of the reflected light, the surface material, shape and other characteristics of the target can also be obtained.

[0064] As an example, the binary search tree is a KD tree, which is a data structure for efficiently processing multidimensional data and is a variant of a binary search tree. The KD tree constructs a hierarchical structure of a multidimensional space by partitioning the data according to a certain dimension at each node.

[0065] In some embodiments of the present invention, before constructing a binary search tree based on the point cloud data, the method further includes: performing frame processing on the acquired point cloud data.

[0066] like Figure 2a , loop through the UDP communication protocol to receive the point cloud data packets generated by the laser radar, and parse the point cloud data for each packet of data according to the pre-defined parsing protocol. Store the parsed point cloud data (X, Y, Z, intensity value, reflectivity value, etc.) in the running memory requested in advance by the algorithm program for use in subsequent steps. According to the point cloud frame ID provided in the UDP data packet, the data packet is framed. If a complete frame of data packet is received, the point cloud noise filtering algorithm is started. After receiving a frame of completed point cloud data, start to build a KD tree for the frame data.

[0067] In some embodiments of the present invention, constructing a binary search tree according to the point cloud data includes:

[0068] In the process of constructing a binary search tree, the data points in each frame of point cloud data are stored in an array, and the data points in the array are grouped to obtain two sub-arrays, and a subtree of the two sub-arrays is constructed; the data points in the upper sub-array are grouped to obtain two lower sub-arrays, and a subtree of the two lower sub-arrays is constructed until the array length of the lower sub-array is a preset length.

[0069] In some embodiments of the present invention, grouping the data points in the array to obtain two sub-arrays, and constructing a subtree of the two sub-arrays includes:

[0070] According to a preset dimension, the data points in the array are sorted and a first middle point is determined therefrom; according to the first middle point, the data points in the array are grouped to obtain two sub-arrays, and a subtree of the two sub-arrays is constructed with the first middle point as a root node.

[0071] In some embodiments of the present invention, grouping the data points in the upper layer sub-array to obtain two lower layer sub-arrays, and constructing sub-trees of the two lower layer sub-arrays includes:

[0072] According to a preset dimension, the data points in the upper sub-array are sorted and a second middle point is determined therefrom; according to the second middle point, the data points in the upper sub-array are grouped to obtain two lower sub-arrays, and a subtree of the two lower sub-arrays is constructed with the second middle point as the root node.

[0073] In some embodiments of the present invention, the preset dimensions include a horizontal coordinate dimension, a vertical coordinate dimension, and a vertical coordinate dimension. When sorting data points in different arrays, one dimension is selected from the horizontal coordinate dimension, the vertical coordinate dimension, and the vertical coordinate dimension according to a preset strategy.

[0074] In some embodiments of the present invention, it also includes: when constructing a subtree, if the number of created threads is less than the thread threshold, a multi-threaded parallel tree building mode is used to create two subtrees in parallel; if the number of created threads is greater than or equal to the thread threshold, a single-threaded recursive mode is used to create two subtrees in succession.

[0075] like Figure 2b , use the quick sort algorithm to sort the entire frame data from small to large according to the X dimension, then select the middle point of the sorted points as the root node of the KD tree, and divide the sorted point cloud data into two with the middle point as the center, and assign the two arrays divided into two to two threads respectively to build the left and right subtrees of the root node. For each child thread, sort the point cloud subarray again from small to large according to the Y dimension, divide the array into two, and select the middle point of the array as the root node of the KD subtree. Similarly, for the left and right subarrays that are divided into two, create two threads to continue to build the left and right subtrees.

[0076] In some examples, for each child thread, the sub-arrays are sorted in an X, Y, Z loop manner according to the level of the KD tree where the root node of the current sub-tree is located.

[0077] After the child thread completes the creation of the left and right subtrees, it returns to the current subtree root node until the main thread completes the construction of the entire KD tree.

[0078] In actual applications, in order to avoid creating too many threads and causing waste of resources during the construction of the KD tree, the algorithm limits the maximum number of threads running simultaneously to T based on the maximum number of parallel threads that the CPU can load. When it is detected that the number of threads currently created reaches T, the child thread will switch the tree construction process from multi-threaded parallel mode to single-threaded recursive mode to avoid creating more threads and causing waste of system resources. When it is detected that a child thread has completed the tree construction and exited, the child thread in the single-threaded recursive mode will immediately switch to the parallel tree construction mode to speed up the tree construction process.

[0079] Step 102: Search the binary search tree to obtain noise points in the point cloud data.

[0080] In some embodiments of the present invention, searching the binary search tree to obtain noise points in the point cloud data includes:

[0081] A target point is determined from the point cloud data, and a neighbor point search is performed on the target point in the binary search tree to obtain the number of neighbor points of the target point; if the number of neighbor point searches for the target point reaches a preset number and the number of neighbor points is less than a preset number, the target point is determined to be a noise point in the point cloud data.

[0082] The preset number is less than the number of data points in each frame of point cloud data.

[0083] In some embodiments of the present invention, performing a neighboring point search on the target point in the binary search tree to obtain the number of neighboring points of the target point includes:

[0084] Starting from the root node of the binary search tree, a neighboring point search is performed on the target point; when the neighboring point search is performed on the target point, the Euclidean distance between the current search node and the target point is calculated, and if the Euclidean distance between the current search node and the target point is less than or equal to a preset distance, the number of neighboring points of the target point is increased.

[0085] In some embodiments of the present invention, it also includes:

[0086] When the current search node is a non-leaf node, a node on one side of the current search node is determined as the next search node based on a comparison result between the current search node and a preset dimension value of the target point.

[0087] In some embodiments of the present invention, it also includes:

[0088] Calculate the Euclidean distance between the node on the other side of the current search node and the target point, and store the node on the other side in the top heap according to the Euclidean distance between the node on the other side of the current search node and the target point; when the current search node is a leaf node, determine the next search node from the top heap.

[0089] like Figure 2c After the KD tree is built, the algorithm starts to perform the K nearest neighbor search operation. Taking the parallel search using 4 threads as an example, the point cloud data sorted according to the X dimension in step 4 is divided into four parts and assigned to the 4 created search sub-threads to perform the K nearest neighbor search task simultaneously.

[0090] Among them, K-Nearest Neighbor Search (KNN) is a method for finding K nearest neighbor points near a point in a multidimensional space.

[0091] For each search subthread, traverse each point in the assigned point cloud subarray in order, and execute the K nearest neighbor search algorithm on the constructed KD tree. Start the search from the root node of the KD tree, first calculate the Euclidean distance d between the current root node and the target point (the square of the distance can be used instead to avoid the algorithm from performing square root operations and speed up the algorithm execution speed). If the d value is less than the set K nearest neighbor distance threshold D, then the target point's neighbor point count is increased by one.

[0092] By comparing the X value of the current root node with the target point, if the X value of the target point is less than or equal to the X value of the root node, then continue to search the left subtree of the current root node. At the same time, calculate the Euclidean distance between the right child node of the current root node and the target point, and put it into a mini-heap according to the distance value. If the X value of the target point is greater than the X value of the root node, then reverse the above operation.

[0093] If the currently visited root node is a leaf node of the KD tree, a backtracking operation is required. The top node of the maintained small top heap is popped out. This node is the point with the smallest Euclidean distance between the traversed points and the target point in the previous search process. This point is used as the root node and the above search process is continued.

[0094] If the target point's neighbor point count value reaches the set threshold value K after the current root node is calculated, then the search is exited and the point is determined to be a valid point. Otherwise, the subtree of the current root node is continued to be recursively searched. If the current search still does not find K areas that meet the conditions for the target point, and the number of searches has reached 4 / 5 of the number of points in a frame, then the search is exited and the point is determined to be an outlier noise point.

[0095] Step 103: performing noise point filtering on the point cloud data to obtain point cloud data after noise point filtering.

[0096] In an embodiment of the present invention, point cloud data is acquired, and a binary search tree is constructed based on the point cloud data. The binary search tree is searched to obtain noise points in the point cloud data, and noise point filtering is performed on the point cloud data to obtain point cloud data after noise point filtering. This achieves noise point filtering of point cloud data by constructing a binary search tree, without relying on prior information, and has universal applicability.

[0097] Reference Figure 3 , shows a flowchart of another method for filtering point cloud data provided by some embodiments of the present invention, which may specifically include the following steps:

[0098] Step 301, obtaining point cloud data.

[0099] Step 302: In the process of constructing the binary search tree, the data points in each frame of point cloud data are stored in an array.

[0100] Step 303: sort the data points in the array according to a preset dimension and determine a first middle point therefrom.

[0101] Step 304: group the data points in the array according to the first middle point to obtain two sub-arrays, and construct subtrees of the two sub-arrays with the first middle point as the root node.

[0102] Step 305: sort the data points in the upper layer sub-array according to the preset dimension and determine the second middle point therefrom.

[0103] Step 306: group the data points in the upper layer sub-array according to the second intermediate point to obtain two lower layer sub-arrays, and construct a subtree of the two lower layer sub-arrays with the second intermediate point as the root node until the array length of the lower layer sub-array reaches a preset length.

[0104] Step 307, when constructing a subtree, if the number of created threads is less than the thread threshold, a multi-threaded parallel tree construction mode is used to create two subtrees in parallel; if the number of created threads is greater than or equal to the thread threshold, a single-threaded recursive mode is used to create two subtrees in succession.

[0105] Step 308: Search the binary search tree to obtain noise points in the point cloud data.

[0106] Step 309: performing noise point filtering on the point cloud data to obtain point cloud data after noise point filtering.

[0107] Reference Figure 4 , shows a flowchart of another method for filtering point cloud data provided by some embodiments of the present invention, which may specifically include the following steps:

[0108] Step 401, obtaining point cloud data, and constructing a binary search tree according to the point cloud data.

[0109] Step 402: determine a target point from the point cloud data, and start from the root node of the binary search tree to search for neighboring points of the target point.

[0110] Step 403, when searching for neighboring points of the target point, calculate the Euclidean distance between the current search node and the target point, and if the Euclidean distance between the current search node and the target point is less than or equal to a preset distance, increase the number of neighboring points of the target point.

[0111] Step 404, when the current search node is a non-leaf node, determine a side node of the current search node as the next search node based on a comparison result of the preset dimension value between the current search node and the target point.

[0112] Step 405, calculating the Euclidean distance between the node on the other side of the current search node and the target point, and storing the node on the other side into the top heap according to the Euclidean distance between the node on the other side of the current search node and the target point.

[0113] Step 406: When the current search node is a leaf node, determine the next search node from the top heap.

[0114] Step 407: If the number of neighbor point searches for the target point reaches a preset number and the number of neighbor points is less than a preset number, it is determined that the target point is a noise point in the point cloud data.

[0115] Step 408: performing noise point filtering on the point cloud data to obtain point cloud data after noise point filtering.

[0116] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0117] Some embodiments of the present invention also provide a device for filtering point cloud data, the device being used for:

[0118] Acquire point cloud data, and construct a binary search tree based on the point cloud data;

[0119] Searching the binary search tree to obtain noise points in the point cloud data;

[0120] Noise point filtering is performed on the point cloud data to obtain point cloud data after noise point filtering.

[0121] Optionally, constructing a binary search tree according to the point cloud data includes:

[0122] In the process of constructing the binary search tree, the data points in each frame of point cloud data are stored in an array, and the data points in the array are grouped to obtain two sub-arrays, and a subtree of the two sub-arrays is constructed;

[0123] The data points in the upper layer sub-array are grouped to obtain two lower layer sub-arrays, and sub-trees of the two lower layer sub-arrays are constructed until the array length of the lower layer sub-arrays reaches a preset length.

[0124] Optionally, grouping the data points in the array to obtain two sub-arrays, and constructing a subtree of the two sub-arrays includes:

[0125] According to a preset dimension, sorting the data points in the array and determining a first middle point therefrom;

[0126] According to the first middle point, the data points in the array are grouped to obtain two sub-arrays, and subtrees of the two sub-arrays are constructed with the first middle point as a root node;

[0127] The step of grouping the data points in the upper layer sub-array to obtain two lower layer sub-arrays and constructing sub-trees of the two lower layer sub-arrays includes:

[0128] According to the preset dimension, sort the data points in the upper sub-array and determine the second middle point therefrom;

[0129] According to the second middle point, the data points in the upper layer sub-array are grouped to obtain two lower layer sub-arrays, and a subtree of the two lower layer sub-arrays is constructed with the second middle point as the root node.

[0130] Optionally, the preset dimensions include a horizontal coordinate dimension, a vertical coordinate dimension, and a vertical coordinate dimension. When sorting data points in different arrays, one dimension is selected from the horizontal coordinate dimension, the vertical coordinate dimension, and the vertical coordinate dimension according to a preset strategy.

[0131] Optionally, it also includes: when constructing a subtree, if the number of created threads is less than the thread threshold, using a multi-threaded parallel tree building mode to create two subtrees in parallel; if the number of created threads is greater than or equal to the thread threshold, using a single-threaded recursive mode to create two subtrees in succession.

[0132] Optionally, before constructing a binary search tree based on the point cloud data, the method further includes: performing frame processing on the acquired point cloud data.

[0133] Optionally, searching the binary search tree to obtain noise points in the point cloud data includes:

[0134] Determine a target point from the point cloud data, and perform a neighbor point search on the target point in the binary search tree to obtain the number of neighbor points of the target point;

[0135] If the number of neighbor point searches for the target point reaches a preset number and the number of neighbor points is less than a preset number, it is determined that the target point is a noise point in the point cloud data.

[0136] Optionally, the preset number is less than the number of data points in each frame of point cloud data.

[0137] Optionally, performing neighboring point search on the target point in the binary search tree to obtain the number of neighboring points of the target point includes:

[0138] Starting from the root node of the binary search tree, searching for neighboring points of the target point;

[0139] When searching for neighboring points of the target point, the Euclidean distance between the current search node and the target point is calculated. If the Euclidean distance between the current search node and the target point is less than or equal to a preset distance, the number of neighboring points of the target point is increased.

[0140] Optionally, it also includes:

[0141] When the current search node is a non-leaf node, a node on one side of the current search node is determined as the next search node based on a comparison result between the current search node and a preset dimension value of the target point.

[0142] Optionally, it also includes:

[0143] Calculate the Euclidean distance between the node on the other side of the current search node and the target point, and store the node on the other side into the top heap according to the Euclidean distance between the node on the other side of the current search node and the target point;

[0144] When the current search node is a leaf node, the next search node is determined from the top heap.

[0145] Optionally, the binary search tree is a KD tree.

[0146] Optionally, the point cloud data is point cloud data collected by a laser radar.

[0147] Some embodiments of the present invention further provide an electronic device, comprising a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the above method is implemented when the computer program is executed by the processor.

[0148] Some embodiments of the present invention further provide a vehicle, comprising the apparatus as described above, and / or the electronic device as described above.

[0149] Some embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, and the computer program implements the above method when executed by a processor.

[0150] Some embodiments of the present invention further provide a computer program product, including a computer program, which implements the above method when executed by a processor.

[0151] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0152] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0153] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0154] Those skilled in the art will appreciate that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of 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 disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0155] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, 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 terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. 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.

[0156] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0157] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0158] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0159] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the above elements.

[0160] The above is a detailed introduction to a method, device and vehicle for point cloud data filtering. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for filtering point cloud data, characterized in that: The method comprises: Acquire point cloud data, and construct a binary search tree based on the point cloud data; Searching the binary search tree to obtain noise points in the point cloud data; Noise point filtering is performed on the point cloud data to obtain point cloud data after noise point filtering.

2. The method according to claim 1, characterized in that The step of constructing a binary search tree according to the point cloud data comprises: In the process of constructing the binary search tree, the data points in each frame of point cloud data are stored in an array, and the data points in the array are grouped to obtain two sub-arrays, and a subtree of the two sub-arrays is constructed; The data points in the upper layer sub-array are grouped to obtain two lower layer sub-arrays, and sub-trees of the two lower layer sub-arrays are constructed until the array length of the lower layer sub-arrays reaches a preset length.

3. The method according to claim 2, characterized in that The step of grouping the data points in the array to obtain two sub-arrays and constructing subtrees of the two sub-arrays comprises: According to a preset dimension, sorting the data points in the array and determining a first middle point therefrom; According to the first middle point, the data points in the array are grouped to obtain two sub-arrays, and subtrees of the two sub-arrays are constructed with the first middle point as a root node; The step of grouping the data points in the upper layer sub-array to obtain two lower layer sub-arrays and constructing sub-trees of the two lower layer sub-arrays includes: According to the preset dimension, sort the data points in the upper sub-array and determine the second middle point therefrom; According to the second middle point, the data points in the upper layer sub-array are grouped to obtain two lower layer sub-arrays, and a subtree of the two lower layer sub-arrays is constructed with the second middle point as the root node.

4. The method according to claim 3, characterized in that The preset dimensions include a horizontal coordinate dimension, a vertical coordinate dimension, and a vertical coordinate dimension. When sorting data points in different arrays, one dimension is selected from the horizontal coordinate dimension, the vertical coordinate dimension, and the vertical coordinate dimension according to a preset strategy.

5. The method according to claim 2, characterized in that: Also includes: When constructing a subtree, if the number of created threads is less than the thread threshold, the multi-threaded parallel tree construction mode is used to create two subtrees in parallel. If the number of created threads is greater than or equal to the thread threshold, the single-threaded recursive mode is used to create two subtrees in succession.

6. The method according to claim 1, characterized in that Before constructing a binary search tree according to the point cloud data, the method further includes: performing frame processing on the acquired point cloud data.

7. The method according to any one of claims 2 to 6, characterized in that: The step of searching the binary search tree to obtain noise points in the point cloud data includes: Determine a target point from the point cloud data, and perform a neighbor point search on the target point in the binary search tree to obtain the number of neighbor points of the target point; If the number of neighbor point searches for the target point reaches a preset number and the number of neighbor points is less than a preset number, it is determined that the target point is a noise point in the point cloud data.

8. The method according to claim 7, characterized in that The preset number is less than the number of data points in each frame of point cloud data.

9. The method according to claim 7, characterized in that: The performing neighboring point search on the target point in the binary search tree to obtain the number of neighboring points of the target point includes: Starting from the root node of the binary search tree, searching for neighboring points of the target point; When searching for neighboring points of the target point, the Euclidean distance between the current search node and the target point is calculated. If the Euclidean distance between the current search node and the target point is less than or equal to a preset distance, the number of neighboring points of the target point is increased.

10. The method according to claim 9, characterized in that Also includes: When the current search node is a non-leaf node, a node on one side of the current search node is determined as the next search node based on a comparison result between the current search node and a preset dimension value of the target point.

11. The method according to claim 10, characterized in that Also includes: Calculate the Euclidean distance between the node on the other side of the current search node and the target point, and store the node on the other side into the top heap according to the Euclidean distance between the node on the other side of the current search node and the target point; When the current search node is a leaf node, the next search node is determined from the top heap.

12. The method according to claim 1, characterized in that The binary search tree is a KD tree.

13. The method according to claim 1, characterized in that The point cloud data is point cloud data collected by a laser radar.

14. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the method according to any one of claims 1 to 13 when executed by the processor.

15. A vehicle, characterized in that: The vehicle includes the electronic device as claimed in claim 14.

Citation Information

Patent Citations

  • Dynamic splitting and maintenance method of quantile query oriented summary data

    CN105045806A

  • Point cloud feature-preserving denoising method and device, electronic equipment and storage medium

    CN112102178A

  • Kd-Tree-based adjacent point parallelization search device and Kd-Tree-based adjacent point parallelization search method

    CN116226424A

Cited By

  • Unmanned aerial vehicle-mounted LiDAR point cloud filtering optimization method

    CN120182129A