An adaptive noise filtering method based on KNN

By introducing adaptive neighborhood parameters and penalty factors into the KNN algorithm, combined with the Gaussian distribution model, effective filtering of point cloud noise is achieved, which solves the problem of noise filtering in scenes with uneven density and large curvature in the existing technology. It eliminates difficult problems and improves the accuracy and efficiency of point cloud noise filtering.

CN114005109BActive Publication Date: 2024-09-20CHANGZHOU SHINCO AUTOMOTIVE ELECTRONICS
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202111120842.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-24
Publication Date
2024-09-20
Estimated Expiration
2041-09-24

AI Technical Summary

Technical Problem

Existing point cloud noise filtering algorithms are ineffective when processing point cloud scenes with uneven density and large curvature. It is difficult to effectively distinguish outlier points and main points, resulting in limited noise filtering capabilities.

Method used

The adaptive noise filtering method based on KNN is used to adaptively judge and separate outliers by dynamically setting the adaptive neighborhood parameter k of each point and calculating the penalty factor C, combined with statistical filtering and Gaussian distribution model.

Benefits of technology

It improves the accuracy and efficiency of point cloud noise filtering, can better distinguish isolated point cloud groups and main point cloud groups, and reduces false detections and missed detections during noise filtering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114005109B
    Figure CN114005109B
Patent Text Reader

Abstract

The present invention discloses an adaptive noise filtering method based on KNN, which relates to the technical field of digital image processing, including obtaining an original point cloud image through a camera; performing neighborhood point traversal on each original point in the original point cloud image; setting the adaptive neighborhood parameter k of each original point to be initially 0, the number of neighborhood points N to be initially 0, and traversing the neighborhood points; when the number of neighborhood points N of each original point remains unchanged, the traversal is terminated, and the adaptive neighborhood parameter k of each original point is determined at this time; generating a penalty factor C through the number of neighborhood points N and the density of the point cloud ball; adding the penalty factor C to calculate the average distance; separating the main points and outliers in the original points by statistical filtering, and filtering the outliers. In the noise filtering algorithm based on KNN of the present invention, the global neighborhood parameter is extended from a fixed value to an adaptive setting according to the difference of each original point, and the method can better distinguish the outlier point cloud group and the main point cloud group, and achieve a better noise filtering effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of laser radar technology, to the field of digital image processing technology, and in particular to a KNN-based adaptive noise filtering method. Background Art

[0002] There is often a lot of noise in the original point cloud obtained by scanning with a LiDAR device. At the same time, due to the scanning angle and the shape characteristics of the object, outliers will appear in the original point cloud. These outliers can easily cause missed detections and false detections in the subsequent point cloud segmentation algorithm. An effective point cloud noise point filtering algorithm is needed to identify and filter out the noise.

[0003] Chinese invention patent CN201711146117.0 discloses a method for fast denoising and filtering of satellite-borne photon counting lidar data, and discloses a KNN-based adaptive noise filtering method which is different from the design method of the present invention.

[0004] At present, the filtering algorithms for point clouds mainly include distance-based methods, density-based methods, voxel-based methods, and clustering-based filtering:

[0005] 1. Distance-based filtering method

[0006] In the distance-based filtering method, distance is a broad concept. It does not only refer to the narrow position distance, but also expresses some characteristic parameters in the point cloud with different distance definitions, such as Euclidean distance, Markov distance, etc. Then, the filtering threshold is set according to the distance perspective to filter out the point cloud noise. There are two classic distance-based point cloud filtering methods: statistical filtering and radius filtering:

[0007] (1) Statistical filtering

