Three-dimensional point cloud denoising method and device, equipment and storage medium

By employing local normal estimation and joint weighted distance methods, the denoising problem in scenarios with uneven point cloud density is solved, achieving a balance between accurate denoising and structural integrity.

CN122048708APending Publication Date: 2026-05-15SHENZHEN XGRIDS-INNOVATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN XGRIDS-INNOVATION CO LTD
Filing Date
2026-02-02
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing radius-based outlier removal methods cannot adapt to scenarios with uneven point cloud density. This leads to the incorrect retention of noisy points in high-density areas and the misclassification of real structural points as outliers in low-density areas, making it difficult to simultaneously achieve both denoising effectiveness and structural integrity in different density regions.

Method used

The normal vector of a point is obtained by local normal estimation, neighboring points are obtained based on geometric distance, joint weighted distance is calculated, a global threshold is determined by local statistical index, and points with local statistical index greater than the global threshold are removed to achieve denoising of 3D point cloud.

Benefits of technology

It achieves accurate denoising in regions with different densities, preserves real structural points, improves denoising accuracy, and maintains the integrity of the geometric structure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122048708A_ABST
    Figure CN122048708A_ABST
Patent Text Reader

Abstract

The invention provides a three-dimensional point cloud denoising method and device, equipment and a storage medium, and the method comprises the steps: carrying out the local normal estimation of each point in a to-be-filtered three-dimensional point cloud, and obtaining a normal vector of each point; for each query point in the to-be-filtered three-dimensional point cloud, obtaining a plurality of nearest neighbor points as neighbor points based on geometric distances; calculating a joint weighted distance between each query point and each neighbor point according to the normal vectors of each query point and each neighbor point; determining a local statistical index of each query point based on the joint weighted distance between each query point and all neighbor points thereof; determining a global threshold value based on the local statistical indexes of all query points; and judging the query points of which the local statistical indexes are greater than the global threshold as outliers, and removing the outliers to realize three-dimensional point cloud denoising. By adopting the method, the denoising precision of the three-dimensional point cloud can be improved, and meanwhile, the integrity of a real geometric structure is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of three-dimensional spatial data processing, and more specifically, to a method, apparatus, device, and storage medium for denoising three-dimensional point clouds. Background Technology

[0002] With the widespread adoption of 3D perception devices such as LiDAR and depth cameras, point cloud data has become a core carrier for depicting the 3D shape of objects and constructing digital twin scenes, and is widely used in fields such as industrial quality inspection, digitization of ancient buildings, and environmental perception for autonomous driving. However, during the point cloud acquisition process, factors such as sensor accuracy limitations, environmental occlusion, and multipath reflection can introduce abnormal data such as isolated flying points and dense noise. These data can interfere with subsequent tasks such as surface fitting and feature extraction. Therefore, point cloud denoising is one of the key steps in the point cloud preprocessing stage.

[0003] Radius-based outlier removal is one of the commonly used point cloud denoising techniques. The core logic of this method is as follows: a fixed spatial radius threshold and a neighboring point number threshold are preset. For each point cloud point, the number of neighboring points within a fixed radius centered on that point is counted. If the number is less than the preset threshold, the point is determined to be an outlier and removed from the point cloud.

[0004] However, research has revealed significant drawbacks to this method: its reliance on a fixed radius and number threshold makes it unsuitable for scenarios with uneven point cloud density. For example, in point cloud data of ancient architectural components, the point cloud density is higher in flat areas of the component surface and lower in areas with complex textures. A fixed radius leads to the following: in areas with higher density, the number of neighboring points of some dense noise points easily reaches the threshold and is mistakenly retained; in areas with lower density, the number of neighboring points of true structural points is insufficient and they are misclassified as outliers. It is difficult to simultaneously achieve both denoising effectiveness and structural integrity in different density regions. Summary of the Invention

[0005] In view of this, the purpose of this application is to provide a three-dimensional point cloud denoising method, apparatus, device and storage medium, which can improve the denoising accuracy of three-dimensional point clouds while ensuring the integrity of the real geometric structure.

[0006] In a first aspect, embodiments of this application provide a three-dimensional point cloud denoising method, the method comprising: Local normal estimation is performed on each point in the 3D point cloud to be filtered to obtain the normal vector of each point; For each query point in the three-dimensional point cloud to be filtered, its nearest neighbors are obtained based on geometric distance. Calculate the joint weighted distance between each query point and its neighbors based on the normal vectors of each query point and its neighbors. Based on the joint weighted distance between each query point and all its neighboring points, determine the local statistical indicators of each query point; The global threshold is determined based on the local statistical indicators of all query points; Query points whose local statistical indicators exceed the global threshold are identified as outliers and removed to achieve denoising of 3D point clouds.

[0007] Optionally, the step of estimating the local normal vector for each point in the 3D point cloud to be filtered, to obtain the normal vector for each point, includes: For each point in the three-dimensional point cloud to be filtered, determine a preset number of its neighboring points; Calculate the covariance matrix based on the coordinates of the neighboring points; Perform eigenvalue decomposition on the covariance matrix to obtain the eigenvector corresponding to the smallest eigenvalue; The feature vector is normalized and used as the unit normal vector of that point.

[0008] Optionally, the step of obtaining several nearest neighbors of each query point in the 3D point cloud to be filtered as its neighbor points based on geometric distance includes: Construct a KD tree spatial index for the 3D point cloud to be filtered; For each query point, the KD tree is used to search for the K points with the closest Euclidean distance, forming a set of its neighbor points, where K is an integer greater than 1.

[0009] Optionally, the step of calculating the joint weighted distance between each query point and its neighbors based on the normal vectors of each query point and its neighbors includes: The first distance component is determined based on the Euclidean distance between the query point and its neighboring points and the difference in their normals. Based on the local planes where the query point and its neighboring points are located, a second distance component characterizing the degree of cross-surface separation is determined; The first distance component and the second distance component are weighted and combined according to preset weighting coefficients to obtain the joint weighted distance.

[0010] Optionally, determining the local statistical indicators for each query point based on the joint weighted distance between each query point and all its neighboring points includes: For each query point, a distance set is formed by the joint weighted distance between the query point and all its neighbor points; Calculate the arithmetic mean or median of the distance set as a local statistical indicator for the query point.

[0011] Optionally, determining the global threshold based on local statistical indicators of all query points includes: Calculate the mean and standard deviation of local statistical indicators for all query points; The mean is added to the product of the standard deviation and the first preset coefficient to obtain the global threshold.

[0012] Optionally, determining the global threshold based on local statistical indicators of all query points includes: Calculate the median and median absolute deviation of the local statistics for all query points; The global threshold is obtained by adding the median to the product of a preset scaling factor, the absolute deviation of the median, and a second preset coefficient.

