Three-dimensional model segmentation method based on non-uniform sampling strategy and hierarchical density clustering
By segmenting the 3D model using non-uniform sampling and hierarchical density clustering algorithms, the topological dependency problem of existing methods for segmenting mechanical parts models is solved, achieving a more efficient and robust segmentation effect.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-20
- Publication Date
- 2026-03-31
AI Technical Summary
Existing 3D model segmentation methods are highly dependent on the topological integrity and geometric properties of mechanical part models, which affects the segmentation quality and lacks versatility and robustness.
A non-uniform sampling strategy and hierarchical density clustering algorithm are adopted. The 3D model is transformed into a triangular mesh through triangulation. The centroid coordinates are randomly sampled and the hierarchical density clustering algorithm is used for segmentation, avoiding dependence on the topological structure and performing analysis based on geometric features.
It significantly improves the versatility and robustness of 3D model segmentation, enhances the expressive power of feature-rich regions, achieves robust partitioning of geometrically consistent regions, and reduces dependence on topological structure.
Smart Images

Figure CN121544846B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer-aided design technology, and in particular to a three-dimensional model segmentation method based on non-uniform sampling strategy and hierarchical density clustering. Background Technology
[0002] With the widespread application of computer-aided design technology in the mechanical field, a large number of 3D models are created and stored in the model databases of enterprises or organizations. Against this backdrop, the similarity retrieval and reuse of 3D models has received increasing attention, and 3D model segmentation technology, as a key component, is particularly important. Especially in local retrieval tasks, segmentation methods are often needed to decompose complex 3D models into multiple simpler sub-parts. Therefore, improving the efficiency and accuracy of 3D model retrieval largely depends on in-depth research into 3D model segmentation methods; this step plays a crucial role in achieving high-quality retrieval.
[0003] Most existing 3D model segmentation methods are designed for general-purpose 3D models. However, mechanical part models have unique characteristics compared to general-purpose 3D models: they exhibit significant shape and functional features, typically containing numerous typical manufacturing features such as bosses, holes, slots, and chamfers. Furthermore, they exhibit clear variations in surface curvature, sharp boundaries, and distinct geometric divisions between features. While some segmentation methods exist for mechanical part models, they all have certain limitations.
[0004] For example, the paper "A Model Segmentation Method for 3D CAD Model Retrieval," published in the 2017 issue of *Mechanical Science and Technology*, by Huangfu Zhongmin et al., describes a method that constructs an attribute adjacency marker graph based on B-rep information, representing each face in the CAD model as a node in the graph. The CAD model is initially segmented based on the concavity, convexity, and continuity of nodes and connections, forming local subgraphs. Subsequently, two indices, regional cohesion and regional coupling, are introduced. An optimization strategy that maximizes regional cohesion and prioritizes merging regional coupling is used to iteratively merge the initial segmentation results, ultimately yielding a clearly structured local region division to support region-level similarity matching and model retrieval.
[0005] For example, a Chinese invention patent entitled "A 3D CAD Model Segmentation Method Based on Graph Theory and Clustering", with publication number CN109241628A and publication date of January 18, 2019, states that: based on the topological information of the model, the B-rep model is transformed into an attribute adjacency graph, and an adjacency matrix is constructed; then, combined with graph theory, the 3D B-rep model is transformed into a point set with two-dimensional coordinates; subsequently, an improved K-means fast clustering algorithm is used to cluster and group the point set, thereby achieving effective segmentation of the 3D CAD model.
[0006] As can be seen, all the methods mentioned above rely on constructing the B-rep model as an attribute adjacency graph and performing 3D model segmentation operations based on the graph structure. Therefore, they are highly dependent on the topological integrity and accuracy of the geometric attributes of the 3D model. If the 3D model has topological defects or the attribute annotations of faces and edges are inaccurate, it will directly affect the construction of the graph structure and the subsequent segmentation quality.
[0007] Therefore, it is necessary to propose a solution to improve one or more problems existing in the above-mentioned related technical solutions.
[0008] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0009] This application provides a 3D model segmentation method based on a non-uniform sampling strategy and hierarchical density clustering, which includes the following steps:
[0010] use The triangulation method transforms the parametric surfaces corresponding to all faces in the 3D model into corresponding triangular meshes, and all triangular meshes form a 3D mesh model.
[0011] Calculate the geometric complexity of the 3D model, and use the geometric complexity of the 3D model to determine the number of sampling points on each triangular mesh;
[0012] Based on the number of sampling points on each triangular mesh, and using a random sampling method based on the centroid coordinates, non-uniform sampling is performed on the 3D mesh model to obtain a set of sampling points;
[0013] The 3D model is automatically segmented based on the set of sampling points and using a hierarchical density clustering algorithm.
[0014] Furthermore, utilizing The triangulation method transforms the parametric surfaces corresponding to all faces in the 3D model into corresponding triangular meshes. The steps for assembling the 3D mesh model from all triangular meshes include:
[0015] Obtain the parametric surface corresponding to each face in the 3D model, and determine the parameter domain of each parametric surface.
[0016] Sampling is performed in the parameter domain of each parametric surface to obtain the corresponding set of parameter points. Each set of parameter points contains multiple parameter points, and the coordinates of the parameter points are represented as follows: , Indicates the first The set of parameter points corresponding to the i-th parameter surface The x-coordinates of the parameter points Indicates the first The set of parameter points corresponding to the i-th parameter surface The ordinates of the parameter points;
[0017] In the parameter domain of each parametric surface, the corresponding set of parameter points is processed respectively. Triangulation yields a set of triangle structures corresponding to each parametric surface. Each set of triangle structures contains multiple triangle structures, and each triangle structure contains 3 parameter points.
[0018] Substitute all parameter points in the parameter domain of each parametric surface into the surface mapping function to obtain the set of mesh vertices corresponding to each parametric surface. Each set of mesh vertices contains multiple mesh vertices, and each mesh vertex corresponds to a parameter point. Based on the correspondence between mesh vertices and parameter points, a triangular mesh corresponding to each parametric surface is formed.
[0019] All the triangular meshes are combined into a three-dimensional mesh model.
[0020] Furthermore, the expression for the mesh vertices is:
[0021] (1)
[0022] in, Indicates the first The set of parameter points corresponding to the i-th parameter surface The grid vertices corresponding to the parameter points Indicates the first The set of parameter points corresponding to the i-th parameter surface The surface mapping function corresponding to each parameter point;
[0023] The expression for the unit normal vector of the mesh vertex is:
[0024] (2)
[0025] in, Indicates the first The set of parameter points corresponding to the i-th parameter surface The unit normal vector of the mesh vertex corresponding to each parameter point. Indicates the first The set of parameter points corresponding to the i-th parameter surface The first-order partial derivatives of the surface mapping function corresponding to each parameter point in the horizontal direction. Indicates the first The set of parameter points corresponding to the i-th parameter surface The first-order partial derivatives of the surface mapping function corresponding to each parameter point in the ordinate direction. It represents the absolute value.
[0026] Furthermore, the steps of calculating the geometric complexity of the 3D model and determining the number of sampling points on each triangular mesh using the geometric complexity of the 3D model include:
[0027] Calculate the volume ratio of the 3D model;
[0028] Calculate the cube ratio of a 3D model;
[0029] Calculate the geometric complexity of a 3D model using volume ratio and cube ratio;
[0030] The expression for the geometric complexity of a 3D model is:
[0031] (3)
[0032] in, Represents the geometric complexity of a 3D model. This represents the volume ratio of a 3D model. , Represents the volume of a 3D model. The volume of the directed bounding box representing the 3D model. This represents the cubic ratio of a 3D model. , Represents the surface area of a cube equivalent to the volume of a 3D model. Represents the measured surface area of the 3D model;
[0033] The number of sampling points on each triangular mesh is determined by utilizing the geometric complexity of the 3D model.
[0034] Furthermore, the steps for determining the number of sampling points on each triangular mesh using the geometric complexity of the 3D model include:
[0035] Based on actual needs, determine the number of sampling references on each triangular mesh in the 3D mesh model;
[0036] The number of sampling references on each triangular mesh is weighted by the geometric complexity of the 3D model, and the weighted result is rounded down using the base function.
[0037] Based on all the rounded-down results, determine the number of sampling points on each triangular grid.
[0038] The expression for the number of sampling points on the triangular mesh is:
[0039] (4)
[0040] in, Indicates the first The number of sampling points on a triangular grid Indicates the first Number of sampling references on a triangular grid, Indicates the first The weighted result of the number of sampling references on the triangular mesh and the geometric complexity of the 3D model is rounded down.
[0041] Furthermore, the steps of obtaining the sampling point set by performing non-uniform sampling on the 3D mesh model based on the number of sampling points on each triangular mesh and using a random sampling method based on the centroid coordinates include:
[0042] Create an empty set;
[0043] For each sampling point of the triangular mesh corresponding to each parametric surface, the following operation is performed: from a uniformly distributed... The first real number is generated randomly. Second real number , Indicates the first The first triangular mesh The first real number corresponding to each sampling point Indicates the first The first triangular mesh The second real number corresponding to each sampling point, if Then, mirror transformations are performed on the first and second real numbers corresponding to each sampling point; the mirror transformation process includes: letting ,and Ensure that all sampling points are located inside the corresponding triangular mesh; where, Indicates a guarantee It is a non-negative number. Indicates a guarantee It is a non-negative number;
[0044] Calculate the position coordinates of each sampling point using the centroid coordinate formula;
[0045] The expression for the location coordinates of the sampling point is:
[0046] (5)
[0047] in, Indicates the first The first triangular mesh The location coordinates of each sampling point Indicates the first The first vertex of a triangular mesh. Indicates the first The second vertex of a triangular mesh. Indicates the first The third vertex of a triangular mesh;
[0048] Store the position coordinates of all sampling points in each triangular grid into an empty set to obtain the sampling point set.
[0049] Furthermore, the steps for automatically segmenting the 3D model based on the sampling point set and using a hierarchical density clustering algorithm include:
[0050] Calculate the normal vector of each triangular mesh, and then concatenate the normal vector of each triangular mesh with the coordinates of all the corresponding sampling points to obtain the initial feature vector of each triangular mesh.
[0051] The expression for the initial eigenvector is:
[0052] (6)
[0053] in, Indicates the first The initial feature vectors corresponding to the triangular meshes Indicates the first The normal vector of a triangular mesh. , Indicates the control coefficient. Indicates the first The first triangular mesh sampling points Axis coordinates Indicates the first The first triangular mesh sampling points Axis coordinates Indicates the first The first triangular mesh sampling points Axis coordinates Indicates the first The normal vector of a triangular mesh Axial components, Indicates the first The normal vector of a triangular mesh Axial components, Indicates the first The normal vector of a triangular mesh Axial components, Indicates transpose. Represents the vector norm;
[0054] An adjustment coefficient is introduced into each initial feature vector, and the normal vector of each triangular mesh is scaled to obtain the normalized feature vector corresponding to each triangular mesh.
[0055] The expression for the normalized eigenvector is:
[0056] (7)
[0057] in, Indicates the first The normalized feature vectors corresponding to the triangular grids Indicates the adjustment coefficient;
[0058] All normalized feature vectors are combined to form a feature matrix, and the feature matrix is whitened to obtain a whitened feature matrix, which contains multiple whitened feature vectors.
[0059] Based on the whitening feature matrix, a density tree structure is constructed, and according to the principle of maximizing density stability, all clusters with density stability higher than the density stability threshold are selected from the density tree structure to form an initial cluster set.
[0060] Based on the proportional threshold and noise filtering strategy, the initial cluster set is optimized to obtain the final cluster set;
[0061] The final cluster set is mapped onto the surface of the 3D model, forming segmented regions of the 3D model;
[0062] The 3D model is automatically segmented based on the segmented regions of the 3D model.
[0063] Furthermore, the steps of constructing a feature matrix from all normalized feature vectors and then whitening the feature matrix to obtain a whitened feature matrix include:
[0064] The feature matrix is represented as: ,in, Represents the characteristic matrix, express The real space of dimension 1 Indicates the number of all triangular meshes;
[0065] Calculate the vector mean of all normalized eigenvectors;
[0066] Construct the covariance matrix using vector mean;
[0067] The expression for the covariance matrix is:
[0068] (8)
[0069] in, Represents the covariance matrix. This represents the vector mean of all normalized eigenvectors;
[0070] Perform the inverse of the covariance matrix Decompose the matrix and construct the whitening transformation matrix based on the decomposition results;
[0071] Perform the inverse of the covariance matrix The decomposition expression is:
[0072] (9)
[0073] in, Denotes the inverse of the covariance matrix. Represents a lower triangular matrix. Represents the whitening transformation matrix;
[0074] A linear transformation is performed on the whitening transformation matrix to obtain the whitening feature vector corresponding to each triangular mesh.
[0075] The expression for the whitening feature vector is:
[0076] (10)
[0077] in, Indicates the first The whitening feature vectors corresponding to each triangular mesh;
[0078] All the whitening feature vectors are combined into a whitening feature matrix.
[0079] Furthermore, based on the whitening feature matrix, a density tree structure is constructed, and according to the principle of maximizing density stability, all clusters with density stability higher than the density stability threshold are selected from the density tree structure to form the initial cluster set. The steps include:
[0080] Calculate the Euclidean distance between any two whitened feature vectors;
[0081] The expression for the Euclidean distance between any two whitened feature vectors is:
[0082] (11)
[0083] in, Indicates the first The whitening feature vector corresponding to the first triangular mesh and the first The Euclidean distance between the whitened feature vectors corresponding to the triangular meshes. Indicates the first Each feature dimension;
[0084] Using all Euclidean distances, construct a density tree structure containing multiple clusters, and solve the density stability of each cluster separately;
[0085] The expression for density stability is:
[0086] (12)
[0087] in, Indicates the first Density stability of individual clusters Indicates the first The density stability threshold when a cluster disappears from the density tree structure. Indicates the first The density stability threshold when generating clusters on a density tree structure. Indicates the density stability threshold. Indicates the first The clusters have a density stability threshold of The scale of the time Indicates the density stability threshold Integrate points;
[0088] Based on the principle of maximizing density stability, all clusters with density stability higher than the density stability threshold are selected from the density tree structure to form the initial cluster set;
[0089] The expression for the initial set of clusters is:
[0090] (13)
[0091] in, Represents the initial set of clusters. This represents the set of all clusters in the density tree structure. This represents the lower limit of the density stability threshold.
[0092] Furthermore, the steps for optimizing the initial cluster set based on the ratio threshold and noise filtering strategy to obtain the final cluster set include:
[0093] The total number of samples in the initial cluster set is obtained by counting the number of samples in each cluster in the initial cluster set.
[0094] Calculate the sample proportion of each cluster in the initial cluster set;
[0095] The proportion of samples in the initial cluster set is less than the total number of samples. All corresponding clusters were identified as noise clusters;
[0096] Remove all noisy clusters from the initial cluster set, and combine all remaining clusters into the final cluster set.
[0097] This application provides a 3D model segmentation method based on non-uniform sampling and hierarchical density clustering, which has at least the following beneficial effects:
[0098] (1) The method proposed in this application can perform analysis based solely on the geometric features of the surface of the three-dimensional model, avoiding dependence on the topological structure of the three-dimensional model, and can significantly improve the universality and robustness of segmentation of three-dimensional models of different formats.
[0099] (2) This application utilizes a centroid coordinate-based random sampling method to perform non-uniform sampling on the 3D mesh model, obtaining a set of sampling points. The non-uniform sampling strategy effectively enhances the ability to express the feature-rich regions of the 3D model;
[0100] (3) This application uses a sampling point set and a hierarchical density clustering algorithm to automatically segment the 3D model. By leveraging the advantages of the hierarchical density clustering algorithm in automatic clustering and noise identification, robust segmentation of regions with significantly consistent geometric shapes is achieved. Attached Figure Description
[0101] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0102] Figure 1 The diagram illustrates the steps of a three-dimensional model segmentation method based on a non-uniform sampling strategy and hierarchical density clustering in an exemplary embodiment of this application.
[0103] Figure 2 This application illustrates the surface treatment of a three-dimensional model in an exemplary embodiment. A schematic diagram of the triangulation results;
[0104] Figure 3 This diagram illustrates a comparison of sampling a three-dimensional bearing model using a random uniform sampling method and a non-uniform sampling method proposed in this application, respectively, in a simulation experiment of an exemplary embodiment of this application.
[0105] Figure 4 This diagram illustrates the effect of segmenting a three-dimensional bearing model in a simulation experiment of an exemplary embodiment of this application. Detailed Implementation
[0106] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided to make this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0107] Furthermore, the accompanying drawings are merely illustrative of this application and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0108] The following section will provide a more detailed explanation of the 3D model segmentation method based on non-uniform sampling strategy and hierarchical density clustering proposed in this embodiment.
[0109] This embodiment provides a 3D model segmentation method based on a non-uniform sampling strategy and hierarchical density clustering, such as... Figure 1 As shown, the method may include the following steps:
[0110] Step S101 of this embodiment: Using The triangulation method transforms the parametric surfaces corresponding to all faces in the 3D model into corresponding triangular meshes, and all triangular meshes form a 3D mesh model. Step S101 in this embodiment may include the following sub-steps:
[0111] Sub-step S1011: Obtain the parametric surface corresponding to each face in the 3D model, and determine the parameter domain of each parametric surface.
[0112] Sub-step S1012: Sample the parameters in the parameter domain of each parametric surface to obtain the corresponding set of parameter points. Each set of parameter points contains multiple parameter points, and the coordinates of the parameter points are represented as follows: , Indicates the first The set of parameter points corresponding to the i-th parameter surface The x-coordinates of the parameter points Indicates the first The set of parameter points corresponding to the i-th parameter surface The ordinates of the parameter points.
[0113] Sub-step S1013: such as Figure 2As shown, the corresponding set of parameter points in the parameter domain of each parametric surface is processed respectively. Triangulation yields a set of triangle structures corresponding to each parametric surface. Each set of triangle structures contains multiple triangle structures, and each triangle structure contains 3 parameter points.
[0114] Sub-step S1014: Substitute all parameter points in the parameter domain of each parametric surface into the surface mapping function to obtain the set of mesh vertices corresponding to each parametric surface. Each set of mesh vertices contains multiple mesh vertices, and each mesh vertex corresponds to a parameter point. Based on the correspondence between mesh vertices and parameter points, a triangular mesh corresponding to each parametric surface is formed.
[0115] Furthermore, the expression for the mesh vertices is:
[0116] (1)
[0117] in, Indicates the first The set of parameter points corresponding to the i-th parameter surface The grid vertices corresponding to the parameter points Indicates the first The set of parameter points corresponding to the i-th parameter surface The surface mapping function corresponding to each parameter point.
[0118] Furthermore, the expression for the unit normal vector of a mesh vertex is:
[0119] (2)
[0120] in, Indicates the first The set of parameter points corresponding to the i-th parameter surface The unit normal vector of the mesh vertex corresponding to each parameter point. Indicates the first The set of parameter points corresponding to the i-th parameter surface The first-order partial derivatives of the surface mapping function corresponding to each parameter point in the horizontal direction. Indicates the first The set of parameter points corresponding to the i-th parameter surface The first-order partial derivatives of the surface mapping function corresponding to each parameter point in the ordinate direction. It represents the absolute value.
[0121] Sub-step S1015: Assemble all triangular meshes into a 3D mesh model.
[0122] Step S102 of this embodiment: Calculate the geometric complexity of the 3D model, and use the geometric complexity of the 3D model to determine the number of sampling points on each triangular mesh. Step S102 of this embodiment may include the following sub-steps:
[0123] Sub-step S1021: Calculate the volume ratio of the 3D model.
[0124] Sub-step S1022: Calculate the cubic ratio of the 3D model.
[0125] Sub-step S1023: Calculate the geometric complexity of the 3D model based on the volume ratio and the cube ratio.
[0126] Furthermore, the expression for the geometric complexity of the 3D model is:
[0127] (3)
[0128] in, Represents the geometric complexity of a 3D model. This represents the volume ratio of a 3D model. , Represents the volume of a 3D model. The volume of the directed bounding box representing the 3D model. This represents the cubic ratio of a 3D model. , Represents the surface area of a cube equivalent to the volume of a 3D model. This represents the measured surface area of the 3D model.
[0129] Sub-step S1024: Determine the number of sampling points on each triangular mesh using the geometric complexity of the 3D model. The specific process of sub-step S1024 is as follows:
[0130] First, based on actual needs, determine the number of sampling references on each triangular mesh in the 3D mesh model.
[0131] The actual need here depends on the intended use of the 3D model. For example, for goals such as high-precision geometric analysis, increasing the number of sampling references helps capture minute features in the 3D model; conversely, for general shape recognition or classification, a lower number of sampling references may be sufficient.
[0132] Secondly, the number of sampling references on each triangular mesh is weighted by the geometric complexity of the 3D model, and the weighted result is rounded down using the base function.
[0133] Finally, based on all the round-down results, the number of sampling points on each triangular grid is determined.
[0134] Furthermore, the expression for the number of sampling points on the triangular mesh is:
[0135] (4)
[0136] in, Indicates the first The number of sampling points on a triangular grid Indicates the first Number of sampling references on a triangular grid, Indicates the first The weighted result of the number of sampling references on the triangular mesh and the geometric complexity of the 3D model is rounded down.
[0137] Step S103 of this embodiment: Based on the number of sampling points on each triangular mesh, and using a random sampling method based on the centroid coordinates, non-uniform sampling is performed on the 3D mesh model to obtain a set of sampling points. Step S103 of this embodiment may include the following sub-steps:
[0138] Sub-step S1031: Create an empty set.
[0139] Sub-step S1032: For each sampling point of the triangular mesh corresponding to each parametric surface, perform the following operation: from a uniformly distributed... The first real number is generated randomly. Second real number , Indicates the first The first triangular mesh The first real number corresponding to each sampling point Indicates the first The first triangular mesh The second real number corresponding to each sampling point, if Then, mirror transformation is performed on the first real number and the second real number corresponding to each sampling point; the mirror transformation process includes: letting ,and This ensures that all sampling points are located inside the corresponding triangular mesh. Indicates a guarantee It is a non-negative number. Indicates a guarantee It is a non-negative number.
[0140] Sub-step S1033: Calculate the position coordinates of each sampling point using the centroid coordinate formula.
[0141] Furthermore, the expression for the location coordinates of the sampling point is:
[0142] (5)
[0143] in, Indicates the first The first triangular mesh The location coordinates of each sampling point Indicates the first The first vertex of a triangular mesh. Indicates the first The second vertex of a triangular mesh. Indicates the first The third vertex of a triangular mesh.
[0144] Sub-step S1033: Store the position coordinates of all sampling points of each triangular grid into an empty set to obtain the sampling point set.
[0145] Step S104 of this embodiment: The 3D model is automatically segmented based on the sampling point set and using a hierarchical density clustering algorithm. Step S104 of this embodiment may include the following sub-steps:
[0146] Sub-step S1041: Calculate the normal vector of each triangular mesh, and concatenate the normal vector of each triangular mesh with the position coordinates of all corresponding sampling points to obtain the initial feature vector corresponding to each triangular mesh.
[0147] Furthermore, the expression for the initial feature vector is:
[0148] (6)
[0149] in, Indicates the first The initial feature vectors corresponding to the triangular meshes Indicates the first The normal vector of a triangular mesh. , Indicates the control coefficient. Indicates the first The first triangular mesh sampling points Axis coordinates Indicates the first The first triangular mesh sampling points Axis coordinates Indicates the first The first triangular mesh sampling points Axis coordinates Indicates the first The normal vector of a triangular mesh Axial components, Indicates the first The normal vector of a triangular mesh Axial components, Indicates the first The normal vector of a triangular mesh Axial components, Indicates transpose. Represents the vector norm.
[0150] Sub-step S1042: Introduce adjustment coefficients into each initial feature vector and scale the normal vector of each triangular mesh to obtain the normalized feature vector corresponding to each triangular mesh.
[0151] Furthermore, the expression for the normalized eigenvector is:
[0152] (7)
[0153] in, Indicates the first The normalized feature vectors corresponding to the triangular grids This represents the adjustment coefficient.
[0154] Sub-step S1043: Form a feature matrix from all normalized eigenvectors, and then whiten the feature matrix to obtain a whitened feature matrix. The whitened feature matrix contains multiple whitened eigenvectors. The specific process of sub-step S1043 is as follows:
[0155] The first step is to represent the feature matrix as follows: ,in, Represents the characteristic matrix, express The real space of dimension 1 This indicates the number of all triangular meshes.
[0156] The second step is to calculate the vector mean of all normalized eigenvectors.
[0157] The third step is to construct the covariance matrix using the vector mean.
[0158] Furthermore, the expression for the covariance matrix is:
[0159] (8)
[0160] in, Represents the covariance matrix. This represents the vector mean of all normalized eigenvectors.
[0161] The fourth step is to perform the inverse operation on the covariance matrix. Decompose the matrix and construct the whitening transformation matrix based on the decomposition results.
[0162] Furthermore, the inverse of the covariance matrix is performed... The decomposition expression is:
[0163] (9)
[0164] in, Denotes the inverse of the covariance matrix. Represents a lower triangular matrix. This represents the whitening transformation matrix.
[0165] The fifth step is to perform a linear transformation on the whitening transformation matrix to obtain the whitening feature vector corresponding to each triangular mesh.
[0166] Furthermore, the expression for the whitening feature vector is:
[0167] (10)
[0168] in, Indicates the first The whitening feature vectors corresponding to the triangular meshes.
[0169] The sixth step is to assemble all the whitening feature vectors into a whitening feature matrix.
[0170] Sub-step S1044: Based on the whitening feature matrix, construct a density tree structure, and according to the principle of maximizing density stability, select all clusters with density stability higher than the density stability threshold from the density tree structure to form the initial cluster set. The specific process of sub-step S1044 is as follows:
[0171] The first step is to calculate the Euclidean distance between any two whitened feature vectors.
[0172] Furthermore, the expression for the Euclidean distance between any two whitened feature vectors is:
[0173] (11)
[0174] in, Indicates the first The whitening feature vector corresponding to the first triangular mesh and the first The Euclidean distance between the whitened feature vectors corresponding to the triangular meshes. Indicates the first Each feature dimension.
[0175] The second step is to construct a density tree structure using all Euclidean distances. The density tree structure contains multiple clusters, and the density stability of each cluster is solved separately.
[0176] Furthermore, the expression for density stability is:
[0177] (12)
[0178] in, Indicates the first Density stability of individual clusters Indicates the first The density stability threshold when a cluster disappears from the density tree structure. Indicates the first The density stability threshold when generating clusters on a density tree structure. Indicates the density stability threshold. Indicates the first The clusters have a density stability threshold of The scale of the time Indicates the density stability threshold Integrate the points.
[0179] The third step is to select all clusters with density stability higher than the density stability threshold from the density tree structure according to the principle of maximizing density stability, and form the initial cluster set.
[0180] Furthermore, the expression for the initial set of clusters is:
[0181] (13)
[0182] in, Represents the initial set of clusters. This represents the set of all clusters in the density tree structure. This represents the lower limit of the density stability threshold. By adjusting the lower limit of the density stability threshold, flexible control over the granularity of the clustering results can be achieved. The final initial set of clusters is then obtained. It typically contains multiple highly stable and structurally distinct clusters.
[0183] Sub-step S1045: Based on the proportional threshold and noise filtering strategy, optimize the initial cluster set to obtain the final cluster set. The specific process of sub-step S1045 is as follows:
[0184] First, count the number of samples in each cluster of the initial cluster set to obtain the total number of samples in the initial cluster set.
[0185] Next, calculate the sample proportion of each cluster in the initial cluster set.
[0186] Secondly, the proportion of samples in the initial cluster set is less than the total number of samples. All the corresponding clusters were identified as noise clusters.
[0187] Finally, all noisy clusters are removed from the initial cluster set, and all remaining clusters are combined to form the final cluster set.
[0188] Sub-step S1045 can effectively eliminate pseudo-clustering caused by noise or excessive regions, thereby improving the clustering effect.
[0189] Sub-step S1046: Map the final cluster set onto the surface of the 3D model to form the segmented regions of the 3D model.
[0190] Sub-step S1047: Automatically segment the 3D model based on the segmentation regions of the 3D model.
[0191] To verify the beneficial effects of the proposed 3D model segmentation method based on non-uniform sampling strategy and hierarchical density clustering, the following simulation experiments were conducted.
[0192] In this simulation experiment, a three-dimensional bearing model is used. The three-dimensional bearing model is segmented using both a random uniform sampling method and the non-uniform sampling method proposed in this application. Figure 3 As shown, Figure 3 'a' represents a three-dimensional bearing model. Figure 3 b is a schematic diagram of sampling the three-dimensional bearing model using a random uniform sampling method. Figure 3 c is a schematic diagram of sampling a three-dimensional bearing model using the non-uniform sampling method proposed in this application. Figure 3 Figure c shows that when using the non-uniform sampling method proposed in this application, a high-density point cloud is generated in the curvature variation region (such as edges and chamfers) of the three-dimensional bearing model, while in the flat region, the point cloud density is low due to the relatively small number of sampling points. This effectively achieves an optimized balance between computational efficiency and shape description accuracy.
[0193] The final segmentation result of the three-dimensional bearing model is as follows: Figure 4 As shown. Figure 4 In the diagram, 'a' shows the overall segmentation effect of the 3D bearing model after hierarchical density clustering, with different colors representing different local regions that have been divided.
[0194] exist Figure 4 In b, cluster Corresponding to the upper circular edge region of the 3D bearing model, in Figure 4 In c, cluster The lower circular edge regions of the corresponding 3D bearing model have obvious boundary features in terms of normal distribution and point cloud density, and both exhibit high density stability.
[0195] exist Figure 4 In d, cluster The main area of the inner cylindrical surface corresponding to the 3D bearing model, in Figure 4 In f, clusters The normal orientations of the two components in the outer cylindrical main body region of the corresponding three-dimensional bearing model are highly consistent, belonging to a dense and continuous distribution structure. The clustering results all show a cylindrical spatial distribution.
[0196] Figure 4 Clusters in e and Figure 4 Cluster 6 in g covers the contour regions of different levels at the bottom of the three-dimensional bearing model. Because they exhibit different patterns in local geometry and normal distribution compared to other parts, they can be independently identified by the hierarchical density clustering algorithm.
[0197] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0198] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. In addition, those skilled in the art can combine and integrate the different embodiments or examples described in this specification.
[0199] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the scope of the technology disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application.
[0200] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.
Claims
1. A three-dimensional model segmentation method based on a non-uniform sampling strategy and hierarchical density clustering, characterized in that, The method comprises the following steps: Utilizing The triangularization method converts all the parametric surfaces corresponding to the faces in the three-dimensional model into corresponding triangular meshes, respectively, and all the triangular meshes form a three-dimensional mesh model. calculating the geometric complexity of the three-dimensional model, and determining the number of sampling points on each triangular mesh based on the geometric complexity of the three-dimensional model; non-uniformly sampling the three-dimensional mesh model based on the number of sampling points on each triangular mesh and the barycentric coordinate random sampling method to obtain a sampling point set, comprising: creating an empty set; For each sampling point of the triangular mesh corresponding to each of the parametric surfaces, the following operation is performed: from a uniformly distributed... The first real number is generated randomly. Second real number , Indicates the first The first triangular mesh The first real number corresponding to each sampling point Indicates the first The first triangular mesh The second real number corresponding to each sampling point, if Then, mirror transformations are performed on the first real number and the second real number corresponding to each sampling point; the mirror transformation process includes: letting ,and Ensure that all sampling points are located inside the corresponding triangular mesh; wherein, Indicates a guarantee It is a non-negative number. Indicates a guarantee It is a non-negative number; calculating the position coordinates of each sampling point based on the barycentric coordinate formula; the expression of the position coordinates of the sampling point is: (5) wherein, represents a position coordinate of a first sampling point of a first triangular mesh, represents a position coordinate of a second sampling point of a first triangular mesh, represents a first mesh vertex of a first triangular mesh, represents a second mesh vertex of a first triangular mesh, represents a third mesh vertex of a first triangular mesh, represents a first mesh vertex of a second triangular mesh, represents a second mesh vertex of a second triangular mesh, represents a third mesh vertex of a second triangular mesh. storing the position coordinates of all the sampling points of each triangular mesh into the empty set to obtain the sampling point set; automatically segmenting the three-dimensional model based on the sampling point set and using the hierarchical density clustering algorithm, comprising: calculating the normal vector of each triangular mesh, and splicing the normal vector of each triangular mesh with the position coordinates of all the corresponding sampling points to obtain the initial feature vector corresponding to each triangular mesh; the expression of the initial feature vector is: (6) wherein, represents the initial eigenvector corresponding to the th triangular mesh, represents the normal vector of the th triangular mesh, , represents the control coefficient, represents the th axial coordinate of the th sampling point of the th triangular mesh, represents the th axial coordinate of the th sampling point of the th triangular mesh, represents the th axial coordinate of the th sampling point of the th triangular mesh, represents the th axial component of the normal vector of the th triangular mesh, represents the th axial component of the normal vector of the th triangular mesh, represents the th axial component of the normal vector of the th triangular mesh, represents the transpose, represents the vector norm; introducing an adjustment coefficient into each initial feature vector to scale the normal vector of each triangular mesh to obtain the normalized feature vector corresponding to each triangular mesh; the expression of the normalized feature vector is: (7) wherein, represents the normalized feature vector corresponding to the i-th triangular mesh, represents a regulation coefficient; combining all the normalized feature vectors into a feature matrix, and whitening the feature matrix to obtain a whitened feature matrix, which contains multiple whitened feature vectors; based on the whitened feature matrix, constructing a density tree structure, and selecting all clustering clusters with density stability higher than a density stability threshold from the density tree structure according to the density stability maximization principle to form an initial clustering cluster set; optimizing the initial clustering cluster set based on a proportion threshold and a noise filtering strategy to obtain a final clustering cluster set; mapping the final clustering cluster set to the surface of the three-dimensional model to form a segmentation region of the three-dimensional model; automatically segmenting the three-dimensional model according to the segmentation region of the three-dimensional model.
2. The method of claim 1, wherein, The use The triangularization method, which converts all the faces in a three-dimensional model into corresponding parametric surfaces, respectively, into corresponding triangular meshes, and all the triangular meshes form a three-dimensional mesh model, comprises the steps of: obtaining the parametric surface corresponding to each surface in the three-dimensional model, and determining the parameter domain of each parametric surface; Sampling in each parameter domain of the parameter surfaces respectively, a corresponding parameter point set is obtained, each of the parameter point sets contains a plurality of parameter points, and the coordinates of the parameter points are represented as: , represents the horizontal coordinate of the i-th parameter point in the parameter point set corresponding to the j-th parameter surface, represents the vertical coordinate of the i-th parameter point in the parameter point set corresponding to the j-th parameter surface, respectively in a parameter domain of each of the parameter surfaces triangulate, to obtain a triangle structure set corresponding to each of the parameter surfaces, each of the triangle structure sets comprising a plurality of triangle structures, each of the triangle structures comprising 3 of the parameter points; substituting all the parameter points in the parameter domain of each parametric surface into a surface mapping function to obtain a mesh vertex set corresponding to each parametric surface, each mesh vertex set containing multiple mesh vertices, each mesh vertex corresponding to a parameter point, and forming a triangular mesh corresponding to each parametric surface according to the correspondence between the mesh vertices and the parameter points; combining all the triangular meshes to form the three-dimensional mesh model.
3. The method of claim 2, wherein, the expression of the mesh vertex is: (1) in, Indicates the first The set of parameter points corresponding to the i-th parameter surface The grid vertices corresponding to each parameter point Indicates the first The set of parameter points corresponding to the i-th parameter surface The surface mapping function corresponding to each parameter point; the expression of the unit normal vector of the mesh vertex is: (2) in, Indicates the first The set of parameter points corresponding to the i-th parameter surface The unit normal vector of the mesh vertex corresponding to each parameter point. Indicates the first The set of parameter points corresponding to the i-th parameter surface The first-order partial derivatives of the surface mapping function corresponding to each parameter point in the horizontal direction. Indicates the first The set of parameter points corresponding to the i-th parameter surface The first-order partial derivative of the surface mapping function corresponding to each parameter point in the ordinate direction. It represents the absolute value.
4. The method of claim 1, wherein, the step of calculating the geometric complexity of the three-dimensional model and determining the number of sampling points on each triangular mesh based on the geometric complexity of the three-dimensional model comprises: calculating the volume ratio of the three-dimensional model; calculating the cubic ratio of the three-dimensional model; Calculate the geometric complexity of the three-dimensional model by using the volume ratio and the cubic ratio; The expression of the geometric complexity of the three-dimensional model is: (3) wherein, represents the geometric complexity of the three-dimensional model, represents the volume ratio of the three-dimensional model, , represents the volume of the three-dimensional model, represents the volume of the oriented bounding box of the three-dimensional model, represents the cubic ratio of the three-dimensional model, , represents the surface area of a cube equivalent to the volume of the three-dimensional model, represents the measured surface area of the three-dimensional model; Determine the number of sampling points on each triangular mesh of the three-dimensional model by using the geometric complexity of the three-dimensional model.
5. The method of claim 4, wherein, The step of determining the number of sampling points on each triangular mesh of the three-dimensional model by using the geometric complexity of the three-dimensional model comprises: According to actual needs, determine the number of sampling reference points on each triangular mesh of the three-dimensional mesh model respectively; Weight the number of sampling reference points on each triangular mesh with the geometric complexity of the three-dimensional model respectively, and use the floor function to round down each weighted result respectively; According to all the rounding down results, determine the number of sampling points on each triangular mesh respectively; The expression of the number of sampling points on each triangular mesh is: (4) wherein, represents the number of sampling points on the th triangular mesh, represents the number of sampling references on the th triangular mesh, represents rounding down the weighted result of the number of sampling references on the th triangular mesh and the geometric complexity of the three-dimensional model.
6. The method of claim 1, wherein, The step of grouping all the normalized feature vectors into a feature matrix, and performing whitening processing on the feature matrix to obtain a whitened feature matrix comprises: The feature matrix is represented as: wherein, represents the feature matrix, represents a real number space of dimension, represents the number of all triangular meshes; Calculate the vector mean of all the normalized feature vectors; Construct a covariance matrix by using the vector mean; The expression of the covariance matrix is: (8) wherein, denotes the covariance matrix, denotes the vector mean of all normalized feature vectors; performing an inversion of the covariance matrix decomposition, and constructing a whitening transformation matrix from the decomposition result; performing an inverse of the covariance matrix The expression for the decomposition is: (9) wherein denotes the inverse of the covariance matrix, denotes a lower triangular matrix, denotes a whitening transformation matrix; Perform linear transformation on the whitening transformation matrix to obtain the whitened feature vector corresponding to each triangular mesh respectively; The expression of the whitened feature vector is: (10) wherein, represents the whitening eigenvector corresponding to the triangular mesh of the i-th Group all the whitened feature vectors into the whitened feature matrix.
7. The method of claim 6, wherein, The step of constructing a density tree structure based on the whitened feature matrix, and selecting all clustering clusters with density stability higher than a density stability threshold from the density tree structure according to the density stability maximization principle to form an initial clustering cluster set comprises: Calculate the Euclidean distance between any two whitened feature vectors respectively; The expression of the Euclidean distance between any two whitened feature vectors is: (11) wherein, denotes the Euclidean distance between the whitened eigenvector corresponding to the triangle mesh of the th triangle mesh and the whitened eigenvector corresponding to the triangle mesh of the th triangle mesh, denotes the Euclidean distance between the whitened eigenvector corresponding to the triangle mesh of the th feature dimension; Construct the density tree structure by using all the Euclidean distances, the density tree structure contains multiple clustering clusters, and the density stability of each clustering cluster is solved respectively; The expression of the density stability is: (12) in, Indicates the first Density stability of individual clusters Indicates the first The density stability threshold when a cluster disappears from the density tree structure. Indicates the first The density stability threshold when generating clusters on a density tree structure. Indicates the density stability threshold. Indicates the first The clusters have a density stability threshold of The scale of the time Indicates the density stability threshold Integrate points; Select all the clustering clusters with density stability higher than the density stability threshold from the density tree structure according to the density stability maximization principle to form the initial clustering cluster set; The expression of the initial clustering cluster set is: (13) wherein, denotes a set of initial clustering clusters, denotes a set of all clustering clusters in the density tree structure, denotes a lower limit value of the density stability threshold.
8. The method of claim 7, wherein, The step of optimizing the initial clustering cluster set based on a proportion threshold and a noise filtering strategy to obtain a final clustering cluster set comprises: Statistically count the number of samples contained in each clustering cluster in the initial clustering cluster set to obtain the total amount of samples of the initial clustering cluster set; Calculate the sample proportion of each clustering cluster in the initial clustering cluster set respectively; determining whether the sample proportion of the initial clustering cluster set is less than the total amount of samples all the corresponding clustering clusters are determined as noise clusters; Remove all noise clusters from the initial clustering cluster set, and group all the remaining clustering clusters into the final clustering cluster set.
Citation Information
Patent Citations
3D CAD model segmentation method based on atlas theory and clustering
CN109241628A
Novel visibility generation method for large-scale three-dimensional scene
CN105389850A
3D model grid segmentation method based on SSDF attenuation graph clustering
CN111696111A