A point cloud smoothing method and device based on local feature estimation, electronic equipment and storage medium
By estimating the normal vector through local density features and weighted local statistical analysis, and combining neighborhood update weights based on spatial distance and normal difference, adaptive point cloud smoothing is achieved. This solves the problems of adaptability to complex structures and computational efficiency in existing methods, and improves point cloud quality and application effects.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN XGRIDS-INNOVATION CO LTD
- Filing Date
- 2026-02-09
- Publication Date
- 2026-05-19
AI Technical Summary
Existing point cloud smoothing methods are difficult to adapt to complex structures, and tend to over-smooth, resulting in blurred geometric details and edges. They also have high computational complexity, making them difficult to apply efficiently in high-density point clouds or real-time scenarios.
By introducing noise point removal based on local density features, normal estimation based on weighted local statistical analysis, and a neighborhood update weight construction mechanism that integrates spatial distance, normal difference, and normal distance, adaptive and structure-preserving point cloud smoothing is achieved.
It effectively removes outliers and noise points, reduces point cloud thickness, improves the stability of normal estimation, and preserves object edges and geometric details, significantly improving the overall quality and applicability of point clouds.
Smart Images

Figure CN121660923B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of point cloud data processing technology, and more specifically, to a point cloud smoothing method, apparatus, electronic device, and storage medium based on local feature estimation. Background Technology
[0002] With the rapid development of 3D sensor technologies (such as LiDAR, structured light, and ToF cameras), point cloud data is widely used in fields such as robot perception, 3D modeling, environmental reconstruction, autonomous driving, and industrial inspection. However, due to factors such as imaging mechanisms, lighting conditions, material properties, and sampling accuracy, raw point cloud data often suffers from noise points, outliers, and large point cloud thickness.
[0003] Existing point cloud smoothing methods mainly include mean filtering, voxel filtering, MLS (Moving Least Squares) surface fitting, and bilateral filtering. While these methods can reduce noise to some extent, some rely on spherical or local planar assumptions, making them difficult to adapt to complex structures. In areas with strong noise or large density variations, they are prone to over-smoothing, leading to blurred geometric details and edges. Furthermore, their high computational complexity makes them difficult to apply efficiently in high-density point clouds or real-time scenarios. Summary of the Invention
[0004] This disclosure provides at least one point cloud smoothing method, apparatus, electronic device, and storage medium based on local feature estimation. By introducing noise point removal based on local density features, normal estimation based on weighted local statistical analysis, and a neighborhood update weight construction mechanism that integrates spatial distance, normal difference, and normal distance, adaptive and structure-preserving smoothing processing of point clouds is achieved. This method effectively removes outliers and noise points, reduces point cloud thickness, improves the stability of normal estimation, and preserves object edges and geometric details during the smoothing process, significantly improving the overall quality and applicability of the point cloud.
[0005] This disclosure provides a point cloud smoothing method based on local feature estimation, including:
[0006] The original point cloud data is acquired and a local neighborhood is constructed for each point. The local density features of each point are calculated based on the local neighborhood. Noise points are removed from the original point cloud data according to the local density features to obtain a preprocessed point cloud.
[0007] On the preprocessed point cloud, a weighted statistical analysis is performed on each point using the neighboring points in the corresponding local neighborhood to estimate the local geometric features of the point, wherein the local geometric features include at least the normal direction of the point.
[0008] Based on the normal direction and the spatial relationship between the neighboring points and the current point, a neighborhood update weight is constructed for each point for position update.
[0009] The neighboring points are weighted according to the neighborhood update weight, and the position of the current point is iteratively updated along the normal direction of the current point.
[0010] In one optional implementation, acquiring raw point cloud data and constructing a local neighborhood for each point specifically includes:
[0011] A KD-tree index structure is constructed for the original point cloud data;
[0012] Based on the KD-tree index structure, for each point in the original point cloud data, a radius search is used to select points whose distance to the point is less than a preset radius range as the local neighborhood, with the point cloud as the center. The set of points contained in the local neighborhood is called the neighborhood points.
[0013] In one optional implementation, local density features of each point are calculated based on the local neighborhood, and outliers are removed from the original point cloud data according to the local density features to obtain a preprocessed point cloud, specifically including:
[0014] For each point in the original point cloud data, the total distance between the point and its corresponding neighboring points is determined, and the ratio between the total distance and the total number of neighboring points is determined as the local density feature corresponding to the point.
[0015] Statistically analyze the local density features of all points in the original point cloud data to determine the corresponding density mean and standard deviation;
[0016] When the local density feature corresponding to a certain point is greater than the sum of the density mean and the standard deviation of the preset hyperparameter, or when the total number of the neighboring points corresponding to that point is less than a preset threshold, the point is identified as a noise point and is removed.
[0017] In one optional implementation, a weighted statistical analysis is performed on each point using its corresponding local neighborhood points to estimate the local geometric features of that point, specifically including:
[0018] For each point in the original point cloud data, a covariance matrix is constructed based on the neighboring points corresponding to that point. The covariance matrix is determined by the position vector of each neighboring point, the neighborhood weight, and the three-dimensional centroid of the neighboring points.
[0019] The covariance matrix is subjected to eigenvalue decomposition or singular value decomposition to obtain multiple eigenvalues and corresponding eigenvectors.
[0020] The eigenvector corresponding to the smallest eigenvalue is determined as the normal direction corresponding to that point.
[0021] In one optional implementation, the neighborhood weights are determined based on the following steps:
[0022] For each local neighborhood, the maximum distance from the neighborhood point to the three-dimensional centroid is calculated, and the distance from each neighborhood point to the three-dimensional centroid is normalized based on the maximum distance.
[0023] The normalized distance is substituted into a monotonically decreasing negative exponential function to obtain the corresponding neighborhood weight, so that the neighborhood point that is closer to the three-dimensional centroid has a greater weight in the estimation of the normal direction.
[0024] In one optional implementation, the neighborhood update weight consists of a spatial distance term, a normal vector difference term, and a normal vector distance term;
[0025] The spatial distance term is determined based on the Euclidean distance between the current point and the neighboring points, and is a monotonically decreasing function of distance, in order to reduce the influence of distant neighboring points;
[0026] The normal difference term is determined based on the dot product between the weighted smoothed normal direction of the current point and the normal direction of the neighboring points, so as to reflect the consistency of the normal directions of the two.
[0027] The normal distance term is determined based on the perpendicular distance from the neighboring point to the current point in the normal direction, so as to reflect the degree of deviation of the neighboring point from the local fitting plane of the current point.
[0028] In an optional implementation, the method further includes, during the process of constructing neighborhood update weights for location updates for each point:
[0029] Determine the angle between the normal direction of the current point and the normal directions of the corresponding neighboring points;
[0030] When the included angle is greater than a preset angle, a truncation process is performed on the neighboring point, and the neighborhood update weight corresponding to the neighboring point is set to zero, so that the neighboring point with a large difference in normal vector does not participate in the smoothing of the normal direction and position update of the current point.
[0031] This disclosure also provides a point cloud smoothing device based on local feature estimation, comprising:
[0032] The point cloud preprocessing module is used to acquire raw point cloud data and construct a local neighborhood for each point, calculate the local density features of each point based on the local neighborhood, and remove noise points from the raw point cloud data according to the local density features to obtain a preprocessed point cloud.
[0033] The normal vector estimation module is used to perform weighted statistical analysis on each point in the preprocessed point cloud using the neighboring points in the corresponding local neighborhood to estimate the local geometric features of the point, wherein the local geometric features include at least the normal direction of the point.
[0034] The weight update module is used to construct a neighborhood update weight for each point for position update based on the normal direction and the spatial relationship between the neighboring points and the current point.
[0035] The local smoothing module is used to weight the neighboring points according to the neighborhood update weight, and iteratively update the position of the current point along the normal direction of the current point.
[0036] This disclosure also provides an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic 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 point cloud smoothing method based on local feature estimation described above, or any possible implementation of the point cloud smoothing method based on local feature estimation described above.
[0037] This disclosure also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the point cloud smoothing method based on local feature estimation described above, or any possible implementation of the point cloud smoothing method based on local feature estimation described above.
[0038] This disclosure also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the above-described point cloud smoothing method based on local feature estimation, or any possible implementation of the above-described point cloud smoothing method based on local feature estimation.
[0039] This disclosure provides a point cloud smoothing method, apparatus, electronic device, and storage medium based on local feature estimation. The method acquires raw point cloud data and constructs a local neighborhood for each point. Local density features of each point are calculated based on the local neighborhoods, and noise points are removed from the raw point cloud data according to the local density features to obtain a preprocessed point cloud. On the preprocessed point cloud, weighted statistical analysis is performed on each point using its corresponding local neighborhood points to estimate its local geometric features, which include at least the normal direction of the point. Based on the normal direction and the spatial relationship between the neighboring points and the current point, a neighborhood update weight is constructed for each point for position updating. The neighboring points are weighted according to the neighborhood update weight, and the position of the current point is iteratively updated along the normal direction of the current point. By introducing noise point removal based on local density features, normal estimation based on weighted local statistical analysis, and a neighborhood update weight construction mechanism that integrates spatial distance, normal difference, and normal distance, adaptive and structure-preserving smoothing processing of point clouds is achieved. This method can effectively remove outliers and noise points, reduce point cloud thickness, improve the stability of normal estimation, and preserve object edges and geometric details during the smoothing process, thus significantly improving the overall quality and applicability of point clouds.
[0040] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0041] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the embodiments will be briefly described below. These drawings are incorporated in and constitute a part of this specification. They illustrate embodiments conforming to this disclosure and, together with the specification, serve to explain the technical solutions of this disclosure. It should be understood that the following drawings only show some embodiments of this disclosure and should not be considered as limiting the scope. Those skilled in the art can obtain other related drawings based on these drawings without creative effort.
[0042] Figure 1 A flowchart of a point cloud smoothing method based on local feature estimation provided in an embodiment of this disclosure is shown;
[0043] Figure 2 One of the comparative schematic diagrams of the point cloud smoothing effect provided by the embodiments of this disclosure is shown;
[0044] Figure 3 This is a second comparative schematic diagram showing the point cloud smoothing effect provided by the embodiments of this disclosure;
[0045] Figure 4A schematic diagram of a point cloud smoothing device based on local feature estimation provided in an embodiment of this disclosure is shown;
[0046] Figure 5 A schematic diagram of an electronic device provided in an embodiment of the present disclosure is shown. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. The components of the embodiments of this disclosure 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 disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.
[0048] 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.
[0049] In this document, the term "and / or" merely describes a relationship, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0050] Research has revealed that existing point cloud smoothing methods mainly include mean filtering, voxel filtering, MLS (Moving Least Squares) surface fitting, and bilateral filtering. While these methods can reduce noise to some extent, some rely on spherical or local planar assumptions, making them difficult to adapt to complex structures. In areas with strong noise or large density variations, they are prone to over-smoothing, leading to blurred geometric details and edges. Furthermore, the algorithms have high computational complexity, making them difficult to apply efficiently in high-density point clouds or real-time scenarios.
[0051] Based on the above research, this disclosure provides a point cloud smoothing method, apparatus, electronic device, and storage medium based on local feature estimation. The method involves acquiring raw point cloud data and constructing a local neighborhood for each point. Local density features of each point are calculated based on these local neighborhoods, and noise points are removed from the raw point cloud data according to the local density features, resulting in a preprocessed point cloud. On the preprocessed point cloud, weighted statistical analysis is performed on each point using its corresponding local neighborhood to estimate its local geometric features, which include at least the normal direction of the point. Based on the normal direction and the spatial relationship between the neighboring points and the current point, a neighborhood update weight is constructed for each point to update its position. The neighboring points are weighted according to the neighborhood update weight, and the position of the current point is iteratively updated along the normal direction of the current point. By introducing noise point removal based on local density features, normal estimation based on weighted local statistical analysis, and a neighborhood update weight construction mechanism that integrates spatial distance, normal difference, and normal distance, adaptive and structure-preserving smoothing of point clouds is achieved. This method can effectively remove outliers and noise points, reduce point cloud thickness, improve the stability of normal estimation, and preserve object edges and geometric details during the smoothing process, thus significantly improving the overall quality and applicability of point clouds.
[0052] To facilitate understanding of this embodiment, a point cloud smoothing method based on local feature estimation disclosed in this disclosure will first be described in detail. The execution entity of the point cloud smoothing method based on local feature estimation provided in this disclosure is generally a computer device with certain computing capabilities. This computer device may include, for example, a terminal device, a server, or other processing devices. The terminal device may be a user equipment (UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, in-vehicle device, wearable device, etc. In some possible implementations, this point cloud smoothing method based on local feature estimation can be implemented by the processor calling computer-readable instructions stored in memory.
[0053] See Figure 1 The diagram shows a flowchart of a point cloud smoothing method based on local feature estimation provided in an embodiment of this disclosure. The method includes steps S101 to S104, wherein:
[0054] S101. Obtain the original point cloud data and construct a local neighborhood for each point. Calculate the local density features of each point based on the local neighborhood, and remove noise points from the original point cloud data according to the local density features to obtain a preprocessed point cloud.
[0055] In practice, the original point cloud data first needs to be preprocessed to remove noise points and outliers, thereby obtaining a preprocessed point cloud with a more stable structure that can support subsequent normal estimation and position update operations.
[0056] Specifically, in this embodiment, raw point cloud data is first acquired. This raw point cloud data can come from various 3D sensing devices, such as LiDAR, depth cameras, 3D scanners, or structured light acquisition devices, or from public or private datasets. Raw point clouds typically consist of a large number of discrete points with 3D coordinate attributes. Due to factors such as sensor noise, abnormal reflectivity, occlusion, or motion, the point cloud often contains isolated points, points with abnormal distance distributions, or points with local densities significantly inconsistent with their surroundings. If these are not processed, they will affect the accuracy of subsequent local geometric feature estimation and smoothing calculations.
[0057] In order to improve data quality, this implementation method constructs a local neighborhood centered on each point in the original point cloud.
[0058] Specifically, in a preferred example, a KD-tree index structure is established for the original point cloud. This structure enables rapid neighborhood retrieval operations within the point cloud. In actual processing, a radius search can be performed for each point. Centered on that point, all points within a preset radius in 3D space are selected as the set of neighboring points. Since the radius search can effectively reflect the local topological relationships of the point cloud in space, it can be used for subsequent statistical calculations of local features.
[0059] It should be noted that in other alternative embodiments, neighborhood construction can also be accomplished using the K-nearest neighbor method, that is, for each point, a fixed number of points closest to it are selected as the set of neighboring points. Regardless of the method used, as long as it ensures that an appropriate number of neighboring points can be established for each point in the point cloud and reflects the real local structure, it can be considered to fall within the protection scope of this invention.
[0060] Furthermore, after constructing the local neighborhood, this embodiment calculates the corresponding local density features based on the neighborhood of each point to identify and remove noise points. In one example of this embodiment, for each point in the original point cloud, the sum of its spatial Euclidean distances with its neighboring points is first calculated, and this sum of distances is divided by the number of neighboring points to obtain the local density features of the corresponding point.
[0061] Here, the local density feature can characterize the density of the local structure around the point. When the distance between a point and its surrounding points is significantly larger or the number of neighboring points is significantly smaller, its local density feature will deviate significantly from the distribution of normal points, thus serving as an important basis for judging noise points.
[0062] In this embodiment, by performing statistical analysis on the local density features of all points in the original point cloud, the mean density and standard deviation of density across the entire point cloud range can be obtained. Based on these statistical results, a reasonable distribution range for the density features can be further determined.
[0063] In a typical implementation, if the density characteristic of a point is greater than the sum of the density mean and the standard deviation determined by a preset hyperparameter, then the local density of that point is considered significantly inconsistent with the surrounding environment, and it is highly likely to be a noise point. Furthermore, when the number of neighboring points corresponding to a point is lower than a preset threshold, its stability is also considered insufficient, and it is likely to be classified as a noise point. In this case, the present invention removes these points identified as noise points from the point cloud, thereby effectively filtering out outliers and points with abnormal local structures.
[0064] Thus, through the above steps, the final preprocessed point cloud basically retains the structural features of the real object surface, while significantly reducing noise points, outliers, and local pseudo-thickness caused by sampling instability. This lays a stable foundation for subsequent normal estimation, weight construction, and iterative position updates along the normal. The noise point removal strategy of this invention is not only applicable to point clouds with relatively uniform density, but also maintains robustness in scenarios with large variations in point cloud density, thereby ensuring the reliability of subsequent geometric feature calculations.
[0065] As one possible implementation, for each point in the original point cloud data, the total distance between that point and its corresponding neighboring points is determined, and the ratio between the total distance and the total number of neighboring points is determined as the local density feature corresponding to that point; the local density features of all points in the original point cloud data are statistically analyzed, and the corresponding density mean and standard deviation are determined; when the local density feature corresponding to a point is greater than the sum of the density mean and the standard deviation of the configured preset hyperparameter, or when the total number of neighboring points corresponding to that point is less than a preset threshold, that point is identified as a noise point and is removed.
[0066] Specifically, for any point in the original point cloud, the Euclidean distance between that point and all its neighbors can be calculated based on the positional relationships of its local neighborhood. These distances are then summed to obtain the total distance between the point and its neighbors. Subsequently, the ratio of this total distance to the number of neighbors is calculated, and this ratio is used as the local density feature of that point.
[0067] In this embodiment, the local density feature reflects the compactness of a point in its region. When there are enough neighboring points and they are distributed in a reasonable spatial area, the feature value is usually small. However, when a point is an outlier, an isolated point, or is affected by severe noise, its distance from neighboring points is often significantly larger. Even if the number of points in the neighborhood still meets the requirements, its local density feature will show significant anomalies, which can be used to make effective distinctions.
[0068] Here, after calculating the local density features corresponding to all points, a further statistical analysis of the density features across the entire point cloud is performed. This implementation performs ensemble statistics on the local density features of all points in the original point cloud, and obtains the global mean and standard deviation of the density features using conventional statistical methods. The density mean characterizes the average density within the entire point cloud region, while the standard deviation reflects the dispersion of the local density distribution of the point cloud.
[0069] In most cases, the local density characteristics of normal points are relatively evenly distributed around the average value, while the density characteristics of noise points often deviate from this normal range. Based on this statistical law, this implementation method can establish a density evaluation standard for identifying local anomalies.
[0070] In a typical implementation of this invention, a judgment relationship is established between the local density characteristics of a point and the density mean and standard deviation. When the local density characteristics of a point are greater than the sum of the density mean and the value obtained by multiplying the preset hyperparameter by the standard deviation, it is considered that the distribution of that point deviates significantly from the normal density region, and may be an outlier point caused by sampling error or external interference.
[0071] In addition, in another independent criterion, when the number of neighboring points corresponding to a certain point is less than a preset threshold, the point can also be directly determined as an isolated noise point.
[0072] It should be noted that in this invention, the quantity threshold can be adjusted through experience or data characteristics, or it can be dynamically set according to the actual sampling resolution. The above two types of criteria can be used independently or in combination, making the noise judgment logic more robust and universal, thereby adapting to point cloud data acquired by different types of sensors and in different environments.
[0073] S102. On the preprocessed point cloud, a weighted statistical analysis is performed on each point using the neighboring points in the corresponding local neighborhood to estimate the local geometric features of the point. The local geometric features include at least the normal direction of the point.
[0074] In practical implementation, after removing noise points from the original point cloud and obtaining the preprocessed point cloud, it is necessary to estimate the local geometric features of each point in the preprocessed point cloud. By performing weighted statistical analysis on the neighboring points within the local neighborhood of a point, geometric parameters reflecting the local surface characteristics of that point are calculated, including at least the normal direction of that point. The normal direction, as an important geometric attribute describing the local morphology of the point cloud surface, plays a crucial role in subsequent point cloud smoothing, geometric reconstruction, and feature edge preservation. Therefore, achieving stable and accurate normal direction estimation is an important component of the method of this invention.
[0075] Specifically, when estimating the normal of any point in the preprocessed point cloud, the three-dimensional spatial coordinates of its neighboring points are first obtained based on the local neighborhood of that point, and a covariance matrix reflecting the local spatial morphology is constructed based on these coordinates. In a typical implementation, the covariance matrix is composed of the offset vectors of the neighboring points relative to the centroid of the neighborhood, and is weighted and accumulated according to preset neighborhood weights. More specifically, the three-dimensional centroid position of the neighborhood point cloud is first calculated, and then the offset vector of each neighboring point relative to the centroid is calculated. The covariance matrix is obtained by the outer product of the offset vectors and combined with the corresponding neighborhood weights. This covariance matrix can reflect the main direction and overall distribution of the local structure around the point, where the trend of change of the main direction is highly correlated with the local surface morphology.
[0076] In another implementation, to enhance the adaptability of the normal estimation to changes in point cloud density, this invention assigns different weights to neighboring points based on their distance from the centroid. In this approach, neighboring points closer to the centroid typically reflect the local structure of the point more accurately. Therefore, a monotonically decreasing function, such as a negative exponential function, can be used to weight the distances from neighboring points to the centroid, causing the neighborhood contribution to gradually weaken as the distance increases. This weighting mechanism not only enhances the local stability of the normal estimation but also effectively suppresses the influence of outliers or local errors within the neighborhood.
[0077] Furthermore, after obtaining the constructed local covariance matrix, this embodiment performs eigenvalue decomposition or singular value decomposition on the matrix to obtain several eigenvalues and their corresponding eigenvectors. Since a local region of a point cloud can usually be approximated as a local surface, and the principal direction of this surface often has a consistent relationship with the eigenvectors of the covariance matrix, the eigenvector corresponding to the smallest eigenvalue can be selected as the normal direction of that point by judging the relationship between the eigenvalues. This eigenvector represents the direction with the least change in the neighborhood point cloud, that is, an approximate estimate of the normal direction of the local surface, which can more accurately reflect the local geometric features of the point cloud.
[0078] In another embodiment, to avoid instability in the normal direction due to similar eigenvalues or uneven local data distribution, this invention can also introduce a normal consistency strategy. That is, after calculating the normal direction of a point, alignment or direction consistency correction is performed based on the normal directions of other points in its neighborhood. For example, several representative neighborhood points are selected, and the directional trend of their normal directions is statistically analyzed to determine whether the normal direction of the current point is reversed or forward. This ensures that the normal directions in the neighborhood maintain overall consistency, thereby avoiding random reversals in the normal direction and improving the stability and continuity of normal estimation.
[0079] Thus, by using the above-mentioned normal estimation method based on weighted statistical analysis, the present invention can still maintain high robustness of normal estimation in regions with uneven point cloud density, local noise, or complex structural changes.
[0080] S103. Based on the normal direction and the spatial relationship between the neighboring points and the current point, construct a neighborhood update weight for each point for position update.
[0081] In practical implementation, after estimating the normal direction of each point in the preprocessed point cloud, to achieve subsequent point position updates along the normal direction, this invention further constructs a neighborhood update weight for each point to guide position adjustments, based on the normal direction of the current point and the spatial relationship between the current point and its neighbors. This neighborhood update weight quantifies the influence of neighboring points on the position change of the current point, reflecting the comprehensive relationship between the current point and its neighbors in terms of spatial distribution, directional consistency, and local geometric deviations.
[0082] In a preferred embodiment, the neighborhood update weight consists of three independent but interconnected components: a spatial distance term, a normal difference term, and a normal distance term. First, the spatial distance term is primarily determined based on the Euclidean distance between the current point and its neighbors, typically using a monotonically decreasing function. This allows closer neighbors with stronger local connections to play a greater role in position updates, while the weight of farther neighbors with weaker geometric connections gradually decreases. This monotonically decreasing function can take various forms, such as exponential decay, inverse proportional functions, or Gaussian functions, and can be dynamically selected based on the application scenario and computing resources.
[0083] Secondly, the normal difference term is determined based on the angle or dot product relationship between the normal direction of the current point and the normal directions of neighboring points. If the normal direction of the current point is highly consistent with the normal direction of a neighboring point, it indicates that they may be located in the same or similar local geometric segments, and their directional consistency is strong. Therefore, the neighboring point should be given a higher influence weight in the position update. Conversely, when the normal direction difference is large, it indicates that the neighboring point and the current point may be located on different sides, edges, or have noise interference in the local geometry. The normals of such neighboring points should not be included in the calculation of the smoothing direction of the current point, and their weight should be reduced. In some implementations, the normal difference term can also be combined with the weighted neighboring normal directions to enhance normal consistency.
[0084] Secondly, the normal distance term is determined based on the perpendicular distance from neighboring points to the normal direction of the current point. Its function is to characterize the degree of deviation of neighboring points from the local fitted surface of the current point. If a neighboring point deviates significantly from the fitted plane formed by the local normal of the current point, it means that its structural relationship differs greatly from that of the current point. The contribution of this neighboring point in the position update should be reduced to avoid erroneously pulling the current point away from the original structural surface. Conversely, if the perpendicular distance between a neighboring point and the normal of the current point is small, it means that it is more likely to be located in the same local surface structure and can be assigned a higher weight.
[0085] In another embodiment, to further improve the ability to preserve edge structures, the present invention can also incorporate an angle truncation mechanism during the construction of neighborhood update weights. When the angle between the normal direction of a neighboring point and the normal direction of the current point exceeds a preset threshold (e.g., 30° or other angles set according to actual conditions), it can be considered that the neighboring point and the current point belong to different surfaces or have significant geometric abrupt changes. In this case, the update weight of the neighboring point can be directly reset to zero, so that it does not participate in the current position adjustment. This strategy can effectively avoid the blurring effect of the smoothing process on object edges, ridges, and areas with abrupt structural changes, thereby achieving accurate preservation of geometric details.
[0086] Furthermore, in practical applications, the neighborhood update weights can be further adjusted based on point cloud density, normal estimation reliability, local noise level, or the number of nearest neighbors. For example, a normalization strategy can be used to ensure that the weights of the three components are all within a stable range, or the proportion of different components can be adjusted according to the needs of the scenario, thereby achieving the best balance between smoothing strength and feature preservation ability.
[0087] In summary, by constructing neighborhood update weights based on the normal direction and neighborhood spatial relationships, this invention establishes an adaptive smoothing mechanism that can both smooth point cloud noise and reduce local thickness while preserving geometric structure and edge information. This weight construction method is applicable not only to regular curved surfaces but also to point cloud scenarios with complex structures, significant density variations, or high noise, and has a significant effect on improving the quality of point cloud processing.
[0088] S104. The neighboring points are weighted according to the neighborhood update weight, and the position of the current point is iteratively updated along the normal direction of the current point.
[0089] In practical implementation, after constructing neighborhood update weights based on the spatial relationship between neighboring points and the current point, this invention further performs adaptive smoothing updates to the current point's position based on these weights to achieve overall denoising and thickness reduction of the point cloud. In a preferred embodiment, this invention first weights the neighboring points according to the neighborhood update weights, resulting in a differentiated distribution of the influence of neighboring points on the current point's position update. Specifically, by multiplying the three-dimensional spatial position vectors of the neighboring points by their corresponding neighborhood update weights and accumulating the weighted vectors of all neighboring points, a weighted result reflecting the neighborhood structure trend is obtained. This weighted result can be regarded as the comprehensive influence of neighboring points on the current point, which helps to obtain a more robust local trend estimate.
[0090] Here, after obtaining the weighted result, the present invention updates the position based on the normal direction of the current point. Since local changes on the point cloud surface are usually most pronounced along the normal direction, updating the position of the point along the normal direction can effectively reduce the point cloud thickness while maintaining the geometric structure features of the point cloud in the tangential direction.
[0091] In a typical implementation, an update amount is obtained by calculating the projection difference between the weighted result of neighboring points and the current point along the normal direction, to guide the adjustment of the current point's position. This update amount is then multiplied by a preset step size parameter or an adaptive adjustment coefficient to obtain the final movement distance of the current point along the normal direction. Adding this movement distance to the original coordinates of the current point yields the updated point position.
[0092] In another implementation, to improve the stability and controllability of the update process, the movement distance can be dynamically adjusted based on the weight distribution of neighboring points, the confidence level of the normal estimation, and the complexity of the local point cloud structure. For example, when the weights of neighboring points are concentrated and the normal estimation is stable, the step size for updating along the normal can be increased to accelerate the smoothing convergence speed; while in regions with strong geometric changes, such as near edges or ridges, the step size can be appropriately reduced to avoid over-smoothing, thereby maintaining the clarity of the point cloud's geometric features. Furthermore, for regions with local noise residue or low point cloud density, a more conservative update strategy can be adopted to avoid the local movement direction being misled by abnormal weights.
[0093] Based on the above update method, this invention typically performs multiple rounds of iterative updates on all points in the point cloud, causing the point cloud to gradually converge. In each iteration, the normal direction and neighborhood update weights are recalculated based on the results of the previous round, and the position update process is repeated. The number of iterations can be fixed, or it can be adaptively terminated based on whether the update amount is less than a preset convergence threshold. During the iteration process, the overall noise of the point cloud gradually decreases, the point cloud thickness decreases significantly with the number of iterations, and the geometric structure is well preserved. Especially for point clouds with complex structures or high noise levels, multiple iterations can significantly improve the smoothness of the point cloud and enhance the clarity of local geometric features such as point cloud edges and curved surfaces.
[0094] In another alternative implementation, the position update can be limited to a certain range to prevent points from deviating excessively from their original sampling positions. For example, a maximum movement distance threshold can be set to ensure that the displacement of each point in a single iteration does not exceed the threshold, thereby further guaranteeing the stability of the structure during the smoothing process. Furthermore, position updates can be combined with adaptive weight normalization to achieve a balanced smoothing effect across different point cloud regions.
[0095] In this way, by weighting neighboring points according to their neighborhood weights and performing multiple rounds of iterative updates on the point position along the normal direction of the current point, the present invention can achieve highly adaptive and structure-preserving point cloud smoothing, so as to achieve a good balance between point cloud denoising, thickness reduction and geometric feature preservation, thereby significantly improving the quality and reliability of point cloud in applications such as 3D reconstruction, feature extraction, recognition and registration.
[0096] The point cloud smoothing effect in the embodiments of this application can be found in [reference]. Figures 2-3 , Figure 2 One of the comparative schematic diagrams of the point cloud smoothing effect provided by the embodiments of this disclosure is shown. Figure 3 This is a second comparative schematic diagram showing the point cloud smoothing effect provided by the embodiments of this disclosure.
[0097] The above scheme will now be described in conjunction with specific implementation methods.
[0098] The normal vector estimation uses a weighted PCA method, which differs from the traditional PCA method in that neighborhood points have different weights when participating in the normal vector estimation. The specific calculation is as follows: For each point, a covariance matrix C is constructed based on its neighborhood points:
[0099] C = Σ wi · (pi - ) (pi - )
[0100] in, This represents the neighborhood weight of each neighboring point. Represents the distance from each neighboring point to the local centroid. The negative exponent of distance is represented by the following formula (the maximum distance also needs to be calculated here). (Normalize the distance of each neighboring point based on the maximum distance).
[0101]
[0102] in, Represents each neighboring point, Let C represent the three-dimensional centroid of the nearest neighbor. Matrix C satisfies the following equation:
[0103]
[0104] in, Let vj be the j-th eigenvalue of the covariance matrix, and vj represent the j-th eigenvector. Performing SVD decomposition on matrix C yields three eigenvectors and their corresponding eigenvalues; the eigenvector corresponding to the smallest eigenvalue is the normal vector for that point.
[0105] For each point, adaptive weighted smoothing is performed based on the normal vectors of its neighboring points. Then, based on the smoothed normal vector and the neighboring points, the point is moved a certain distance r along the normal direction. The local movement equation is calculated as follows:
[0106]
[0107] Where p represents the original position of a point, r is the distance moved, and np is the smoothed normal vector of that point. Let np be the new position after the move. The formula for calculating np is as follows:
[0108]
[0109] in, Let p represent the normal vector of the neighborhood points of point p. Let be the smoothed normal vector at that point. The neighborhood weight represents the weight of the neighborhood in this step, which is expressed as a combination of spatial distance and difference in normal angle. Its calculation formula is as follows:
[0110] a<=30
[0111] a>30
[0112] Where 'a' represents the angle between the two vectors. If the angle between the normal vector of a neighboring point and the normal vector of the current point is greater than 30 degrees, the vector is truncated, and the weight of that point is assigned to 0. d is the distance vector between the two points, expressed as... x, y, z represent the coordinate system axes with the original position p of a point as the origin.
[0113]
[0114] Where q represents a neighboring point, p represents the original position of a point, and wq represents the neighborhood update weight corresponding to each neighboring point. wq = wd + wn + wdn, and wq consists of three terms:
[0115] The first term represents the spatial Euclidean distance wd, which is expressed as the Euclidean distance from the current point to its neighboring points:
[0116]
[0117] The second term represents the difference in normal vectors, wn, which is the dot product of the weighted smoothed normal vector of the current point and the normal vectors of its neighboring points:
[0118]
[0119] The third term represents the difference in normal distance, wdn, which is expressed as the perpendicular distance from neighboring points to the current point along the normal direction.
[0120]
[0121] This disclosure provides a point cloud smoothing method based on local feature estimation. The method acquires original point cloud data and constructs a local neighborhood for each point. Local density features are calculated for each point based on these local neighborhoods. Noise points are removed from the original point cloud data based on these local density features to obtain a preprocessed point cloud. On the preprocessed point cloud, weighted statistical analysis is performed on each point using its corresponding local neighborhood to estimate its local geometric features, which include at least the point's normal direction. Based on the normal direction and the spatial relationship between the neighboring points and the current point, a neighborhood update weight is constructed for each point to update its position. The neighboring points are weighted according to the neighborhood weight, and the position of the current point is iteratively updated along its normal direction. By introducing noise point removal based on local density features, normal estimation based on weighted local statistical analysis, and a neighborhood update weight construction mechanism that integrates spatial distance, normal difference, and normal distance, adaptive and structure-preserving smoothing of the point cloud is achieved. This method can effectively remove outliers and noise points, reduce point cloud thickness, improve the stability of normal estimation, and preserve object edges and geometric details during the smoothing process, thus significantly improving the overall quality and applicability of point clouds.
[0122] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0123] Based on the same inventive concept, this disclosure also provides a point cloud smoothing device based on local feature estimation, which corresponds to the point cloud smoothing method based on local feature estimation. Since the principle of the device in this disclosure is similar to the point cloud smoothing method based on local feature estimation described above, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0124] Please see Figure 4 , Figure 4 This is a schematic diagram of a point cloud smoothing device based on local feature estimation, provided as an embodiment of this disclosure. Figure 4 As shown in the illustration, the point cloud smoothing device 400 based on local feature estimation provided in this embodiment includes:
[0125] The point cloud preprocessing module 410 is used to acquire raw point cloud data and construct a local neighborhood for each point, calculate the local density features of each point based on the local neighborhood, and remove noise points from the raw point cloud data according to the local density features to obtain a preprocessed point cloud.
[0126] The normal vector estimation module 420 is used to perform weighted statistical analysis on each point in the preprocessed point cloud using the neighboring points in the corresponding local neighborhood to estimate the local geometric features of the point, wherein the local geometric features include at least the normal direction of the point.
[0127] The weight update module 430 is used to construct a neighborhood update weight for each point for position update based on the normal direction and the spatial relationship between the neighboring points and the current point.
[0128] The local smoothing module 440 is used to weight the neighboring points according to the neighborhood update weight, and iteratively update the position of the current point along the normal direction of the current point.
[0129] The processing flow of each module in the device and the interaction flow between each module can be referred to the relevant descriptions in the above method embodiments, and will not be detailed here.
[0130] This disclosure provides a point cloud smoothing device based on local feature estimation. It acquires raw point cloud data and constructs a local neighborhood for each point. Based on the local neighborhood, it calculates the local density features of each point and removes noise points from the raw point cloud data according to the local density features, obtaining a preprocessed point cloud. On the preprocessed point cloud, it performs weighted statistical analysis on each point using its corresponding local neighborhood to estimate the point's local geometric features, which include at least the point's normal direction. Based on the normal direction and the spatial relationship between the neighboring points and the current point, it constructs a neighborhood update weight for each point for position updating. The neighboring points are weighted according to the neighborhood update weight, and the position of the current point is iteratively updated along the normal direction of the current point. By introducing noise point removal based on local density features, normal estimation based on weighted local statistical analysis, and a neighborhood update weight construction mechanism that integrates spatial distance, normal difference, and normal distance, it achieves adaptive and structure-preserving smoothing of the point cloud. This method can effectively remove outliers and noise points, reduce point cloud thickness, improve the stability of normal estimation, and preserve object edges and geometric details during the smoothing process, thus significantly improving the overall quality and applicability of point clouds.
[0131] Corresponding to Figure 1 The present disclosure also provides an electronic device 500, such as a point cloud smoothing method based on local feature estimation. Figure 5 The diagram shown is a structural schematic of an electronic device 500 provided in an embodiment of this disclosure, including:
[0132] Processor 51, memory 52, and bus 53; memory 52 is used to store execution instructions, including main memory 521 and external memory 522; the main memory 521, also called internal memory, is used to temporarily store the computational data in processor 51, as well as the data exchanged with external memory 522 such as hard disk. Processor 51 exchanges data with external memory 522 through main memory 521. When the electronic device 500 is running, processor 51 and memory 52 communicate through bus 53, enabling processor 51 to execute... Figure 1 The steps of the point cloud smoothing method based on local feature estimation.
[0133] This disclosure also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the point cloud smoothing method based on local feature estimation described in the above-described method embodiments. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0134] This disclosure also provides a computer program product, which includes computer instructions. When the computer instructions are executed by a processor, they can perform the steps of the point cloud smoothing method based on local feature estimation described in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.
[0135] The aforementioned computer program product can be implemented through hardware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied in a computer storage medium; in another optional embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.
[0136] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this disclosure, it should be understood that the disclosed device and method can be implemented in other ways. The device 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. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0137] 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.
[0138] In addition, the functional units in the various embodiments of this disclosure 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.
[0139] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, 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 disclosure. 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.
[0140] Finally, it should be noted that the above-described embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure 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 disclosure. Such 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 disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.
Claims
1. A point cloud smoothing method based on local feature estimation, characterized in that, include: The original point cloud data is acquired and a local neighborhood is constructed for each point. The local density features of each point are calculated based on the local neighborhood. Noise points are removed from the original point cloud data according to the local density features to obtain a preprocessed point cloud. Specifically, for each point in the original point cloud data, the total distance between that point and its corresponding neighboring points is determined, and the ratio between the total distance and the total number of neighboring points is determined as the local density feature corresponding to that point; the local density features of all points in the original point cloud data are statistically analyzed to determine the corresponding density mean and standard deviation; when the local density feature corresponding to a point is greater than the sum of the density mean and the standard deviation configured with preset hyperparameters, or when the total number of neighboring points corresponding to that point is less than a preset threshold, that point is identified as a noise point and removed. On the preprocessed point cloud, a weighted statistical analysis is performed on each point using the neighboring points in the corresponding local neighborhood to estimate the local geometric features of the point, wherein the local geometric features include at least the normal direction of the point. Specifically, for each point in the original point cloud data, a covariance matrix is constructed based on the neighboring points corresponding to that point. The covariance matrix is determined by the position vector of each neighboring point, the neighborhood weight, and the three-dimensional centroid of the neighboring points. Eigenvalue decomposition or singular value decomposition is performed on the covariance matrix to obtain multiple eigenvalues and corresponding eigenvectors. The eigenvector corresponding to the smallest eigenvalue is determined as the normal direction corresponding to that point. Based on the normal direction and the spatial relationship between the neighboring points and the current point, a neighborhood update weight is constructed for each point for position updating. The neighborhood update weight consists of a spatial distance term, a normal vector difference term, and a normal vector distance term. The spatial distance term is determined based on the Euclidean distance between the current point and the neighboring points and is a monotonically decreasing function of distance to reduce the influence of distant neighboring points. The normal vector difference term is determined based on the dot product between the weighted smoothed normal direction of the current point and the normal direction of the neighboring points to reflect the consistency of their normal directions. The normal vector distance term is determined based on the perpendicular distance from the neighboring point to the normal direction of the current point to reflect the degree of deviation of the neighboring point from the local fitting plane of the current point. The neighboring points are weighted according to the neighborhood update weight, and the position of the current point is iteratively updated along the normal direction of the current point.
2. The method according to claim 1, characterized in that, Acquire raw point cloud data and construct a local neighborhood for each point, specifically including: A KD-tree index structure is constructed for the original point cloud data; Based on the KD-tree index structure, for each point in the original point cloud data, a radius search is used to select points whose distance to the point is less than a preset radius range as the local neighborhood, with the point cloud as the center. The set of points contained in the local neighborhood is called the neighborhood points.
3. The method according to claim 1, characterized in that, The neighborhood weights are determined based on the following steps: For each local neighborhood, the maximum distance from the neighborhood point to the three-dimensional centroid is calculated, and the distance from each neighborhood point to the three-dimensional centroid is normalized based on the maximum distance. The normalized distance is substituted into a monotonically decreasing negative exponential function to obtain the corresponding neighborhood weight, so that the neighborhood point that is closer to the three-dimensional centroid has a greater weight in the estimation of the normal direction.
4. The method according to claim 1, characterized in that, In constructing neighborhood update weights for location updates for each point, the method further includes: Determine the angle between the normal direction of the current point and the normal directions of the corresponding neighboring points; When the included angle is greater than a preset angle, a truncation process is performed on the neighboring point, and the neighborhood update weight corresponding to the neighboring point is set to zero, so that the neighboring point with a large difference in normal vector does not participate in the smoothing of the normal direction and position update of the current point.
5. A point cloud smoothing device based on local feature estimation, characterized in that, include: The point cloud preprocessing module is used to acquire raw point cloud data and construct a local neighborhood for each point. Based on the local neighborhood, it calculates the local density features of each point and removes noise points from the raw point cloud data according to the local density features, resulting in a preprocessed point cloud. Specifically, for each point in the raw point cloud data, the module determines the total distance between that point and its corresponding neighboring points, and the ratio of this total distance to the total number of neighboring points is determined as the local density feature corresponding to that point. The module then calculates the local density features of all points in the raw point cloud data to determine the corresponding density mean and standard deviation. When the local density feature corresponding to a point is greater than the sum of the density mean and the standard deviation configured with preset hyperparameters, or when the total number of neighboring points corresponding to that point is less than a preset threshold, that point is identified as a noise point and removed. The normal vector estimation module is used to perform weighted statistical analysis on each point in the preprocessed point cloud using its corresponding local neighborhood points to estimate the local geometric features of the point. The local geometric features include at least the normal direction of the point. Specifically, for each point in the original point cloud data, a covariance matrix is constructed based on the corresponding neighborhood points. The covariance matrix is determined by the position vector of each neighborhood point, the neighborhood weight, and the three-dimensional centroid of the neighborhood points. Eigenvalue decomposition or singular value decomposition is performed on the covariance matrix to obtain multiple eigenvalues and corresponding eigenvectors. The eigenvector corresponding to the smallest eigenvalue is determined as the normal direction of the point. The weight update module is used to construct a neighborhood update weight for each point for position updating based on the normal direction and the spatial relationship between the neighboring points and the current point. The neighborhood update weight consists of a spatial distance term, a normal vector difference term, and a normal vector distance term. The spatial distance term is determined based on the Euclidean distance between the current point and the neighboring points and is a monotonically decreasing function of distance to reduce the influence of distant neighboring points. The normal vector difference term is determined based on the dot product between the weighted smoothed normal direction of the current point and the normal direction of the neighboring points to reflect the consistency of their normal directions. The normal vector distance term is determined based on the perpendicular distance from the neighboring point to the normal direction of the current point to reflect the degree of deviation of the neighboring point from the local fitting plane of the current point. The local smoothing module is used to weight the neighboring points according to the neighborhood update weight, and iteratively update the position of the current point along the normal direction of the current point.
6. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic 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 point cloud smoothing method based on local feature estimation as described in any one of claims 1 to 4.
7. 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 point cloud smoothing method based on local feature estimation as described in any one of claims 1 to 4.