[0013] Secondly, embodiments of this application provide a three-dimensional point cloud denoising device, the device comprising: The normal vector determination module is used to estimate the local normal vector of each point in the 3D point cloud to be filtered, and obtain the normal vector of each point. The neighbor point determination module is used to obtain several nearest neighbor points as its neighbor points for each query point in the three-dimensional point cloud to be filtered based on geometric distance. The joint weighted distance calculation module is used to calculate the joint weighted distance between each query point and each neighbor point based on the normal vectors of each query point and its neighbor points. The local statistical indicator determination module is used to determine the local statistical indicators of each query point based on the joint weighted distance between each query point and all its neighboring points. The global threshold determination module is used to determine the global threshold based on local statistical indicators of all query points; The outlier removal module is used to identify query points whose local statistical indicators are greater than the global threshold as outliers and remove them to achieve denoising of 3D point clouds.

[0014] Optionally, the step of estimating the local normal vector for each point in the 3D point cloud to be filtered, to obtain the normal vector for each point, includes: For each point in the three-dimensional point cloud to be filtered, determine a preset number of its neighboring points; Calculate the covariance matrix based on the coordinates of the neighboring points; Perform eigenvalue decomposition on the covariance matrix to obtain the eigenvector corresponding to the smallest eigenvalue; The feature vector is normalized and used as the unit normal vector of that point.

[0015] Optionally, the step of obtaining several nearest neighbors of each query point in the 3D point cloud to be filtered as its neighbor points based on geometric distance includes: Construct a KD tree spatial index for the 3D point cloud to be filtered; For each query point, the KD tree is used to search for the K points with the closest Euclidean distance, forming a set of its neighbor points, where K is an integer greater than 1.

[0016] Optionally, the step of calculating the joint weighted distance between each query point and its neighbors based on the normal vectors of each query point and its neighbors includes: The first distance component is determined based on the Euclidean distance between the query point and its neighboring points and the difference in their normals. Based on the local planes where the query point and its neighboring points are located, a second distance component characterizing the degree of cross-surface separation is determined; The first distance component and the second distance component are weighted and combined according to preset weighting coefficients to obtain the joint weighted distance.

[0017] Optionally, determining the local statistical indicators for each query point based on the joint weighted distance between each query point and all its neighboring points includes: For each query point, a distance set is formed by the joint weighted distance between the query point and all its neighbor points; Calculate the arithmetic mean or median of the distance set as a local statistical indicator for the query point.

[0018] Optionally, determining the global threshold based on local statistical indicators of all query points includes: Calculate the mean and standard deviation of local statistical indicators for all query points; The mean is added to the product of the standard deviation and the first preset coefficient to obtain the global threshold.

[0019] Optionally, determining the global threshold based on local statistical indicators of all query points includes: Calculate the median and median absolute deviation of the local statistics for all query points; The global threshold is obtained by adding the median to the product of a preset scaling factor, the absolute deviation of the median, and a second preset coefficient.

[0020] Thirdly, embodiments of this application provide a computer device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the steps of the three-dimensional point cloud denoising method described in any of the optional embodiments of the first aspect are performed.

[0021] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the three-dimensional point cloud denoising method described in any of the optional embodiments of the first aspect.

[0022] The technical solution provided in this application includes, but is not limited to, the following beneficial effects: By estimating the local normal of each point in the 3D point cloud to be filtered, the normal vector of each point can be obtained. This can accurately capture the local geometric feature attributes of each point, providing a core basis for distinguishing between neighboring points on the same surface and pseudo-neighboring points across surfaces. This lays the foundation for differentiated distance measurement and makes the subsequent denoising process more targeted.

[0023] For each query point in the 3D point cloud to be filtered, several nearest neighbors are obtained based on geometric distance as its neighboring points. This ensures that the neighboring points and the query point have spatial correlation and locality, providing a reliable sample set for subsequent local statistical analysis and ensuring that the local statistical results can truly reflect the surrounding distribution of the query point.

[0024] Based on the normal vectors of each query point and its neighboring points, the joint weighted distance between each query point and its neighboring points is calculated. This can incorporate the differences in normal features into the distance metric, effectively amplify the distance contribution of point pairs across surfaces and at points where normals change abruptly, while weakening the distance weight of point pairs on the same surface, thus significantly improving the distance distinction between noise points and real structure points.

[0025] Based on the joint weighted distance between each query point and all its neighboring points, local statistical indicators for each query point are determined. Through distance statistics within a local area, the degree of fit between each query point and its surrounding neighborhood can be accurately characterized, making the statistical indicators corresponding to noise points show significant anomalies, thus providing accurate and effective quantitative basis for subsequent outlier identification.

[0026] Based on the local statistical indicators of all query points, a global threshold is determined. This fully utilizes the statistical distribution characteristics of the overall point cloud, making the threshold setting globally adaptable. It avoids the problem of unreasonable thresholds caused by differences in local point cloud features, and ensures the consistency and fairness of the outlier determination criteria.

[0027] By identifying query points with local statistical indicators exceeding the global threshold as outliers and removing them, we can achieve accurate screening and efficient removal of noise points, while retaining real structural points with local statistical indicators that meet the requirements. This achieves the core goal of denoising while maximizing the maintenance of the geometric integrity of the point cloud.

[0028] In summary, the above steps are progressive and synergistic. Through the introduction of normal features, accurate construction of local neighborhoods, differentiated distance measurement, targeted statistical analysis, reasonable global threshold setting, and precise removal operations, it not only achieves efficient identification and removal of noise points, but also preserves real structural points to the greatest extent. Ultimately, it achieves accurate and reliable 3D point cloud denoising results, balancing denoising efficiency and structural integrity.

[0029] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0030] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0031] Figure 1 The flowchart of a three-dimensional point cloud denoising method provided in Embodiment 1 of this application is shown; Figure 2 A flowchart of a method for determining a normal vector provided in Embodiment 1 of this application is shown; Figure 3 A flowchart of a neighbor point determination method provided in Embodiment 1 of this application is shown; Figure 4 A flowchart of a joint weighted distance calculation method provided in Embodiment 1 of this application is shown; Figure 5 A flowchart of a method for determining local statistical indicators provided in Embodiment 1 of this application is shown; Figure 6 A flowchart of a global threshold determination method provided in Embodiment 1 of this application is shown; Figure 7 A flowchart of the second global threshold determination method provided in Embodiment 1 of this application is shown; Figure 8 A schematic diagram of the original point cloud distribution of a sign provided in Embodiment 1 of this application is shown; Figure 9 This illustration shows a schematic diagram of the point cloud distribution of a sign after SOR denoising, as provided in Embodiment 1 of this application. Figure 10 This diagram illustrates the point cloud distribution of a sign provided in Embodiment 1 of this application after denoising using this method. Figure 11This shows a schematic diagram of the structure of a three-dimensional point cloud denoising device provided in Embodiment 2 of this application; Figure 12 A schematic diagram of the structure of a computer device provided in Embodiment 3 of this application is shown. Detailed Implementation

[0032] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0033] Example 1 To facilitate understanding of this application, the following is combined with... Figure 1 The flowchart of the three-dimensional point cloud denoising method provided in Embodiment 1 of this application illustrates Embodiment 1 in detail.

