Adaptive grid fitting point cloud filtering method and system based on gradient compensation

By employing adaptive mesh fitting and gradient compensation methods, the problems of noise identification and feature extraction in point cloud data processing in existing technologies are solved. An adaptive mesh fitting method for point cloud data is realized, and the adaptability problem of existing mesh filtering methods is resolved, achieving efficient denoising and feature preservation of point cloud data.

CN121767228BActive Publication Date: 2026-06-26北京捷翔天地信息技术有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
北京捷翔天地信息技术有限公司
Filing Date
2026-03-03
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing mesh filtering methods cannot accurately distinguish between noise and valid points when processing complex 3D point cloud data, resulting in feature loss or noise residue. Furthermore, discontinuities exist at mesh boundaries, affecting the accuracy of 3D reconstruction and feature recognition.

Method used

By acquiring the local density distribution characteristics of point cloud data to divide the grid, performing local surface fitting, calculating the gradient change and surface smoothness constraints, determining the gradient compensation amount, correcting the fitted surface parameters, and dynamically adjusting the filtering threshold by combining local curvature characteristics and deviation values, adaptive filtering is achieved.

Benefits of technology

It improves the accuracy and robustness of point cloud filtering, effectively removes noise while preserving geometric features, adapts to point cloud data with different densities and complex geometries, and outputs high-quality filtered point cloud data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121767228B_ABST
    Figure CN121767228B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of point cloud data processing, and more particularly to a self-adaptive grid fitting point cloud filtering method and system based on gradient compensation. The method divides the grid by the local density of the point cloud and performs surface fitting, calculates the grid gradient variation to determine the gradient compensation, and then corrects the fitting surface parameters. Based on the corrected parameters, the deviation of each point from the fitting surface and the local curvature are calculated to determine the adaptive filtering threshold, thereby classifying and removing the noise points. The present application can effectively maintain the detailed features of the point cloud and improve the filtering robustness of complex surfaces and noise.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of point cloud data processing technology, and in particular to an adaptive mesh fitting point cloud filtering method and system based on gradient compensation. Background Technology

[0002] In the field of 3D point cloud data processing, filtering is a crucial preprocessing step for removing noise and preserving valid geometric features. In existing technologies, mesh-based filtering methods are a common practice. These methods typically divide the point cloud into a regular voxel mesh based on its spatial distribution and perform independent statistical analysis or surface fitting within each mesh. By calculating the statistical characteristics of points within the mesh, such as density or distance distribution, a threshold is set to distinguish noise points from valid points. Another common approach is to perform local surface modeling, using polynomials or plane fitting to the point cloud within the mesh, and then applying filtering based on the distance from the points to the fitted surface. These methods rely on local computation within the mesh and aim to simplify the problem of noise identification in complex 3D spaces.

[0003] However, the aforementioned conventional mesh filtering methods have significant drawbacks. Mesh division is often fixed or based solely on simple density, failing to adequately consider the complex geometric variations of the point cloud surface. In regions with drastic surface curvature changes or feature edges, fixed mesh division results in individual meshes containing significantly different geometric information, making it impossible for a single statistical model or fitted surface based on that mesh to accurately describe the local surface. This leads to: misclassifying valid points located at sharp features as noise and filtering them out, resulting in feature loss; and insufficient sensitivity to noise identification in smooth regions, leaving a large number of noise points. Furthermore, the processing between adjacent meshes is completely independent, lacking spatial continuity constraints. When noise or uneven point cloud density causes abrupt changes in the parameters of the fitted surface within the mesh, it further amplifies the filtering error, resulting in discontinuities or artifacts at mesh boundaries in the final result, severely impacting the accuracy of subsequent 3D reconstruction, recognition, and other applications. Summary of the Invention

[0004] The embodiments of the present invention provide an adaptive mesh fitting point cloud filtering method and system based on gradient compensation, which can solve the problems in the prior art.

[0005] A first aspect of this invention provides an adaptive mesh fitting point cloud filtering method based on gradient compensation, comprising:

[0006] The point cloud data to be processed is acquired, and the point cloud data is divided into grids according to the local density distribution characteristics in space. Local surface fitting is performed on the point cloud data in each grid to obtain the fitting surface parameters corresponding to each grid.

[0007] The gradient change of each grid is calculated, and the gradient compensation amount is determined by the gradient continuity constraint and surface smoothness constraint between adjacent grids. The fitted surface parameters are then corrected using the gradient compensation amount to obtain the corrected fitted surface parameters.

[0008] Based on the corrected fitting surface parameters, calculate the deviation between each point in the point cloud data and its corresponding mesh fitting surface;

[0009] The local curvature features are calculated based on the corrected fitted surface parameters, and the filtering threshold is determined based on the deviation value and the local curvature features.

[0010] The point cloud data is classified according to the filtering threshold. Points with deviation values ​​exceeding the filtering threshold are marked as noise points and removed. The remaining points are retained as filtered point cloud data and output.

[0011] The process involves acquiring point cloud data to be processed, dividing the point cloud data into grids based on the local density distribution characteristics in space, performing local surface fitting on the point cloud data within each grid, and obtaining the fitted surface parameters corresponding to each grid, including:

[0012] The local density value of each point in the point cloud data is determined based on the number of neighboring points of each point within a preset neighborhood range.

[0013] Spatial distribution analysis is performed on all local density values ​​of the point cloud data. The grid boundary is determined based on the gradient change direction of the local density values ​​in space, and the grid is divided based on the grid boundary.

[0014] For each grid, extract the point cloud data within the grid and the point cloud data at the boundary of the adjacent grid, and use the point cloud data within the grid and the point cloud data at the boundary of the adjacent grid as a fitting dataset.

[0015] The spatial coordinate information of the point cloud data in the fitting dataset is transformed into the local coordinate system corresponding to the grid to obtain the surface fitting relationship. The surface fitting relationship is solved by minimizing the distance residual from each point in the fitting dataset to the surface to be fitted, and the fitting surface parameters corresponding to each grid are obtained.

[0016] The gradient change of each grid is calculated, and the gradient compensation amount is determined by the gradient continuity constraint and surface smoothness constraint between adjacent grids. The fitted surface parameters are then corrected using the gradient compensation amount to obtain the corrected fitted surface parameters, including:

[0017] For each grid, the surface gradient vector of the grid is calculated based on the fitted surface parameters corresponding to the grid. The adjacent grids of the grid are determined and the surface gradient vectors of the adjacent grids are calculated.