[0008] By analyzing the spatial distribution characteristics of point clouds, it can be concluded that noise points often exist in sparse areas of point clouds far away from the feature areas of point clouds. From a statistical point of view, certain statistical standards are set for the neighborhood points of each point to perform statistics, and points that do not meet the statistical distribution can be filtered out as noise points. At present, the classic statistical filtering method is based on the Gaussian distribution model for noise discrimination. By calculating the average distance and standard deviation between a point and its domain points, the outlier degree of each point is obtained, and then according to the pre-set threshold, the points with outliers outside the threshold are filtered out. The KNN (k-Nearest-Neighbor) classification algorithm is one of the simplest methods in data mining classification technology. The so-called K nearest neighbors means k nearest neighbors, which means that each sample can be represented by its closest k neighbors. On the basis of statistical filtering, researchers have proposed a denoising algorithm based on k nearest neighbors (KNN). This method uses the average distance between the k neighborhood points of each point and the average distance between the k neighborhood points as the standard of outlier degree, which reduces the cumbersome model calculation process in traditional statistical filtering and improves efficiency. The filtering effect of statistical filtering depends on the specification of k-neighborhood parameters and the prior setting of outlier standards, so this filtering method cannot adapt well to uneven point cloud scenes.

[0009] (2) Radius filtering

[0010] Radius filtering can be understood as the inverse process of statistical filtering. Statistical filtering determines whether the neighborhood points of a point are outliers and performs filtering by setting a radius, while radius filtering determines whether there are points in the field of a scattered point with a specified threshold number. If not, it is regarded as a discrete point. Since radius filtering is very sensitive to outliers, it can be used to detect and filter outliers. Correspondingly, some researchers have proposed the reverse k-nearest neighbor method (RKNN) based on this idea, which is implemented by the inverse process of the k-nearest neighbor method. There is also the LDOF algorithm proposed based on this idea, which uses the average distance between the k-neighboring points of the target point and the ratio of the distance between the target point and its k-neighboring points as the outlier standard, reducing the algorithm complexity of the statistical filtering method due to model calculation, and significantly improving the filtering efficiency. However, the radius filtering method depends on the specified filtering threshold, and has limited ability to filter out outlier point cloud clusters that appear locally aggregated in the point cloud.

[0011] 2. Density-based filtering method

[0012] Density-based filtering is mainly designed for local noise points. The LOF algorithm proposed by Breunig et al. is the most classic. The algorithm updates the outlier criterion and uses the ratio of the density of the point to the average density of the KNN neighborhood of the point as the outlier. The higher the outlier of a point, the closer the point is to the standard of noise points. This filtering method takes into account the large difference between the point cloud density in the feature area and the point cloud density in the non-feature area, so that the characteristic area of ​​the target is taken into account in the process of noise filtering. Based on this, Jin et al. proposed INFLO, which takes into account KNN and RKNN at the same time, and is more refined and accurate than the filtering of the LOF algorithm. The density-based filtering method does not fully consider other geometric features of the point cloud, such as the curvature and normal vector, which easily causes the loss of point cloud information in the edge area.

[0013] 3. Voxel-based filtering method

[0014] Voxel-based methods include triangular mesh method, grid division method and other methods. The core idea is to divide the point cloud data with regular geometric figures to realize voxelization, and define some parameters that can represent the feature information of the point cloud, such as curvature, density, normal vector, etc. as primitives. Then, the primitives are calculated for each divided area, and a point that can represent the characteristics of each area is found, called the key point. Then, with the key point as the center, the noise is filtered according to the distance parameter. The algorithm has a high computational complexity, and it is often difficult to achieve a balance between filtering accuracy and filtering efficiency in the selection of primitives.

[0015] 4. Clustering-based filtering method

[0016] In order to fully consider the feature information of the point cloud and avoid information loss in the feature area, Tang et al. proposed a clustering-based filtering method. The process is as follows: first, the original point cloud image is clustered, and the scattered points with similar features are clustered into one category. Then, the scattered points outside the feature area are filtered. This method is suitable for filtering point cloud noise throughout the entire domain. The clustering methods currently proposed are mainly based on octree and kd tree clustering. This algorithm has a fast calculation speed and high efficiency, but the filtering of outliers is highly dependent on the clustering effect. If the clustering algorithm itself cannot distinguish the feature areas well, it cannot achieve a good outlier filtering effect. Summary of the invention