[0034] See Figure 1 As shown, Figure 1 The flowchart of a three-dimensional point cloud denoising method provided in Embodiment 1 of this application is shown, wherein the method includes steps S101 to S106: S101: Perform local normal estimation for each point in the 3D point cloud to be filtered to obtain the normal vector of each point.

[0035] Specifically, this step aims to obtain the local normal information of each point in the point cloud to solve the problem that traditional statistical outlier removal (SOR) methods do not utilize normal features and have difficulty distinguishing between neighboring points on the same surface and pseudo-neighboring points across surfaces.

[0036] In practice, the original point cloud data P={p1,p2,p3,...,p} is first input. N}, where each character is defined as follows: P represents the original point cloud dataset, p i p represents the i-th point in the point cloud, N represents the total number of points in the point cloud, and p i The three-dimensional coordinates are (x i ,y i ,z i ), x i ,y i ,z iThese represent the coordinates of the i-th point on the X, Y, and Z axes in three-dimensional space, respectively. This data can be obtained through LiDAR, structured light, depth cameras, or multi-view stereo reconstruction technology, and is commonly used in fields such as vegetation monitoring, crop phenotypic analysis, forestry resource surveys, industrial inspection, and digital construction.

[0037] Then, for each point p i Searching for its k based on Euclidean distance normal The nearest neighbors form a neighborhood set N. k normal(i), the characters are defined as follows: k normal N represents the neighborhood size parameter specifically for normal estimation. k normal(i) represents point p i The normal estimation neighborhood set, where i corresponds to the center point p in parentheses. i The index. For example, in the embodiment, k is set to... normal =30, and this parameter can be set to a different value than the neighborhood size K of the subsequent statistical filtering; there is no mandatory requirement for uniformity.

[0038] Next, with point p i Centered on p, translate the coordinates of neighboring points to a point p. i Using a local coordinate system with the origin as the origin, construct the covariance matrix C of the neighborhood points. i The specific formula is as follows:

[0039] The characters in the formula are defined as follows: C i Point p i The covariance matrix of the neighborhood points, |N k normal(i) represents the neighborhood set N. k The number of neighboring points (i.e., the size of the neighborhood) included in normal(i) is summed within the neighborhood set N in the formula. k All neighborhood points p in normal(i) j p j Represents the neighborhood set N k The j-th neighborhood point in normal(i), p i Indicates the current center point, (p j -p i ) represents the neighborhood point p j Relative to the center point p i The coordinate difference vector, where T represents the matrix transpose operation.

[0040] Next, singular value decomposition (SVD) is used to perform eigenvalue decomposition on the covariance matrix Ci, yielding three eigenvalues ​​(denoted as λ1, λ2, λ3) and corresponding eigenvectors (denoted as v1, v2, v3). The characters are defined as follows: λ1, λ2, and λ3 represent the covariance matrix C... i After eigenvalue decomposition, the three eigenvalues ​​(sorted from largest to smallest) are v1, v2, and v3, which represent the eigenvectors corresponding to the three eigenvalues. When the neighborhood of a point forms a plane, the smallest eigenvalue λ3 represents the thickness of the plane (the smaller λ3 is, the thinner the plane is), and its corresponding eigenvector v3 represents the direction of the normal vector of the plane.

[0041] Finally, let n denote the eigenvector v3 corresponding to the smallest eigenvalue λ3. i and for n i After normalization, the unit normal vector of the point is obtained.

[0042] Optionally, to avoid random flipping of the normal direction, the local or global normal can be made consistent in direction. For example, the normal can be made to point in the direction of the sensor, or a reference direction can be used as a reference, and the side where the product of the normal and the inner product of that direction is positive can be taken as the unified direction.

[0043] It should be noted that even if the initial point cloud is highly noisy, there is no need to perform preprocessing such as radius filtering. The accuracy of the normal estimation has a limited impact on the subsequent weighted calculation, and no additional preprocessing overhead is required.

[0044] S102: For each query point in the three-dimensional point cloud to be filtered, obtain its nearest neighbor points as its neighbor points based on geometric distance.

[0045] Specifically, this step builds a basic neighborhood set for subsequent local statistical calculations. The core is to achieve nearest-neighbor point selection through efficient search, adapting to the needs of large-scale point cloud data processing.

[0046] First, a spatial index structure (such as a KD tree) is constructed for the point cloud data P. The core function of this index is to accelerate the subsequent nearest neighbor query process, reduce the query time complexity, and ensure the overall efficiency of the algorithm.

[0047] Then, for each query point p i Using Euclidean distance, search for its K nearest neighbors in the point cloud, and denote this neighborhood as N. K (i), where each character is defined as follows: K represents the preset statistical filter neighborhood size parameter (the value range is usually 10~50), N K (i) represents point p i The statistical filtering neighborhood set, where i corresponds to the center point p in parentheses. i The index. For example, in the embodiment, K=20 is set, which can be flexibly adjusted according to the point cloud density and scene characteristics.

[0048] This step establishes a fixed-size neighborhood set for each query point. Subsequently, weighted distances and local statistical indices will be calculated based on this set. The neighborhood size K is the same as the estimated neighborhood size k in step S101. normal There is no mandatory uniform requirement; settings can be made separately as needed.

[0049] S103: Calculate the joint weighted distance between each query point and each neighbor point based on the normal vectors of each query point and its neighbor points.

[0050] Specifically, this step is the core improvement of the present invention. By integrating Euclidean distance, normal consistency penalty and point-to-surface distance, it solves the denoising defects of the traditional SOR method in high curvature regions such as thin sheet edges and stair corners. For example, it addresses the problems of trailing pseudo-neighbors at thin sheet edges and the difficulty in distinguishing noise from real structural points in high curvature regions.