[0018] Calculate the gradient change between the surface gradient vector of the mesh and the surface gradient vector of the adjacent mesh, and perform spatial weighted accumulation of multiple gradient changes of the mesh to obtain the total gradient change of the mesh;

[0019] The surface distortion metric of the mesh is calculated based on the fitted surface parameters corresponding to the mesh, and the preliminary gradient compensation amount is determined based on the surface distortion metric and the total gradient change.

[0020] The initial gradient compensation amount is adaptively scaled according to the geometric feature type corresponding to the grid in the point cloud data to obtain the adaptively adjusted gradient compensation amount.

[0021] For each grid, the adaptively adjusted gradient compensation amount is superimposed on the surface gradient vector of the grid, and the fitted surface parameters corresponding to the grid are updated in reverse according to the superimposed surface gradient vector to obtain the corrected fitted surface parameters.

[0022] The initial gradient compensation amount is adaptively scaled according to the geometric feature type corresponding to the mesh in the point cloud data to obtain the adaptively adjusted gradient compensation amount, including:

[0023] Calculate the principal curvature and secondary curvature of the fitted surface corresponding to each grid based on the fitted surface parameters corresponding to each grid, and determine the curvature tensor matrix based on the directional and numerical distributions of the principal curvature and secondary curvature in space;

[0024] The curvature tensor matrix is ​​subjected to singular value decomposition to obtain multiple singular value components. Based on the ratio relationship between the multiple singular value components, the geometric feature type corresponding to the mesh is determined.

[0025] For the mesh, calculate the component projections of the initial gradient compensation amount of the mesh in the normal direction and the tangential direction of the mesh boundary, extract the initial gradient compensation amount of the adjacent meshes, and calculate the component projections of the initial gradient compensation amount of the adjacent meshes in the corresponding boundary directions.

[0026] The gradient compensation discontinuity metric is determined based on the component projection difference between the grid and the adjacent grid.

[0027] An adaptive scaling factor is determined based on the geometric feature type and the gradient compensation discontinuity measure. Based on the adaptive scaling factor and the initial gradient compensation amount, an adaptively adjusted gradient compensation amount is obtained.

[0028] Based on the corrected fitted surface parameters, the deviation between each point in the point cloud data and its corresponding mesh fitted surface is calculated, including:

[0029] Generate a fitting surface based on the corrected fitting surface parameters, and calculate the shortest distance from each point in the point cloud data to the fitting surface as the initial deviation value.

[0030] Determine the normal vector of the fitted surface at the position corresponding to the shortest distance, calculate the angle deviation between the line vector connecting each point in the point cloud data to the position corresponding to the shortest distance and the normal vector, and correct the initial deviation value according to the angle deviation to obtain the direction adjustment deviation value.

[0031] Generate adjacent fitted surfaces based on the corrected fitted surface parameters corresponding to the adjacent grids of the grid to which each point belongs in the point cloud data, and calculate the distance from each point in the point cloud data to the adjacent fitted surfaces.

[0032] By comparing the orientation adjustment deviation value with the distance from each point in the point cloud data to the adjacent fitted surface, abnormal deviation jumps at the grid boundary are identified. When the abnormal deviation jump exceeds the preset jump threshold, the orientation adjustment deviation value is smoothed, and the smoothed orientation adjustment deviation value is used as the deviation value between each point in the point cloud data and its corresponding grid fitted surface.

[0033] Calculate local curvature features based on the corrected fitted surface parameters, and determine the filtering threshold based on the deviation value and the local curvature features, including:

[0034] Calculate the spatial curvature distribution of the fitted surface based on the corrected fitted surface parameters corresponding to each grid.

[0035] Calculate the curvature change gradient of the spatial curvature distribution of the fitted surface in different spatial directions, and determine the local curvature characteristics based on the amplitude distribution of the curvature change gradient;

[0036] Calculate the statistical distribution characteristics of the deviation values ​​of each point in the point cloud data, and determine the initial filtering threshold based on the statistical distribution characteristics of the deviation values;

[0037] The threshold adjustment coefficient is determined based on the curvature fluctuation intensity index, and the filtered threshold after curvature adjustment is determined based on the threshold adjustment coefficient and the initial filtered threshold.

[0038] For each grid, the correlation measure between the distribution of deviation values ​​of point cloud data within the grid and the curvature fluctuation intensity index is calculated, and the grids that are deviation curvature anomalies are determined based on the correlation measure.

[0039] The local correction amount is determined based on the correlation metric of the abnormal curvature region, and the local correction amount is superimposed on the curvature-adjusted filter threshold to obtain the adaptively adjusted filter threshold.

[0040] Calculate the curvature variation gradient of the spatial curvature distribution of the fitted surface in different spatial directions, and determine the local curvature characteristics based on the amplitude distribution of the curvature variation gradient, including:

[0041] Multiple spatial direction sampling paths are determined on the fitted surface, and a sequence of curvature values ​​is extracted from the spatial curvature distribution along each spatial direction sampling path;

[0042] Calculate the difference between adjacent curvature values ​​in the curvature value sequence, and use the difference as the curvature change gradient in the direction corresponding to the spatial sampling path;

[0043] Based on the curvature change gradients corresponding to the sampling paths in all spatial directions, determine the curvature change anisotropy measure corresponding to the curvature change gradients.

[0044] For a target region in the spatial curvature distribution where the curvature value meets the preset curvature value condition, the curvature change gradient within the target region is extracted and aggregated for analysis. The distribution concentration of the curvature change gradient in space is calculated. The curvature change anisotropy measure and the distribution concentration are combined to obtain a comprehensive curvature fluctuation index.

[0045] The degree of surface change is determined based on the comprehensive index of curvature fluctuation and the peak position of the spatial curvature distribution. The comprehensive index of curvature fluctuation and the degree of surface change are used together as local curvature features.

[0046] A second aspect of the present invention provides an adaptive mesh fitting point cloud filtering system based on gradient compensation, comprising:

[0047] The grid division unit is used to acquire the point cloud data to be processed. The grid is divided according to the local density distribution characteristics of the point cloud data in space. Local surface fitting is performed on the point cloud data in each grid to obtain the fitting surface parameters corresponding to each grid.

[0048] The surface fitting unit is used to calculate the gradient change of each grid. The gradient compensation amount is determined by the gradient continuity constraint and surface smoothness constraint between adjacent grids. The fitted surface parameters are corrected using the gradient compensation amount to obtain the corrected fitted surface parameters.

[0049] The parameter correction unit is used to calculate the deviation between each point in the point cloud data and its corresponding mesh fitting surface based on the corrected fitting surface parameters.

