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

By constructing a preset tree model and calculating the centroid point, the problem of low denoising efficiency of small group noise and strip noise in three-dimensional measurement is solved, efficient point cloud data denoising is achieved, and data quality is improved.

CN112102178BActive Publication Date: 2024-09-06FUSSEN IMAGING CO LTD
View PDF 17 Cites 0 Cited by

Patent Information

Application Number
CN202010748731.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-29
Publication Date
2024-09-06
Estimated Expiration
2040-07-29

AI Technical Summary

Technical Problem

Among existing three-dimensional measurement technologies, point cloud denoising technology is difficult to effectively deal with small cluster noise and strip-like small-segment trace convex noise around the point cloud body, resulting in low denoising efficiency, and the bilateral filtering algorithm will change point coordinates and introduce errors. .

Method used

By building a preset tree model, search the neighborhood point set of the main data point in the point cloud data, calculate the point normal vector and centroid point, calculate the vector and projection distance based on the centroid point and the neighborhood point set, and record if the projection distance reaches the threshold for noise points and update the neighborhood point set until complete denoising is achieved.

Benefits of technology

Without changing the coordinates of the point cloud data, it improves the denoising efficiency of small group noise and strip-like small-segment trace convex noise, provides more reliable point cloud data, and improves the quality of three-dimensional surface reconstruction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112102178B
    Figure CN112102178B
Patent Text Reader

Abstract

The present invention relates to the field of three-dimensional measurement technology, and provides a point cloud feature-preserving denoising method, device, electronic device and storage medium, the method comprising: constructing a preset tree model according to point cloud data, searching for a neighborhood point set corresponding to a main data point in the point cloud data based on the preset tree model; calculating the point normal vector of the main data point and the centroid point of the neighborhood point set according to the neighborhood point set corresponding to the main data point by a preset algorithm; calculating a vector according to the centroid point and the neighborhood point set, and the projection distance of the vector on the point normal vector; if the projection distance meets the threshold distance, recording the denoised point corresponding to the projection distance as a noise point, and updating the neighborhood point set based on the noise point, until the neighborhood point set of the main data point is completely denoised after the update. The present invention can denoise small clumping noise and small strip-shaped micro-convex noise around the main body of the point cloud, thereby improving the denoising efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of three-dimensional measurement technology, and in particular to a point cloud feature-preserving denoising method, device, electronic equipment and storage medium. Background Art

[0002] At present, in the field of three-dimensional measurement, three-dimensional point cloud denoising technology has important applications in reverse engineering. For three-dimensional scanning, due to the influence of the scanning environment, the operation of the scanner, the accuracy of the scanner, etc., the acquired three-dimensional point cloud data often has many noise points and outliers, which will directly affect the extraction of point cloud features, point cloud splicing and the quality of three-dimensional surface reconstruction. In the existing point cloud denoising technology, it is possible to process noise that deviates from the point cloud body at a certain distance and a long distance. For small cluster noise around the point cloud body, the denoising effect is poor, and the use of bilateral filtering algorithm will change the point coordinates, and introduce large errors to the point cloud data while denoising. In addition, stripe light projection technology can also be used for measurement, and the data obtained is in strips. If a small segment of trace convex noise appears in the strip point cloud data, the bilateral filtering algorithm will mistakenly think that this is a feature. It can be seen that in the prior art, there is a problem of low denoising efficiency for small cluster noise around the point cloud body. Summary of the invention

[0003] The embodiment of the present invention provides a point cloud feature-preserving denoising method, which can denoise small cluster noises and small strip-shaped micro-convex noises around the point cloud body, improve the denoising efficiency, and provide more reliable point cloud data.

[0004] In a first aspect, an embodiment of the present invention provides a point cloud feature-preserving denoising method, comprising the following steps:

[0005] Constructing a preset tree model according to the point cloud data, and searching for a neighborhood point set corresponding to a main data point in the point cloud data based on the preset tree model;

[0006] Calculating the point normal vector of the subject data point and the centroid point of the neighborhood point set according to the neighborhood point set corresponding to the subject data point by using a preset algorithm;

[0007] Calculate a vector according to the centroid point and the neighborhood point set, and a projection distance of the vector on the point normal vector, wherein the vector is composed of the points to be denoised in the neighborhood point set and the centroid point;

[0008] If the projection distance meets the threshold distance, the to-be-denoised point corresponding to the projection distance is recorded as a noise point, and the neighborhood point set is updated based on the noise point until the neighborhood point set of the main data point is completely denoised after the update.

[0009] In a second aspect, an embodiment of the present invention further provides a device capable of implementing feature-preserving denoising of point clouds, comprising:

[0010] A search module, used to construct a preset tree model according to the point cloud data, and search for a neighborhood point set corresponding to a main data point in the point cloud data based on the preset tree model;

[0011] A first calculation module, used to calculate the point normal vector of the main data point and the centroid point of the neighborhood point set according to the neighborhood point set corresponding to the main data point by using a preset algorithm;

[0012] A second calculation module, used for calculating a vector and a projection distance of the vector on the point normal according to the centroid point and the neighborhood point set, wherein the vector is composed of the points to be denoised in the neighborhood point set and the centroid point;

[0013] An updating module is used to record the to-be-denoised point corresponding to the projection distance as a noise point if the projection distance meets the threshold distance, and to update the neighborhood point set based on the noise point until the neighborhood point set of the main data point is completely denoised after the update.