[0051] The specific calculation process is as follows: 1. Calculate the Euclidean distance: For any point pi and its neighborhood points p j (j∈N k (i) First, calculate the Euclidean distance between the two, using the formula: d c =||p i -p j || The characters in the formula are defined as follows: d c Point p i With p j The Euclidean distance between them, p i p represents the current query point. j Represents query point p i Neighborhood set N K The j-th neighbor point in (i), ||p i -p j || represents a vector (p) i -p j The L2 norm of (i.e., the straight-line distance between two points in space).

[0052] 2. Calculate the normal consistency index: Calculate p i With p j The absolute value of the cosine of the angle between the corresponding normal vectors is given by the formula: c ij =∣n i ·n j | The characters in the formula are defined as follows: c ij Point p i With p j The absolute value of the cosine of the angle between the normal vectors, n iPoint p i The unit normal vector, n j Point p j The unit normal vector. ij The value range is [0,1]. The closer it is to 1, the more consistent the normals are; the closer it is to 0, the greater the difference in the normals.

[0053] 3. Define the normal difference penalty factor: based on c ij The penalty factor is constructed using the following formula: f ij =1+λ(1-c ij ) The characters in the formula are defined as follows: f ij Point p i With p j The normal deviation penalty factor, λ represents the normal deviation penalty coefficient (λ≥0), c ij This represents the absolute value of the cosine of the angle between the normal vectors. When λ=0, the penalty factor degenerates to 1, and the distance metric is equivalent to the traditional Euclidean distance. The larger λ is, the higher the sensitivity to normal differences. For example, in this embodiment, setting λ=5 can effectively amplify the distance contribution of cross-surface point pairs. In addition, the normal weighting function can also adopt other forms such as exponential, piecewise linear, threshold truncation, and power functions. As long as it satisfies the monotonicity design of "the greater the normal difference, the stronger the penalty", it falls within the protection scope of this invention.

[0054] 4. Calculation of point-to-plane distance: To further improve cross-surface separation capability, a point-to-plane distance term is introduced. This invention preferably uses a symmetrical bidirectional average point-to-plane distance, as shown in the formula: d=

[0055] The characters in the formula are defined as follows: d represents point p. i With p j The distance between the symmetrical points and the plane, representing the average coefficient, n i , nj represent p i p j The unit normal vector, p j -p i p j Relative to p i The coordinate difference vector, p i -p j p i Relative to p j The coordinate difference vector. It should be noted that the point-to-surface distance metric can also be in an asymmetric form (such as choosing the maximum or minimum point-to-surface distance), with no absolute superiority or inferiority, and can be selected according to the needs of the scenario; the symmetric average metric is more suitable for scenarios with complex features and non-co-orienting surfaces, and expresses a more approximate actual geometric relationship.

[0056] 5. Calculate the joint weighted distance: This is a linear combination of the Euclidean distance's normal penalty term and the point-to-surface term, defined as: d ij =w·d c ·f ij +(1-w)·d,0≤w≤1 The characters in the formula are defined as follows: d ij Point p i With p j The joint weighted distance, w represents the weighting coefficient (0≤w≤1), used to control the relative contribution of the Euclidean component (including normal penalty) and the point-surface component, d c f represents the Euclidean distance. ij The normal difference penalty factor is represented by d, which represents the distance between the symmetrical point and the surface.

[0057] Alternatively, a variant of exponential penalty can be used: d ij =w·d c ·exp(β(1-c ij ))+(1-w)·d,0≤w≤1 The characters in the formula are defined as follows: d ij Let w represent the joint weighted distance (0 ≤ w ≤ 1), dc represent the Euclidean distance, exp represent the natural exponential function, β represent the exponential penalty coefficient (β ≥ 0), and c represent the weighted distance. ij λ represents the absolute value of the cosine of the angle between the normal vectors, and d represents the distance between the symmetrical point and the plane. Both weighting methods can be used, depending on the desired contribution ratio of each factor. When λ=0 (or β=0) and w=1, it degenerates into the traditional Euclidean distance metric of SOR.

[0058] S104: Determine the local statistical indicators of each query point based on the joint weighted distance between each query point and all its neighboring points.

[0059] Specifically, this step uses the joint weighted distance to characterize the proximity of the query point to its local neighborhood, providing a basis for subsequent outlier identification. Noise points or erroneous neighbors usually exhibit significantly larger statistical index values.

[0060] First, for each query point p i Collect the joint weighted distance d within its neighborhood. ij (j∈N k (i)) forms a distance set, the size of which is the same as the preset neighborhood size K.

[0061] Subsequently, the calculation method for the local statistical indicator Di is selected based on the scenario requirements: In one embodiment, a simple average is used as the statistical indicator, and the formula is:

[0062] The characters in the formula are defined as follows: D i Point p i The local statistical index (mean form), where K represents the preset statistical filter neighborhood size parameter, d ij Point p i With neighboring point p j The joint weighted distance.

[0063] In another embodiment, to enhance robustness to extreme values, the median can be used as a statistical indicator, as shown in the formula: D i =median{d ij |j∈N K (i)} The characters in the formula are defined as follows: D i Point p i The local statistical indicator (in median form), median represents the median operation, and the set {d ij |j∈N K (i)} represents point p i With all p in the neighborhood j The joint weighted distance set.

[0064] In other implementations, it can also be defined by a weighted average or a combined index that considers both the mean and variance, for example:

[0065] Among them, the mean The calculation formula is:

[0066] Local standard deviation σ i The calculation formula is:

[0067] The characters in the above combined indicators and related formulas are defined as follows: D i Local statistical indicators representing combinations Point p i The mean of the joint weighted distance within the neighborhood, where γ represents the local standard deviation weighting coefficient, and σ i Point p i Local standard deviation of the joint weighted distance within the neighborhood. This type of indicator can more comprehensively reflect the characteristics of local distance distribution.

[0068] In addition, other robust statistical measures such as quantiles can be used as local statistical indicators to improve the adaptability to complex noise distributions, all of which fall within the scope of protection of this invention.

[0069] S105: Determine the global threshold based on the local statistical indicators of all query points.

[0070] Specifically, this step involves performing global statistical analysis on all local statistical indicators and setting a critical value for outlier detection. The rationality of the threshold directly affects the balance between denoising effect and preservation of structural details.

[0071] First, collect local statistical indicators from all query points to form a set {D}. i |i=1…N}, where D i Let N represent the local statistical index of the i-th point, and N represent the total number of points in the point cloud.

[0072] Subsequently, the global threshold can be determined through the following two mainstream methods. Both methods are applicable to similar scenarios and do not require mandatory optimization: The first method is a statistical approach based on the mean and standard deviation: 1. Calculate the global average value μ using the following formula:

[0073] The characters in the formula are defined as follows: μ represents the global average of all local statistical indicators, N represents the total number of points in the point cloud, and D... i This represents the local statistical index of the i-th point.

[0074] 2. Calculate the global standard deviation σ using the following formula:

[0075] The characters in the formula are defined as follows: σ represents the global standard deviation of all local statistical indicators, N represents the total number of points in the point cloud, N-1 represents the degree of freedom correction term, and D... i Let μ represent the local statistical index of the i-th point, and μ represent the global average value.

[0076] 3. Set the threshold T, the formula is: In the formula T=μ+α·σ, the characters are defined as follows: T represents the global threshold, μ represents the global average, α represents the threshold coefficient (α>0, and the range can be selected from 1.0 to 2.5 in experiments), which is used to control the strictness of the filtering, and σ represents the global standard deviation. The larger α is, the stricter the filtering and the more points are removed.

[0077] The second approach is a robust solution based on the median and median absolute deviation (MAD), which is suitable for scenarios where point cloud statistical indicators are unevenly distributed or contain many outliers. 1. Calculate all D iThe median m is given by the formula: m=median{D i |i=1,…,N} The characters in the formula are defined as follows: m represents the global median of all local statistical indicators, and the set {D} i |i=1,…,N} represents the set of local statistical indicators for all points, D i Let N be the local statistical index of the i-th point, and N be the total number of points in the point cloud.

[0078] 2. Calculate the median absolute deviation (MAD) using the following formula: MAD=median{∣D i -m∣∣i=1,…,N} The characters in the formula are defined as follows: MAD represents the median absolute deviation, D i Let m be the local statistical index of the i-th point, and m be the global median. i -m| indicates D i The absolute value of the difference between m and N, where N is the total number of points in the point cloud.