[0017] In order to effectively solve the above technical problems, an adaptive noise filtering method based on KNN is provided. The original point cloud image is first obtained, and then the original point cloud image is processed by image processing technology. The original point cloud image is filtered by the adaptive noise filtering method, and the steps are as follows:

[0018] Step 1: Acquire the original point cloud image through a camera with laser radar technology, wherein the original point cloud image is composed of a plurality of original points, and the original points contain three-dimensional information;

[0019] Step 2: Traversing the neighborhood points of each original point in the original point cloud image;

[0020] Step 3: Initialize the adaptive neighborhood parameter k of each original point to 0, the number of neighborhood points N to 0, and then traverse the neighborhood points;

[0021] Step 4: If the traversed neighborhood point is determined to be a neighborhood point of the current original point, the adaptive neighborhood parameter k of the current original point is increased by 1, and the number of neighborhood points N is increased by 1; otherwise, the initial neighborhood parameter k of the current original point is increased by 1, and the number of neighborhood points N remains unchanged;

[0022] Step 5: When the number of neighborhood points N of each original point remains unchanged, the traversal ends, and the adaptive neighborhood parameter k of each original point is determined;

[0023] Step 6: Generate the penalty factor C through the number of neighborhood points N and the point cloud ball density;

[0024] Step 7: Add the penalty factor C to calculate the average distance;

[0025] Step 8: Determine and separate outliers through statistical filtering, and filter the outliers.

[0026] Furthermore, the KNN-based adaptive noise filtering method further includes outputting the original point cloud image processed by the adaptive noise filtering method.

[0027] Furthermore, the step 2 includes calculating the average distance between each original point in the original point cloud image and its K nearest neighboring points, calculating the mean and variance of the data information of the average distance between all the K neighboring points, and fitting them into an approximate Gaussian distribution model.

[0028] Furthermore, the step 2 includes, assuming that there are n original points in the original point cloud image, recording an original point m as c m (x m ,y m , z m ), m = 1, 2...n, x m ,y m 、z m They represent the coordinates of the x-axis, y-axis and z-axis respectively. Any neighboring point of the original point m is o, and the neighboring point o is denoted by c o (x o ,y o , z o ), x o,y o 、z o Represent the coordinates of the x-axis, y-axis and z-axis respectively, then the distance from the original point m to any neighboring point o is l mo The formula is

[0029]

[0030] The average distance from the original point m to its K neighboring points can be recorded as l, the mean of the fitted Gaussian distribution is al, and the variance is tl, then the Gaussian distribution f(l) is:

[0031]

[0032] Set a fixed threshold tg, then when the average distance l of the neighborhood point o o ∈(al-tg,al+tg), retain point o, otherwise filter it out.

[0033] Furthermore, the step 4 and the step 5 include a method for determining an adaptive neighborhood parameter k, wherein the adaptive neighborhood parameter k is determined by algorithm calculation without the need for unified specification.

[0034] Furthermore, the method for determining the adaptive neighborhood parameter k comprises the following steps:

[0035] Step 1: Given a dataset Where P is the original point set in the original point cloud image, x i is the i-th original point in the original point set P, x j is the jth original point in the original point set P; let M k (x i ) represents x i Neighborhood point set, AM(x i ) represents x i The adaptive neighborhood point set is:

[0036] AM(x i )={x j |x j ∈M k (x i )&x i ∈M k (x j )};

[0037] Step 2: Change x i The number of adaptive neighbors is expressed as N(x i )=||AM(x i)||, then the process of determining the adaptive neighborhood parameter k is to traverse each original point in the original point cloud image, set the adaptive neighborhood parameter k of each original point to 1 initially, and search its neighborhood point set. The formula is: where y t is the original point x i The tth neighboring point of ;