[0014] In an embodiment of the present invention, a preset tree model is constructed according to point cloud data, and a neighborhood point set corresponding to a main data point in the point cloud data is searched based on the preset tree model; a point normal vector of the main data point and a centroid point of the neighborhood point set are calculated according to the neighborhood point set corresponding to the main data point by a preset algorithm; a vector is calculated according to the centroid point and the neighborhood point set, and a projection distance of the vector on the point normal vector, the vector being composed of the point to be denoised in the neighborhood point set and the centroid point; if the projection distance meets a threshold distance, the point to be denoised corresponding to the projection distance is recorded as a noise point, and the neighborhood point set is updated based on the noise point until the neighborhood point set of the main data point is completely denoised after the update. The embodiment of the present invention selects a neighborhood point set of the main data point and calculates the point normal vector through a preset algorithm to more accurately express the geometric information of the main body; without changing the coordinates of the point cloud data (point cloud features), the centroid point is calculated according to the neighborhood point set, and the vector between the centroid point and the neighborhood point set is calculated with the centroid point as the reference point. The projection distance of the vector on the point normal vector is used as the standard for judging noise, and the noise points whose projection distance reaches the threshold distance are denoised to achieve small cluster noise denoising and small strip segment trace protrusion noise denoising, which is beneficial to improving the denoising efficiency to provide reliable point cloud data. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0016] Figure 1 is a specific flow chart of the point cloud feature-preserving denoising method provided by an embodiment of the present invention;

[0017] Figure 2 is a specific flow chart of another point cloud feature-preserving denoising method provided by an embodiment of the present invention;

[0018] Figure 3 is a specific flow chart of another point cloud feature-preserving denoising method provided by an embodiment of the present invention;

[0019] Figure 4 is a schematic diagram of a specific structure of a point cloud feature-preserving denoising device provided by an embodiment of the present invention;

[0020] Figure 5 is a schematic diagram of the specific structure of another point cloud feature-preserving denoising device provided by an embodiment of the present invention;

[0021] Figure 6 is a schematic diagram of the specific structure of another point cloud feature-preserving denoising device provided by an embodiment of the present invention;

[0022] Figure 7 is a schematic diagram of the specific structure of another point cloud feature-preserving denoising device provided by an embodiment of the present invention;

[0023] Figure 8 is a schematic diagram of the specific structure of another point cloud feature-preserving denoising device provided by an embodiment of the present invention;

[0024] Fig. 9 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0026] like Figure 1 As shown, Figure 1: is a flow chart of a point cloud feature-preserving denoising method provided by an embodiment of the present invention, which specifically includes the following steps:

[0027] 101. Construct a preset tree model according to the point cloud data, and search for a neighborhood point set corresponding to the main data point in the point cloud data based on the preset tree model.

[0028] In the embodiment of the present invention, the scenarios in which the point cloud feature-preserving denoising method is applied include but are not limited to three-dimensional scanning systems, etc. The electronic device on which the point cloud feature-preserving denoising method is running can obtain point cloud data through a wired connection or a wireless connection. Among them, the above-mentioned wireless connection method may include but is not limited to 3G / 4G connection, WiFi (Wireless-Fidelity) connection, Bluetooth connection, WiMAX (Worldwide Interoperability for Microwave Access) connection, Zigbee (low-power LAN protocol, also known as Zigbee protocol) connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.

[0029] The above-mentioned point cloud data may refer to the point cloud data corresponding to the location of the subject (including vehicles, buildings, etc.) described in 3D point cloud space. In an embodiment of the present invention, the preset tree model provided may be a kd (K-dimensiontree) tree. The kd tree is a data structure that divides the subject data points in k-dimensional space (such as two-dimensional (x, y), three-dimensional (x, y, z), k-dimensional (x1, y, z...k)). It is mainly used for searching key data in multidimensional space, such as range search and nearest neighbor search. In essence, the kd tree can be a balanced binary tree. After obtaining the subject's point cloud data, the kd tree can be constructed according to the construction method of the kd tree. According to the function of applying the kd tree to the nearest neighbor search, the neighboring points corresponding to each subject data point in the point cloud data can be obtained. By gathering the neighboring points of each subject data point, a one-to-one corresponding neighborhood point set for each subject data point can be obtained. For example: the neighborhood point set corresponding to the subject data point A is N. P1 ={p1, ..., p m}, m represents the number of points in the neighborhood point set.

[0030] 102. Calculate the point normal vector of the main data point and the centroid point of the neighborhood point set according to the neighborhood point set corresponding to the main data point through a preset algorithm.

[0031] Among them, the above-mentioned preset algorithm may include a principal component analysis algorithm (PCA), which is a method of mathematical transformation, which converts a given set of related variables into another set of unrelated variables through linear transformation, and these new variables are arranged in descending order of variance. In the mathematical transformation, the total variance of the variables is kept unchanged, so that the first variable has the largest variance, which is called the first principal component, and the variance of the second variable is the second largest and is unrelated to the first variable, which is called the second principal component. By analogy, there are m principal components for m variables. Among them, in an embodiment of the present invention, the variables are m main data points in the neighborhood point set.

[0032] The above-mentioned point normal vector can be the target variable output after the above-mentioned principal component analysis algorithm uses the neighborhood point set as the initial variable and undergoes linear transformation. The target variable is the point normal vector of the neighborhood point set corresponding to the main data point and can be represented by N. The point normal vector has both direction and size. The above-mentioned centroid point can be used as a reference point for judging denoising. The centroid point can be the most stable point calculated based on the neighborhood point set. The preset algorithm can also include a mean algorithm to calculate the centroid point.

[0033] 103. Calculate a vector based on the centroid point and the neighborhood point set, as well as the projection distance of the vector on the point normal vector. The vector is composed of the point to be denoised in the neighborhood point set and the centroid point.

[0034] The vectors formed between each point in the neighborhood point set and the centroid point correspond in sequence. If there are m points in the neighborhood point set, there are m corresponding vectors. i O P Represents, where i represents the i-th point in the neighborhood point set, (i=1, ..., m). The above-mentioned denoised point can represent each point in the neighborhood point set, and the denoised point can be determined as a noise point or retained as a non-noise point. When the denoised point is determined to be a noise point, the 3D scanning system can generate a deletion instruction to delete the noise point, thereby achieving denoising processing for each main data point in the point cloud data to ensure the quality of the point cloud data.