[0079] 3. Provide an approximate estimate of the standard deviation σ. robust The formula is: σ robust= 1.4826 MAD The characters in the formula are defined as follows: σ robust This represents the approximate standard deviation estimate based on MAD, where 1.4826 is the preset scaling factor (a constant derived from the normal distribution), and MAD is the median absolute deviation.

[0080] 4. Set the robustness threshold T, the formula is: T=m+α·σ robust The characters in the formula are defined as follows: T represents the global threshold, m is the global median, α is the threshold coefficient (ranging from 1.0 to 2.5), and σ... robust This is an approximate standard deviation estimate based on MAD. This scheme is used in the embodiment, with α=1.5, achieving good denoising results.

[0081] Furthermore, the global threshold can be adaptively set by segmenting statistics according to spatial regions or connected components to adapt to uneven point cloud density and multimodal distribution. This improved scheme also falls within the protection scope of this invention.

[0082] S106: Query points with local statistical indicators greater than the global threshold are identified as outliers and removed to achieve denoising of 3D point clouds.

[0083] Specifically, this step is the final execution stage of the denoising process. It uses threshold comparison to eliminate outliers and retain valid points, balancing denoising effectiveness with structural integrity.

[0084] The mathematical expression of the decision rule is:

[0085] The characters in the formula are defined as follows: p i Let D represent the i-th query point. i p i The local statistical index, where T represents the global threshold.