[0038] If y t ∈AM(x i ), then calculate y t Neighborhood point M k (y t ), and calculate M k (y t ) and M k (x i ) x , ρ y ;

[0039] If x i Meet the following requirements: Then: AM(x i )=AM(x i )∪y t ;

[0040] Step 3: Iterate the above steps until the adaptive neighborhood parameter k of each original point no longer changes. The calculation area can be considered stable, thus obtaining the adaptive neighborhood parameter k of each point in the original point cloud, which is recorded as: k(x i ), x i ∈P.

[0041] Furthermore, the step six also includes, after obtaining the adaptive neighborhood parameter k of each original point in steps four and five, giving a unique outlier degree criterion for each original point to determine whether it is an outlier point, and if it is not an outlier point, it is a main point.

[0042] Furthermore, in step six, a unique outlier criterion is given for each original point, specifically including: filtering the original point cloud image through steps one to five, dividing the main points and outlier points, the set of the main points is the main point cloud group, and the set of the outlier points is the outlier point cloud group; in order to better filter out the outlier point cloud group, a method of adding a penalty factor C to a number of global point cloud groups is proposed based on the point cloud ball density of a certain unknown point cloud group, so as to improve the average distance l' of the outlier point cloud group, as a new metric for judging whether the point cloud group is an outlier point cloud group or a main point cloud group:

[0043] set up is an original point x in the point cloud i The penalty factor is firstly based on the original point xi The farthest neighbor point is used as the radius to establish an enclosing sphere And calculate the bounding sphere The point cloud sphere density within The penalty factor The calculation formula is:

[0044] in the formula For x i The number of neighborhood points.

[0045] Furthermore, the step 7 includes adding the average distance l after the penalty factor C is added c (x i )for:

[0046]

[0047] In the formula, l(x i ) is the original point x i The average distance to all neighboring points in the neighborhood, is the original point x in the point cloud i The penalty factor.

[0048] Furthermore, in step eight, the method for determining the statistical filtering method includes adding the penalty factor C to a certain original point x i The average distance to the neighboring points l(x i ) depends on x i The surrounding sphere of the area The point cloud sphere density within and x i The number of neighboring points If the point x i The number of neighboring points is large but the local density is very low, so it can be considered that point x i Located in the outlier point cloud, it is penalized; if point x i The number of neighboring points is small but the local density is very high, so it can be considered that point x i is a noise point located closer to the main point cloud cluster; if point x i The number of neighboring points is small and the local density is low, so it can be considered that point x i is a single outlier; if point x i The number of neighboring points is large and the local density is high, so it can be considered that point x i Those located in the main point cloud cluster are not filtered out.

[0049] The beneficial effects of the present invention are:

[0050] (1) The global neighborhood parameter in the KNN-based noise filtering algorithm of the present invention is expanded from a fixed value to a different adaptive neighborhood parameter k that is adaptively set according to each original point. This method can better distinguish the cluster point cloud area from the main point cloud area and achieve better noise filtering effect.

[0051] (2) The present invention adopts a new threshold calculation method to provide a unique outlier criterion for each original point. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to better express the technical solution of the present invention, the present invention will be described with drawings as follows:

[0053] Figure 1 A schematic diagram of the process of the embodiment method; DETAILED DESCRIPTION

[0054] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.

[0055] It should be noted that, in the description of the present invention, terms such as "up", "down", "left", "right", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the drawings. This is merely for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present invention.

[0056] In addition, it should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0057] The filtering method adopted by the present invention is based on statistical filtering. In view of the fact that the fixed neighborhood parameters cannot well distinguish the outlier point cloud clusters from the main point cloud clusters, it is proposed to dynamically set the adaptive neighborhood parameter k of each original point. The present invention is adaptive, and gives each point a different adaptive neighborhood parameter k and number of neighborhood points N, so as to achieve a better segmentation effect of the main points and outlier points, and finally achieve a better denoising effect.