[0035] After calculating the corresponding vectors based on the centroid point and each point in the neighborhood point set, we can perform operations based on the vector of each main data point and the point normal vector to obtain the projection distance of the vector in the direction of the point normal vector. i O P , corresponding to m projection distances, the projection distance is L i Represents (i=1,…,m).

[0036] 104. If the projection distance meets the threshold distance, the denoised point corresponding to the projection distance is recorded as a noise point, and the neighborhood point set is updated based on the noise point until the neighborhood point set of the main data point is completely denoised after the update.

[0037] Among them, the threshold distance can be obtained according to the centroid point of the neighborhood point set and the pre-selected parameters. Compare the projection distance with the above threshold distance. When the projection distance is greater than the threshold distance, it means that the projection distance meets the threshold distance. At this time, the denoised point corresponding to the projection distance can be marked as a noise point. If m projection distances are obtained, there will be m comparisons and m results. The result includes at least one noise point and at least one non-noise point. After all the noise points are obtained, a noise point set can be formed, the noise point set is marked with a set ID, and all noise points in the set ID are searched in the neighborhood point set, and all noise points are deleted to update the neighborhood point set.

[0038] The above-mentioned complete denoising can mean that the denoising effect reaches 100%. In addition, it can also be a preset denoising degree to reach a denoising threshold, for example: the denoising degree reaches 95%, and 95% is used as the denoising threshold. Specifically, it is not limited in the embodiments of the present invention. It should be noted that in the embodiments of the present invention, the main data points, centroid points, points to be denoised, etc. in the described neighborhood can be two-dimensional coordinate data, three-dimensional coordinate data,..., k-dimensional coordinate data. In the embodiments of the present invention, it is not specifically limited.

[0039] In an embodiment of the present invention, a preset tree model is constructed according to point cloud data, and a neighborhood point set corresponding to a main data point in the point cloud data is searched based on the preset tree model; the point normal vector of the main data point and the centroid point of the neighborhood point set are calculated according to the neighborhood point set corresponding to the main data point through a preset algorithm; a vector is calculated according to the centroid point and the neighborhood point set, as well as the projection distance of the vector on the point normal vector, the vector being composed of the point to be denoised in the neighborhood point set and the centroid point; if the projection distance meets the threshold distance, the point to be denoised corresponding to the projection distance is recorded as a noise point, and the neighborhood point set is updated based on the noise point until the neighborhood point set of the main data point is completely denoised after the update. The embodiment of the present invention selects a neighborhood point set and calculates the point normal vector through the principal component analysis algorithm to more accurately express the geometric information of the subject; without changing the coordinates (point cloud features) of the point cloud data, the centroid point is calculated according to the neighborhood point set, and the vector between the centroid point and the neighborhood point set is calculated with the centroid point as the reference point. The projection distance of the vector on the point normal vector is used as the standard for judging noise, and the noise points whose projection distance reaches the threshold distance are denoised to achieve small cluster noise denoising and small strip segment trace protrusion noise denoising, which is beneficial to improving the denoising efficiency to provide reliable point cloud data.

[0040] like Figure 2 As shown, Figure 2: is a flow chart of another point cloud feature preserving denoising method provided by an embodiment of the present invention, which specifically includes the following steps:

[0041] 201. Obtain point cloud data, and divide the point cloud space corresponding to the point cloud data into multi-dimensional regions.

[0042] Get point cloud data from the point cloud space. The point cloud data may be point cloud data of a subject and include multiple subject data points. The subject may include a vehicle, a house, a human body, etc. The point cloud space may be divided into multiple dimensional regions, and then a related search operation is performed in the specific space. The division rules may be customized, for example, a three-dimensional space may be divided into eight-dimensional spaces.

[0043] 202. Select a split point in the multidimensional region according to the main data point, and insert the main data point into the left subspace and the right subspace of the split point based on the split point to construct a preset tree model.

[0044] Among them, the split point can represent the root node. Selecting the root node can first determine how many dimensions the main data points of the point cloud data belong to, and then count the data variances of multiple main data points in each dimension. The number of dimensions determines the number of data variances, and the dimension corresponding to the maximum value can be selected from the data variance as the domain value. Then the data in the domain value can be sorted to select the median, and the data point corresponding to the median is used as the above split point (root node). In this way, the splitting hyperplane of the split point will pass through the split point and be perpendicular to the median. For example: 6 two-dimensional data points {(2,3), (5,4), (9,6), (4,7), (8,1), (7,2)}, the data variances of the 6 data points in the x and y dimensions are 39 and 28.63 respectively, so the variance is larger on the x axis, so the domain value is x; the median value on the x dimension is selected as 7, then the split point is (7,2).

[0045] After the split point is calculated, the entire space will be divided into two parts, one side can be the part less than or equal to the median, that is, the above-mentioned left subspace, and the other side can be the part greater than the median, that is, the above-mentioned right subspace. The data of the dimension where the median is located can be compared in size, and all the main data points can be inserted into the left subspace and the right subspace respectively. Among them, the ranking of the data points in the left subspace and the right subspace can also be performed according to the above-mentioned process of selecting the root node. Because the construction of the kd tree is a recursive process, it is executed back and forth until only one data point is contained in the point cloud space to complete the construction of the kd tree. Of course, in addition to the construction method of the kd tree provided above, other methods for constructing the kd tree can also be included, which are not limited in the embodiments of the present invention.

[0046] 203. Preset an initial neighborhood radius, and search for neighboring points corresponding to the main data point in the kd tree multiple times within the initial neighborhood radius based on the main data point, and form a neighborhood point set with the searched neighboring point set.