[0086] In practice, for each query point p i Its local statistical index D i Compare each value with the global threshold T; when D i When the distance is greater than T, it indicates that the distance between the point and its local neighborhood in the "weighted sense of normal and point-surface combination" is significantly larger, and it is likely a noise point, a flying point, or an erroneous measurement point across the surface, so it should be deleted from the point cloud; when Di ≤ T, it indicates that the point belongs to the true structure point and should be retained. Finally, all the retained interior points form the filtered point cloud dataset. (where P' represents the filtered point cloud dataset), the output of which is used for subsequent surface reconstruction, segmentation, feature extraction or quantitative analysis.

[0087] This step effectively solves the problems of traditional SOR methods, such as the easy deletion of real points at the edges of thin sheets and incomplete noise removal in high curvature areas. For example, in the scene of parking lot signs (single-layer metal sheet), it can effectively suppress edge trailing noise and retain the clear outline of the sign, which is significantly superior to traditional SOR methods.

[0088] In an optional implementation, see Figure 2 As shown, Figure 2 The flowchart of a normal vector determination method provided in Embodiment 1 of this application is shown, wherein the step of performing local normal vector estimation for each point in the 3D point cloud to be filtered to obtain the normal vector of each point includes steps S201 to S204: S201: For each point in the three-dimensional point cloud to be filtered, determine a preset number of its neighboring points.

[0089] Specifically, the preset number is the neighborhood size k specifically used for normal estimation. normal The characters are defined as follows: k normal This parameter represents the neighborhood size for normal vector estimation and controls the number of neighboring points involved in the normal vector calculation. The selection of this parameter needs to be adapted to the point cloud density and local geometric features; for example, in a parking sign denoising implementation, k is set to... normal=30, which can ensure the accuracy of normal estimation without introducing irrelevant points due to an excessively large neighborhood.

[0090] It needs to be emphasized that k normal The neighborhood size K of the subsequent statistical filtering can be set independently, without mandatory uniformity requirements. It can be adjusted according to the accuracy requirements of normal estimation and the locality requirements of statistical filtering.

[0091] S202: Calculate the covariance matrix based on the coordinates of the neighboring points.

[0092] Specifically, the covariance matrix is ​​used to characterize the spatial distribution features of neighborhood points and is the basis for subsequent eigenvalue decomposition to obtain normal vectors.

[0093] During the calculation, first take the current point p i Centered on a point, set N of its neighborhood points. k The coordinates of all points in normal(i) are translated to a local coordinate system with pi as the origin, thus eliminating the influence of the center point's position on the neighborhood distribution. The covariance matrix is ​​then calculated using the following formula: The definitions of each character in the formula are the same as before. This formula uses the outer product of the normalized summation of coordinate difference vectors to characterize the dispersion of neighborhood points in the local coordinate system.

[0094] S203: Perform eigenvalue decomposition on the covariance matrix to obtain the eigenvector corresponding to the smallest eigenvalue.

[0095] Specifically, the core of eigenvalue decomposition is to extract the main direction of the spatial distribution of neighborhood points, where the direction corresponding to the smallest eigenvalue is the normal direction.

[0096] The covariance matrix Ci is decomposed by singular value decomposition (SVD). This method has high stability and strong adaptability and can effectively handle various point cloud neighborhood distributions. After decomposition, three eigenvalues ​​λ1, λ2, and λ3 are obtained, along with three corresponding eigenvectors v1, v2, and v3. The smallest eigenvalue λ3 represents the thickness of the plane formed by the neighboring points; the smaller the value, the thinner the plane. The corresponding eigenvector v3 is perpendicular to the plane, i.e., it represents the direction of the normal vector of that point.

[0097] S204: Normalize the feature vector and use it as the unit normal vector of the point.

[0098] Specifically, normalization makes the normal vector a unit vector, ensuring the accuracy and consistency of subsequent normal vector calculations (such as the cosine of the included angle).

[0099] Normalize the eigenvector v3 corresponding to the smallest eigenvalue λ3 to obtain the unit normal vector of that point.

[0100] To avoid random reversal of normal directions (i.e., the normals of points on the same surface may point in opposite directions), the direction of local or global normals can be made consistent. For example, the normals can be made to point in the direction of the sensor, or a reference direction (such as the Z-axis of the world coordinate system) can be used as a reference, and the side where the product of the normal and the dot product of that direction is positive can be used as the unified direction to ensure the consistency of normal information.

[0101] In an optional implementation, see Figure 3 As shown, Figure 3 The flowchart of a neighbor point determination method provided in Embodiment 1 of this application is shown, wherein the step of obtaining several nearest neighbors as its neighbors for each query point in the 3D point cloud to be filtered based on geometric distance includes steps S301~S302: S301: Construct a KD tree spatial index for the three-dimensional point cloud to be filtered.

[0102] Specifically, the KD tree is an efficient spatial index structure designed to solve the problem of low efficiency in nearest neighbor queries for large-scale point clouds, ensuring that the overall complexity of the algorithm is controllable.

[0103] When constructing a KD tree, the point cloud data is organized into a tree structure by recursively dividing the three-dimensional space, with each node corresponding to a spatial region and the set of points within that region; This index structure can reduce the time complexity of nearest neighbor queries from O(N) to O(logN), keeping the overall computational complexity of this method at the level of O(NlogN) (where N is the total number of points in the point cloud), consistent with the traditional SOR method, and meeting the needs of real-time and large-scale data processing in engineering.

[0104] S302: For each query point, search the KD tree to find the K points with the closest Euclidean distance, forming a set of its neighbor points, where K is an integer greater than 1.

[0105] Specifically, Euclidean distance is a commonly used indicator for measuring the geometric distance between points in space, and it can intuitively reflect the spatial proximity relationship between points.

[0106] When searching, use query point p i Centered on a point, a KD-tree is used to quickly traverse adjacent spatial regions and select the K points with the closest Euclidean distance to form a neighborhood set N. K (i), the characters are defined as follows: K represents the statistical filter neighborhood size parameter (K>1, the value range is usually 10~50), N K (i) represents point p i The statistical filtering neighborhood set, p i This is the query point.

[0107] K can be flexibly adjusted according to the point cloud density: when the point cloud density is high, K can be appropriately reduced to avoid introducing too many distant neighbor points; when the point cloud density is low, K can be increased to ensure that the neighborhood has sufficient statistical representativeness. For example, in the embodiment, K=20 is set to adapt to the density characteristics of the parking lot sign point cloud.

[0108] This step establishes a fixed-size neighborhood set for each query point, providing stable basic data for subsequent joint weighted distance calculation and local statistical analysis.

[0109] In an optional implementation, see Figure 4 As shown, Figure 4 The flowchart of a joint weighted distance calculation method provided in Embodiment 1 of this application is shown, wherein the step of calculating the joint weighted distance between each query point and its neighbors based on the normal vectors of each query point and its neighbors includes steps S401 to S403: S401: Determine the first distance component based on the Euclidean distance between the query point and its neighboring points and the difference in their normals.

[0110] Specifically, the first distance component is the core component that integrates geometric position and normal features, and aims to amplify the distance contribution of pseudo-neighbors across the surface by penalizing the difference in normals.

[0111] First, calculate the Euclidean distance between the query point pi and its neighbor point pj. Then, calculate the absolute value of the cosine of the angle between their normal vectors. Next, define the normal difference penalty factor. Finally, the first distance component is the product of the Euclidean distance and the normal difference penalty factor.

[0112] Furthermore, the normal weighting function can also take other forms such as exponential, piecewise linear, threshold truncation, and power function. As long as it satisfies the monotonicity design that "the greater the difference in normals, the stronger the penalty", it falls within the protection scope of this invention.

[0113] S402: Determine a second distance component characterizing the degree of cross-surface separation based on the local planes where the query point and its neighboring points are located.

[0114] Specifically, the second distance component is a point-to-surface distance term, which aims to further enhance the separation capability of point pairs across surfaces and make up for the shortcomings of Euclidean distance, which only considers spatial position.

[0115] The present invention preferably uses a symmetrical bidirectional point-to-surface distance average, as shown in the formula: d=

[0116] The definitions of each character in the formula are the same as before.

[0117] For point pairs on the same surface, the "distance from the surface" along the normal is extremely small, with the d value close to 0; for point pairs across surfaces or at abrupt changes in the normal, the "distance from the surface" along their respective normals increases significantly, and the d value rises markedly, thus effectively amplifying the distance contribution of such pseudo-nearest neighbor pairs.

[0118] It should be noted that the point-to-surface distance metric can also be asymmetric, for example, by selecting the maximum point-to-surface distance (max{|n i ·(p j -p i )|,|n j ·(p i -p j )|}) or minimum point-to-surface distance (min{|n i ·(p j -p i )|,|n j ·(p i -p j There is no absolute superiority or inferiority among them. They can be flexibly selected according to the characteristics of the scene. Symmetrical average measurement is more suitable for scenes with complex features and non-co-orientation of the two surfaces, and expresses a more realistic geometric relationship.

[0119] S403: According to the preset weighting coefficient, the first distance component and the second distance component are weighted and combined to obtain the joint weighted distance.

[0120] Specifically, the core of weighted combination is to balance the contribution of geometric position (including normal penalty) and point-to-surface separation features through weight coefficients, so as to adapt to the denoising needs of different scenarios.

[0121] The preset weight coefficient w has a value range of 0≤w≤1. The characters are defined as follows: w represents the weight coefficient, which is used to control the relative proportion of the first distance component and the second distance component. For example, in the embodiment, w=0.5 is set so that the two components contribute equally. The combination method can be a linear combination, and the formula is: d ij =w·d c ·f ij +(1-w)·d A variant of the exponential penalty can also be used, with the following formula: d ij =w·d c ·exp(β(1-c ij ))+(1-w)·d The definitions of each character in the formula are the same as those described above.

[0122] When λ=0 (or β=0) and w=1, both combinations degenerate into the Euclidean distance metric of the traditional SOR, ensuring the compatibility of this method with traditional methods.

[0123] In an optional implementation, see Figure 5 As shown, Figure 5 The flowchart of a method for determining local statistical indicators provided in Embodiment 1 of this application is shown. The method for determining the local statistical indicators of each query point based on the joint weighted distance between each query point and all its neighboring points includes steps S501-S502: S501: For each query point, form a distance set by the joint weighted distance between the query point and all its neighbor points.

[0124] Specifically, distance sets are the foundational data for local statistical analysis, and the information they contain directly determines the effectiveness of statistical indicators.

[0125] During construction, for each query point p i Collect its neighborhood set N K All neighboring points p in (i) j The corresponding joint weighted distance d ij (j∈N k (i)) forms the distance set S i ={d ij (j∈N k (i)}, the characters are defined as follows: S i Point p i The joint weighted distance set, d ij p i With p j The joint weighted distance, N K (i) represents p i , where j is the index of the neighborhood point in the statistical filtering neighborhood.

[0126] This set reflects the proximity of the query point to all points in its local neighborhood in a "jointly weighted sense," where noise points or cross-surface pseudo-neighbors correspond to d. ij The value will be significantly larger, providing a basis for subsequent anomaly identification.

[0127] S502: Calculate the arithmetic mean or median of the distance set as a local statistical indicator for the query point.

[0128] Specifically, the arithmetic mean and the median are two commonly used statistical indicators, which are applicable to different noise distribution scenarios and can effectively characterize the central tendency of a distance set.

[0129] The formula for calculating the arithmetic mean is:

[0130] Neighborhood size K = |S i | represents the distance set S iThe magnitude of the noise level. This indicator is easy to calculate, reflects the average level across all distances, and is suitable for scenarios with relatively uniform noise distribution and no extreme outliers; The formula for calculating the median is: D i =median{d ij |j∈N K (i)} This indicator is highly robust to extreme values ​​and can avoid the occurrence of individual abnormally large d values. ij The value distortion statistics are applicable to scenarios with complex noise distribution and many extreme values. In addition, other robust statistics such as weighted average, mean-variance joint index, or quantiles can be selected according to needs to improve adaptability to complex noise distributions. For example, the formula for the mean-variance joint index is:

[0131] The mean and local standard deviation σ i The calculation formulas are as follows:

[0132]

[0133] The definitions of each character in the above formula are the same as those described above.

[0134] In an optional implementation, see Figure 6 As shown, Figure 6 The flowchart of a global threshold determination method provided in Embodiment 1 of this application is shown, wherein determining the global threshold based on local statistical indicators of all query points includes steps S601-S602: S601: Calculate the mean and standard deviation of local statistical indicators for all query points.

[0135] Specifically, the mean and standard deviation together characterize the global distribution of all local statistical indicators. The mean reflects the central tendency, while the standard deviation reflects the degree of dispersion.

[0136] The formula for calculating the mean μ is:

[0137] The formula for calculating the standard deviation σ is:

[0138] The definitions of each character in the formula are as described above.

[0139] S602: Add the mean to the product of the standard deviation and the first preset coefficient to obtain the global threshold.

[0140] Specifically, this threshold setting method is based on an extension of the "normal distribution 3σ principle" and can effectively filter out outliers that significantly deviate from the global average level.

[0141] The first preset coefficient ranges from 1.0 to 2.5, and each character is defined as follows: The first preset coefficient is used to control the strictness of the filtering. The larger the first preset coefficient is, the higher the threshold T is, the stricter the filtering is, and the more points are removed; the smaller the first preset coefficient is, the lower the threshold T is, the looser the filtering is, and the more points are retained. It can be flexibly adjusted according to the needs of the scenario. The formula for calculating the global threshold is: T=m+α·σ σ represents the global standard deviation, and the definitions of the remaining characters in the formula are the same as described above. This method is suitable for scenarios where local statistical indicators are approximately normally distributed, and it can achieve a good balance between noise reduction and structure preservation.

[0142] In an optional implementation, see Figure 7 As shown, Figure 7 The flowchart of the second global threshold determination method provided in Embodiment 1 of this application is shown, wherein determining the global threshold based on the local statistical indicators of all query points includes steps S701-S702: S701: Calculate the median and median absolute deviation of the local statistical indicators for all query points.

[0143] Specifically, the median and median absolute deviation (MAD) are more robust global statistical features, suitable for scenarios where local statistical indicators are unevenly distributed and there are many outliers.

[0144] S702: The median is added to the product of a preset scaling factor, the absolute deviation of the median, and a second preset coefficient, and the result is used as the global threshold.

[0145] Specifically, this threshold setting method converts MAD into an approximate standard deviation through a scaling factor, balancing robustness and numerical reasonableness. The preset scaling factor is 1.4826, and the definitions of each character are as follows: 1.4826 is a fixed scaling factor, a constant derived based on the normal distribution, used to convert MAD into an approximate standard deviation estimate; The second preset coefficient has a value range of 1.0 to 2.5. The second preset coefficient has the same function as the first preset coefficient in the mean-standard deviation method (the preset coefficient is referred to as α), and is used to control the strictness of filtering. For example, in the embodiment, the second preset coefficient is set to 1.5, which achieves a balance between effective noise removal and structural integrity preservation. The formula for calculating the global threshold is: T=m+α·1.4826·MAD The definitions of each character in the formula are the same as described above. This method is suitable for scenarios with uneven point cloud density and non-normal distribution of local statistical indicators. It can effectively avoid the interference of extreme values ​​on the threshold and improve the stability and reliability of denoising.

[0146] To better illustrate the 3D point cloud denoising method provided in this application, the method is applied to the scenario of 3D point cloud denoising for parking lot signs. Using the point cloud data of underground parking lot signs as the processing object, the actual effect of the 3D point cloud denoising method of this application is verified.

[0147] Data Acquisition Object and Noise Background: The data to be processed is a 3D scanned point cloud of a sign in an underground parking lot. This sign is located in a single-layer metal sheet scene. Due to the measurement tailing effect of the depth sensor, the edges of the sign generated a lot of cross-surface pseudo-adjacency noise and tail noise, resulting in blurred outlines and cluttered details in the original point cloud. See also Figure 8 As shown, Figure 8 A schematic diagram of the original point cloud distribution of a sign provided in Embodiment 1 of this application is shown, in which diffuse noise at the edge of the point cloud can be visually observed.

[0148] Based on the density and geometric features of the sign point cloud, the specific parameter settings are as follows: Normal estimation parameter: normal estimation neighborhood size k normal =30, used to search for sufficient neighborhood points for each point and construct the covariance matrix to extract the unit normal vector; Neighborhood and weighting parameters: statistical neighborhood size K=20 (used to search for neighbor points of the query point), normal penalty coefficient λ=5 (to amplify the distance contribution of cross-surface point pairs), Euclidean distance weighting coefficient w=0.5 (to balance the weight of Euclidean components and point-surface components); Threshold parameters: a robust thresholding scheme of "median + MAD" is adopted, and the threshold coefficient α is used to control the strictness of outlier detection.

[0149] The effectiveness of this method is compared with that of the traditional SOR denoising method based on Euclidean distance: See [link to relevant documentation]. Figure 9 As shown, Figure 9 The diagram shows the point cloud distribution of a sign after SOR denoising provided in Embodiment 1 of this application. It can be seen that although the method removes some noise, there is still obvious trailing at the edge of the sign, and some real structural points are mistakenly deleted, resulting in insufficient outline clarity. See Figure 10 As shown, Figure 10 The diagram illustrates the point cloud distribution of a sign after denoising using the method described in Embodiment 1 of this application. It shows that the method effectively suppresses cross-surface pseudo-adjacency and trailing noise at the edges of the thin sheet, while completely preserving the true structure of the sign. The final point cloud outline is clear and detailed. This example verifies the denoising effectiveness of the method in the "single-layer thin sheet-like point cloud" scenario, achieving a balance between noise removal and structure preservation.

[0150] Example 2 See Figure 11 As shown, Figure 11 A schematic diagram of a three-dimensional point cloud denoising device provided in Embodiment 2 of this application is shown, wherein the device includes: The normal vector determination module 1101 is used to perform local normal estimation for each point in the 3D point cloud to be filtered, and obtain the normal vector of each point. The neighbor point determination module 1102 is used to obtain several nearest neighbor points as its neighbor points for each query point in the three-dimensional point cloud to be filtered, based on geometric distance. The joint weighted distance calculation module 1103 is used to calculate the joint weighted distance between each query point and each neighbor point based on the normal vectors of each query point and its neighbor points. The local statistical indicator determination module 1104 is used to determine the local statistical indicators of each query point based on the joint weighted distance between each query point and all its neighboring points. The global threshold determination module 1105 is used to determine the global threshold based on the local statistical indicators of all query points; The outlier removal module 1106 is used to identify query points with local statistical indicators greater than the global threshold as outliers and remove them to achieve denoising of 3D point clouds.

[0151] In an optional implementation, the step of estimating the local normal vector for each point in the 3D point cloud to be filtered, to obtain the normal vector for each point, includes: For each point in the three-dimensional point cloud to be filtered, determine a preset number of its neighboring points; Calculate the covariance matrix based on the coordinates of the neighboring points; Perform eigenvalue decomposition on the covariance matrix to obtain the eigenvector corresponding to the smallest eigenvalue; The feature vector is normalized and used as the unit normal vector of that point.

[0152] In an optional implementation, the step of obtaining several nearest neighbors of each query point in the 3D point cloud to be filtered as its neighbor points based on geometric distance includes: Construct a KD tree spatial index for the 3D point cloud to be filtered; For each query point, the KD tree is used to search for the K points with the closest Euclidean distance, forming a set of its neighbor points, where K is an integer greater than 1.

[0153] In an optional implementation, calculating the joint weighted distance between each query point and its neighbors based on the normal vectors of each query point and its neighbors includes: The first distance component is determined based on the Euclidean distance between the query point and its neighboring points and the difference in their normals. Based on the local planes where the query point and its neighboring points are located, a second distance component characterizing the degree of cross-surface separation is determined; The first distance component and the second distance component are weighted and combined according to preset weighting coefficients to obtain the joint weighted distance.

[0154] In an optional implementation, determining the local statistical indicators of each query point based on the joint weighted distance between each query point and all its neighboring points includes: For each query point, a distance set is formed by the joint weighted distance between the query point and all its neighbor points; Calculate the arithmetic mean or median of the distance set as a local statistical indicator for the query point.

[0155] In an optional implementation, determining the global threshold based on local statistical indicators of all query points includes: Calculate the mean and standard deviation of local statistical indicators for all query points; The mean is added to the product of the standard deviation and the first preset coefficient to obtain the global threshold.

[0156] In an optional implementation, determining the global threshold based on local statistical indicators of all query points includes: Calculate the median and median absolute deviation of the local statistics for all query points; The global threshold is obtained by adding the median to the product of a preset scaling factor, the absolute deviation of the median, and a second preset coefficient.

[0157] Example 3 Based on the same application concept, see [link / reference] Figure 12 As shown, Figure 12 This illustration shows a structural schematic diagram of a computer device provided in Embodiment 3 of this application, wherein, as shown... Figure 12 As shown, the computer device 1200 provided in Embodiment 3 of this application includes: The computer device 1200 includes a processor 1201, a memory 1202, and a bus 1203. The memory 1202 stores machine-readable instructions that can be executed by the processor 1201. When the computer device 1200 is running, the processor 1201 and the memory 1202 communicate through the bus 1203. When the machine-readable instructions are executed by the processor 1201, the steps of the three-dimensional point cloud denoising method shown in Embodiment 1 are performed.

[0158] Example 4 Based on the same concept, this application also provides a computer-readable storage medium storing a computer program, which, when run by a processor, performs the steps of the three-dimensional point cloud denoising method described in any of the above embodiments.

[0159] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0160] The computer program product for denoising three-dimensional point clouds provided in this application includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation details, please refer to the method embodiments, which will not be repeated here.

[0161] The 3D point cloud denoising device provided in this application embodiment can be specific hardware on a device or software or firmware installed on the device. The implementation principle and technical effects of the device provided in this application embodiment are the same as those in the foregoing method embodiments. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the foregoing method embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can all be referred to the corresponding processes in the above method embodiments, and will not be repeated here.

[0162] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

[0163] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0164] In addition, the functional units in the embodiments provided in this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0165] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0166] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0167] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The protection scope of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application. All should be covered within the protection scope of this application. Therefore, the protection scope of this application should be determined by the protection scope of the claims.