[0058] Taking the x-axis as an example, a fixed size range is defined at a point on the x-axis. This range is the neighborhood, and the points within the range are neighborhood points. Extending to the concept of two-dimensional and three-dimensional, it is a circle (sphere) with a certain point as the center of the circle (sphere center). The inside of the circle (sphere) is the neighborhood range, and the points inside are neighborhood points.

[0059] The basic concept of KNN (K-Nearest Neighbor) algorithm is that in order to determine the category of an unknown sample, all samples of known categories are used as references, the distance between the unknown sample and all known samples is calculated, and the K known samples closest to the unknown sample are selected. According to the majority-voting rule, the unknown sample and the K nearest neighboring samples are classified into one category.

[0060] The adaptive neighborhood parameter k refers to the inclusion of the K points closest to the original point into the neighborhood of the current traversed point. However, these points included in the neighborhood are screened one by one according to a certain threshold. Those exceeding the threshold will be filtered as noise points and do not belong to the neighborhood of the original point. After the traversal is completed, the adaptive neighborhood parameter k of the original point is determined, and the number of neighborhood points N is determined at the same time. The number of neighborhood points N refers to the number of neighborhood points in the neighborhood range of the original point at the beginning. Because the initial adaptive neighborhood parameter is 0 at the beginning, the neighborhood range is 0, and the number of neighborhood points N must be 0.

[0061] Example reference Figure 1 , an adaptive noise filtering method based on KNN, first obtains the original point cloud image, then uses image processing technology to process the original point cloud image, and filters the original point cloud image by the adaptive noise filtering method, and follows the following steps:

[0062] Step 1: Obtain the original point cloud image through a camera with laser radar technology. The original point cloud image is composed of multiple original points, which contain three-dimensional information.

[0063] Step 2: Perform neighborhood point traversal on each original point in the original point cloud image. In this embodiment, this is an adaptive traversal process, and there is no need to pre-design the radius. If it is pre-designed, it is a traditional KNN traversal. The algorithm of the present invention is a process of determining adaptive traversal, and the radius of each original point is not necessarily the same.

[0064] Statistical filtering is a filtering algorithm that performs statistical calculations on point cloud clusters. It relies on the KNN algorithm (k nearest neighbor search algorithm) to calculate the average distance between each original point in the original point cloud image and its nearest K neighboring points, and calculates the mean and variance of the average distance data between all K neighboring points to fit an approximate Gaussian distribution model. Assume that there are a total of n original points in the original point cloud image, and record an original point m as cm (x m ,y m , z m ), m = 1, 2...n, x m ,y m 、z m They represent the coordinates of the x-axis, y-axis and z-axis respectively. Any neighboring point of the original point m is o, and the neighboring point o is denoted by c o (x o ,y o , z o ), x o ,y o 、z o Represent the coordinates of the x-axis, y-axis and z-axis respectively, then the distance from the original point m to any neighboring point o is l mo The formula is

[0065]

[0066] The average distance from the original point m to its K neighboring points can be recorded as l, the mean of the fitted Gaussian distribution is al, and the variance is tl, then the Gaussian distribution f(l) is:

[0067]

[0068] Set a fixed threshold tg, then when the average distance l of the neighborhood point o o ∈(al-tg, al+tg), point o is retained, otherwise it is filtered out. This formula forms a neighborhood, and points within the neighborhood are retained, and points outside the neighborhood are filtered out.

[0069] Step 3: Set the adaptive neighborhood parameter k of each original point to 0 and the number of neighborhood points N to 0, and then traverse the neighborhood points.

[0070] Step 4: If the traversed neighborhood point is determined to be a neighborhood point of the current original point, the adaptive neighborhood parameter k of the current original point is increased by 1, and the number of neighborhood points N is increased by 1; otherwise, the initial neighborhood parameter k of the current original point is increased by 1, and the number of neighborhood points N remains unchanged.

[0071] Step 5: When the number of neighborhood points N of each original point remains unchanged, the traversal ends, and the adaptive neighborhood parameter k of each original point is determined.