[0050] The deviation calculation unit is used to calculate local curvature features based on the corrected fitted surface parameters, and to determine a filtering threshold based on the deviation value and the local curvature features.

[0051] The threshold determination unit is used to classify the point cloud data according to the filtering threshold, mark points whose deviation values ​​exceed the filtering threshold as noise points and remove them, and retain the remaining points as filtered point cloud data and output them.

[0052] A third aspect of the present invention provides an electronic device, comprising:

[0053] processor;

[0054] Memory used to store processor-executable instructions;

[0055] The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.

[0056] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.

[0057] This invention effectively improves the accuracy and robustness of point cloud filtering. By dividing the mesh according to the local density distribution characteristics of the point cloud, it ensures the adaptability of the mesh cells to the spatial structure characteristics of the point cloud, avoiding overfitting or underfitting problems caused by uniform mesh division in areas with uneven density. Local surface fitting is performed on each mesh, providing an accurate geometric representation basis for subsequent analysis. This invention determines the compensation amount by calculating the mesh gradient change and combining the gradient continuity constraints and surface smoothness constraints between adjacent meshes, which can effectively correct the surface parameter deviation caused by local fitting or missing data. This step significantly enhances the smooth transition and overall consistency of the fitted surface at the mesh boundary, overcoming the "block effect" and surface discontinuity problems commonly found in traditional block fitting methods. This invention calculates the point cloud deviation value and local curvature characteristics based on the corrected surface parameters, making the noise judgment standard more scientific and reasonable. Combining the deviation value with the curvature characteristics reflecting local geometric complexity to determine the dynamic filtering threshold achieves adaptive adjustment of the filtering standard. In flat regions, a stricter threshold is used to filter out subtle noise, while in feature-rich, complex curvature regions, the threshold is relaxed to protect detailed features, thus achieving an excellent balance between noise reduction and shape preservation. This invention uses adaptive thresholding for classification filtering, which can accurately identify and remove anomalous noise points that deviate from the fitted surface. This method demonstrates good adaptability to point cloud data containing varying degrees of noise, density changes, and complex geometries. The filtered point cloud output effectively removes noise while preserving the geometric features and detailed information of the original point cloud to the greatest extent possible, providing a high-quality data foundation for subsequent applications such as 3D reconstruction and feature extraction. Attached Figure Description

[0058] Figure 1This is a flowchart illustrating the adaptive mesh fitting point cloud filtering method based on gradient compensation, according to an embodiment of the present invention.

[0059] Figure 2 This is a schematic diagram illustrating the process of determining the corrected fitted surface parameters according to an embodiment of the present invention. Detailed Implementation

[0060] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0061] The technical solution of the present invention will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0062] Figure 1 This is a flowchart illustrating the adaptive mesh fitting point cloud filtering method based on gradient compensation, according to an embodiment of the present invention. Figure 1 As shown, the method includes:

[0063] The point cloud data to be processed is acquired, and the point cloud data is divided into grids according to the local density distribution characteristics in space. Local surface fitting is performed on the point cloud data in each grid to obtain the fitting surface parameters corresponding to each grid.

[0064] The gradient change of each grid is calculated, and the gradient compensation amount is determined by the gradient continuity constraint and surface smoothness constraint between adjacent grids. The fitted surface parameters are then corrected using the gradient compensation amount to obtain the corrected fitted surface parameters.

[0065] Based on the corrected fitting surface parameters, calculate the deviation between each point in the point cloud data and its corresponding mesh fitting surface;

[0066] The local curvature features are calculated based on the corrected fitted surface parameters, and the filtering threshold is determined based on the deviation value and the local curvature features.

[0067] The point cloud data is classified according to the filtering threshold. Points with deviation values ​​exceeding the filtering threshold are marked as noise points and removed. The remaining points are retained as filtered point cloud data and output.

[0068] The process involves acquiring point cloud data to be processed, dividing the point cloud data into grids based on the local density distribution characteristics in space, performing local surface fitting on the point cloud data within each grid, and obtaining the fitted surface parameters corresponding to each grid, including:

[0069] The local density value of each point in the point cloud data is determined based on the number of neighboring points of each point within a preset neighborhood range.

[0070] Spatial distribution analysis is performed on all local density values ​​of the point cloud data. The grid boundary is determined based on the gradient change direction of the local density values ​​in space, and the grid is divided based on the grid boundary.

[0071] For each grid, extract the point cloud data within the grid and the point cloud data at the boundary of the adjacent grid, and use the point cloud data within the grid and the point cloud data at the boundary of the adjacent grid as a fitting dataset.

[0072] The spatial coordinate information of the point cloud data in the fitting dataset is transformed into the local coordinate system corresponding to the grid to obtain the surface fitting relationship. The surface fitting relationship is solved by minimizing the distance residual from each point in the fitting dataset to the surface to be fitted, and the fitting surface parameters corresponding to each grid are obtained.

[0073] After acquiring the point cloud data to be processed, for each point in the point cloud data, a spherical neighborhood is established centered on that point. The radius of the neighborhood is adaptively determined based on the overall density characteristics of the point cloud. The number of neighboring points within the spherical neighborhood is counted, and the ratio of this number to the neighborhood volume is taken as the local density value of that point. For point cloud data containing N points, each point... Local density value Calculated as ,in The number of points in the neighborhood. Let r be the volume of the sphere with radius r.

[0074] After obtaining the local density values ​​of all points, spatial distribution analysis is performed on the point cloud data. A density gradient field calculation method is used to calculate the density difference vector between each point and its surrounding points, with the density gradient direction pointing in the direction of increasing density. Spatial locations where significant changes in density gradient occur are identified; these locations correspond to geometrically defined boundary regions of the point cloud. Locations where the rate of change of density gradient exceeds a set threshold are designated as candidate grid boundary points, and grid boundary lines are formed by connecting adjacent candidate points. Based on the determined grid boundaries, the three-dimensional space of the point cloud data is divided into multiple spatial grid cells.

[0075] For each grid segment, all point cloud data contained within that grid are extracted. Simultaneously, all adjacent grids are identified, and point cloud data located near the shared boundary within these adjacent grids are extracted, specifically points within 20% of the grid feature size at the boundary. The points inside the grid are then merged with the points near the boundary to form the fitted dataset for that grid. This method ensures good continuity of the fitted surface at the grid boundaries.