[0047] Before presetting the initial neighborhood radius, a binary tree search can be performed first. The main data point that needs to be searched is searched layer by layer starting from the root node, and the current nearest point is found from the search path. Then the distance between the current nearest point and the data point that needs to be searched can be calculated. The distance can be calculated according to the distance formula between two points. The point can be a k-dimensional coordinate point.

[0048] After completing the binary tree search, perform a backtracking search, trace back from the current nearest neighbor point found above to its parent node, and determine whether there are data points with a distance less than the above distance in the space of other child nodes of the parent node. Specifically, the initial neighborhood radius can be preset, and the initial neighborhood radius can be the distance value corresponding to the current nearest neighbor point; and draw a circle with the main data point to be found as the center to see whether it intersects with the hyperplane boundary divided into multidimensional areas. If there is no intersection, there is no need to enter the dimensional area corresponding to the hyperplane boundary, that is, data points with a smaller distance in this dimension are not considered. Then trace back to the parent node of the above parent node, and continue to search in the same way until the root node. In this way, the above neighboring points can be found, and then all the searched neighboring points are combined to obtain the above neighborhood point set.

[0049] In addition, when the currently calculated distance is smaller than the previously calculated distance during multiple searches, the current nearest neighbor point will be updated, and the initial neighborhood radius of subsequent searches will also need to be updated to the corresponding minimum distance. It should be noted that neighbor points can also be found by other methods, such as the BBF algorithm.

[0050] 204. Calculate the point normal vector of the main data point and the centroid point of the neighborhood point set according to the neighborhood point set corresponding to the main data point through a preset algorithm.

[0051] 205. Calculate a vector based on the centroid point and the neighborhood point set, as well as the projection distance of the vector on the point normal vector, wherein the vector is composed of the point to be denoised in the neighborhood point set and the centroid point.

[0052] 206. If the projection distance satisfies the threshold distance, the to-be-denoised point corresponding to the projection distance is recorded as a noise point, and the neighborhood point set is updated based on the noise point until the neighborhood point set of the main data point is completely denoised after the update.

[0053] Optionally, the above step 204 includes:

[0054] The mean of the neighborhood point set is calculated according to the neighborhood point set corresponding to the main data point, and the mean is determined as the centroid point corresponding to the main data point, wherein the mean corresponds to the main data point.

[0055] Among them, each main data point will have a corresponding neighborhood point set. There can be multiple points to be denoised in the neighborhood point set. The average of all the points to be denoised can be calculated, and the obtained average is used as the centroid point of the main data point. The specific calculation formula is as follows:

[0056]

[0057] Wherein, Op is the centroid point, n is the number of points to be denoised in the neighborhood point set, and Pi represents the i-th point to be denoised. The above method of taking the centroid point and using the centroid point as the reference point to calculate the projection distance can remove small cluster noise and small strip-shaped micro-convex noise around the point cloud body without changing the coordinates of the main data points in the point cloud data.

[0058] Optionally, the above step 205 includes:

[0059] Calculate the vector based on the point to be denoised and the centroid point in the neighborhood point set.

[0060] Among them, each point to be denoised in the neighborhood point set can be subtracted from the centroid point. If there are m points to be denoised in the neighborhood point set, the vector PiPo between the m points to be denoised and the centroid point will be calculated. The specific calculation formula is as follows:

[0061] p i O p =p i -O p (i=1, ..., m) (2)

[0062] Among them, Pi is the i-th point to be denoised, PiPo is the i-th vector, and Op is the centroid point.

[0063] The projection distance of the vector in the direction of the point normal vector is calculated according to the vector and the point normal vector, until the projection distance of the vectors corresponding to all the points to be denoised in the neighborhood point set on the corresponding point normal vector is calculated.

[0064] Among them, there are m points to be denoised, and m projection distances will be calculated. The specific calculation formula for calculating the projection distance of the vector in the direction of the point normal vector is as follows:

[0065]

[0066] Wherein, Ni represents the normal vector of the ith point, |Ni│ represents the length of the normal vector of the ith point, PiPo is the ith vector, |PiPo│ is the length of the ith vector, and Li is the ith projection distance. According to the above formula (3), m projection distances can be calculated. The above-calculated projection distance is used as a criterion for judging noise in the embodiment of the present invention, and can be compared with the threshold distance, and the noise points can be selected from the points to be removed according to the size.

[0067] Optionally, after the step of calculating the projection distances of the vectors corresponding to all the to-be-denoised points in the neighborhood point set on the corresponding point normal vectors, the method may further include:

[0068] The average projection distance of the vectors corresponding to all the noise-removing points in the calculated neighborhood point set on the corresponding point normal vector is calculated to obtain the average projection distance.

[0069] After calculating m projection distances, all projection distances may be averaged to obtain an average projection distance, which is represented by meanL. The specific calculation formula is as follows.

[0070]

[0071] Among them, meanL is the average projection distance, Li is the i-th projection distance, and m is the total number of projection distances. The average projection distance calculated above can be used to calculate the threshold distance, which is convenient for comparing the projection distance with the threshold distance to determine whether the corresponding denoising point is a noise point.

[0072] In an embodiment of the present invention, a kd tree is established to select a neighborhood point set of a subject data point in the form of a kd tree, and the distance between the subject data point and the data point in each dimensional space is calculated, and then the subject data point and the calculated distance are used to find whether there is a closer neighboring point, so as to form a neighborhood point set for each subject data point. The accuracy of obtaining the neighboring points of the subject data point can be improved. The point normal vector calculated by the principal component analysis algorithm can more accurately express the geometric information of the subject; without changing the coordinates of the point cloud data, the centroid point is calculated according to the neighborhood point set, and the vector between the centroid point and the neighborhood point set is calculated with the centroid point as the reference point. The projection distance of the vector on the point normal vector is used as the standard for judging noise, and the noise points whose projection distance reaches the threshold distance are denoised to achieve small cluster noise denoising and strip-shaped small segment trace convex noise denoising, which is conducive to improving the denoising efficiency to provide reliable point cloud data.