[0072] Based on the actual distribution of point cloud clusters, a method for determining the adaptive neighborhood parameter k is designed. The adaptive neighborhood parameter k is determined by algorithm calculation without unified specification. The steps are as follows:

[0073] Step 1: Given a dataset Where P is the original point set in the original point cloud image, x i is the i-th original point in the original point set P, xj is the jth original point in the original point set P; let M k (x i ) represents x i Neighborhood point set, AM(x i ) represents x i The adaptive neighborhood point set refers to the situation where the neighborhoods of multiple original points intersect. Then the second step is to determine which original point's neighborhood the neighborhood points in these intersections belong to. The formula is:

[0074] AM(x i )={x j |x j ∈M k (x i )&x i ∈M k (x j )};

[0075] Step 2: Change x i The number of adaptive neighbors is expressed as N(x i )=||AM(x i )||, then the process of determining the adaptive neighborhood parameter k is to traverse each original point in the original point cloud image, set the adaptive neighborhood parameter k of each original point to 1 initially, and search its neighborhood point set. The formula is: where y t is the original point x i The tth neighboring point of ;

[0076] If y t ∈AM(x i ), then calculate y t Neighborhood point M k (y t ), and calculate M k (y t ) and M k (x i ) x , ρ y , density is calculated by distance, for example x i The sum of the distances to other points in the neighborhood divided by the number of points is the density. The smaller this value is, the denser the points are and the greater the density is.

[0077] If x i Meet the following requirements: Then: AM(x i )=AM(x i )∪y t ;

[0078] Step 3: Iterate the above steps until the adaptive neighborhood parameter k of each original point no longer changes. The calculation area can be considered stable, thus obtaining the adaptive neighborhood parameter k of each point in the original point cloud, which is recorded as: k(x i ), x i ∈P.

[0079] Step 6: Generate the penalty factor C through the number of neighborhood points N and the point cloud ball density;

[0080] After obtaining the adaptive neighborhood parameter k of each original point, it is necessary to determine whether a point is an outlier by outlier degree. Outlier degree refers to the measurement value for determining whether a point is an outlier. Traditional statistical filtering uses a unified filter threshold as the outlier criterion, but when the adaptive neighborhood parameter k of each point is different, the method of setting a unified filter threshold is obviously not applicable. Therefore, the algorithm with variable neighborhood parameters needs to adopt a new threshold calculation method to give a unique outlier criterion for each original point to determine whether it is an outlier. If it is not an outlier, it is a main point. Specifically, it includes: filtering the original point cloud image through steps one to five, dividing the main points and outliers, the set of main points is the main point cloud group, and the set of outliers is the outlier point cloud group; in order to better filter out the outlier point cloud group, based on the point cloud ball density of a certain unknown point cloud group, a method of adding a penalty factor C to several global point cloud groups is proposed, so as to improve the average distance l' of the outlier point cloud group, as a new metric for determining whether the point cloud group is an outlier point cloud group or a main point cloud group:

[0081] set up is an original point x in the point cloud i The penalty factor is firstly based on the original point x i The farthest neighbor point is used as the radius to establish an enclosing sphere And calculate the bounding sphere The point cloud sphere density within The penalty factor

[0082] The calculation formula is: in the formula For x i The number of neighborhood points.

[0083] Step 7: Add the penalty factor C to calculate the average distance. The average distance l after adding the penalty factor C c (x i )The formula is:

[0084]

[0085] In the formula, l(x i ) is the original point x iThe average distance to all neighboring points in the neighborhood, is the original point x in the point cloud i The penalty factor.