[0076] For each grid, a local coordinate system is established with the grid center as the origin. The principal direction of the point cloud data within the grid is selected as the z-axis direction of the local coordinate system. The principal direction is determined by principal component analysis. The 3D coordinates of all points in the fitted dataset are transformed to the local coordinate system to obtain a new coordinate representation. A quadratic surface model is used to describe the local geometry within the grid, and the surface equation is expressed as a function of z with respect to x and y in the local coordinate system.

[0077] A least-squares optimization objective function is constructed, which calculates the sum of squared perpendicular distances from all points in the fitted dataset to the surface to be fitted. For each point in the dataset, based on its x and y coordinates in the local coordinate system, the z-value of the corresponding position on the surface is calculated using the surface equation. The difference between this z-value and the actual z-coordinate of the point is taken as the distance residual. The partial derivative of the objective function with respect to the surface parameters is taken and set to zero, resulting in a system of linear equations with respect to the surface parameters. Solving this system of equations yields the fitted surface parameters for each grid, including the coefficients of the quadratic term, the coefficients of the linear term, and the constant term. A robust weighting mechanism is introduced during the fitting process, assigning smaller weights to points with larger distance residuals to reduce the influence of outliers on the fitting results.

[0078] The gradient change of each grid is calculated, and the gradient compensation amount is determined by the gradient continuity constraint and surface smoothness constraint between adjacent grids. The fitted surface parameters are then corrected using the gradient compensation amount to obtain the corrected fitted surface parameters, including:

[0079] For each grid, the surface gradient vector of the grid is calculated based on the fitted surface parameters corresponding to the grid. The adjacent grids of the grid are determined and the surface gradient vectors of the adjacent grids are calculated.

[0080] Calculate the gradient change between the surface gradient vector of the mesh and the surface gradient vector of the adjacent mesh, and perform spatial weighted accumulation of multiple gradient changes of the mesh to obtain the total gradient change of the mesh;

[0081] The surface distortion metric of the mesh is calculated based on the fitted surface parameters corresponding to the mesh, and the preliminary gradient compensation amount is determined based on the surface distortion metric and the total gradient change.

[0082] The initial gradient compensation amount is adaptively scaled according to the geometric feature type corresponding to the grid in the point cloud data to obtain the adaptively adjusted gradient compensation amount.

[0083] For each grid, the adaptively adjusted gradient compensation amount is superimposed on the surface gradient vector of the grid, and the fitted surface parameters corresponding to the grid are updated in reverse according to the superimposed surface gradient vector to obtain the corrected fitted surface parameters.

[0084] Figure 2 This is a schematic diagram illustrating the process of determining the corrected fitted surface parameters according to an embodiment of the present invention. Figure 2 As shown, for each grid, the surface gradient vector is calculated based on the fitted surface parameters corresponding to that grid. When the fitted surface is represented by a quadratic polynomial, the surface equation is in the form of: Where a, b, c, d, e, and f are the parameters of the fitted surface. The surface gradient vector is obtained by taking the partial derivatives of the surface equation with respect to x and y, respectively, specifically: The gradient vector is calculated at the center coordinates of the grid and used as the representative gradient of the grid. Neighboring grids are identified; neighboring grids are defined as grid cells that share boundaries or vertices with the current grid. The surface gradient vector of each neighboring grid is calculated in the same way.

[0085] Calculate the gradient change between the surface gradient vector of the current mesh and the surface gradient vectors of each adjacent mesh. The gradient change is expressed as the magnitude of the vector difference. ,in Let be the gradient vector of the i-th neighboring grid. The gradient changes of all neighboring grids are spatially weighted and accumulated, with the weighting factor inversely proportional to the distance between grids, specifically: ,in The distance between the current grid center and the i-th adjacent grid center. To prevent division by zero by a small constant (valued at 0.001), the total gradient change is calculated as follows: .

[0086] The surface distortion metric is calculated based on the fitted surface parameters corresponding to the mesh. The distortion metric is characterized by the second-order partial derivatives of the surface, and the second-order partial derivative matrix of the surface, i.e., the Hessian matrix, is calculated. The surface distortion metric is defined as the Frobenius norm of the matrix. The initial gradient compensation amount is determined by combining the surface distortion metric with the total gradient change. The compensation amount is... ,in To compensate for the strength coefficient (value 0.5), The value is the torsion sensitivity coefficient (taken as 1.2). This formula automatically reduces the compensation amount when the surface torsion is large.

[0087] The initial gradient compensation amount is adaptively scaled based on the geometric feature type corresponding to the mesh in the point cloud data. The geometric feature type is determined by analyzing the local morphology of the point cloud within the mesh, including planar regions, edge regions, and corner regions. For planar regions, the eigenvalues ​​are determined by the eigenvalue ratio of principal component analysis. When the ratio of the minimum eigenvalue to the maximum eigenvalue is less than 0.1, it is identified as a planar region, and the scaling factor is set to 1.2 to enhance the filtering effect. For edge regions, when the ratio of the intermediate eigenvalue to the maximum eigenvalue is between 0.3 and 0.7, it is identified as an edge, and the scaling factor is set to 0.8 to preserve edge features. For corner regions, when the differences between the three eigenvalues ​​are small, i.e., the ratio of the minimum eigenvalue to the maximum eigenvalue is greater than 0.6, it is identified as a corner, and the scaling factor is set to 0.5 to avoid over-smoothing. The adaptively adjusted gradient compensation amount is the initial gradient compensation amount multiplied by the corresponding scaling factor.

[0088] For each mesh, the adaptively adjusted gradient compensation is superimposed onto the original surface gradient vector of that mesh along the gradient direction. This superposition operation is achieved by applying compensation in the opposite direction of the gradient vector. The corrected gradient vector is... The fitted surface parameters are updated in reverse based on the superimposed surface gradient vector. The surface parameters that satisfy the corrected gradient constraints are then refitted using the least squares method. During the update process, the elevation value of the surface at the center of the grid remains unchanged, and only the first-order and second-order coefficients are adjusted to obtain the corrected fitted surface parameters for subsequent processing.

[0089] The initial gradient compensation amount is adaptively scaled according to the geometric feature type corresponding to the mesh in the point cloud data to obtain the adaptively adjusted gradient compensation amount, including:

[0090] Calculate the principal curvature and secondary curvature of the fitted surface corresponding to each grid based on the fitted surface parameters corresponding to each grid, and determine the curvature tensor matrix based on the directional and numerical distributions of the principal curvature and secondary curvature in space;

[0091] The curvature tensor matrix is ​​subjected to singular value decomposition to obtain multiple singular value components. Based on the ratio relationship between the multiple singular value components, the geometric feature type corresponding to the mesh is determined.

