Adaptive sampling method of surface features of 3D models for retrieval
By triangulating the three-dimensional model and adaptive sampling, the number of sampling points is dynamically adjusted, and the problem that the surface sampling of three-dimensional models in the existing technology cannot effectively capture important features, achieving more efficient computing resource utilization and more accurate retrieval effects.
Patent Information
- Application Number
- CN202411526476.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-10-30
AI Technical Summary
The existing three-dimensional model surface sampling methods cannot effectively capture important features of the surface, resulting in reduced retrieval accuracy and low computing resource utilization. Especially in a three-dimensional model database containing rich detailed information, the calculation overhead is high.
By traversing the three-dimensional model in the model database, the boundary points are extracted for triangulation, the triangle mesh data structure is constructed, and the number of sampled points is dynamically adjusted according to the geometric complexity and grid classification marks, adaptive sampling is performed, and the shape distribution vector is finally constructed for retrieval.
It effectively reduces the computational complexity, improves the utilization rate of computing resources, allocates sampling points more intelligently, better captures the geometric information of the three-dimensional model, and optimizes the retrieval task.
Smart Images

Figure CN119046492B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of computer-aided design, and in particular to a retrieval-oriented three-dimensional model surface feature adaptive sampling method. Background Art
[0002] With the widespread application of computer-aided design technology, a large number of 3D models have been created and stored in the model libraries of enterprises and organizations. Effective management of existing 3D models can significantly reduce the time and cost of creating new models from scratch, which has become a key factor in improving enterprise design efficiency.
[0003] In the 3D model retrieval task, a basic and key step is to sample the 3D model surface. However, the existing sampling of 3D model surfaces has the following problems:
[0004] First, since different areas of the 3D model surface are not equally important for identifying the 3D model, using non-discriminative sampling methods, such as traditional random sampling and uniform sampling, is likely to over-sample smoother areas on the 3D model surface and under-sample areas with obvious geometric features. This may result in the inability to effectively capture important features of the 3D model surface, and when using the sampling results to perform subsequent retrieval tasks, the accuracy is reduced and the computing resource utilization is low.
[0005] Secondly, there are currently solutions to the problems of random sampling and uniform sampling, such as the invention patent entitled "Adaptive Surface Sampling Method, Device, Storage Medium and Computer Equipment", publication number: CN117197397A, country: China, publication date: 2023.12.08, in which the proposed sampling scheme is based on the surface change amplitude of the surface to be sampled in each grid unit, adaptively adjusts the grid units in the initial grid, and determines the internal sampling points based on the adjusted grid units, and then combines the boundary sampling points with the internal sampling points to calculate the sampling point set of the surface to be sampled. For example, the document "Sampling Point Planning for Complex Surface Inspection based on Feature Points under Area Division" (Sun, J., Xiang, S., Zhou, T., Cheng, T, "The International Journal of Advanced Manufacturing Technology", 2023, 127(1),717–732.) states: Based on the curvature characteristics of the complex surface, it is divided into a flat area and a sharp edge area. When planning the sampling scheme, a uniformly distributed sampling strategy is used in flat areas; feature points are defined and searched in sharp edge areas, and a curvature adaptive sampling strategy based on feature points is adopted. However, when these sampling methods that rely on surface geometry operations are applied to 3D model retrieval, especially when searching in a 3D model database containing rich detail information, high computational overhead will be incurred, and high time complexity and computational complexity will be caused.
[0006] Therefore, it is necessary to propose a solution to improve one or more problems existing in the above-mentioned related technical solutions.
[0007] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present application, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0008] The present application provides a method for adaptively sampling surface features of a three-dimensional model for retrieval, the method comprising the following steps:
[0009] Traversing all edges and all faces of each three-dimensional model to be sampled in the model database, respectively extracting a plurality of boundary points of each three-dimensional model to be sampled, and using all the boundary points to triangulate the corresponding three-dimensional model to be sampled, respectively obtaining a plurality of triangular meshes corresponding to each three-dimensional model to be sampled;
[0010] Constructing and storing a data structure of all the triangular meshes, and classifying and marking the corresponding triangular meshes according to all the data structures;
[0011] Calculating the key geometric parameters corresponding to each of the three-dimensional models to be sampled respectively, evaluating the geometric complexity of the corresponding three-dimensional models to be sampled according to all the key geometric parameters respectively, and calculating the median of all the geometric complexities;
[0012] According to all the results of the classification and labeling, and the median of all the geometric complexities, respectively determine the number of sampling points on all the triangular meshes in each of the three-dimensional models to be sampled, and respectively perform adaptive sampling on each of the triangular meshes;
[0013] Using all the adaptive sampling results, respectively constructing a shape distribution vector of each of the three-dimensional models to be sampled, and respectively calculating a cosine distance of the shape distribution vector between every two of the three-dimensional models to be sampled;
[0014] All the cosine distances are arranged in ascending order, and all the three-dimensional models to be sampled corresponding to the arrangement results are used as retrieval results of the input model.
[0015] In an exemplary embodiment of the present application, the step of triangulating the corresponding three-dimensional model to be sampled using all the boundary points to obtain a plurality of triangular meshes corresponding to each three-dimensional model to be sampled comprises:
[0016] Calculate all the corresponding bounding boxes of the three-dimensional model to be sampled according to all the boundary points, and all the bounding boxes of each three-dimensional model to be sampled respectively contain all the extreme value points of the corresponding three-dimensional model to be sampled;
[0017] For each of the three-dimensional models to be sampled, a triangular model is constructed respectively, and each of the triangular models includes all the boundary points of the corresponding three-dimensional model to be sampled, and all the boundary points are inserted into the corresponding triangulation one by one using the Bowyer-Watson algorithm; after each insertion of a boundary point, all auxiliary vertices related to the triangular model are removed, and the triangulation is iteratively updated until all the boundary points are inserted into the corresponding triangulation;
[0018] After all the boundary points are inserted into the corresponding triangulations, the centroids of all the triangular models are respectively inserted into the corresponding triangulations, and all the triangulations are respectively iteratively optimized and adjusted;
[0019] Projecting all the boundary points and all the triangular models into three-dimensional space respectively to obtain a plurality of triangular meshes corresponding to each of the three-dimensional models to be sampled;
[0020] Each of the triangular meshes fits the surface of the corresponding three-dimensional model to be sampled, and all of the triangular meshes in each of the three-dimensional models to be sampled jointly cover all of the surfaces of the corresponding three-dimensional model to be sampled.
[0021] In an exemplary embodiment of the present application, the steps of constructing and storing the data structure of all the triangular meshes, and classifying and marking the corresponding triangular meshes according to all the data structures include:
[0022] For all the three-dimensional models to be sampled after the triangulation, respectively construct mapping information between all vertices, all edges, and all triangle models in each of the three-dimensional models to be sampled;
[0023] According to all the mapping information, respectively classify and mark the triangular models corresponding to all the faces in each of the three-dimensional models to be sampled;
[0024] Wherein, the types of the triangle model include vertex triangle, edge triangle and internal triangle;
[0025] The mapping information includes: a vertex list, a triangle model list, a vertex-triangle model hash table, and an edge-triangle model hash table;
[0026] The vertex list is used to store the coordinates of all the vertices in the three-dimensional model to be sampled;
[0027] The triangle model list is used to store the indexes of the triangle models corresponding to all the vertices in the three-dimensional model to be sampled;
[0028] The vertex-triangle model hash table is used to store first mapping association information between all the vertices in the three-dimensional model to be sampled and all the triangle models respectively connected to each vertex;
[0029] The edge-triangle model hash table is used to store all the edges and second mapping association information between all the triangle models respectively including each edge;
[0030] The triangulation is a Delaunay triangulation.
[0031] In an exemplary embodiment of the present application, the step of classifying and marking the triangular models corresponding to all the faces in each of the three-dimensional models to be sampled according to the mapping information includes:
[0032] Access each of the triangle model lists respectively through all the first mapping association information, each of the triangle model lists including all of the vertex triangles respectively connected to each of the vertices;
[0033] Traversing all the second mapping association information, and checking the number of the triangle models to which each edge is mapped respectively;
[0034] For the edge to which only one triangular model is mapped, marking the triangular model corresponding to the edge as the edge triangle;
[0035] For the edge to which at least two of the triangular models are mapped, at least two of the triangular models corresponding to the edge are marked as internal triangles.
[0036] In an exemplary embodiment of the present application, the steps of respectively calculating the key geometric parameters corresponding to each of the three-dimensional models to be sampled, respectively evaluating the geometric complexity of the corresponding three-dimensional models to be sampled according to all the key geometric parameters, and calculating the median of all the geometric complexities include:
[0037] Calculating the volume ratio between the volume of each of the three-dimensional models to be sampled and the volume of the corresponding bounding box respectively;
[0038] respectively calculating the surface area ratio between the surface area of the equivalent sphere of each of the three-dimensional models to be sampled and the surface area of the three-dimensional model to be sampled;
[0039] Respectively calculating the geometric parameter ratio of each of the three-dimensional models to be sampled;
[0040] According to the volume ratio, the surface area ratio and the geometric parameter ratio, respectively evaluating the geometric complexity of each of the three-dimensional models to be sampled;
[0041] Calculating the median of all the geometric complexities;
[0042] Wherein, the key geometric parameters include the volume ratio, the surface area ratio and the geometric parameter ratio.
[0043] In an exemplary embodiment of the present application, the expression of the volume ratio is:
[0044] (1)
[0045] in, represents the volume ratio, represents the volume of the 3D model to be sampled, Represents the volume of the bounding box;
[0046] The expression of the surface area ratio is:
[0047] (2)
[0048] in, represents the surface area ratio, represents the surface area of the equivalent sphere of the 3D model to be sampled, , Represents the surface area of the three-dimensional model to be sampled;
[0049] The expression of the geometric parameter ratio is:
[0050] (3)
[0051] in, represents the geometric parameter ratio, The number of triangular meshes representing the surface of the 3D model to be sampled, represents the surface area of the bounding box;
[0052] The expression of the geometric complexity is:
[0053] (4)
[0054] in, represents the geometric complexity, represents the first weight corresponding to the volume ratio, represents the second weight corresponding to the surface area ratio, The third weight corresponding to the geometric parameter ratio;
[0055] The expression of the median of all the geometric complexities is:
[0056] (5)
[0057] in, Representing geometric complexity Through the mapping of Sigmoid function, The value range of is (0,1), Represents the median of all geometric complexities.
[0058] In an exemplary embodiment of the present application, the step of determining the number of sampling points on all the triangular meshes in each of the three-dimensional models to be sampled according to all the results of the classification and labeling, and the median of all the geometric complexities, and performing adaptive sampling on each of the triangular meshes includes:
[0059] Respectively setting the number of baseline sampling points of all the triangular meshes on each face of each of the three-dimensional models to be sampled;
[0060] According to the number of the baseline sampling points, the median, and all the classification and labeling results, respectively calculate the number of the sampling points of each of the triangular meshes;
[0061] According to the number of the sampling points, the adaptive sampling is performed on all the triangular meshes of each of the faces of the corresponding three-dimensional model to be sampled.
[0062] In an exemplary embodiment of the present application, the expression for the number of sampling points is:
[0063] (6)
[0064] in, Represents the number of sampling points of the triangle mesh, represents the number of baseline sampling points, , Indicates the multiplier of the geometric complexity corresponding to the triangle model, is a positive integer;
[0065] According to the different types of triangle models, set represents the multiplier of the geometric complexity corresponding to the vertex triangle, represents the multiplier of the geometric complexity corresponding to the edge triangle, represents the multiple of the geometric complexity corresponding to the internal triangle, and satisfies .
[0066] In an exemplary embodiment of the present application, the step of using all the adaptive sampling results to construct a shape distribution vector of each of the three-dimensional models to be sampled, and calculating the cosine distance of the shape distribution vector between each two of the three-dimensional models to be sampled includes:
[0067] arbitrarily selecting a group of sampling point groups from the results of the adaptive sampling of each of the three-dimensional models to be sampled, each of the sampling point groups including a first sampling point and a second sampling point, and calculating the distance between each of the first sampling points and the corresponding second sampling point;
[0068] Iterate the above steps and use an equidistant histogram to represent the distribution of iterative calculation results;
[0069] According to the distribution of the iterative calculation results, respectively establishing the shape distribution vector of each of the three-dimensional models to be sampled;
[0070] The cosine distance between the shape distribution vectors of any two of the three-dimensional models to be sampled is calculated respectively.
[0071] In an exemplary embodiment of the present application, the distance between the first sampling point and the corresponding second sampling point is expressed as:
[0072] (7)
[0073] in, represents the distance between the first sampling point and the corresponding second sampling point, represents the position coordinates of the first sampling point, represents the position coordinates of a second sampling point corresponding to the first sampling point;
[0074] The step of using the equidistant histogram to represent the distribution of the iterative calculation results comprises:
[0075] The number of times the distance between each first sampling point and the corresponding second sampling point is iteratively calculated is Second-rate;
[0076] The number of intervals in the equidistant histogram is , the height of each of the intervals is expressed as The frequency in the interval, the expression of the group distance between any two groups of the sampling point groups in each of the three-dimensional models to be sampled is:
[0077] (8)
[0078] in, represents the distance between any two groups of sampling points, Represents the maximum value among the iterative calculation results. Represents the minimum value among the iterative calculation results. Indicates the number of intervals in an equally spaced histogram;
[0079] The height of the equidistant histogram satisfies:
[0080] (9)
[0081] in, Indicates that the iterative calculation result is in the The frequency of the interval, Indicates the iterative calculation result in The frequency of the interval, , Indicates the number of iterative calculations;
[0082] The expression of the cosine distance is:
[0083] (10)
[0084] in, represents the cosine distance, Indicates shape distribution vector of the 3D model to be sampled, Indicates shape distribution vector of the 3D model to be sampled, Represents the norm of a vector.
[0085] Beneficial effects:
[0086] The present application provides a retrieval-oriented three-dimensional model surface feature adaptive sampling method, which has at least the following beneficial effects:
[0087] (1) This application introduces both mesh edge classification technology and geometric complexity analysis technology into 3D model sampling, providing a new strategy for 3D model retrieval, thereby avoiding intensive curvature calculation of the entire 3D model surface, effectively reducing the computational complexity, and making more efficient use of computing resources;
[0088] (2) At the same time, the present application dynamically adjusts the sampling strategy according to the geometric complexity of the three-dimensional model to be sampled, and allocates sampling points more intelligently, so as to more effectively capture the geometric information of the three-dimensional model to be sampled, thereby optimizing the retrieval task. BRIEF DESCRIPTION OF THE DRAWINGS
[0089] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0090] Figure 1 A schematic diagram showing the steps of a method for adaptively sampling surface features of a three-dimensional model for retrieval in an exemplary embodiment of the present application is shown;
[0091] Figure 2 A schematic diagram showing a flow chart of a retrieval-oriented three-dimensional model surface feature adaptive sampling method in an exemplary embodiment of the present application;
[0092] Figure 3 A schematic diagram showing the result of triangulating the three-dimensional model to be sampled in an exemplary embodiment of the present application;
[0093] Figure 4 A schematic diagram showing triangle meshes corresponding to different types of triangle models in an exemplary embodiment of the present application;
[0094] Figure 5 A schematic diagram showing the comparison of the effects of the random sampling method and the adaptive sampling method proposed in the present application on the three-dimensional model to be sampled and the corresponding shape distribution histograms in the exemplary embodiments of the present application;
[0095] Figure 6 A schematic diagram showing an input model in an exemplary embodiment of the present application;
[0096] Figure 7 A schematic diagram showing a comparison of retrieval results of searching an input model using a random sampling method and an adaptive sampling method proposed in the present application in an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0097] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concepts of the example 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.
[0098] In addition, the accompanying drawings are only schematic illustrations of the present application and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0099] To this end, this example embodiment provides a retrieval-oriented three-dimensional model surface feature adaptive sampling method, such as Figure 1 and Figure 2 As shown, the following steps may be included:
[0100] Step S101: traverse all edges and all faces of each three-dimensional model to be sampled in the model database, extract multiple boundary points of each three-dimensional model to be sampled, and use all boundary points to triangulate the corresponding three-dimensional model to be sampled, so as to obtain multiple triangular meshes corresponding to each three-dimensional model to be sampled.
[0101] Step S102: construct and store data structures of all triangular meshes, and classify and mark corresponding triangular meshes according to all data structures.
[0102] Step S103: respectively calculating the key geometric parameters corresponding to each of the three-dimensional models to be sampled, respectively evaluating the geometric complexity of the corresponding three-dimensional models to be sampled according to all the key geometric parameters, and calculating the median of all the geometric complexities.
[0103] Step S104: According to all the classification and labeling results and the median of all geometric complexities, the number of sampling points on all triangular meshes in each three-dimensional model to be sampled is determined, and adaptive sampling is performed on each triangular mesh.
[0104] Step S105: using all the adaptive sampling results, respectively constructing the shape distribution vector of each to-be-sampled three-dimensional model, and respectively calculating the cosine distance of the shape distribution vector between every two to-be-sampled three-dimensional models.
[0105] Step S106: Arrange all cosine distances in ascending order, and use all the to-be-sampled three-dimensional models corresponding to the arrangement results as the retrieval results of the input model.
[0106] The present application embodiment provides a retrieval-oriented three-dimensional model surface feature adaptive sampling method, which has at least the following beneficial effects:
[0107] (1) This application introduces both mesh edge classification technology and geometric complexity analysis technology into 3D model sampling, providing a new strategy for 3D model retrieval, thereby avoiding intensive curvature calculation of the entire 3D model surface, effectively reducing the computational complexity, and making more efficient use of computing resources;
[0108] (2) At the same time, the present application dynamically adjusts the sampling strategy according to the geometric complexity of the three-dimensional model to be sampled, and allocates sampling points more intelligently, so as to more effectively capture the geometric information of the three-dimensional model to be sampled, thereby optimizing the retrieval task.
[0109] In order to address the problems that existing sampling methods cannot effectively capture the key features of the three-dimensional model surface, have low computing resource utilization and high time complexity, the retrieval-oriented three-dimensional model surface feature adaptive sampling method proposed in this example embodiment is now described in more detail.
[0110] like Figure 6 As shown, in this embodiment, a three-dimensional bearing model is used as an input model, and the three-dimensional bearing model is retrieved in a model database.
[0111] In step S101 of this embodiment, Figure 3 As shown, all edges and all faces of each 3D model to be sampled in the model database are traversed, multiple boundary points of each 3D model to be sampled are extracted respectively, and the corresponding 3D model to be sampled is triangulated using all boundary points respectively, so as to obtain multiple triangular meshes corresponding to each 3D model to be sampled respectively. Step S101 of this embodiment includes the following sub-steps:
[0112] Sub-step S1011: traverse all edges and all faces in each three-dimensional model to be sampled, and extract multiple boundary points of each three-dimensional model to be sampled.
[0113] Sub-step S1012: all bounding boxes of the corresponding three-dimensional models to be sampled are calculated according to all boundary points, and all bounding boxes of each three-dimensional model to be sampled respectively contain all extreme value points in the corresponding three-dimensional model to be sampled.
[0114] Furthermore, the extreme point refers to the dividing point between the outside and the inside of the three-dimensional model to be sampled.
[0115] Sub-step S1013: For each three-dimensional model to be sampled, a triangular model is constructed respectively, and each triangular model contains all boundary points of the corresponding three-dimensional model to be sampled, and all boundary points are inserted into the corresponding triangulation one by one using the Bowyer-Watson algorithm; after each boundary point is inserted, all auxiliary vertices related to the triangular model are removed, and the triangulation is iteratively updated until all boundary points are inserted into the corresponding triangulation.
[0116] Furthermore, it is necessary to record all boundary points generated on the boundary curve of the three-dimensional model to be sampled as a set of boundary points.
[0117] Furthermore, the auxiliary vertices mentioned here refer to vertices temporarily added or used in the process of inserting boundary points using the Bowyer-Watson algorithm, and these vertices do not belong to the boundary points or internal points of the three-dimensional model to be sampled.
[0118] Sub-step S1014: After all boundary points are inserted into the corresponding triangulations, the centroids of all triangle models are respectively inserted into the corresponding triangulations, and all triangulations are iteratively optimized and adjusted.
[0119] Sub-step S1015: projecting all boundary points and all triangular models into three-dimensional space respectively, and obtaining a plurality of triangular meshes corresponding to each three-dimensional model to be sampled.
[0120] Here, each triangular mesh fits the surface of the corresponding three-dimensional model to be sampled, and all triangular meshes in each three-dimensional model to be sampled jointly cover all surfaces of the corresponding three-dimensional model to be sampled.
[0121] like Figure 4 As shown, in step S102 of this embodiment, a data structure of all triangular meshes is constructed and stored, and corresponding triangular meshes are classified and marked according to all data structures. Step S102 of this embodiment includes the following sub-steps:
[0122] Sub-step S1021: for all the three-dimensional models to be sampled that have been triangulated, construct mapping information between all vertices, all edges, and all triangle models in each three-dimensional model to be sampled.
[0123] Furthermore, the triangulation is preferably a Delaunay triangulation.
[0124] Furthermore, the mapping information includes: a vertex list, a triangle model list, a vertex-triangle model hash table, and an edge-triangle model hash table.
[0125] The vertex list can be used to store the coordinates of all vertices in the 3D model to be sampled.
[0126] The triangle model list may be used to store the indexes of the triangle models corresponding to all vertices in the three-dimensional model to be sampled.
[0127] The vertex-triangle model hash table can be used to store first mapping association information between all vertices in the three-dimensional model to be sampled and all triangle models respectively connected to each vertex.
[0128] The edge-triangle model hash table may be used to store all edges and second mapping association information between all triangle models respectively containing each edge.
[0129] Sub-step S1022: Classify and mark the triangle models corresponding to all faces in each 3D model to be sampled according to all mapping information. This includes the following processes:
[0130] First, each triangle model list is accessed respectively through all first mapping association information, and each triangle model list contains all vertex triangles connected to each vertex respectively.
[0131] Secondly, all the second mapping association information is traversed, and the number of triangle models mapped to each edge is checked respectively.
[0132] Again, for an edge to which only one triangle model is mapped, the triangle model corresponding to the edge is marked as an edge triangle.
[0133] Finally, for an edge to which at least two triangle models are mapped, at least two triangle models corresponding to the edge are marked as internal triangles.
[0134] In step S103 of this embodiment, key geometric parameters corresponding to each three-dimensional model to be sampled are calculated respectively, the geometric complexity of the corresponding three-dimensional model to be sampled is evaluated respectively according to all key geometric parameters, and the median of all geometric complexities is calculated.
[0135] Furthermore, key geometric parameters include volume ratio, surface area ratio and geometric parameter ratio.
[0136] In this embodiment, step S103 includes the following sub-steps:
[0137] Sub-step S1031: Calculate the volume ratio between the volume of each to-be-sampled 3D model and the volume of the bounding box respectively.
[0138] Furthermore, the expression of the volume ratio is:
[0139] (1)
[0140] in, represents the volume ratio, represents the volume of the 3D model to be sampled, Represents the volume of the bounding box.
[0141] Sub-step S1032: Calculate the surface area ratio between the surface area of the equivalent sphere of each three-dimensional model to be sampled and the surface area of the three-dimensional model to be sampled.
[0142] Furthermore, the expression of the surface area ratio is:
[0143] (2)
[0144] in, represents the surface area ratio, represents the surface area of the equivalent sphere of the 3D model to be sampled, , Represents the surface area of the 3D model to be sampled.
[0145] Sub-step S1033: Calculate the geometric parameter ratio of each 3D model to be sampled respectively.
[0146] The expression of the geometric parameter ratio is:
[0147] (3)
[0148] in, represents the geometric parameter ratio, The number of triangular meshes representing the surface of the 3D model to be sampled, Represents the surface area of the bounding box.
[0149] Sub-step S1034: Evaluate the geometric complexity of each three-dimensional model to be sampled according to the volume ratio, surface area ratio and geometric parameter ratio.
[0150] Furthermore, the expression of the geometric complexity is:
[0151] (4)
[0152] in, represents the geometric complexity, represents the first weight corresponding to the volume ratio, represents the second weight corresponding to the surface area ratio, Indicates the third weight corresponding to the geometric parameter ratio.
[0153] Sub-step S1035: Calculate the median of all geometric complexities.
[0154] Furthermore, the expression for the median of all geometric complexities is:
[0155] (5)
[0156] in, Representing geometric complexity Through the mapping of Sigmoid function, The value range of is (0,1), Represents the median of all geometric complexities.
[0157] In step S104 of this embodiment, based on all the results of classification and labeling, and the median of all geometric complexities, the number of sampling points on all triangular meshes in each to-be-sampled three-dimensional model is determined, and adaptive sampling is performed on each triangular mesh. Step S104 of this embodiment includes the following sub-steps:
[0158] Sub-step S1041: respectively set the number of baseline sampling points of all triangular meshes on each face of each to-be-sampled 3D model. The number of baseline sampling points depends on the overall geometric complexity of all to-be-sampled 3D models contained in the model database and the intended purpose of sampling the surfaces of all to-be-sampled 3D models. In this embodiment, based on the experience of sampling the surfaces of the to-be-sampled 3D models, in general, the number of baseline sampling points is 20.
[0159] Sub-step S1042: Calculate the number of sampling points of each triangular mesh according to the number of baseline sampling points, the median, and all classification and labeling results.
[0160] Furthermore, the expression for the number of sampling points of the triangular mesh is:
[0161] (6)
[0162] in, Represents the number of sampling points of the triangle mesh, represents the number of baseline sampling points, , Indicates the multiplier of the geometric complexity corresponding to the triangle model, is a positive integer;
[0163] According to the different types of triangle models, set Indicates the multiplier of the geometric complexity corresponding to the vertex triangle, represents the multiplier of the geometric complexity corresponding to the edge triangle, Represents the multiple of the geometric complexity corresponding to the internal triangle, and satisfies .
[0164] Specifically, the multiplier for interior triangles is 1, the multiplier for edge triangles is 2, and the multiplier for vertex triangles is 3.
[0165] Sub-step S1043: According to the number of sampling points, adaptive sampling is performed on all triangular meshes of each face of the corresponding three-dimensional model to be sampled.
[0166] like Figure 5 As shown, in step S105 of this embodiment, the shape distribution vector of each to-be-sampled three-dimensional model is constructed using the results of all adaptive sampling, and the cosine distance of the shape distribution vector between every two to-be-sampled three-dimensional models is calculated. Step S105 of this embodiment includes the following sub-steps:
[0167] Sub-step S1051: arbitrarily select a group of sampling point groups from the results of adaptive sampling of each three-dimensional model to be sampled, each sampling point group includes a first sampling point and a second sampling point, and calculate the distance between the first sampling point and the corresponding second sampling point.
[0168] Furthermore, the distance between the first sampling point and the corresponding second sampling point is expressed as:
[0169] (7)
[0170] in, represents the distance between the first sampling point and the corresponding second sampling point, represents the position coordinates of the first sampling point, Indicates the position coordinates of the second sampling point corresponding to the first sampling point.
[0171] Sub-step S1052: iterate the above steps and use an equidistant histogram to represent the distribution of iterative calculation results.
[0172] Furthermore, the step of using the equidistant histogram to represent the distribution of the iterative calculation results includes:
[0173] The number of times the distance between each first sampling point and the corresponding second sampling point is iterated is Second-rate;
[0174] The number of bins in an equally spaced histogram is , the height of each interval is expressed as The frequency in this interval, the expression of the group distance between any two groups of sampling points in each three-dimensional model to be sampled is:
[0175] (8)
[0176] in, represents the distance between any two groups of sampling points, Represents the maximum value among the iterative calculation results. Represents the minimum value among the iterative calculation results. Indicates the number of intervals in an equally spaced histogram;
[0177] The height of the equidistant histogram satisfies:
[0178] (9)
[0179] in, Indicates that the iterative calculation result is in the The frequency of the interval, Indicates the iterative calculation result in The frequency of the interval, , Indicates the number of iterative calculations.
[0180] Sub-step S1053: establishing a shape distribution vector for each three-dimensional model to be sampled according to the distribution of the iterative calculation results.
[0181] Sub-step S1054: respectively calculating the cosine distance between the shape distribution vectors of any two three-dimensional models to be sampled.
[0182] Furthermore, the expression of the cosine distance is:
[0183] (10)
[0184] in, represents the cosine distance, Indicates shape distribution vector of the 3D model to be sampled, Indicates shape distribution vector of the 3D model to be sampled, Represents the norm of a vector.
[0185] In step S105 of this embodiment, all the three-dimensional models to be sampled are arranged in ascending order according to all the cosine distances as the search results of the input model.
[0186] like Figure 7 As shown in FIG. 1 , the retrieval results of the three-dimensional bearing model are compared using the traditional random sampling method and the adaptive sampling method proposed in this application. Figure 7 It can be seen that random sampling has a weakness in capturing important features of the surface of the three-dimensional model to be sampled, which causes this method to confuse the three-dimensional bearing model with the headless screw model in the model database. The adaptive sampling method proposed in this application can effectively avoid this problem.
[0187] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0188] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification.
[0189] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or substitutions within the technical scope disclosed in the present application, and these modifications or substitutions should be included in the protection scope of the present application.
[0190] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary technical means in the art that are not disclosed in the present application.
Claims
1. A retrieval-oriented three-dimensional model surface feature adaptive sampling method, characterized in that: The method comprises the following steps: Traversing all edges and all faces of each three-dimensional model to be sampled in the model database, respectively extracting a plurality of boundary points of each three-dimensional model to be sampled, and using all the boundary points to triangulate the corresponding three-dimensional model to be sampled, respectively obtaining a plurality of triangular meshes corresponding to each three-dimensional model to be sampled; Constructing and storing a data structure of all the triangular meshes, and classifying and marking the corresponding triangular meshes according to all the data structures; Calculating the key geometric parameters corresponding to each of the three-dimensional models to be sampled respectively, evaluating the geometric complexity of the corresponding three-dimensional models to be sampled according to all the key geometric parameters respectively, and calculating the median of all the geometric complexities, including: Calculating the volume ratio between the volume of each of the three-dimensional models to be sampled and the volume of the corresponding bounding box respectively; respectively calculating the surface area ratio between the surface area of the equivalent sphere of each of the three-dimensional models to be sampled and the surface area of the three-dimensional model to be sampled; Respectively calculating the geometric parameter ratio of each of the three-dimensional models to be sampled; According to the volume ratio, the surface area ratio and the geometric parameter ratio, respectively evaluating the geometric complexity of each of the three-dimensional models to be sampled; Calculating the median of all the geometric complexities; Wherein, the key geometric parameters include the volume ratio, the surface area ratio and the geometric parameter ratio; According to all the results of the classification and labeling, and the median of all the geometric complexities, respectively determine the number of sampling points on all the triangular meshes in each of the three-dimensional models to be sampled, and respectively perform adaptive sampling on each of the triangular meshes; Using all the adaptive sampling results, respectively constructing a shape distribution vector of each of the three-dimensional models to be sampled, and respectively calculating a cosine distance of the shape distribution vector between every two of the three-dimensional models to be sampled; All the cosine distances are arranged in ascending order, and all the three-dimensional models to be sampled corresponding to the arrangement results are used as retrieval results of the input model.
2. The retrieval-oriented three-dimensional model surface feature adaptive sampling method according to claim 1, characterized in that: The step of triangulating the corresponding three-dimensional model to be sampled by using all the boundary points to obtain a plurality of triangular meshes corresponding to each three-dimensional model to be sampled comprises: Calculate all the boundary boxes of the corresponding three-dimensional model to be sampled according to all the boundary points, and each of the boundary boxes of the three-dimensional model to be sampled includes all the extreme points of the corresponding three-dimensional model to be sampled; For each of the three-dimensional models to be sampled, a triangular model is constructed respectively, and each of the triangular models includes all the boundary points of the corresponding three-dimensional model to be sampled, and all the boundary points are inserted into the corresponding triangulation one by one using the Bowyer-Watson algorithm; after each insertion of a boundary point, all auxiliary vertices related to the triangular model are removed, and the triangulation is iteratively updated until all the boundary points are inserted into the corresponding triangulation; After all the boundary points are inserted into the corresponding triangulations, the centroids of all the triangular models are respectively inserted into the corresponding triangulations, and all the triangulations are respectively iteratively optimized and adjusted; Projecting all the boundary points and all the triangular models into three-dimensional space respectively to obtain a plurality of triangular meshes corresponding to each of the three-dimensional models to be sampled; Each of the triangular meshes fits the surface of the corresponding three-dimensional model to be sampled, and all of the triangular meshes in each of the three-dimensional models to be sampled jointly cover all of the surfaces of the corresponding three-dimensional model to be sampled.
3. The retrieval-oriented three-dimensional model surface feature adaptive sampling method according to claim 2, characterized in that: The steps of constructing and storing the data structure of all the triangular meshes, and classifying and marking the corresponding triangular meshes according to all the data structures include: For all the three-dimensional models to be sampled after the triangulation, respectively construct mapping information between all vertices, all edges, and all triangle models in each of the three-dimensional models to be sampled; According to all the mapping information, respectively classify and mark the triangular models corresponding to all the faces in each of the three-dimensional models to be sampled; Wherein, the types of the triangle model include vertex triangle, edge triangle and internal triangle; The mapping information includes: a vertex list, a triangle model list, a vertex-triangle model hash table, and an edge-triangle model hash table; The vertex list is used to store the coordinates of all the vertices in the three-dimensional model to be sampled; The triangle model list is used to store the indexes of the triangle models corresponding to all the vertices in the three-dimensional model to be sampled; The vertex-triangle model hash table is used to store first mapping association information between all the vertices in the three-dimensional model to be sampled and all the triangle models respectively connected to each vertex; The edge-triangle model hash table is used to store all the edges and second mapping association information between all the triangle models respectively including each edge; The triangulation is a Delaunay triangulation.
4. The retrieval-oriented three-dimensional model surface feature adaptive sampling method according to claim 3, characterized in that: The step of classifying and marking the triangular models corresponding to all the faces in each of the three-dimensional models to be sampled according to the mapping information comprises: Access each of the triangle model lists respectively through all the first mapping association information, each of the triangle model lists including all of the vertex triangles respectively connected to each of the vertices; Traversing all the second mapping association information, and checking the number of the triangle models to which each edge is mapped respectively; For the edge to which only one triangular model is mapped, marking the triangular model corresponding to the edge as the edge triangle; For the edge to which at least two of the triangular models are mapped, at least two of the triangular models corresponding to the edge are marked as internal triangles.
5. The retrieval-oriented three-dimensional model surface feature adaptive sampling method according to claim 4, characterized in that: The expression of the volume ratio is: Among them, C VR Indicates volume ratio, V m Represents the volume of the 3D model to be sampled, V b Represents the volume of the bounding box; The expression of the surface area ratio is: Among them, C AR represents the surface area ratio, A s represents the surface area of the equivalent sphere of the 3D model to be sampled, A m represents the surface area of the three-dimensional model to be sampled; The expression of the geometric parameter ratio is: Among them, G R Indicates the geometric parameter ratio, n T The number of triangular meshes representing the surface of the 3D model to be sampled, A b represents the surface area of the bounding box; The expression of the geometric complexity is: C=w1C VR +w2C AR +w3G R (4) Wherein, C represents geometric complexity, w1 represents the first weight corresponding to the volume ratio, w2 represents the second weight corresponding to the surface area ratio, and w3 represents the third weight corresponding to the geometric parameter ratio; The expression of the median of all the geometric complexities is: Among them, C ′ Represents the geometric complexity C through the mapping of the Sigmoid function, C ′ The value range of is (0,1), and α represents the median of all geometric complexities.
6. The retrieval-oriented three-dimensional model surface feature adaptive sampling method according to claim 5, characterized in that: The step of determining the number of sampling points on all the triangular meshes in each of the three-dimensional models to be sampled according to all the results of the classification and labeling and the median of all the geometric complexities, and performing adaptive sampling on each of the triangular meshes comprises: Respectively setting the number of baseline sampling points of all the triangular meshes on each face of each of the three-dimensional models to be sampled; According to the number of the baseline sampling points, the median, and all the classification and labeling results, respectively calculate the number of the sampling points of each of the triangular meshes; According to the number of the sampling points, the adaptive sampling is performed on all the triangular meshes of each of the faces of the corresponding three-dimensional model to be sampled.
7. The retrieval-oriented three-dimensional model surface feature adaptive sampling method according to claim 6, characterized in that: The expression for the number of sampling points is: n=NC′δ (6) Where n represents the number of sampling points of the triangle mesh, N represents the number of baseline sampling points, and N∈Z + , δ represents the multiple of the geometric complexity corresponding to the triangle model, δ is a positive integer; According to the different types of triangle models, δ is set respectively. vertex represents the ratio of the geometric complexity corresponding to the vertex triangle, δ edge represents the multiplier of the geometric complexity corresponding to the edge triangle, δ interior represents the multiple of the geometric complexity corresponding to the internal triangle, and satisfies δ vertex >δ edge >δ interior .
8. The retrieval-oriented three-dimensional model surface feature adaptive sampling method according to claim 7, characterized in that: The step of using all the adaptive sampling results to construct the shape distribution vector of each of the three-dimensional models to be sampled, and calculating the cosine distance of the shape distribution vector between every two three-dimensional models to be sampled comprises: arbitrarily selecting a group of sampling point groups from the results of the adaptive sampling of each of the three-dimensional models to be sampled, each of the sampling point groups including a first sampling point and a second sampling point, and calculating the distance between each of the first sampling points and the corresponding second sampling point; Iterate the above steps and use an equidistant histogram to represent the distribution of iterative calculation results; According to the distribution of the iterative calculation results, respectively establishing the shape distribution vector of each of the three-dimensional models to be sampled; The cosine distance between any two of the shape distribution vectors of the three-dimensional models to be sampled is calculated respectively.
9. The retrieval-oriented three-dimensional model surface feature adaptive sampling method according to claim 8, characterized in that: The distance between the first sampling point and the corresponding second sampling point is expressed as: Among them, l ou represents the distance between the first sampling point and the corresponding second sampling point, x c Indicates the position coordinates of the first sampling point, x c‘ represents the position coordinates of a second sampling point corresponding to the first sampling point; The step of using the equidistant histogram to represent the distribution of the iterative calculation results comprises: The number of times the distance between each first sampling point and the corresponding second sampling point is iteratively calculated is 1024 2 Second-rate; The number of intervals in the equidistant histogram is L, and the height of each interval is represented by l ou The frequency in the interval, the expression of the group distance between any two groups of the sampling point groups in each of the three-dimensional models to be sampled is: Among them, d represents the distance between any two groups of sampling points, l oumax Indicates the maximum value among the iterative calculation results, l oumin represents the minimum value in the iterative calculation results, and L represents the number of intervals in the equidistant histogram; The height of the equidistant histogram satisfies: Among them, h m Indicates the frequency of the iterative calculation result in the mth interval, L m It represents the frequency of the iterative calculation result in the mth interval, m∈L, k represents the number of iterative calculations; The expression of the cosine distance is: Among them, d c represents the cosine distance, v i represents the shape distribution vector of the i-th 3D model to be sampled, v j represents the shape distribution vector of the jth 3D model to be sampled, and ‖·‖ represents the norm of the vector.
Citation Information
Patent Citations
Curved surface adaptive sampling method and device, storage medium and computer equipment
CN117197397A
An adaptive sampling method for complex surface detection based on triangular mesh simplification
CN109101741A