[0086] Step 8: Separate outliers by statistical filtering. The outliers are filtered out. The filtering judgment method is: after adding the penalty factor C, a certain original point x i The average distance to the neighboring points l(x i ) depends on x i The surrounding sphere of the area The point cloud sphere density within and x i The number of neighboring points If the point x i The number of neighboring points is large but the local density is very low, so it can be considered that point x i Located in the outlier point cloud, it is penalized; if point x i The number of neighboring points is small but the local density is very high, so it can be considered that point x i is a noise point located closer to the main point cloud cluster; if point x i The number of neighboring points is small and the local density is low, so it can be considered that point x i is a single outlier; if point x i The number of neighboring points is large and the local density is high, so it can be considered that point x i It is located in the main point cloud cluster and will not be filtered out.

[0087] Step 9: Output the original point cloud image processed by the adaptive noise filtering algorithm.

[0088] The above-mentioned embodiments only express several implementation methods of the present invention, and the description is relatively specific and detailed, but it cannot be understood as limiting the scope of the invention patent. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.

Claims

1. A KNN-based adaptive noise filtering method, characterized in that: First, the original point cloud image is obtained, and then the original point cloud image is processed using image processing technology, and the original point cloud image is filtered by an adaptive noise filtering method, according to the following steps: Step 1: Acquire the original point cloud image through a camera with laser radar technology, wherein the original point cloud image is composed of a plurality of original points, and the original points contain three-dimensional information; Step 2: Traversing the neighborhood points of each original point in the original point cloud image; Step 3: Initialize the adaptive neighborhood parameter k of each original point to 0, the number of neighborhood points N to 0, and then traverse the neighborhood points; Step 4: If the traversed neighborhood point is determined to be a neighborhood point of the current original point, the adaptive neighborhood parameter k of the current original point is increased by 1, and the number of neighborhood points N is increased by 1; otherwise, the initial neighborhood parameter k of the current original point is increased by 1, and the number of neighborhood points N remains unchanged; Step 5: When the number of neighborhood points N of each original point remains unchanged, the traversal ends, and the adaptive neighborhood parameter k of each original point is determined; Step 6: Generate the penalty factor C through the number of neighborhood points N and the point cloud ball density; Step 7: Add the penalty factor C to calculate the average distance; Step 8: Determine and separate outliers through statistical filtering, and filter the outliers.

2. The KNN-based adaptive noise filtering method according to claim 1, characterized in that: The method also includes outputting the original point cloud image processed by the KNN-based adaptive noise filtering method.

3. The KNN-based adaptive noise filtering method according to claim 1, characterized in that: The second step includes calculating the average distance between each original point in the original point cloud image and its K nearest neighboring points, calculating the mean and variance of the data information of the average distance between all the K neighboring points, and fitting them into an approximate Gaussian distribution model.

4. The KNN-based adaptive noise filtering method according to claim 3, characterized in that: The second step includes assuming that there are n original points in the original point cloud image, and recording an original point m as c m (x m ,y m , z m ), m = 1, 2…n, x m ,y m 、z m They represent the coordinates of the x-axis, y-axis and z-axis respectively. Any neighboring point of the original point m is o, and the neighboring point o is denoted by c o (x o ,y o ,z o ), x o ,y o 、z o Represent the coordinates of the x-axis, y-axis and z-axis respectively, then the distance from the original point m to any neighboring point o is l mo The formula is The average distance from the original point m to its K neighboring points can be recorded as l, the mean of the fitted Gaussian distribution is al, and the variance is tl, then the Gaussian distribution f(l) is: Set a fixed threshold tg, then when the average distance l of the neighborhood point o o ∈(al-tg,al+tg), retain point o, otherwise filter it out.

5. The KNN-based adaptive noise filtering method according to claim 4, characterized in that: The steps 4 and 5 include a method for determining an adaptive neighborhood parameter k, wherein the adaptive neighborhood parameter k is determined by algorithm calculation without the need for unified designation.