[0092] For the mesh, calculate the component projections of the initial gradient compensation amount of the mesh in the normal direction and the tangential direction of the mesh boundary, extract the initial gradient compensation amount of the adjacent meshes, and calculate the component projections of the initial gradient compensation amount of the adjacent meshes in the corresponding boundary directions.

[0093] The gradient compensation discontinuity metric is determined based on the component projection difference between the grid and the adjacent grid.

[0094] An adaptive scaling factor is determined based on the geometric feature type and the gradient compensation discontinuity measure. Based on the adaptive scaling factor and the initial gradient compensation amount, an adaptively adjusted gradient compensation amount is obtained.

[0095] After mesh generation and initial fitting are completed, the gradient compensation amount needs to be adaptively adjusted for meshes with different geometric features. For a single mesh, the second-order partial derivative information is first extracted from the parameters of its fitted surface, and the principal curvature of the fitted surface corresponding to that mesh is calculated. with second curvature The principal curvature represents the maximum degree of curvature of the surface along the principal direction at a certain point, while the secondary curvature represents the degree of curvature perpendicular to the principal direction. By calculating the direction vectors of the principal and secondary curvatures in space and their corresponding numerical values, a curvature tensor matrix K is constructed. This matrix is ​​a 3×3 symmetric matrix, whose diagonal elements reflect the curvature components along each coordinate axis, and whose off-diagonal elements reflect the coupling relationship of curvature.

[0096] Performing singular value decomposition on the curvature tensor matrix K yields three singular values. The geometric feature type of the mesh is determined by calculating the ratio between singular values: when Much larger and When, the grid belongs to the edge feature region; when and Close to and all much larger than When the three singular values ​​are close, the grid belongs to a corner feature region; when the three singular values ​​are close, the grid belongs to a planar feature region; when... , and When the distribution exhibits a gradual change, the mesh belongs to the curved surface transition region. A threshold parameter is set for specific judgment. and ,like Then it is determined to be an edge feature, if and Then it is determined to be a corner feature, if It is then determined to be a planar feature.

[0097] For the current mesh, its initial gradient compensation vector Decomposed into boundary normal components With boundary tangential component The boundary normal direction is defined as a unit vector pointing from the current mesh to the centroid of the adjacent mesh, and the tangential direction is a unit vector perpendicular to the normal and lying in the tangential plane of the fitted surface. The same component projection operation is performed on all adjacent meshes of the current mesh, extracting the normal and tangential components of each adjacent mesh in the corresponding boundary direction. The difference in normal components between the current mesh and the i-th adjacent mesh is calculated. and tangential component differences Then, the gradient compensation discontinuity metric is calculated. Where N is the number of adjacent grid cells. These are the weighting coefficients for the tangential components.

[0098] Based on the mesh's geometric feature type and gradient compensation discontinuity metric Calculate the adaptive scaling factor For edge feature meshes, gradient compensation needs to maintain continuity along the edge direction. (Setting...) ,in For corner feature meshes, gradient jumps are allowed; set... For planar feature meshes, gradient compensation should be fully utilized, and settings should be configured accordingly. For curved surface transition regions, linear interpolation is used to determine the scaling factor. Finally, an adaptive scaling factor is applied. With the initial gradient compensation amount Multiplying them together yields the adaptively adjusted gradient compensation amount. This is used for subsequent correction operations on the fitted surface parameters.

[0099] Based on the corrected fitted surface parameters, the deviation between each point in the point cloud data and its corresponding mesh fitted surface is calculated, including:

[0100] Generate a fitting surface based on the corrected fitting surface parameters, and calculate the shortest distance from each point in the point cloud data to the fitting surface as the initial deviation value.

[0101] Determine the normal vector of the fitted surface at the position corresponding to the shortest distance, calculate the angle deviation between the line vector connecting each point in the point cloud data to the position corresponding to the shortest distance and the normal vector, and correct the initial deviation value according to the angle deviation to obtain the direction adjustment deviation value.

[0102] Generate adjacent fitted surfaces based on the corrected fitted surface parameters of the adjacent grids to which each point belongs in the point cloud data, and calculate the distance from each point in the point cloud data to the adjacent fitted surfaces.

[0103] By comparing the orientation adjustment deviation value with the distance from each point in the point cloud data to the adjacent fitted surface, abnormal deviation jumps at the grid boundary are identified. When the abnormal deviation jump exceeds the preset jump threshold, the orientation adjustment deviation value is smoothed, and the smoothed orientation adjustment deviation value is used as the deviation value between each point in the point cloud data and its corresponding grid fitted surface.

[0104] When calculating the deviation between each point in point cloud data and its corresponding mesh fitted surface, it is necessary to comprehensively consider distance features, orientation features, and the continuity features of the mesh boundary. The corrected fitted surface parameters can be represented as a quadratic surface, with the local geometry described by a parameter matrix. The 3D coordinates of the i-th point within the mesh are substituted into the fitted surface equation, and the shortest distance is calculated using the orthogonal projection method from the point to the surface. The absolute value of this distance is used as the initial deviation value. During calculation, the position of the projection point is searched for through iterative optimization, ensuring that the line connecting the projection point to the original point is perpendicular to the tangent plane of the surface at that position. The iteration termination condition is set to a change in projection position of less than 0.01 mm or an iteration count exceeding 20.

[0105] After determining the projection position corresponding to the shortest distance, the normal vector of the fitted surface at that position is extracted. The normal vector is obtained by taking the partial derivative of the fitted surface equation. The gradient vector at that point is calculated and normalized. A line vector is constructed connecting the projection point to the original point, and the cosine of the angle between this line vector and the normal vector is calculated. Ideally, the shortest distance line should be parallel to the normal vector, and the cosine of the angle should be close to 1. When the angle deviates significantly, it indicates that the initial deviation value may have a directional error. The deviation is defined as 1 minus the absolute value of the cosine of the angle. When the deviation is greater than 0.15, the initial deviation value is adjusted. The directional adjustment deviation value is obtained by multiplying the initial deviation value by a deviation correction coefficient. The correction coefficient is designed as the reciprocal function of the deviation to ensure that the larger the deviation, the more significant the correction.

[0106] To address the continuity issue in deviation calculations at grid boundaries, neighboring grids of the current point are identified. These neighboring grids typically consist of 4 or 8 grid cells sharing boundaries or vertices. The corrected fitted surface parameters corresponding to the neighboring grids are extracted, and adjacent fitted surfaces are constructed. The perpendicular distance from the current point to each adjacent fitted surface is calculated using the same projection method as the main grid. The average distance from the current point to the adjacent surfaces is statistically analyzed, and the absolute value of the difference between the orientation adjustment deviation and this average value is calculated. When the absolute value of the difference exceeds a preset jump threshold, it is considered an abnormal deviation jump at the grid boundary. The jump threshold is adaptively set based on the overall point cloud density, typically ranging from 8% to 12% of the grid size.