Claims

1. A method for denoising three-dimensional point clouds, characterized in that, The method includes: Local normal estimation is performed on each point in the 3D point cloud to be filtered to obtain the normal vector of each point; For each query point in the three-dimensional point cloud to be filtered, its nearest neighbors are obtained based on geometric distance. Calculate the joint weighted distance between each query point and its neighbors based on the normal vectors of each query point and its neighbors. Based on the joint weighted distance between each query point and all its neighboring points, determine the local statistical indicators of each query point; The global threshold is determined based on the local statistical indicators of all query points; Query points whose local statistical indicators exceed the global threshold are identified as outliers and removed to achieve denoising of 3D point clouds.

2. The method according to claim 1, characterized in that, The process of estimating the local normal vector for each point in the 3D point cloud to be filtered, resulting in the normal vector for each point, includes: For each point in the three-dimensional point cloud to be filtered, determine a preset number of its neighboring points; Calculate the covariance matrix based on the coordinates of the neighboring points; Perform eigenvalue decomposition on the covariance matrix to obtain the eigenvector corresponding to the smallest eigenvalue; The feature vector is normalized and used as the unit normal vector of that point.

3. The method according to claim 1, characterized in that, For each query point in the 3D point cloud to be filtered, several nearest neighbors are obtained based on geometric distance, including: Construct a KD tree spatial index for the 3D point cloud to be filtered; For each query point, the KD tree is used to search for the K points with the closest Euclidean distance, forming a set of its neighbor points, where K is an integer greater than 1.