[0073] like Figure 3 As shown, Figure 3 : is a flow chart of another point cloud feature preserving denoising method provided by an embodiment of the present invention, which specifically includes the following steps:

[0074] 301. Obtain point cloud data, and divide the point cloud space corresponding to the point cloud data into multi-dimensional regions.

[0075] 302. Select a split point in the multidimensional region according to the main data point, and insert the main data point into the left subspace and the right subspace of the split point based on the split point to construct a preset tree model.

[0076] 303. Preset an initial neighborhood radius, and search the neighboring points corresponding to the main data point in the kd tree multiple times within the initial neighborhood radius based on the main data point, and form a neighborhood point set with the searched neighboring point set.

[0077] 304. Calculate the point normal vector of the main data point and the centroid point of the neighborhood point set according to the neighborhood point set corresponding to the main data point through a preset algorithm.

[0078] 305. Calculate a vector based on the centroid point and the neighborhood point set, as well as the projection distance of the vector on the point normal vector, wherein the vector is composed of the point to be denoised in the neighborhood point set and the centroid point.

[0079] 306. Select a radius coefficient, and calculate a current neighborhood radius according to the initial neighborhood radius and a preset radius coefficient.

[0080] The radius coefficient can be a pre-set coefficient and can be customized. In the embodiment of the present invention, it can be represented by f, and its selection range is (0.0<f<1.0). The current neighborhood radius can be calculated based on the initial neighborhood radius by multiplying the radius coefficient by the initial neighborhood radius, as shown in the following formula:

[0081] r1=f×r (5)

[0082] Among them, r1 is the current neighborhood radius, r is the initial neighborhood radius, and f is the radius coefficient. From formula (5) and the value range of f, it can be seen that the value of the current neighborhood radius r1 will be smaller than the initial neighborhood radius r, that is, the neighborhood point set is in a smaller neighborhood.

[0083] 307. Select a neighborhood point set within the current neighborhood radius, and compare the projection distance corresponding to the point to be denoised in the neighborhood point set within the current neighborhood radius with a threshold distance, where the threshold distance is calculated based on the average projection distance and the radius coefficient.

[0084] The threshold distance can be obtained by multiplying the average projection distance by the radius coefficient. The threshold distance is represented by thresholdL, and the specific calculation formula is as follows:

[0085] thresholdL =f1* mean L (6)

[0086] Among them, f1 represents a radius coefficient selected within the range of f. After calculating the current neighborhood radius, select the point set within the neighborhood of the current neighborhood radius r1, and compare the size of the point to be denoised in the point set with the threshold distance.

[0087] 308. If the projection distance meets the threshold distance, the data point corresponding to the projection distance is recorded as a noise point, and the noise point in the neighborhood point set is removed to obtain an updated neighborhood point set.

[0088] When the projection distance Li is greater than the threshold distance thresholdL, it means that the denoised point corresponding to the projection distance Li has caused noise interference to the main data point. The denoised point needs to be marked as a noise point and then removed from the neighborhood point set to update the neighborhood point set. The number of times the projection distance is compared with the threshold distance will be greater than or equal to the number of times the neighborhood point set is updated, because when judging whether it is a noise point, there may be a situation where it is not a noise point.

[0089] 309. If the updated neighborhood point set does not satisfy complete denoising, the initial neighborhood radius and radius coefficient are reselected, and steps 301 to 308 are executed repeatedly.

[0090] After multiple updates, it is necessary to confirm whether the neighborhood point set is completely denoised to determine whether steps 301 to 308 need to be repeated. When no noise points are updated in the neighborhood point set, the denoising process is completed.

[0091] Among them, if after m comparisons, it is determined that the main data points are still affected by noise, steps 301-308 will be executed repeatedly until complete denoising is achieved. In addition, a denoising condition can also be set, and the execution can be stopped when the updated neighborhood point set meets the denoising condition. According to the test results, it is usually sufficient to execute 2-3 times. When the updated neighborhood point set does not meet the complete denoising or denoising conditions, the parameters r, f and f1 can be reset first, and then the reset parameters can be brought into the above steps 301 to 308 and repeated to find the noise points for denoising and obtain better quality point cloud data.

[0092] In an embodiment of the present invention, after calculating the m projection distances Li, the radius coefficient is selected, the current neighborhood radius is calculated according to the initial neighborhood radius and the preset radius coefficient, and a neighborhood point set is selected within the range of the current neighborhood radius, and the m projection distances Li in the neighborhood point set are respectively compared with the threshold distance (calculated by the radius coefficient and the average projection distance), and the points to be denoised that are greater than the threshold distance are recorded as denoised points. After all the denoised points are obtained, they can be found in the neighborhood point set in the form of a set and deleted, so as to update the neighborhood point set. In the case of judging that there is no complete denoising, by re-defining the parameters of the initial neighborhood radius, the current neighborhood radius and the radius coefficient, and repeating the execution at least once, complete denoising can be achieved. It is ensured that there are no denoising points in the neighborhood point set, so as to realize the denoising of small cluster noise and the denoising of small strip-shaped micro-protrusion noise, which is conducive to making the point cloud data corresponding to the main data points and retained have higher data quality, and improve the reliable point cloud data for the surface reconstruction of the main body of the point cloud data.

[0093] like Figure 4 As shown, Figure 4 is a schematic diagram of the structure of a point cloud feature preserving denoising device provided in an embodiment of the present invention. The point cloud feature preserving denoising device 400 includes:

[0094] A search module 401 is used to construct a preset tree model according to the point cloud data, and search for a neighborhood point set corresponding to a main data point in the point cloud data based on the preset tree model;