[0107] When an abrupt change is detected, a smoothing mechanism is activated. This smoothing employs a weighted fusion strategy, linearly combining the orientation adjustment deviation value with the average distance to adjacent surfaces using weighted coefficients. These weighted coefficients are dynamically adjusted based on the distance from the current point to the grid center; adjacent surfaces closer to the grid boundary have higher weights, with the weight ratio fluctuating between 0.3 and 0.7. For points near grid vertices, the influence of multiple adjacent grids is considered, and a distance-inverse weighted average method is used to fuse multiple deviation values. The smoothed deviation value is used as the final output, ensuring a smooth transition in deviation calculations within the grid boundary region and avoiding the impact of artificial discontinuities introduced by grid division on the accuracy of subsequent filtering judgments.

[0108] Calculate local curvature features based on the corrected fitted surface parameters, and determine the filtering threshold based on the deviation value and the local curvature features, including:

[0109] Calculate the spatial curvature distribution of the fitted surface based on the corrected fitted surface parameters corresponding to each grid.

[0110] Calculate the curvature change gradient of the spatial curvature distribution of the fitted surface in different spatial directions, and determine the local curvature characteristics based on the amplitude distribution of the curvature change gradient;

[0111] Calculate the statistical distribution characteristics of the deviation values ​​of each point in the point cloud data, and determine the initial filtering threshold based on the statistical distribution characteristics of the deviation values;

[0112] The threshold adjustment coefficient is determined based on the curvature fluctuation intensity index, and the filtered threshold after curvature adjustment is determined based on the threshold adjustment coefficient and the initial filtered threshold.

[0113] For each grid, the correlation measure between the distribution of deviation values ​​of point cloud data within the grid and the curvature fluctuation intensity index is calculated, and the grids that are deviation curvature anomalies are determined based on the correlation measure.

[0114] The local correction amount is determined based on the correlation metric of the abnormal curvature region, and the local correction amount is superimposed on the curvature-adjusted filter threshold to obtain the adaptively adjusted filter threshold.

[0115] The spatial curvature distribution of the fitted surface is calculated based on the corrected fitted surface parameters corresponding to each grid. When the fitted surface is represented by a second-order polynomial, the curvature information is obtained by calculating the second-order partial derivatives of the surface equation. Specifically, for the fitted surface of grid i... Calculate its second-order partial derivatives. , , Then calculate the principal curvature. and The average curvature and Gaussian curvature within the grid are obtained as a representation of the spatial curvature distribution.

[0116] Calculate the curvature gradient of the fitted surface in the x and y directions. In the x direction, calculate the curvature difference between adjacent grids and divide it by the grid spacing to obtain the rate of curvature change; calculate the same method in the y direction. For grid i, its curvature gradient in the x direction is: The curvature gradient in the y-direction is Where K represents the mean curvature, and The grid size is specified. The magnitude of the curvature change gradient is calculated as the square root of the sum of the squares of the gradients in two directions. The maximum value, mean, and standard deviation of this magnitude within the grid range are used as quantitative indicators of the local curvature characteristics.

[0117] Calculate the statistical distribution characteristics of the deviation values ​​of each point in the point cloud data. Sort the deviation values ​​of all points according to their absolute values ​​and calculate the mean of the deviation values. and standard deviation .use The criteria determine the initial filtering threshold, i.e. The coefficient k ranges from 2.5 to 3.5 and is adjusted according to the overall noise level of the point cloud. For high-noise point clouds, a smaller value of k is used to enhance the filtering strength; for low-noise point clouds, a larger value of k is used to avoid over-filtering.

[0118] The threshold adjustment coefficient is determined based on the curvature fluctuation intensity index. The curvature fluctuation intensity is defined as the ratio of the standard deviation to the mean of the curvature gradient amplitude. When the curvature fluctuation intensity is less than 0.3, it indicates a gentle surface change; the threshold adjustment coefficient is set to 0.8 to 0.9, appropriately lowering the filtering threshold to remove more noise points. When the curvature fluctuation intensity is between 0.3 and 0.7, the threshold adjustment coefficient is set to 1.0, maintaining the initial threshold. When the curvature fluctuation intensity is greater than 0.7, it indicates the presence of abrupt surface changes; the threshold adjustment coefficient is set to 1.2 to 1.5, increasing the filtering threshold to avoid misclassifying true feature points as noise. The calculated curvature-adjusted filtering threshold is... ,in This is the threshold adjustment coefficient.

[0119] For each grid, the correlation between the distribution of point cloud deviation values ​​and the curvature fluctuation intensity index is calculated. For grid i, the standard deviation of the deviation values ​​of its internal points is statistically analyzed. With the intensity of the grid curvature fluctuation Calculate the Pearson correlation coefficient between the two. When the absolute value of the correlation coefficient is greater than 0.6 and the standard deviation of the deviation value exceeds 1.5 times the global standard deviation, the mesh is marked as a region of abnormal curvature. Such regions typically correspond to special locations such as scan occlusion, reflection anomalies, or object edges.

[0120] The local correction amount is determined based on the correlation metric of the deviation curvature anomaly region. For the anomaly region mesh, the local correction amount is calculated as follows: ,in This is a correction factor, ranging from 0.5 to 1.0, determined based on the strength of the correlation coefficient. A higher correlation coefficient generally indicates a stronger correlation. The larger the value, the more adaptive the adjusted filter threshold becomes. This local correction is then superimposed onto the curvature-adjusted filter threshold to obtain the adaptively adjusted filter threshold for the mesh in the anomalous region. For non-abnormal region meshes, directly use... As the final filtering threshold, it enables differentiated threshold configuration for different regions.

[0121] Calculate the curvature variation gradient of the spatial curvature distribution of the fitted surface in different spatial directions, and determine the local curvature characteristics based on the amplitude distribution of the curvature variation gradient, including:

[0122] Multiple spatial direction sampling paths are determined on the fitted surface, and a sequence of curvature values ​​is extracted from the spatial curvature distribution along each spatial direction sampling path;

[0123] Calculate the difference between adjacent curvature values ​​in the curvature value sequence, and use the difference as the curvature change gradient in the direction corresponding to the spatial sampling path;

