A point cloud segmentation method based on geometric prior and multi-dimensional similarity measure
By combining geometric priors and multidimensional similarity metrics, the label leakage problem in adjacent faces, chamfers, and rounded corners in point cloud segmentation is solved, resulting in more stable segmentation boundaries and noise resistance, and improving the accuracy and robustness of the segmentation results.
Patent Information
- Application Number
- CN202611377135.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-07
- Publication Date
- 2026-11-24
AI Technical Summary
Existing CAD-guided point cloud segmentation methods suffer from label leakage issues in adjacent faces, chamfered corners, and rounded corners, leading to unstable segmentation boundaries and an inability to effectively utilize local neighborhood distribution information and CAD topology information.
A point cloud segmentation method based on geometric prior and multidimensional similarity measurement is adopted. By estimating the local covariance matrix, Mahalanobis distance, continuous normal inconsistency, Log-Euclidean covariance shape distance and parameter domain edge penalty, combined with comprehensive scoring and robust post-processing, the boundary stability of the segmentation results is improved.
It effectively reduces label leakage in adjacent faces, chamfers, and rounded corners, improves the boundary stability and noise resistance of the segmentation results, and enhances the robustness of the segmentation results.
Smart Images

Figure CN123160885A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of industrial 3D measurement and point cloud processing technology, specifically involving a method for faceting and segmenting a registered point cloud using CAD geometric priors, local covariance morphology, and parameter domain topological constraints. Background Technology
[0002] In precision manufacturing, in-machine inspection, and reverse engineering, the point cloud of a workpiece acquired by 3D scanning equipment typically needs to be segmented according to the design surfaces in the CAD model in order to calculate flatness, cylindricity, profile, or dimensional deviations separately. For industrial parts containing a large number of adjacent planes, cylindrical surfaces, chamfers, and fillets, the stability of the segmentation boundaries directly affects the subsequent measurement results.
[0003] Existing CAD-guided point cloud segmentation methods typically first filter candidate points step-by-step based on axis-aligned bounding boxes, Euclidean distance from points to faces, point normal angles, and parameter domain ranges. Points that simultaneously satisfy multiple face conditions are then assigned to the face with the smallest Euclidean distance. While this method is simple to implement, it assumes that the Euclidean distance has the same uncertainty in all directions, failing to reflect the directional correlation measurement characteristics of structured light scanning in the normal and tangential directions.
[0004] In transitional regions such as the boundaries between adjacent faces, chamfers, and rounded corners, the same point may simultaneously pass through the distance and normal thresholds of multiple faces. Hard thresholding only provides a binary judgment of whether a point passes or fails, and cannot preserve the continuous differences in the degree of normal alignment. At the same time, the center point of a face and the point immediately adjacent to the boundary of the parameter domain have the same weight in traditional competition, which can easily lead to leakage where face labels cross the true boundary.
[0005] Furthermore, the local neighborhood distribution of a point contains morphological information that can distinguish between the center of a plane, the interior of a curved surface, and the transition zone between multiple surfaces. Traditional methods do not compare the local covariance of a point with the theoretical covariance of a CAD surface, thus lacking additional criteria for distinguishing candidate surfaces with similar geometric distances or normals. Therefore, a continuous scoring segmentation method that can integrate position, orientation, local morphology, and CAD topology information is needed. Summary of the Invention
[0006] The purpose of this invention is to overcome the problem that single Euclidean distance competition and cascaded hard threshold judgment are insufficient in the discrimination ability of surface boundary regions, and to provide a point cloud segmentation method based on geometric prior and multidimensional similarity measurement, so as to reduce label leakage of adjacent surfaces, chamfers and rounded corners, and improve the boundary stability and noise resistance of the segmentation results.
[0007] To achieve the above objectives, the present invention adopts the following technical solution: a point cloud segmentation method based on geometric prior and multidimensional similarity measurement, comprising the following steps.
[0008] Step S100: Data Acquisition and Coordinate Unification. Acquire the point cloud to be segmented, containing point coordinates and point normals, and the CAD boundary representation model containing multiple analytical geometric surfaces and their parameter domain boundaries; ensure that the point cloud to be segmented and the CAD model are in the same coordinate system through rigid body registration.
[0009] Step S200: Local statistics and CAD prior calculation. For each point in the point cloud, search for k nearest neighbors, estimate the local covariance matrix of the point and add a regularization term; for each CAD surface, construct the theoretical anisotropic covariance matrix according to the surface type and local orientation, extract and sample the parameter domain boundary, and establish the nearest neighbor search structure of the boundary sample points.
[0010] Step S300: Candidate point faces are generated. For each CAD face, spatial bounding box filtering, geometric distance filtering, relaxed normal threshold filtering, and parameter domain filtering are performed sequentially to exclude points that are clearly irrelevant to the face and retain candidate points with competitive potential. The filtering is used to limit the calculation range and is not used as the final ranking criterion among candidate faces.
[0011] Step S400: Calculate multi-dimensional continuous features. For each candidate point face, calculate the Mahalanobis distance, continuous normal inconsistency, Log-Euclidean covariance shape distance, and edge proximity penalty.
[0012] Step S500: Comprehensive scoring and point-to-surface competition. A weighted combination of the four continuous features is applied; for the same point, its comprehensive similarity score relative to all candidate surfaces is compared, and the candidate surface with the lowest score is determined as the initial surface label for that point.
[0013] Step S600, Robust Post-processing. Calculate the comprehensive similarity score of assigned points based on their faces, and use a robust scale based on median absolute deviation to identify abnormally high-scoring points, setting them to an unassigned state.
[0014] Step S700: Output the results. Based on the final face labels, generate a faceted point cloud, a label array, and segmentation statistics for use in dimension inspection, form and position error assessment, or visualization.
[0015] point The local covariance is denoted as CAD surface At the corresponding point The theoretical covariance at the location is denoted as Point-to-surface residuals The joint covariance is:
[0016] The Mahalanobis distance is:
[0017] in person When it is a plane, let its unit normal be... The theoretical covariance adopts an anisotropic model with high sensitivity in the normal direction and high tolerance in the tangential direction: ,and
[0018] in person When the surface is cylindrical, let It is a unit vector along the axis. Let be the radial unit vector at the corresponding point. For a tangential unit vector, the theoretical covariance is: ,and
[0019] The normal direction of a point is denoted as The unit normal of the surface at the corresponding point is denoted as Continuous normal inconsistency is defined as:
[0020] The score is 0 when the normals are perfectly aligned, and increases continuously as the deviation from the normals increases, thus preserving the directional differences that still exist after hard thresholding.
[0021] To reduce the influence of absolute scaling by comparing only the anisotropic shapes of the covariances, trace normalization is performed on any positive definite covariance matrix C:
[0022] After normalization, the Log-Euclidean covariance shape distance between the local covariance at a point and the theoretical covariance of the surface is:
[0023] Matrix logarithms are calculated through eigenvalue decomposition of symmetric positive definite matrices. The local neighborhood of a plane center point is usually a thin sheet compressed along the normal, while the local neighborhood of a cylindrical point extends along the axial and tangential directions, and the neighborhood of a boundary or transition zone is affected by multiple surfaces; therefore, covariance shape distance can provide local structural discrimination information beyond geometric distance and normal.
[0024] Project the candidate points onto the surface parameter domain and calculate their distances to the nearest parameter domain boundary. Let the effective width of the edge penalty be... The edge proximity penalty is defined as:
[0025] The penalty is 1 when the candidate point is located on the boundary of the parameter domain; the penalty is 1 when the boundary distance is not less than 1. The time penalty is 0. For a plane, the boundary edges can be projected onto a local two-dimensional coordinate system and spaced according to the interval. Sampling is performed by querying the nearest boundary sample using a KD-tree; for cylindrical surfaces, the shortest axial distance can be calculated based on the axial parameters and the upper and lower boundaries.
[0026] When the shortest feature size of the face is less than In some cases, the edge penalty region may cover most of the face; when the boundary of a coplanar subface is generated solely by CAD topology splitting, the boundary does not correspond to a true geometric abrupt change. To address these issues, the edge proximity penalty of the corresponding face is set to zero to avoid causing systematic disadvantages to facets or coplanar subfaces.
[0027] The comprehensive similarity score based on the four features is as follows:
[0028] in , , and The weights are non-negative. For a point... The set of candidate faces filtered through step S300 is denoted as Its initial face label is determined according to the following formula:
[0029] Assigned to face Calculate the median of the rating set and median absolute deviation And define robustness metrics:
[0030] when At that time, the point Marked as unassigned points. Used to avoid excessive culling when MAD is close to zero. The preferred values are 2 to 4.
[0031] Compared with existing methods, the present invention has at least the following advantages: First, it uses Mahalanobis distance under joint covariance to express the directional correlation of measurement uncertainty; second, it replaces the competitive method that only relies on hard thresholds of normal with continuous normal scores; third, it introduces local differential structure information through shape distance of Log-Euclidean covariance; fourth, it directly uses CAD topological priors for boundary decision by penalizing the proximity of parameter domain edges; and fifth, it uses MAD robust post-processing to reduce the impact of high-scoring outliers on the results. Attached Figure Description
[0032] Figure 1 This is a flowchart illustrating the overall process of the point cloud segmentation method of the present invention.
[0033] Figure 2 This is a flowchart illustrating the process of generating candidate point-surface combinations according to the present invention.
[0034] Figure 3 This is a diagram illustrating the four-dimensional similarity score of this invention.
[0035] Figure 4 This is a schematic diagram of the anisotropic covariance of the planar and cylindrical surface theories of this invention.
[0036] Figure 5 This is a schematic diagram of parameter domain boundary sampling and edge proximity penalty in this invention.
[0037] Figure 6 This is a flowchart of the point-to-surface competition and MAD robust outlier removal process of the present invention. Detailed Implementation
[0038] The present invention will be further described below with reference to the accompanying drawings and embodiments. It should be understood that the embodiments are for illustrating the present invention and not for limiting the scope of protection; equivalent substitutions for face type, nearest neighbor search method, weight, and threshold can be made without departing from the concept of the present invention.
[0039] The inputs for this embodiment include a STEP format CAD model, surface attribute data for identifying the surface to be measured, and a PLY format registered point cloud. Both the point cloud and the CAD model use millimeters as the unified unit of length. The point cloud contains the three-dimensional coordinates and unit normal of each point. After triangulation, the CAD model retains the identifiers of the original faces to which the triangles belong, and the geometric parameters of the planar and cylindrical surfaces are resolved from the boundary representation.
[0040] like Figure 1 As shown, the process first loads the point cloud and CAD surface information, then sequentially executes local covariance estimation, CAD surface prior construction, candidate filtering, four-dimensional scoring, point-by-point competition, MAD post-processing, and surface-by-surface output. The optimal score for each point is initialized to positive infinity, and the optimal surface label is initialized to unassigned.
[0041] In the local covariance estimation stage, 15 nearest neighbor points are queried for each point, the sample covariance of the neighborhood coordinates relative to the neighborhood centroid is calculated, and a regularization term of 0.1I is added. The value of k can be selected between 10 and 30 depending on the point density; when the point density is high, a larger k can reduce random noise, but an excessively large k will cause the neighborhood to cross the true boundary.
[0042] In the CAD surface prior construction stage, the plane uses two tangential directions and one normal direction to construct the covariance; the cylindrical surface constructs a point-by-point varying covariance based on the axial, circumferential tangential, and radial directions. In this embodiment, the standard deviation of the plane's tangential direction and the standard deviation of the cylinder's axial and tangential directions are taken as 1.0 mm, and the standard deviation of the normal or radial direction is taken as 0.1 mm.
[0043] like Figure 2 As shown, for each CAD surface, the bounding box of the surface is first extended by 5 mm along the three coordinate directions for rapid spatial clipping; the analytical geometric distance is calculated for the clipped points, with a plane distance threshold of 2.0 mm and a cylindrical surface distance threshold of 2.0 mm; then, points with an absolute value of the cosine of the included normal angle not less than 0.5 are retained, and it is checked whether the projected points are located within the effective parameter domain of the surface.
[0044] The candidate filtering threshold is set to a lenient safety threshold to exclude obviously irrelevant points and reduce computational cost. A single point can be a candidate point for multiple adjacent surfaces simultaneously; the final assignment is determined by [the relevant authority / component]. Figure 3 The four-dimensional comprehensive score shown is determined by the overall score, rather than by the order in which candidates are filtered.
[0045] For each valid candidate point, the nearest point is searched on the corresponding CAD surface discrete grid to form a point-surface residual. The local covariance of the point is added to the theoretical covariance at the nearest surface point, and the linear equation system is solved in batches to calculate the Mahalanobis distance, avoiding explicit calculation of the matrix inverse.
[0046] The inconsistency of continuous normals is directly obtained from the inner product of the point normal and the surface normal. The covariance shape distance is calculated by performing eigenvalue decomposition on two 3×3 symmetric positive definite matrices, taking the logarithm of the eigenvalues, and reconstructing the matrix logarithm to calculate the Frobenius norm. To ensure numerical stability, the eigenvalues are restricted to the minimum positive value.
[0047] like Figure 5 As shown, the boundary of the planar parameter domain consists of mesh edges belonging to only one triangle. The boundary edges are projected onto the local 2D coordinate system of the surface, and boundary sample points are generated at 0.3 mm intervals to establish a KD-tree. The effective width of the edge penalty is... When the nearest boundary distance is increased from 0 to 3.0 mm, the edge proximity penalty decreases linearly from 1 to 0.
[0048] This embodiment adopts , , , After calculating the comprehensive score for each candidate face, the best face label and best score are updated only if the current score is less than the best score recorded for that point. This allows us to obtain the global point-by-point competition result after traversing all candidate faces.
[0049] like Figure 6 As shown, after the point-by-point competition ends, MAD post-processing is performed on a face-by-face basis. In this embodiment... Take 0.05, 3 is selected; points with scores higher than the median score plus three times the robust scale are marked as unassigned to remove anomalous candidate points located in transition regions, occluded edges, or affected by strong noise.
[0050] This invention is not limited to planar and cylindrical surfaces. For conical surfaces, spherical surfaces, or other analytical surfaces with computable local tangent planes and parameter domain boundaries, theoretical anisotropic covariance can be constructed based on their local principal directions, using the same continuous normal score, covariance shape distance, edge penalty, and competitive assignment process.
[0051] This invention is not limited to specific file formats and numerical libraries. CAD models can be provided by STEP, IGES, or other boundary representation formats, and point clouds can be acquired by structured light, laser triangulation, lidar, or photogrammetry equipment; nearest neighbor search can be implemented using KD-tree, octree, or equivalent spatial index.
[0052] The above description is merely a preferred embodiment of the present invention. Any modifications, equivalent substitutions, and improvements made to the weight normalization method, penalty function shape, anomaly detection factor, or surface theory covariance parameter within the spirit and principles of the present invention shall fall within the protection scope of the present invention.
Claims
1. A point cloud segmentation method based on geometric prior and multi-dimensional similarity measure, characterized in that, Includes the following steps: Step S100: Obtain the point cloud to be segmented, which has been coordinate-registered with the CAD model. The point cloud includes point coordinates and point normals. The CAD model is a boundary representation model containing multiple geometric surfaces with parameter domain boundaries. Step S200: For each point in the point cloud to be segmented, estimate the local covariance matrix based on its neighboring points. For each geometric surface in the CAD model, construct the theoretical anisotropic covariance matrix based on the analytical geometric parameters of the geometric surface, and extract the parameter domain boundaries of the geometric surface. Step S300: For each geometric surface, determine candidate points from the point cloud to be segmented based on the bounding box, the geometric distance from the point to the geometric surface, the consistency between the point normal and the surface normal, and whether the projected point is located within the parameter domain. Step S400: For each candidate point and the corresponding geometric surface forming a candidate point-plane, calculate the local covariance matrix of the point. The following steps are used: Step S500: The Mahalanobis distance, continuous normal inconsistency, Log-Euclidean covariance shape distance between the point local covariance and the theoretical anisotropic covariance matrix, and edge proximity penalty determined based on the distance from the candidate point to the parameter domain boundary are weighted and combined to obtain a comprehensive similarity score for the candidate point faces, and each point is assigned to the geometric face with the smallest comprehensive similarity score; Step S600: For points assigned to the same geometric face, abnormally assigned points are identified and removed based on the median absolute deviation of the comprehensive similarity score; Step S700: The segmented point cloud is output according to the geometric face labels.
2. The point cloud segmentation method according to claim 1, characterized in that, In step S200, point Point local covariance matrix From point of Nearest neighbor estimation, and by adding a regularization term Keep it positive definite; candidate point On the geometric surface The corresponding point on is The residual is The Mahalanobis distance is ,in For geometric surfaces At the corresponding point The theoretical anisotropic covariance matrix at that location.
3. The point cloud segmentation method according to claim 2, characterized in that, When geometric surface When it is planar, its theoretical anisotropic covariance matrix is: ,in For the plane unit normal, For tangential standard deviation, Let be the normal standard deviation, and Greater than .
4. The point cloud segmentation method according to claim 2, characterized in that, When geometric surface When the surface is cylindrical, its theoretical anisotropic covariance matrix is: ,in Let be the unit vector along the axis of the cylinder. Let be the radial unit vector at the corresponding point. It is a tangential unit vector. , and These are the standard deviations for the axial, tangential, and radial directions, respectively. and All greater than .
5. The point cloud segmentation method according to claim 1, characterized in that, In step S400, the continuous normal inconsistency is: ,in For point unit normal, For geometric surfaces The unit normal at the corresponding point; the value range of the continuous normal inconsistency is [0,1], and the higher the degree of normal alignment, the smaller its value.
6. The point cloud segmentation method according to claim 1, characterized in that, In step S400, first follow Trace normalization is performed on the local covariance matrix at the point and the theoretical anisotropic covariance matrix respectively, and then... Calculate the Log-Euclidean covariance shape distance, its The matrix logarithm of a symmetric positive definite matrix. This represents the Frobenius norm.
7. The point cloud segmentation method according to claim 1, characterized in that, In step S400, the parameter domain boundary of the geometric surface is discretized into boundary sample points according to a preset sampling interval. A nearest neighbor search structure is established based on the boundary sample points, and the boundary distance is approximated by the distance from the parameter domain projection of the candidate point to the nearest boundary sample point. and in accordance with Determine the edge proximity penalty, where The width at which the edge penalty takes effect.
8. The point cloud segmentation method according to claim 7, characterized in that, When the feature size of the geometric surface is less than twice the effective width of the edge penalty, or when the geometric surface is a topological sub-surface coplanar with the parent surface, the edge proximity penalty of the geometric surface is set to zero; the nearest neighbor search structure is a KD-tree, and the sampling interval of the boundary sample points is less than the effective width of the edge penalty.
9. The point cloud segmentation method according to claim 1, characterized in that, In step S500, the overall similarity score is: ,in , , and The weights are non-negative. For the same point, a comprehensive similarity score is calculated for each geometric surface filtered by step S300, and the geometric surface corresponding to the minimum score is used as the surface label of that point.
10. The point cloud segmentation method according to claim 1, characterized in that, In step S600, for the geometric surface Calculate the median score from the assigned points. and median absolute deviation Make robustness standards When the overall similarity score of the points is greater than When this point is reached, it is marked as an unassigned point, where The lower limit of the positive scale. This is a preset anomaly detection factor.