4. The method according to claim 1, characterized in that, The step of calculating the joint weighted distance between each query point and its neighbors based on the normal vectors of each query point and its neighbors includes: The first distance component is determined based on the Euclidean distance between the query point and its neighboring points and the difference in their normals. Based on the local planes where the query point and its neighboring points are located, a second distance component characterizing the degree of cross-surface separation is determined; The first distance component and the second distance component are weighted and combined according to preset weighting coefficients to obtain the joint weighted distance.

5. The method according to claim 1, characterized in that, The local statistical indicators for each query point are determined based on the joint weighted distance between each query point and all its neighboring points, including: For each query point, a distance set is formed by the joint weighted distance between the query point and all its neighbor points; Calculate the arithmetic mean or median of the distance set as a local statistical indicator for the query point.

6. The method according to claim 1, characterized in that, The determination of the global threshold based on local statistical indicators of all query points includes: Calculate the mean and standard deviation of local statistical indicators for all query points; The mean is added to the product of the standard deviation and the first preset coefficient to obtain the global threshold.

7. The method according to claim 1, characterized in that, The determination of the global threshold based on local statistical indicators of all query points includes: Calculate the median and median absolute deviation of the local statistics for all query points; The global threshold is obtained by adding the median to the product of a preset scaling factor, the absolute deviation of the median, and a second preset coefficient.

8. A three-dimensional point cloud denoising device, characterized in that, The device includes: The normal vector determination module is used to estimate the local normal vector of each point in the 3D point cloud to be filtered, and obtain the normal vector of each point. The neighbor point determination module is used to obtain several nearest neighbor points as its neighbor points for each query point in the three-dimensional point cloud to be filtered based on geometric distance. The joint weighted distance calculation module is used to calculate the joint weighted distance between each query point and each neighbor point based on the normal vectors of each query point and its neighbor points. The local statistical indicator determination module is used to determine the local statistical indicators of each query point based on the joint weighted distance between each query point and all its neighboring points. The global threshold determination module is used to determine the global threshold based on local statistical indicators of all query points; The outlier removal module is used to identify query points whose local statistical indicators are greater than the global threshold as outliers and remove them to achieve denoising of 3D point clouds.

9. A computer device, characterized in that, include: The computer device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, they perform the steps of the three-dimensional point cloud denoising method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the three-dimensional point cloud denoising method as described in any one of claims 1 to 7.