[0124] Based on the curvature change gradients corresponding to the sampling paths in all spatial directions, determine the curvature change anisotropy measure corresponding to the curvature change gradients.

[0125] For a target region in the spatial curvature distribution that meets the preset curvature value condition, the curvature change gradient within the target region is extracted and aggregated for analysis. The distribution concentration of the curvature change gradient in space is calculated. The curvature change anisotropy measure and the distribution concentration are combined to obtain a comprehensive curvature fluctuation index.

[0126] The degree of surface change is determined based on the comprehensive index of curvature fluctuation and the peak position of the spatial curvature distribution. The comprehensive index of curvature fluctuation and the degree of surface change are used together as local curvature features.

[0127] After obtaining the corrected parameters of the fitted surface, local curvature features need to be extracted to assist in determining the filtering threshold. By calculating the curvature gradient of the fitted surface in different directions in space, the geometric complexity features of the surface can be captured.

[0128] Spatial directional sampling paths are established on the fitted surface, with the number of sampling paths set to 8 to 16, corresponding to uniformly distributed direction angles within the range of 0° to 360°. Curvature values ​​are extracted along each sampling path at intervals of 0.05 to 0.1 times the grid size, forming a curvature value sequence. The curvature values ​​are calculated using the second derivative of the fitted surface parameters, specifically using the rate of change of the surface normal vector to characterize the degree of local curvature.

[0129] Perform a difference operation on the extracted curvature value sequence to calculate adjacent curvature values. and The difference between This difference component reflects the rate of curvature change along the sampling path direction, serving as the curvature change gradient in that direction. This operation is repeated for all sampling paths to obtain a set of curvature change gradients covering multiple spatial directions.

[0130] Based on the magnitude differences of curvature change gradients in different directions, an anisotropy measure of curvature change is calculated. The ratio of the standard deviation to the mean of the gradient magnitude in each direction is used as the anisotropy index. The larger the value of this index, the more significant the difference in the variation characteristics of the surface in different directions. The anisotropy measure can identify the dominant change direction of the surface and distinguish between the surface characteristics of uniform curvature and directional change.

[0131] The preset curvature value condition includes a curvature value in the spatial curvature distribution that exceeds the overall average by more than 1.5 times. Regions meeting this preset curvature value condition are designated as target regions. Curvature change gradients within these target regions are extracted and aggregated for analysis. The spatial distribution density of these gradients is calculated, and the spatial clustering density of the gradient vectors is used to assess the distribution concentration. The distribution concentration is determined by calculating the mean of the cosine values ​​of the angles between gradient vectors; a value close to 1 indicates a high degree of consistency in gradient directions and high distribution concentration.

[0132] By weighting and combining the anisotropy measure of curvature variation with the distribution concentration, and setting the weighting coefficients to 0.6 and 0.4 respectively, a comprehensive curvature fluctuation index is obtained. This index comprehensively reflects the geometric complexity and the concentration of variation of the surface. At the same time, the peak positions of the spatial curvature distribution are identified, and the number of peaks and the curvature amplitude at the peaks are statistically analyzed.

[0133] Based on the numerical range of the curvature fluctuation comprehensive index and combined with peak characteristics, the degree of surface change is divided into three levels: when the comprehensive index is less than 0.3 and the number of peaks does not exceed 2, it is judged as a smooth change level; when the comprehensive index is between 0.3 and 0.7 or the number of peaks is between 3 and 5, it is judged as a moderate change level; when the comprehensive index is greater than 0.7 or the number of peaks exceeds 5, it is judged as a drastic change level. The value of the curvature fluctuation comprehensive index and the surface change degree level label are used together as the local curvature feature output for the adaptive determination of the subsequent filtering threshold.

[0134] A third aspect of the present invention provides an electronic device, comprising:

[0135] processor;

[0136] Memory used to store processor-executable instructions;

[0137] The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.

[0138] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.

[0139] This invention can be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the invention.

[0140] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. An adaptive mesh fitting point cloud filtering method based on gradient compensation, characterized in that, include: The point cloud data to be processed is acquired, and the point cloud data is divided into grids according to the local density distribution characteristics in space. Local surface fitting is performed on the point cloud data in each grid to obtain the fitting surface parameters corresponding to each grid. The gradient change of each grid is calculated, and the gradient compensation amount is determined by the gradient continuity constraint and surface smoothness constraint between adjacent grids. The fitted surface parameters are then corrected using the gradient compensation amount to obtain the corrected fitted surface parameters. Based on the corrected fitting surface parameters, calculate the deviation between each point in the point cloud data and its corresponding mesh fitting surface; The local curvature features are calculated based on the corrected fitted surface parameters, and the filtering threshold is determined based on the deviation value and the local curvature features. The point cloud data is classified according to the filtering threshold. Points with deviation values ​​exceeding the filtering threshold are marked as noise points and removed. The remaining points are retained as filtered point cloud data and output. The gradient change of each grid is calculated, and the gradient compensation amount is determined by the gradient continuity constraint and surface smoothness constraint between adjacent grids. The gradient compensation amount is then used to correct the fitted surface parameters to obtain the corrected fitted surface parameters, including: For each grid, the surface gradient vector of the grid is calculated based on the fitted surface parameters corresponding to the grid. The adjacent grids of the grid are determined and the surface gradient vectors of the adjacent grids are calculated. Calculate the gradient change between the surface gradient vector of the mesh and the surface gradient vector of the adjacent mesh, and perform spatial weighted accumulation of multiple gradient changes of the mesh to obtain the total gradient change of the mesh; The surface distortion metric of the mesh is calculated based on the fitted surface parameters corresponding to the mesh, and the preliminary gradient compensation amount is determined based on the surface distortion metric and the total gradient change. The initial gradient compensation amount is adaptively scaled according to the geometric feature type corresponding to the grid in the point cloud data to obtain the adaptively adjusted gradient compensation amount. For each grid, the adaptively adjusted gradient compensation amount is superimposed on the surface gradient vector of the grid, and the fitting surface parameters corresponding to the grid are updated in reverse according to the superimposed surface gradient vector to obtain the corrected fitting surface parameters. The step of calculating local curvature features based on the corrected fitted surface parameters and determining a filtering threshold based on the deviation value and the local curvature features includes: Calculate the spatial curvature distribution of the fitted surface based on the corrected fitted surface parameters corresponding to each grid. Calculate the curvature change gradient of the spatial curvature distribution of the fitted surface in different spatial directions, and determine the local curvature characteristics based on the amplitude distribution of the curvature change gradient; Calculate the statistical distribution characteristics of the deviation values ​​of each point in the point cloud data, and determine the initial filtering threshold based on the statistical distribution characteristics of the deviation values; The threshold adjustment coefficient is determined based on the curvature fluctuation intensity index, and the filtered threshold after curvature adjustment is determined based on the threshold adjustment coefficient and the initial filtered threshold. For each grid, the correlation measure between the distribution of deviation values ​​of point cloud data within the grid and the curvature fluctuation intensity index is calculated, and the grids that are deviation curvature anomalies are determined based on the correlation measure. The local correction amount is determined based on the correlation metric of the abnormal curvature region, and the local correction amount is superimposed on the curvature-adjusted filter threshold to obtain the adaptively adjusted filter threshold.