[0095] A first calculation module 402 is used to calculate the point normal vector of the main data point and the centroid point of the neighborhood point set according to the neighborhood point set corresponding to the main data point by using a preset algorithm;

[0096] A second calculation module 403 is used to calculate a vector and a projection distance of the vector on a point normal according to the centroid point and the neighborhood point set, wherein the vector is composed of the point to be denoised in the neighborhood point set and the centroid point;

[0097] The updating module 404 is used to record the denoised point corresponding to the projection distance as a noise point if the projection distance meets the threshold distance, and update the neighborhood point set based on the noise point until the neighborhood point set of the main data point is completely denoised after the update.

[0098] Optional, such as Figure 5 As shown, Figure 5 4 is a schematic diagram of the structure of another point cloud feature preserving denoising device provided by an embodiment of the present invention, wherein the search module 401 includes:

[0099] An acquisition unit 4011 is used to acquire point cloud data and divide the point cloud space corresponding to the point cloud data into multi-dimensional regions;

[0100] A construction unit 4012 is used to select a split point in the multidimensional region according to the main data point, and insert the main data point into the left subspace and the right subspace of the split point based on the split point to construct a preset tree model, wherein the preset tree model is a kd tree;

[0101] The search unit 4013 is used to preset an initial neighborhood radius, and search the neighboring points corresponding to the main data points in the kd tree multiple times within the initial neighborhood radius based on the main data points, and form a neighborhood point set with the searched neighboring point sets.

[0102] Optionally, the first calculation module 402 is used to calculate the mean of the neighborhood point set according to the neighborhood point set corresponding to the main data point, and determine the mean as the centroid point corresponding to the main data point, wherein the mean corresponds to the main data point.

[0103] Optional, such as Figure 6 As shown, Figure 6 4 is a schematic diagram of the structure of another point cloud feature preserving denoising device provided by an embodiment of the present invention, wherein the second computing module 403 includes:

[0104] The first calculation unit 4031 is used to calculate a vector according to the point to be de-noised in the neighborhood point set and the centroid point;

[0105] The second calculation unit 4032 is used to calculate the projection distance of the vector in the direction of the point normal vector according to the vector and the point normal vector, until the projection distances of the vectors corresponding to all the points to be denoised in the neighborhood point set on the corresponding point normal vectors are calculated.

[0106] Optional, such as Figure 7 As shown, Figure 7 4 is a schematic diagram of the structure of another point cloud feature preserving denoising device provided by an embodiment of the present invention, wherein the device 400 further includes:

[0107] The third calculation module 405 is used to calculate the average of the projection distances of the vectors corresponding to all the to-be-denoised points in the calculated neighborhood point set on the corresponding point normal vectors to obtain an average projection distance.

[0108] Optional, such as Figure 8 As shown, Figure 8 4 is a schematic diagram of the structure of another point cloud feature preserving denoising device provided by an embodiment of the present invention, wherein the updating module 404 includes:

[0109] The third calculation unit 4041 is used to select a radius coefficient and calculate the current neighborhood radius according to the initial neighborhood radius and the preset radius coefficient;

[0110] A comparison unit 4042 is used to select a neighborhood point set within the current neighborhood radius, and compare the projection distance corresponding to the point to be denoised in the neighborhood point set within the current neighborhood radius with a threshold distance, where the threshold distance is calculated based on the average projection distance and the radius coefficient;

[0111] A removal unit 4043 is used for recording the main data point corresponding to the projection distance as a noise point if the projection distance meets the threshold distance, and removing the noise point in the neighborhood point set to obtain an updated neighborhood point set;

[0112] The loop unit 4044 is used to reselect the initial neighborhood radius and radius coefficient if the updated neighborhood point set does not satisfy complete denoising, and then return to modules 401-404 to execute corresponding steps.

[0113] like Fig. 9 As shown, Fig. 9 It is a structural diagram of an electronic device provided in an embodiment of the present invention. The electronic device 900 includes: a memory 902, a processor 901, a network interface 903, and a computer program stored in the memory 902 and executable on the processor 901. When the processor 901 executes the computer program, the steps in the point cloud feature-preserving denoising method provided in the embodiment are implemented.

[0114] Specifically, the processor 901 is configured to perform the following steps:

[0115] Construct a preset tree model according to the point cloud data, and search for a neighborhood point set corresponding to the main data point in the point cloud data based on the preset tree model;

[0116] Calculate the point normal vector of the main data point and the centroid point of the neighborhood point set according to the neighborhood point set corresponding to the main data point through a preset algorithm;

[0117] Calculate the vector based on the centroid point and the neighborhood point set, as well as the projection distance of the vector on the point normal vector. The vector is composed of the point to be denoised in the neighborhood point set and the centroid point.

[0118] If the projection distance meets the threshold distance, the denoised point corresponding to the projection distance is recorded as a noise point, and the neighborhood point set is updated based on the noise point until the neighborhood point set of the main data point is completely denoised after the update.

[0119] Optionally, the step of constructing a preset tree model according to the point cloud data and searching for a neighborhood point set corresponding to the main data point in the point cloud data based on the preset tree model executed by the processor 901 includes:

[0120] Obtain point cloud data, and divide the point cloud space corresponding to the point cloud data into multi-dimensional regions;

[0121] Selecting a split point in the multidimensional region according to the main data point, inserting the main data point into the left subspace and the right subspace of the split point based on the split point, so as to construct a preset tree model, wherein the preset tree model is a kd tree;

[0122] The initial neighborhood radius is preset, and the neighboring points corresponding to the main data points in the kd tree are searched multiple times within the initial neighborhood radius based on the main data points, and the searched neighboring points are set to form a neighborhood point set.

[0123] Optionally, the step of calculating the centroid point of the neighborhood point set performed by the processor 901 includes:

[0124] The mean of the neighborhood point set is calculated according to the neighborhood point set corresponding to the main data point, and the mean is determined as the centroid point corresponding to the main data point, wherein the mean corresponds to the main data point.

[0125] Optionally, the step of calculating the vector according to the centroid point and the neighborhood point set and the projection distance of the vector on the point normal vector performed by the processor 901 includes:

[0126] Calculate the vector based on the point to be denoised and the centroid point in the neighborhood point set;

[0127] The projection distance of the vector in the direction of the point normal vector is calculated according to the vector and the point normal vector, until the projection distance of the vectors corresponding to all the points to be denoised in the neighborhood point set on the corresponding point normal vector is calculated.

[0128] Optionally, after the step of calculating the projection distances of the vectors corresponding to all the to-be-denoised points in the neighborhood point set on the corresponding point normal vectors, the processor 901 is further configured to execute:

[0129] The average projection distance of the vectors corresponding to all the noise-removing points in the calculated neighborhood point set on the corresponding point normal vector is calculated to obtain the average projection distance.

[0130] Optionally, if the projection distance satisfies the threshold distance, the processor 901 records the subject data point corresponding to the projection distance as a noise point, and updates the neighborhood point set based on the noise point until the neighborhood point set of the updated subject data point is completely denoised, including:

[0131] Select the radius coefficient, and calculate the current neighborhood radius based on the initial neighborhood radius and the preset radius coefficient;

[0132] Select a neighborhood point set within the current neighborhood radius, and compare the projection distance corresponding to the point to be denoised in the neighborhood point set within the current neighborhood radius with the threshold distance, which is calculated based on the average projection distance and the radius coefficient;

[0133] If the projection distance meets the threshold distance, the main data point corresponding to the projection distance is recorded as a noise point, and the noise point in the neighborhood point set is removed to obtain an updated neighborhood point set;

[0134] If the updated neighborhood point set does not satisfy complete denoising, the initial neighborhood radius and radius coefficient are reselected, and the steps of constructing a preset tree model according to the point cloud data and searching for the neighborhood point set corresponding to the main data points in the point cloud data based on the preset tree model are executed cyclically.

[0135] The electronic device 900 provided in the embodiment of the present invention can implement various implementations in the point cloud feature-preserving denoising method embodiment and the corresponding beneficial effects, which will not be described again here to avoid repetition.

[0136] It should be noted that the figure only shows 901-903 with components, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the electronic device 900 here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASIC), programmable gate arrays (FPGA), digital signal processors (DSP), embedded devices, etc.

[0137] The electronic device 900 may be a computing device such as a desktop computer, a notebook, a palm computer, etc. The electronic device 900 may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.

[0138] The memory 902 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 902 can be an internal storage unit of the electronic device 900, such as a hard disk or memory of the electronic device 900. In other embodiments, the memory 902 can also be an external storage device of the electronic device 900, such as a plug-in hard disk equipped on the electronic device 900, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 902 can also include both the internal storage unit of the electronic device 900 and its external storage device. In this embodiment, the memory 902 is generally used to store the operating system and various application software installed on the electronic device 900, such as the program code of the point cloud feature-preserving denoising method, etc. In addition, the memory 902 can also be used to temporarily store various types of data that have been output or are to be output.

[0139] In some embodiments, the processor 901 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor 901 is generally used to control the overall operation of the electronic device 900. In this embodiment, the processor 901 is used to run the program code stored in the memory 902 or process data, such as running the program code of the point cloud feature preserving denoising method.

[0140] The network interface 903 may include a wireless network interface or a wired network interface, and the network interface 903 is generally used to establish a communication connection between the electronic device 900 and other electronic devices.

[0141] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by the processor 901, each process in the point cloud feature-preserving denoising method provided in the embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0142] A person skilled in the art can understand that all or part of the processes in the method for denoising point cloud with feature preservation in the embodiment can be completed by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of each method. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory 902 (RAM).

[0143] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0144] The terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects rather than to describe a specific order. Reference to "embodiment" in this article means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present application. The appearance of this phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0145] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.

Claims

1. A point cloud feature-preserving denoising method, characterized in that: The following steps are involved: Constructing a preset tree model according to the point cloud data, and searching for a neighborhood point set corresponding to a main data point in the point cloud data based on the preset tree model; Calculating the point normal vector of the subject data point and the centroid point of the neighborhood point set according to the neighborhood point set corresponding to the subject data point by using a preset algorithm; The preset algorithm includes a principal component analysis algorithm PCA. The principal component analysis algorithm is a method of mathematical transformation, which transforms a given set of related variables into another set of unrelated variables through linear transformation. These new variables are arranged in descending order of variance. The total variance of the variables is kept unchanged during the mathematical transformation, so that the first variable has the largest variance, which is called the first principal component, and the second variable has the second largest variance and is unrelated to the first variable, which is called the second principal component. By analogy, there are m principal components for m variables, where the variables are m main data points in the neighborhood point set; The point normal vector is the target variable output after the principal component analysis algorithm uses the neighborhood point set as the initial variable and undergoes linear transformation. The target variable is the point normal vector of the neighborhood point set corresponding to the main data point, represented by N. The point normal vector has both direction and magnitude. The centroid point is used as a reference point for judging denoising. The centroid point is the most stable point calculated based on the neighborhood point set. The preset algorithm also includes a mean value algorithm for calculating the centroid point. Calculate a vector according to the centroid point and the neighborhood point set, and a projection distance of the vector on the point normal vector, wherein the vector is composed of the points to be denoised in the neighborhood point set and the centroid point; If the projection distance meets the threshold distance, the to-be-denoised point corresponding to the projection distance is recorded as a noise point, and the neighborhood point set is updated based on the noise point until the neighborhood point set of the main data point is completely denoised after the update.