6. The KNN-based adaptive noise filtering method according to claim 5, characterized in that: The method for determining the adaptive neighborhood parameter k comprises the following steps: Step 1: Given a data set X = {(x i )} i n =1 ,x i ∈P, where P is the original point set in the original point cloud image, x i is the i-th original point in the original point set P, x j is the jth original point in the original point set P; let M k (x i ) represents x i The neighborhood point set, AM(x i ) represents x i The adaptive neighborhood point set is: AM(x i )={x j |x j ∈M k (x i )&x i ∈M k (x j )}; Step 2: Change x i The number of adaptive neighbors is expressed as N(x i )=||AM(x i )||, then the process of determining the adaptive neighborhood parameter k is to traverse each original point in the original point cloud image, set the adaptive neighborhood parameter k of each original point to 1 initially, and search for its neighborhood point set. The formula is: k (x i )={(y t )} t k =1 , where y t is the original point x i The tth neighboring point of ; If y t ∈AM(x i ), then calculate y t Neighborhood point M k (y t ), and calculate M k (y t ) and M k (x i ) x ,ρ y ; If x i Meet the following requirements: Then: AM(x i )=AM(x i )∪y t ; Step 3: Iterate the above steps until the adaptive neighborhood parameter k of each original point no longer changes. The calculation area can be considered stable, thus obtaining the adaptive neighborhood parameter k of each point in the original point cloud, which is recorded as: k(x i ), x i ∈P.

7. The KNN-based adaptive noise filtering method according to claim 6, characterized in that: The step six also includes, after obtaining the adaptive neighborhood parameter k of each original point in steps four and five, giving a unique outlier criterion for each original point to determine whether it is an outlier point. If it is not an outlier point, it is a main point.

8. The KNN-based adaptive noise filtering method according to claim 7, characterized in that: In the step 6, a unique outlier criterion is given for each original point, specifically including: filtering the original point cloud image through steps 1 to 5, dividing the main points and outlier points, the set of the main points is the main point cloud group, and the set of the outlier points is the outlier point cloud group; in order to better filter out the outlier point cloud group, a method of adding a penalty factor C to a number of global point cloud groups is proposed based on the point cloud ball density of a certain unknown point cloud group, so as to improve the average distance l' of the outlier point cloud group, as a new metric for judging whether the point cloud group is an outlier point cloud group or a main point cloud group: set up is an original point x in the point cloud i The penalty factor is firstly based on the original point x i The farthest neighbor point is used as the radius to establish an enclosing sphere And calculate the bounding sphere The point cloud sphere density within The penalty factor The calculation formula is: in the formula For x i The number of neighborhood points.

9. The KNN-based adaptive noise filtering method according to claim 8, characterized in that: The step 7 includes adding the average distance l after the penalty factor C is added c (x i )for: In the formula, l(x i ) is the original point x i The average distance to all neighboring points in the neighborhood, is the original point x in the point cloud i The penalty factor.

10. The KNN-based adaptive noise filtering method according to claim 9, characterized in that: In the step eight, the method for determining the statistical filtering method includes adding the penalty factor C to a certain original point x i The average distance to the neighboring points l(x i ) depends on x i The surrounding sphere of the area The point cloud sphere density within and x i The number of neighboring points If the point x i The number of neighboring points is large but the local density is very low, so it can be considered that point x i Located in the outlier point cloud, it is penalized; if point x i The number of neighboring points is small but the local density is very high, so it can be considered that point x i is a noise point located closer to the main point cloud cluster; if point x i The number of neighboring points is small and the local density is low, so it can be considered that point x i is a single outlier; if point x i The number of neighboring points is large and the local density is high, so it can be considered that point x i Those points located in the main point cloud cluster will not be filtered out.

Citation Information

Patent Citations

  • Fast denoising and filtering method for spaceborne photon counting laser radar data

    CN109799494A

  • A method and apparatus for monolithic point cloud data build

    CN109461207A

  • 3D point cloud denoising method based on statistical outlier and adaptive bilateral hybrid filtering

    CN110349094A

  • Terrain-adaptive airborne LiDAR point cloud regularization thin plate spline interpolation filtering method

    CN111340723A

  • Scattered point cloud denoising method based on normal correction and position filtering two-step method

    CN112396567A