2. The method according to claim 1, characterized in that, The process involves acquiring point cloud data to be processed, dividing the point cloud data into grids based on the local density distribution characteristics in space, performing local surface fitting on the point cloud data within each grid, and obtaining the fitted surface parameters corresponding to each grid, including: The local density value of each point in the point cloud data is determined based on the number of neighboring points of each point within a preset neighborhood range. Spatial distribution analysis is performed on all local density values ​​of the point cloud data. The grid boundary is determined based on the gradient change direction of the local density values ​​in space, and the grid is divided based on the grid boundary. For each grid, extract the point cloud data within the grid and the point cloud data at the boundary of the adjacent grid, and use the point cloud data within the grid and the point cloud data at the boundary of the adjacent grid as a fitting dataset. The spatial coordinate information of the point cloud data in the fitting dataset is transformed into the local coordinate system corresponding to the grid to obtain the surface fitting relationship. The surface fitting relationship is solved by minimizing the distance residual from each point in the fitting dataset to the surface to be fitted, and the fitting surface parameters corresponding to each grid are obtained.

3. The method according to claim 1, characterized in that, The initial gradient compensation amount is adaptively scaled according to the geometric feature type corresponding to the mesh in the point cloud data to obtain the adaptively adjusted gradient compensation amount, including: Calculate the principal curvature and secondary curvature of the fitted surface corresponding to each grid based on the fitted surface parameters corresponding to each grid, and determine the curvature tensor matrix based on the directional and numerical distributions of the principal curvature and secondary curvature in space; The curvature tensor matrix is ​​subjected to singular value decomposition to obtain multiple singular value components. Based on the ratio relationship between the multiple singular value components, the geometric feature type corresponding to the mesh is determined. For the mesh, calculate the component projections of the initial gradient compensation amount of the mesh in the normal direction and the tangential direction of the mesh boundary, extract the initial gradient compensation amount of the adjacent mesh, and calculate the component projections of the initial gradient compensation amount of the adjacent mesh in the corresponding boundary direction. The gradient compensation discontinuity metric is determined based on the component projection difference between the grid and the adjacent grid. An adaptive scaling factor is determined based on the geometric feature type and the gradient compensation discontinuity measure. Based on the adaptive scaling factor and the initial gradient compensation amount, an adaptively adjusted gradient compensation amount is obtained.

4. The method according to claim 1, characterized in that, Based on the corrected fitted surface parameters, the deviation between each point in the point cloud data and its corresponding mesh fitted surface is calculated, including: Generate a fitting surface based on the corrected fitting surface parameters, and calculate the shortest distance from each point in the point cloud data to the fitting surface as the initial deviation value. Determine the normal vector of the fitted surface at the position corresponding to the shortest distance, calculate the angle deviation between the line vector connecting each point in the point cloud data to the position corresponding to the shortest distance and the normal vector, and correct the initial deviation value according to the angle deviation to obtain the direction adjustment deviation value. Generate adjacent fitted surfaces based on the corrected fitted surface parameters corresponding to the adjacent grids of the grid to which each point belongs in the point cloud data, and calculate the distance from each point in the point cloud data to the adjacent fitted surfaces. By comparing the orientation adjustment deviation value with the distance from each point in the point cloud data to the adjacent fitted surface, abnormal deviation jumps at the grid boundary are identified. When the abnormal deviation jump exceeds the preset jump threshold, the orientation adjustment deviation value is smoothed, and the smoothed orientation adjustment deviation value is used as the deviation value between each point in the point cloud data and its corresponding grid fitted surface.

5. The method according to claim 1, characterized in that, Calculate the curvature variation gradient of the spatial curvature distribution of the fitted surface in different spatial directions, and determine the local curvature characteristics based on the amplitude distribution of the curvature variation gradient, including: Multiple spatial direction sampling paths are determined on the fitted surface, and a sequence of curvature values ​​is extracted from the spatial curvature distribution along each spatial direction sampling path; Calculate the difference between adjacent curvature values ​​in the curvature value sequence, and use the difference as the curvature change gradient in the direction corresponding to the spatial sampling path; Based on the curvature change gradients corresponding to the sampling paths in all spatial directions, determine the curvature change anisotropy measure corresponding to the curvature change gradients. For a target region in the spatial curvature distribution where the curvature value meets the preset curvature value condition, the curvature change gradient within the target region is extracted and aggregated for analysis. The distribution concentration of the curvature change gradient in space is calculated. The curvature change anisotropy measure and the distribution concentration are combined to obtain a comprehensive curvature fluctuation index. The degree of surface change is determined based on the comprehensive index of curvature fluctuation and the peak position of the spatial curvature distribution. The comprehensive index of curvature fluctuation and the degree of surface change are used together as local curvature features.

6. An adaptive mesh fitting point cloud filtering system based on gradient compensation, used to implement the method as described in any one of claims 1-5, characterized in that it comprises: The grid division unit is used to acquire the point cloud data to be processed. The grid is divided according to the local density distribution characteristics of the point cloud data in space. Local surface fitting is performed on the point cloud data in each grid to obtain the fitting surface parameters corresponding to each grid. The surface fitting unit is used to calculate the gradient change of each grid. The gradient compensation amount is determined by the gradient continuity constraint and surface smoothness constraint between adjacent grids. The fitted surface parameters are corrected using the gradient compensation amount to obtain the corrected fitted surface parameters. The parameter correction unit is used to calculate the deviation between each point in the point cloud data and its corresponding mesh fitting surface based on the corrected fitting surface parameters. The deviation calculation unit is used to calculate local curvature features based on the corrected fitted surface parameters, and to determine a filtering threshold based on the deviation value and the local curvature features. The threshold determination unit is used to classify the point cloud data according to the filtering threshold, mark points whose deviation values ​​exceed the filtering threshold as noise points and remove them, and retain the remaining points as filtered point cloud data and output them.

7. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 5.