2. The method according to claim 1, characterized in that The step of constructing a preset tree model according to the point cloud data and searching for a neighborhood point set corresponding to the main data point in the point cloud data based on the preset tree model comprises: Acquire the point cloud data, and divide the point cloud space corresponding to the point cloud data into multi-dimensional regions; Selecting a split point in the multidimensional region according to the main data point, and inserting the main data point into the left subspace and the right subspace of the split point based on the split point, so as to construct the preset tree model, wherein the preset tree model is a kd tree; An initial neighborhood radius is preset, and neighboring points corresponding to the main data point in the kd tree are searched multiple times within the initial neighborhood radius based on the main data point, and the searched neighboring points are set to form the neighborhood point set.

3. The method according to claim 1, characterized in that The step of calculating the centroid of the neighborhood point set comprises: The mean of the neighborhood point set is calculated according to the neighborhood point set corresponding to the main data point, and the mean is determined as the centroid point corresponding to the main data point, wherein the mean corresponds to the main data point.

4. The method according to claim 2, characterized in that The step of calculating a vector according to the centroid point and the neighborhood point set, and the projection distance of the vector on the point normal vector comprises: Calculate the vector according to the point to be denoised in the neighborhood point set and the centroid point; The projection distance of the vector in the direction of the point normal vector is calculated according to the vector and the point normal vector, until the projection distances of the vectors corresponding to all the points to be denoised in the neighborhood point set on the corresponding point normal vectors are calculated.

5. The method according to claim 4, characterized in that After the step of calculating the projection distances of the vectors corresponding to all the to-be-denoised points in the neighborhood point set on the corresponding point normal vectors, the method further comprises: The projection distances of the vectors corresponding to all the to-be-denoised points in the neighborhood point set calculated on the corresponding point normal vectors are averaged to obtain an average projection distance.

6. The method according to claim 5, characterized in that If the projection distance satisfies the threshold distance, the main data point corresponding to the projection distance is recorded as a noise point, and the neighborhood point set is updated based on the noise point until the neighborhood point set of the main data point is completely denoised after the update. The steps include: Selecting a radius coefficient, and calculating a current neighborhood radius according to the initial neighborhood radius and a preset radius coefficient; Selecting the neighborhood point set within the current neighborhood radius, comparing the projection distance corresponding to the to-be-denoised point in the neighborhood point set within the current neighborhood radius with a threshold distance, wherein the threshold distance is calculated according to the average projection distance and the radius coefficient; If the projection distance satisfies the threshold distance, the main data point corresponding to the projection distance is recorded as a noise point, and the noise point in the neighborhood point set is removed to obtain an updated neighborhood point set; If the updated neighborhood point set does not satisfy complete denoising, the initial neighborhood radius and the radius coefficient are reselected, and the steps of constructing a preset tree model according to the point cloud data and searching for the neighborhood point set corresponding to the main data points in the point cloud data based on the preset tree model are executed in a loop.

7. A point cloud feature-preserving denoising device, characterized in that: include: A search module, used to construct a preset tree model according to the point cloud data, and search for a neighborhood point set corresponding to a main data point in the point cloud data based on the preset tree model; A first calculation module, used to calculate the point normal vector of the main data point and the centroid point of the neighborhood point set according to the neighborhood point set corresponding to the main data point by using a preset algorithm; The preset algorithm includes a principal component analysis algorithm PCA. The principal component analysis algorithm is a method of mathematical transformation, which transforms a given set of related variables into another set of unrelated variables through linear transformation. These new variables are arranged in descending order of variance. The total variance of the variables is kept unchanged during the mathematical transformation, so that the first variable has the largest variance, which is called the first principal component, and the second variable has the second largest variance and is unrelated to the first variable, which is called the second principal component. By analogy, there are m principal components for m variables, where the variables are m main data points in the neighborhood point set; The point normal vector is the target variable output after the principal component analysis algorithm uses the neighborhood point set as the initial variable and undergoes linear transformation. The target variable is the point normal vector of the neighborhood point set corresponding to the main data point, represented by N. The point normal vector has both direction and magnitude. The centroid point is used as a reference point for judging denoising. The centroid point is the most stable point calculated based on the neighborhood point set. The preset algorithm also includes a mean value algorithm for calculating the centroid point. A second calculation module, used for calculating a vector and a projection distance of the vector on the point normal according to the centroid point and the neighborhood point set, wherein the vector is composed of the points to be denoised in the neighborhood point set and the centroid point; An updating module is used to record the to-be-denoised point corresponding to the projection distance as a noise point if the projection distance meets the threshold distance, and to update the neighborhood point set based on the noise point until the neighborhood point set of the main data point is completely denoised after the update.

8. The device according to claim 7, wherein the search module comprises: An acquisition unit, used for acquiring the point cloud data, and dividing the point cloud space corresponding to the point cloud data into multi-dimensional regions; A construction unit, configured to select a segmentation point in the multidimensional region according to the main data point, and insert the main data point into the left subspace and the right subspace of the segmentation point based on the segmentation point, so as to construct the preset tree model, wherein the preset tree model is a kd tree; A search unit is used to preset an initial neighborhood radius, select the main data point, and search the neighboring points corresponding to the main data point in the kd tree multiple times within the initial neighborhood radius based on the main data point, and form the neighborhood point set with the searched neighboring points.

9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps in the point cloud feature-preserving denoising method according to any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the point cloud feature-preserving denoising method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Method for searching contour noise points of three-dimensional point cloud data

    CN102609912A

  • Device and method for point cloud optimization

    CN103065354A

  • Method and device for extracting point cloud framework

    CN103268631A

  • Calculating method for three-dimension scanning point cloud real-time normal vectors

    CN104123746A

  • Denoising smoothing method of point cloud

    CN105096268A