An interactive three-dimensional mesh segmentation and normal consistent completion method based on region growing
By using an interactive 3D mesh segmentation and normal-consistent completion method based on region growing, the problems of insufficient accuracy and cumbersome operation in existing technologies are solved, generating high-quality 3D models suitable for 3D printing and simulation.
Patent Information
- Application Number
- CN202511125887.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2045-08-12
AI Technical Summary
Existing 3D mesh segmentation technology suffers from insufficient accuracy, cumbersome operation, and is prone to errors. After segmentation, the normals of the model are inconsistent and not closed, making it difficult to meet the needs of 3D printing and simulation applications.
An interactive 3D mesh segmentation method based on region growing is adopted, which combines user interactive selection with region growing algorithm, and generates a high-precision and continuous 3D model through centroid correction and normal consistency completion.
It achieves high-precision local segmentation, avoids accidental cutting of adjacent structures, and generates a structurally continuous and watertight 3D model, which is suitable for 3D printing, simulation and visualization applications, improving operational efficiency and model quality.
Smart Images

Figure CN121033348B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of computer graphics and three-dimensional model processing technology, and particularly relates to an interactive three-dimensional mesh segmentation and normal consistent completion method based on region growing. BACKGROUND
[0002] The interactive three-dimensional mesh segmentation and normal consistent completion based on region growing refers to that, in the process of three-dimensional model processing, after a user specifies an initial segmentation region through an interactive mode (such as point selection), the system automatically expands a connected segmentation region by using a region growing algorithm, so as to accurately extract a local structure (such as a finger or a part) in the model, and after the segmentation, the model boundary is closed and completed by using a normal direction alignment algorithm, so as to ensure that the newly generated surface patch and the original model are continuous and watertight in geometry and vision. The method combines user intention and automatic algorithm, so that the segmentation operation has both accuracy and efficiency, and is suitable for local separation, fine modeling and 3D printing preparation of complex structure models.
[0003] The prior art has the following disadvantages: The existing three-dimensional mesh segmentation technology generally has the following disadvantages: The traditional plane-based segmentation method lacks precision, is easy to damage adjacent structures, and is difficult to accurately control the segmentation range, especially in multi-finger or multi-branch structures; at the same time, the operation mode is complicated, and the modeling personnel need to manually select points to adjust the boundary step by step, which is low in efficiency and easy to make mistakes; in addition, the boundary after segmentation often has problems such as inconsistent normals and unclosed model, which leads to rough surface and non-watertight output model, and the model is difficult to be directly used for subsequent 3D printing, simulation or animation rendering processing. Although the artificial intelligence method has automation potential, it often has problems such as blurred boundary and insufficient precision due to the lack of large-scale training data for three-dimensional segmentation tasks, and it is difficult to meet the actual application requirements of industry.
[0004] The above information disclosed in the background section is only used to strengthen the understanding of the background of the present disclosure, and therefore it can include information that does not constitute prior art known to those of ordinary skill in the art. SUMMARY
[0005] The purpose of the present application is to provide an interactive three-dimensional mesh segmentation and normal consistent completion method based on region growing, which realizes high-precision local segmentation through region growing and interactive guidance, significantly improves the segmentation accuracy and efficiency of three-dimensional models, and avoids damaging adjacent structures; at the same time, the surface completion and normal reordering mechanism is introduced to solve the problems of unclosed model and inconsistent normals after segmentation, and a structure continuous, watertight and standardized three-dimensional model is generated, which can be directly used for 3D printing, simulation and visualization application, and has good industrial adaptability and engineering practical value, so as to solve the problems in the background technology.
[0006] In order to achieve the above object, the present application provides the following technical scheme: a method for interactive three-dimensional mesh segmentation and normal consistency completion based on region growing, comprising the following steps:
[0007] Obtaining a plurality of triangle facet numbers selected interactively, extracting spatial coordinates of corresponding facets, calculating a cutting reference plane by using a fitting algorithm, and aligning the center of the plane to the barycentric coordinates of the selected facets by a barycentric correction mechanism;
[0008] Based on the reference plane, initializing a region growing search queue, recursively expanding adjacent triangle facets under the conditions of topological connectivity and coplanar in the normal direction, and constructing a target segmentation region;
[0009] Based on the segmentation region, performing topological traversal on the original mesh by using breadth-first search, dividing two or more connected triangle facet sets according to the boundary, and generating a continuous segmentation region;
[0010] At the boundary, performing facet division according to the quadrilateral structure, introducing a center interpolation point and reconstructing the supplementary surface region according to the tangent direction, and forming a boundary closed structure composed of regular triangle facets;
[0011] Uniformly analyzing the vertex order of the closed structure and the original facets, constructing a normal consistency module, performing reordering for the supplementary surface region, and unifying the normal direction;
[0012] Outputting the processed multiple structure bodies in a standardized format file according to task requirements, generating a visual three-dimensional entity model, and completing the model segmentation, completion and normal correction process.
[0013] Preferably, the step of obtaining a plurality of triangle facet numbers selected interactively comprises:
[0014] A three-dimensional modeling person selects a plurality of triangle facet numbers through an interactive operation interface;
[0015] Extracting the coordinates of the three vertices of the corresponding facets in three-dimensional space to form a local region coordinate set;
[0016] Based on the extracted coordinates, a spatial fitting algorithm is used to calculate a cutting reference plane;
[0017] The center point of the cutting reference plane is aligned to the barycentric coordinates of the selected facets by a barycentric correction mechanism.
[0018] Preferably, the step of constructing a target segmentation region based on the cutting reference plane comprises:
[0019] Initializing a region growing search queue, selecting a starting triangle facet intersecting the cutting reference plane and having topological connectivity as an initial seed facet to add to the queue;
[0020] According to the topological connection relationship between the patches, it is judged whether the normal direction of the adjacent patch is coplanar with the normal direction of the cutting reference plane, if the coplanar condition is met, the patch is added to the segmentation region and the queue is expanded;
[0021] The adjacent patches are recursively expanded from the newly added patch as the starting point until all the patches meeting the topological connectivity and normal coplanar conditions are included in the target segmentation region;
[0022] After the region expansion is completed, the closed target segmentation region is output, and the topological consistency analysis is performed.
[0023] Preferably, the step of dividing the connected patch set by using the breadth-first search algorithm comprises:
[0024] The target segmentation region is subjected to topological analysis to identify all the adjacent triangular patches constituting a coherent structure;
[0025] The breadth-first search algorithm is used to start from the boundary patch and iteratively traverse the adjacent patches to expand the continuous segmentation region;
[0026] In the traversal process, the mesh is divided into two or more connected triangular patch sets according to the connectivity between the patches;
[0027] After the division is completed, the topological consistency check is performed on each set to form a segmentation region with topological continuity.
[0028] Preferably, the step of generating a boundary closed structure composed of regular triangular patches at the boundary comprises:
[0029] The quadrilateral structure formed by the boundary of the segmentation region is identified and extracted, and a patch division operation is performed;
[0030] A center interpolation point is introduced at the geometric center of each quadrilateral structure;
[0031] According to the tangent direction of the adjacent edge patch, the center interpolation point is connected with the boundary point to generate a regular triangular patch;
[0032] After the construction of the patch area is completed, a topologically coherent and normal direction consistent boundary closed structure is generated.
[0033] Preferably, the step of performing normal consistency processing on the patch comprises:
[0034] A uniform vertex order analysis is performed on all triangular patches in the three-dimensional mesh model to identify the vertex arrangement direction;
[0035] A normal direction consistency module is constructed according to the preset vertex order to uniformly adjust the patch normal direction;
[0036] The newly generated patch region is subjected to reordering processing to make its normal direction consistent with the adjacent original patch;
[0037] The normal consistency processing of the whole model is completed, and a three-dimensional mesh model with uniform normal direction is output.
[0038] Preferably, the three-dimensional structure after segmentation, completion and normal rearrangement processing is subjected to standard format conversion, and according to the modeling requirements of the user, each vertex coordinate, normal direction and patch topology in the original three-dimensional structure are standardized and stored, and the specific steps are as follows:
[0039] The vertex coordinates are converted by the normalization function Normalize, so as to obtain the standardized vertex coordinates, and the calculation expression is as follows:
[0040] ,
[0041] In the formula, P i is the coordinate of the i-th vertex in the original three-dimensional structure, representing the x, y, z values in the three-dimensional space, is the corresponding vertex coordinate in the standard format, and Normalize is the normalization function;
[0042] After the standard format conversion is completed, a three-dimensional entity model that can be independently called is generated, so that the entity model can be interactively operated in various applications, all standardized vertex coordinates, normal directions and topological structures are summarized to construct a complete three-dimensional entity model, and the construction formula is as follows:
[0043] ,
[0044] In the formula, M is the three-dimensional entity model finally generated, N i is the normal direction of the i-th vertex, and Connectivity(P i ) is the topological connectivity of the vertex P i .
[0045] In the above technical solution, the technical effects and advantages provided by the present application are as follows:
[0046] The present application can realize high-precision segmentation of complex local structures in a three-dimensional mesh model by combining user interaction selection and a region growing algorithm, and significantly improves the accuracy and control of segmentation. The user does not need to perform tedious point-by-point boundary drawing operations, and only needs to select a number of key patches, and the system can automatically construct a cutting reference plane and guide the region growing process, thereby accurately extracting a target region (such as a finger in a multi-finger structure or a sub-component in a mechanical component), and effectively avoiding the problem of “injury” to adjacent structures in traditional plane cutting. The whole process not only reduces the professional threshold of the segmentation operation, but also improves the operation efficiency and robustness, so that the local separation work of a complex three-dimensional model becomes fast and controllable, and is especially suitable for fine modeling, medical image segmentation and product part extraction in scenes with extremely high precision requirements.
[0047] The present application introduces a boundary patching and normal reordering mechanism to comprehensively solve common technical problems such as normal discontinuity, boundary unclosure and non-water-tight structure in the cut model, and significantly improves the quality and applicability of the output model. In the patching stage, the system automatically inserts a center point according to the boundary quadrilateral structure, and generates a regular triangular patch according to the tangent direction of the adjacent patches, to ensure the smoothness and tight connection of the completed area in the geometric structure; then, by unifying the vertex arrangement order and constructing a normal consistency module, the continuous transition of the patching area and the original model in the normal direction is realized, avoiding the problems of visual mutation and abnormal lighting. The finally output model has complete topological structure, uniform normal direction and standardized format, and can be directly used for 3D printing, simulation analysis, animation rendering and other practical industrial applications, reducing the post-processing cost and improving the model deployment efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed in the embodiments. Obviously, the drawings in the following description only illustrate some embodiments of the present application, and other drawings can also be obtained by those skilled in the art based on these drawings.
[0049] Figure 1 The method flowchart of the present application is an interactive three-dimensional mesh segmentation and normal consistent patching method based on region growing. DETAILED DESCRIPTION
[0050] Example implementations will now be described more fully with reference to the accompanying drawings. Example implementations may, however, be implemented in many different forms and should not be construed as limited to the examples set forth herein; rather, these example implementations are provided so that this disclosure will be thorough and complete, and will fully convey the scope of example implementations to those skilled in the art.
[0051] The present application provides a method forFigure 1 An interactive three-dimensional mesh segmentation and normal consistent completion method based on region growing, comprising the following steps:
[0052] Obtain the selected multiple triangular facet numbers interactively by the three-dimensional modeler, extract the corresponding facet space coordinates according to the numbers, calculate the cutting reference plane by using the space fitting algorithm, and align the center point of the reference plane to the barycentric coordinates of the selected facet through the barycentric correction mechanism;
[0053] Firstly, the three-dimensional modeler selects multiple triangular facets through the interactive operation interface. These facets are usually regions with obvious geometric features, such as certain local structures of the model (e.g. human fingers, mechanical parts, etc.). Each facet has its specific number in three-dimensional space, indicating its position in the entire mesh model. According to these numbers, the system can automatically extract the spatial coordinates of the corresponding triangular facets. Specifically, the system extracts the selected multiple facets from the original three-dimensional data by reading the data structure in the three-dimensional mesh model, obtaining the specific coordinates of each vertex of these facets in three-dimensional space. These coordinates include the spatial positions of the three vertices of each triangular facet, thus forming a complete local region coordinate set. This step ensures that the selected facets are accurately mapped to the corresponding positions of the three-dimensional model, providing accurate data basis for subsequent cutting operations.
[0054] Secondly, based on the extracted triangular facet coordinates, the system will use a space fitting algorithm to calculate an accurate cutting reference plane. This reference plane is constructed based on the selected facets, and by analyzing the geometric shapes of these facets, the system automatically identifies an optimal fitting plane that can best match the geometric shapes of these facets. The process of the fitting algorithm includes aggregating the normal vectors of multiple selected facets, and according to the directions and distributions of these normal vectors, calculating a globally optimal plane. This plane is defined as the reference plane for cutting operations, which can ensure the accuracy and stability of the cutting region to a certain extent. In practical applications, this reference plane is not only a simple fitting of the facet geometric shapes, but also takes into account the topological features and overall structure of the facets, ensuring that the plane can closely combine with the actual shape of the model.
[0055] Third, to further improve the segmentation accuracy, the system adopts a gravity correction mechanism to accurately align the cutting reference plane. Specifically, in the selected patch set, each patch has a corresponding gravity center coordinate. The gravity center is the position of the geometric center of the patch, usually calculated as the average of the three vertex coordinates of the patch. Through the gravity correction mechanism, the system adjusts the position of the calculated cutting reference plane, so that the center point of the plane is aligned to the gravity center coordinate of the selected patch. The key of this correction mechanism is to ensure that the cutting plane and the selected patch have a closer spatial relationship, avoiding segmentation errors caused by plane offset. Through this step, the system can more accurately control the positioning of the cutting area, avoid unnecessary geometric deviation in the segmentation process, especially when dealing with complex structures, it can effectively avoid cutting into unnecessary parts.
[0056] Finally, the corrected cutting reference plane will serve as the starting point for the region growing algorithm, and the system will start the mesh segmentation operation based on this plane. Specifically, the cutting plane after gravity alignment will automatically determine an accurate segmentation boundary, which is based on the expansion of the topological relationship of the selected patch, ensuring the accuracy and continuity of the segmentation area. The core of this step is to combine the geometric position of the cutting reference plane with the connectivity of the entire mesh structure, ensuring that the segmentation result is not only accurate, but also meets the physically reasonable mesh topology. In this way, the system can ensure that the segmentation operation does not damage the overall structure of the original three-dimensional mesh, while also accurately extracting local areas in the model, laying the foundation for subsequent segmentation and completion operations.
[0057] In summary, the implementation steps not only ensure high precision of model segmentation, but also effectively avoid segmentation deviation caused by inaccurate reference planes through the gravity correction mechanism. Through such a technical solution, the efficiency and accuracy of the three-dimensional mesh model segmentation process can be significantly improved, especially for complex structure processing, meeting the needs of high-precision modeling and fine design. In addition, the combination of spatial fitting algorithm and gravity correction mechanism provides strong technical support for subsequent region growing algorithm and normal consistency completion, providing a more efficient and intuitive tool for three-dimensional modeling personnel, thereby solving the common problems of mis-cutting, mis-operation and incomplete model after segmentation in traditional methods.
[0058] Based on the cutting reference plane, a region growing search queue is initialized, and under the condition that the normal direction of the adjacent patch is coplanar with the normal direction of the reference plane, the adjacent triangular patches are recursively expanded based on the topological connectivity between adjacent patches to construct the target segmentation region;
[0059] First, after obtaining the accurate cutting reference plane, the system automatically initializes a region growing search queue. This queue is used to track and expand the triangular facets that intersect with the reference plane, ensuring that the segmentation region gradually covers the target structure. When initializing the queue, the system selects a set of starting facets from the boundary of the cutting reference plane based on the preprocessed data, and adds these facets to the queue as the initial region for expansion. These starting facets are the ones closest to the cutting reference plane and have good topological connectivity. Their geometric positions and normal directions will serve as the starting point for region growing. The system records the spatial coordinates and normal directions of these facets to ensure that subsequent expansion operations are accurately performed in the plane normal direction.
[0060] Second, with the initialization of the region growing search queue, the system begins to recursively expand the region based on the topological connectivity between adjacent facets. Each time the expansion is performed, the system selects the currently nearest facet from the queue and checks whether the angle between this facet and the reference plane normal satisfies the coplanar condition. Specifically, the system calculates the included angle between the facet normal and the reference plane normal, and if the included angle is within the allowed range (i.e., it satisfies the normal direction coplanar requirement), the facet is considered part of the current segmentation region and is added to the region growing queue. This step ensures that the expansion of the segmentation region is based on the actual geometric relationship between the facets, rather than simply cutting the plane, avoiding the mis-cutting or omission that may occur in traditional methods.
[0061] Third, as the region growing progresses, the system continuously takes new facets from the queue and checks and expands their adjacent facets. Specifically, each facet that has been added to the segmentation region is used as a starting point for expansion, and its adjacent facets are checked to see if they satisfy the same normal direction and topological connectivity conditions. Through step-by-step expansion, the system ensures that the segmentation region accurately covers every detail area of the target structure without missing any necessary parts. In this process, the region growing algorithm continuously evaluates the geometric continuity and topological connectivity between new facets and the existing segmentation region, ensuring that the segmented region is continuous and can seamlessly connect in subsequent completion steps.
[0062] Finally, after completing the region growing and successfully expanding to the entire target segmentation region, the system performs a termination judgment on the segmentation region and outputs the complete segmentation result. At this point, the region growing algorithm ensures that the segmentation region is complete and closed, covering not only the required target structure but also maintaining the coplanarity of the facet normal and the reference plane. For the segmented region, the system will perform further topological analysis to ensure that the segmented model has the coherence and integrity required for subsequent operations. At this point, the target segmentation region is ready for subsequent operations such as normal consistency completion and facet splitting, ultimately forming an accurate and user-demand-oriented segmentation result.
[0063] The above embodiments describe in detail how to initialize the region growing search queue based on the cutting reference plane and gradually expand the target segmentation region through topological connectivity and face normal coplanar conditions. Through this innovative method, the accuracy and continuity of the segmentation region can be guaranteed, avoiding the errors and incomplete regions in traditional methods, while greatly improving the efficiency and accuracy of the segmentation operation. This method is particularly suitable for complex three-dimensional model processing, especially for detailed target structures such as biological models, industrial design, and high-precision three-dimensional modeling applications.
[0064] Based on the target segmentation region, a breadth-first search algorithm is used to perform topological traversal on the original three-dimensional mesh model, dividing the mesh model into two or more connected triangle face sets according to the region boundary, and generating a topologically continuous segmentation region;
[0065] First, based on the target segmentation region, the system will perform mesh topology analysis to identify and extract all triangle faces within the segmentation region. These faces constitute the target segmentation region, and the system will identify the topological relationship between adjacent faces to ensure that these faces form a coherent region and exclude any isolated or broken faces. At this time, the system will check whether each face is in contact with the boundary of the target region to ensure that the topological structure of these faces is complete and can provide a stable basis for subsequent segmentation operations. To avoid missing any necessary faces, the system will optimize the identification of the target region through a preprocessing step to ensure that all faces that need to be segmented are accurately included in the target region.
[0066] Second, after identifying and extracting the target segmentation region, the system will use a breadth-first search algorithm (Breadth-First Search, BFS) to perform topological traversal on the original three-dimensional mesh model. The core idea of the breadth-first search algorithm is to start from the starting face of the segmentation region and traverse adjacent faces layer by layer until the entire segmentation region is completely covered. In this process, the system first adds the boundary face of the target region as the starting point to the search queue and expands to adjacent faces in topological order. The system tracks the adjacency relationship of each face to ensure that all faces from the starting point to the target region can be traversed without missing any part. At the same time, the breadth-first search algorithm can ensure the uniformity of the traversal order, thereby avoiding the memory overhead problem caused by too deep recursion depth in traditional algorithms, ensuring efficient processing of large-scale three-dimensional models.
[0067] Third, the system divides the mesh model into two or more connected triangle sets according to the topology of the boundary during traversal. Each time the search is expanded, the system checks whether the newly traversed face is connected to the existing partitioned area. If it is connected, it is added to the current set; if it is not connected, it is divided into another new face set. In this way, the breadth-first search algorithm ensures that the boundary of the target area remains continuous and can generate one or more topologically continuous partitioned areas. The faces inside each topologically continuous area are adjacent and connected, which provides a solid foundation for subsequent completion and normal consistency adjustment. In addition, the system can effectively identify and process multiple sub-regions in complex geometries, ensuring the integrity and accuracy of the partitioning results when dealing with models with rich details or complex structures.
[0068] Finally, after completing the topological traversal and dividing the two or more connected triangle sets, the system performs post-processing on the partitioned areas to ensure that the partitioned areas are geometrically consistent and meet physical requirements. At this time, the system will generate topologically continuous partitioned areas and provide accurate input data for subsequent steps such as normal completion, face supplementation, and model optimization. Specifically, the system checks whether the faces within each partitioned area have good topological connectivity, ensuring that each area is self-consistent and will not have broken or incorrectly connected areas in actual applications. After completing this process, the model will be divided into multiple independent parts, each of which can be operated individually in subsequent processing steps without affecting the overall structure of the model.
[0069] By using the breadth-first search algorithm, the system can effectively perform topological traversal in three-dimensional mesh models and divide the mesh into multiple topologically continuous partitioned areas according to the area boundaries. This method can ensure the accuracy of the partitioning while avoiding the problems of traditional methods such as mis-cutting and missing areas. At the same time, the system can flexibly handle the partitioning needs of multiple sub-regions in complex models, ensuring that the topological structure and geometric shape of each partitioned area are perfectly preserved, providing a reliable foundation for subsequent completion and optimization.
[0070] At the boundary of the partitioned area, perform face division operations according to the quadrilateral structure formed by the boundary, introduce a central interpolation point, and reconstruct the supplementary face area based on the tangent direction of the adjacent edges to generate a boundary closed structure composed of regular triangular faces;
[0071] First, after completing the segmentation of the target area and confirming the boundaries of the segmented areas, the system will identify and extract all the quadrilateral structures formed on the boundaries. Quadrilateral structures often appear on the edges of the segmented model, especially during the mesh cutting process, as the intersection of planes and three-dimensional model patches may form quadrilateral patches. To ensure that the boundaries are smoothly closed, the system will perform a patch division operation on the boundaries based on these quadrilateral structures. Specifically, the system will automatically analyze the geometry of these quadrilaterals, decompose them into multiple triangular patches, ensure that each patch is regular, and meet the subsequent requirements for completion and normal consistency. This step is a prerequisite for ensuring that the segmented area can be accurately completed, avoiding irregular or discontinuous boundary structures.
[0072] Second, after performing the patch division operation, the system will introduce a central interpolation point, which is located at the geometric center of the quadrilateral structure. The introduction of the interpolation point is mainly to optimize the geometric shape and topological structure of the completion area. Specifically, the central interpolation point is used to calculate the geometric center of the completion area and serves as a reference point for subsequent patch construction. The interpolation point is generated by interpolating the geometric characteristics of the edges of the quadrilateral, resulting in a physically and geometrically smooth and reasonable completion position. During the generation of this interpolation point, the system considers the normal direction of the boundary patch and the angle of the edge patch to ensure that the transition between the newly generated completion area and the original model is natural and seamless, avoiding geometric distortion caused by improper interpolation point positions.
[0073] Third, after introducing the central interpolation point, the system will reconstruct the patch area based on the adjacent edge tangent directions. Specifically, the system analyzes the adjacent patches of the boundary of the segmented area to obtain the tangent directions of these patches and determines the construction method of the patch area based on the tangent directions. The tangent direction of the adjacent edge will be used as a reference for the normal vector of the patch, so that the newly generated patch is consistent in geometry and normal direction, thereby avoiding the problem of surface abruptness or discontinuity caused by inconsistent normals. In this process, the system will automatically seamlessly connect the patch to the original mesh and ensure that the newly generated patch follows the topological rules of the adjacent patches, ensuring the topological structure and normal consistency of the completion area.
[0074] Finally, after the center interpolation point and tangent direction reconstruction of the patch region, the system will generate a boundary closed structure composed of regular triangular patches. This structure not only perfectly fits the original model boundary in geometry, but also maintains consistency in topology, ensuring that the segmented region can meet high quality requirements for subsequent three-dimensional printing, animation rendering, or physical simulation. In this process, the system automatically performs a mesh optimization step to further refine the mesh structure of the patch region, ensuring that there are no redundant patches and that all patches are constructed in the form of regular triangular patches, meeting the standard and accuracy requirements of three-dimensional modeling. Finally, the system outputs a closed and regular triangular face mesh, completes the boundary completion, and ensures the smooth progress of subsequent operations.
[0075] The above embodiment elaborates how to generate a boundary closed structure composed of regular triangular patches through a series of innovative steps such as patch division, center interpolation, tangent direction reconstruction, etc. at the boundary of the segmented region. This process not only improves the accuracy and consistency of the segmented region, but also avoids the completion problem in traditional methods by optimizing the normal consistency and topology of the patch region. This technical solution has high creativity and practicality, is suitable for processing complex three-dimensional mesh models, and can effectively improve the efficiency and accuracy of model segmentation and completion, meeting the high requirements of three-dimensional modeling.
[0076] A unified vertex order analysis is performed on the boundary closed structure and all triangular patches in the original model, and a global normal direction consistency module is constructed according to the preset order to perform reordering processing on the newly generated patch region, so that the normal direction of all patches is consistent;
[0077] First, after completing the segmentation and completion operations, the system performs a unified vertex order analysis on all triangular patches in the entire three-dimensional mesh model. The purpose of this analysis is to ensure that all triangular patches have consistent vertex arrangement order in space. Specifically, the system first scans the patch data in the entire three-dimensional mesh, checks the arrangement order of the three vertices of each triangular patch. Generally, there are two possible orders of triangular patch vertex arrangement: clockwise and counterclockwise. In order to achieve normal direction consistency, the system uniformly processes the vertex order of all patches by analyzing the connection relationship between adjacent patches to ensure that the vertex order of each patch meets the uniform standard. In this way, the system can avoid the problem of inconsistent normal direction caused by different vertex arrangements, and ensure that the subsequent normal consistency operation can be smoothly performed.
[0078] Secondly, after completing the vertex order unification, the system constructs a global normal consistency module based on the preset order. The core goal of this module is to ensure that the normal direction of each face in the model remains consistent based on the global vertex order. Specifically, the system calculates the normal direction of each face and compares it with the preset normal direction. If the normal direction of a certain face is inconsistent with the preset direction, the system will adjust it by reversing the normal direction of that face to ensure consistency with the normal direction of surrounding faces. To improve efficiency, the system uses a local adjustment strategy based on the topology structure, which only corrects the normal direction of the face adjacent to the boundary without affecting the inner layer faces that have been processed by the normal consistency module. In this way, the system can ensure the overall normal consistency of the model while avoiding unnecessary calculations and optimization.
[0079] Thirdly, after completing the construction of the global normal consistency module, the system will perform a reordering-oriented processing for the newly generated patch region. Specifically, the patch region is usually generated at the boundary of the segmented region and needs to seamlessly connect with the geometry and normal direction of the original model. To achieve this goal, the system will reorder all the face vertices in the patch region to ensure that their normal direction is consistent with the original mesh model. This step reorders the vertex order of each triangular face in the patch region to make its normal direction consistent with the adjacent face in the original mesh. The system will determine whether the normal direction of the face needs to be adjusted based on the adjacent structure of the patch region and the overall topology of the mesh, and will reverse or maintain the original normal direction as needed. Through this operation, the patch region can perfectly connect with the original model in terms of normal consistency, avoiding visual defects caused by sudden changes in normal direction.
[0080] Finally, after the reordering-oriented processing, the system will complete the normal consistency adjustment of the entire model and output a three-dimensional mesh model with complete normal consistency. During this process, the system will perform a final check of the normal direction of the entire model to ensure that the normal direction of all faces is uniform and meets the preset standards. The processed model will have high-quality surface smoothness and natural transition, suitable for subsequent 3D printing, animation rendering or physical simulation applications. At the same time, the mesh model processed by the normal consistency not only presents a smooth surface transition in terms of vision, but also meets the mechanical consistency requirements in physical simulation, ensuring the reliability of the model in actual application.
[0081] Through the above steps, the system can analyze the vertex order of all triangular facets in the three-dimensional mesh model, and construct a global normal direction consistency module according to the preset order, so as to realize the normal consistency processing of the whole model. This process ensures the seamless connection of the newly generated patch area with the original mesh, avoids the visual problems caused by inconsistent normal direction, and ensures the smoothness and natural transition of the model surface through the reordering operation. This technical scheme not only improves the precision and quality of the model, but also provides strong support for subsequent 3D printing, simulation and rendering applications, has strong innovation and practicality, and can meet the high requirements of three-dimensional modeling.
[0082] The segmented, completed and normal rearranged three-dimensional structures are output as standardized format files according to the modeling task requirements, to generate a visual three-dimensional entity model that can be independently called, realizing the segmentation, completion and normal correction integrated processing flow of the model.
[0083] The role of this step is to output the segmented, completed and normal rearranged three-dimensional structures as standardized format files according to the modeling task requirements, and generate a visual three-dimensional entity model that can be independently called. The core of this process is to ensure that the three-dimensional model after multiple processing steps can be stored and transmitted in a standardized format for subsequent use and integration. By outputting in a standardized format, the model can be easily shared between different software and platforms, ensuring compatibility and data consistency. At the same time, the generated visual three-dimensional entity model enables the model to be interactively operated and displayed in various application scenarios, enhancing the operability and controllability of the model for users.
[0084] This step is crucial for the subsequent application of the model, especially in the fields of 3D printing, virtual reality (VR), augmented reality (AR), animation rendering and physical simulation, etc. The model must have good data structure and operability. By implementing the segmentation, completion and normal correction integrated processing flow of the model, it can effectively avoid error accumulation and model incoherence that may occur during processing, ensuring that the generated three-dimensional model is not only geometrically complete and meets the accuracy requirements, but also maintains high visual consistency and physical consistency. Finally, the generation of standardized output files enables the model to be flexibly embedded into various applications, greatly improving work efficiency and the diversity of application scenarios.
[0085] The segmented, completed and normal rearranged three-dimensional structures are converted into standardized format. The conversion of standardized format is a key step to ensure the compatibility and stable performance of model data between different applications and platforms. According to the modeling requirements of users, each vertex coordinate, normal direction and facet topology structure in the original three-dimensional structure are stored in a standardized manner, and the specific steps are as follows:
[0086] The vertex coordinates are converted by the normalization function Normalize, to obtain the normalized vertex coordinates, and the calculation expression is as follows:
[0087] ,
[0088] In the formula, P i is the coordinate of the i-th vertex in the original three-dimensional structure, representing the x, y, z values in three-dimensional space, is the corresponding vertex coordinate in the normalized format, and its output is the normalized vertex coordinate, which is usually scaled, rotated, and offset, etc. to adapt to the required coordinate space (for example, scaled into a unit cube or converted to other model coordinate systems). The normalized coordinates ensure that the model can be correctly displayed in different platforms, tools or applications, and have consistent performance in all software or hardware environments. Normalize is a normalization function;
[0089] Normalize is a normalization function that converts the original three-dimensional vertex coordinates into coordinates that conform to a specific standard format. Its main function is to perform geometric processing on the vertices of a three-dimensional model to ensure consistency of the model in different coordinate systems and platforms. Specifically, the Normalize() function usually performs a series of mathematical operations, including scaling, translation, rotation, etc., to adjust the vertex coordinates to a predetermined range or standard space.
[0090] For example, a common operation is to scale all the vertices of the model into a unit cube, which ensures that the model can be displayed consistently in any application or platform. Specifically, Normalize may: scaling: adjust the range of vertex coordinates to a standard size, such as scaling the entire model into a unit cube or unit sphere. Translation: move the center of the model to the origin or other specified position to ensure that the position of the model in the coordinate system is not affected. Rotation: sometimes also rotates to ensure that the model is displayed in the correct direction.
[0091] Existing normalization functions, such as in 3D modeling software or graphics libraries (such as OpenGL, DirectX), usually have this function built-in, which helps developers ensure that processed three-dimensional data can be seamlessly migrated to different application environments without causing data inconsistencies due to different coordinate systems or size standards.
[0092] In this process, the vertex coordinates are adapted according to the model precision requirements, and the normal direction and topology of the model are also updated synchronously. This operation ensures that all geometric information is preserved and meets the predetermined precision requirements of the model when generating a normalized format file.
[0093] After completing the standardized format conversion, a callable 3D solid model is generated, enabling interactive operation of the solid model in various applications. To achieve this goal, the system generates a 3D model instance containing all topological and geometric information, where each facet and vertex is precisely labeled to ensure accurate control and display of the model in subsequent operations. All standardized vertex coordinates, normal directions, and topological structures are then aggregated to construct a complete 3D solid model. The construction formula is as follows:
[0094] ,
[0095] In the formula, M is the final generated 3D solid model, which includes the coordinates of all vertices, normal directions, and topological information. It is a set containing complete 3D data, enabling the model to be applied to various 3D modeling, rendering, physical simulation, and 3D printing applications. This parameter is the output of the entire formula, representing a complete 3D model. It will be converted into a format that can be used independently, such as STL, OBJ, or PLY, ensuring compatibility and data consistency between different software and platforms. N i These are the normal directions of the i vertices. A normal is a vector perpendicular to the face containing the vertex, typically used to represent the orientation of a model's surface. Each vertex is associated with a normal vector, indicating its surface orientation in 3D space. Normal directions are crucial for rendering, lighting calculations, and subsequent operations. By processing normal directions uniformly, the system can ensure the consistency of the 3D model's surface and the naturalness of its lighting response. Normal information also has a significant impact on applications such as physical simulation and 3D printing, as it relates to the model's geometric surface morphology and details. Connectivity (P) i ) is vertex P i Topological connectivity refers to the connections between vertices and their adjacent triangles, edges, and other vertices. This includes information about the vertex's adjacent faces in the model (e.g., which triangles are adjacent to the vertex), as well as the topological relationships with its other adjacent vertices and edges. Topological information is crucial for constructing a complete 3D mesh. It defines how faces are connected, ensuring that the relationships between each vertex, face, and edge are correctly described. During model processing, modification, and rendering, the topological structure helps ensure that faces do not become misaligned, and that the model's geometry remains consistent.
[0096] This formula combines all vertices, normals, and topological information to form a complete 3D solid model. This model can be interactively displayed in various application environments, such as 3D printing, animation rendering, and virtual reality. Ultimately, after these two processing steps, the 3D model not only meets accuracy requirements but also runs stably in applications and allows for efficient visualization operations.
[0097] The present application can realize high-precision segmentation of complex local structures in a three-dimensional mesh model by combining user interaction selection and region growing algorithm, significantly improving the accuracy and control of segmentation. The user does not need to perform tedious point-by-point boundary drawing operation, only needs to select several key patches, and the system can automatically construct a cutting reference plane and guide the region growing process, thereby accurately extracting the target region (such as a finger in a multi-finger structure or a sub-component in a mechanical component), effectively avoiding the problem of "injury" to adjacent structures in traditional plane cutting. The whole process not only reduces the professional threshold of segmentation operation, but also improves the operation efficiency and robustness, making the local separation of complex three-dimensional models fast and controllable, especially suitable for fine modeling, medical image segmentation and product part extraction, etc. scenes with very high precision requirements.
[0098] The present application introduces a boundary patch and normal reordering mechanism to comprehensively solve the common technical problems of normal discontinuity, boundary unclosed, structure non-water-tight, etc. after cutting, significantly improving the quality and applicability of the output model. In the patch stage, the system automatically inserts a center point according to the boundary quadrilateral structure, and generates a regular triangular patch according to the tangent direction of the adjacent patch, ensuring the smoothness and tight connection of the completed area in the geometric structure; then, by unifying the vertex arrangement order and constructing the normal consistency module, the continuous transition of the patch area and the original model in the normal direction is realized, avoiding the problem of visual mutation and abnormal lighting. The finally output model has complete topological structure, uniform normal direction and standardized format, and can be directly used for 3D printing, simulation analysis, animation rendering and other practical industrial applications, reducing post-processing cost and improving model deployment efficiency.
[0099] The above formulas are dimensionless numerical calculations, and the formulas are obtained by software simulation of a large amount of data to obtain the most recent real situation, and the preset parameters in the formula are set by a person skilled in the art according to the actual situation.
[0100] The above only describes some exemplary embodiments of the present application by way of illustration, and it is needless to say that those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present application. Therefore, the above figures and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present application.
[0101] It should be noted that, in the present document, relational terms are used to convey a relationship of one entity or action to another entity or action. For example, without necessarily implying any actual relationship or order between entities or actions, the terms "first," "second," "top" and "bottom" are used to name different entities and actions, and are used to distinguish one element from another. Furthermore, the terms "comprise," "include," and "have," and variations thereof, do not preclude the presence or addition of one or more other elements or steps, unless the context clearly indicates otherwise. The term "including" as used herein, means "comprising" in the sense of the transition word "comprising," and not by way of limitation. The use of "including" and "including" and "have" and variations thereof herein, does not imply that there are no additional elements or steps. The term "coupled" as used herein, means the joining of two members together such that the members together and / or one or both members can function together.
[0102] It should be understood that the size of the sequence number of each process described above in various embodiments of the present application does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0103] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be realized in electronic hardware, or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0104] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, which will not be described here.
[0105] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, i.e. they can be located in one place or distributed on multiple network units. Part or all of the units can be selected to achieve the purpose of the embodiments according to actual needs.
[0106] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit.
[0107] The above merely provides the specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of the changes or replacements within the technical range disclosed by the present application, which should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
[0108] The foregoing merely describes certain exemplary embodiments of this application by way of illustration. Obviously, for those skilled in the art, modifications and changes can be made to the described embodiments in various ways without departing from the spirit and scope of the application. Therefore, the above drawings and descriptions are illustrative in nature, and should not be construed as limiting the scope of the claims of the present application.
Claims
1. An interactive 3D mesh segmentation and normal consistent completion method based on region growing, characterized in that, The method comprises the following steps: Obtaining a plurality of triangle facet numbers selected by interaction, extracting spatial coordinates of corresponding facets, calculating a cutting reference plane by using a fitting algorithm, and aligning the center of the cutting reference plane to the barycentric coordinates of the selected facets by barycentric correction; Based on the reference plane, initializing a region growing search queue, recursively expanding adjacent triangle facets under the condition of coplanar normal direction according to topological connectivity, and constructing a target segmentation region; Based on the segmentation region, performing topological traversal on the original mesh by using breadth-first search, dividing two or more connected triangle facet sets according to the boundary, and generating a continuous segmentation region; At the boundary, performing facet division according to the quadrilateral structure, introducing a center interpolation point, and reconstructing the patch region according to the tangent direction to form a boundary closed structure composed of regular triangle facets; Uniformly analyzing vertex order of the closed structure and the original facets, constructing a normal consistency module, performing facet reordering for the patch region, and unifying the normal direction; Outputting the processed multiple structure bodies in a standardized format file according to task requirements, generating a visual three-dimensional entity model, and completing the model segmentation, completion and normal correction process.
2. The region growing based interactive 3D mesh segmentation and normal consistent completion method according to claim 1, characterized in that, The step of obtaining a plurality of triangle facet numbers selected by interaction comprises: A three-dimensional modeling person selects a plurality of triangle facet numbers through an interactive operation interface; Extracting the coordinates of the three vertices of the corresponding facets in three-dimensional space to form a local region coordinate set; Based on the extracted coordinates, a cutting reference plane is calculated by using a spatial fitting algorithm; The center point of the cutting reference plane is aligned to the barycentric coordinates of the selected facets by a barycentric correction mechanism.
3. The region growing based interactive 3D mesh segmentation and normal consistent completion method according to claim 1, characterized in that, The step of constructing a target segmentation region based on the cutting reference plane comprises: Initializing a region growing search queue, selecting a starting triangle facet intersecting the cutting reference plane and having topological connectivity as an initial seed facet to add to the queue; According to the topological connection relationship between the facets, it is judged whether the normal direction of the adjacent facets is coplanar with the normal direction of the cutting reference plane, if the coplanar condition is met, the facet is added to the segmentation region and the queue is expanded; Continue to recursively expand adjacent facets from the newly added facet as the starting point until all facets that meet the topological connectivity and normal coplanar condition are included in the target segmentation region; After the region expansion is completed, the closed target segmentation region is output, and topological consistency analysis is performed.
4. The region growing based interactive 3D mesh segmentation and normal consistent completion method according to claim 1, characterized in that, The step of dividing connected facet sets by using a breadth-first search algorithm comprises: Performing topological analysis on the target segmentation region to identify all adjacent triangle facets that constitute a coherent structure; Using a breadth-first search algorithm, starting from the boundary facet, iteratively traversing adjacent facets to expand a continuous segmentation region; In the traversal process, the mesh is divided into two or more connected triangle facet sets according to the connectivity between the facets; After the division is completed, topological consistency check is performed on each set to form a segmentation region with topological continuity.
5. The region growing based interactive 3D mesh segmentation and normal consistent completion method according to claim 1, wherein, The step of generating a boundary closed structure composed of regular triangle facets at the boundary comprises: Identifying and extracting quadrilateral structures formed by the boundaries of the segmentation region and performing facet division operation; Introducing a center interpolation point at the geometric center of each quadrilateral structure; According to the tangent direction of the adjacent edge facets, reconstruct the patch region, connect the center interpolation point and the boundary point to generate regular triangle facets; After the completion of the patch region construction, a topologically consistent and normal direction consistent boundary closed structure is generated.
6. The region growing based interactive 3D mesh segmentation and normal consistent completion method according to claim 1, wherein, The steps of performing the normal consistency processing on the patches include: Performing uniform vertex order analysis on all triangular patches in the three-dimensional mesh model to identify the vertex arrangement direction; Constructing a normal direction consistency module according to a preset vertex order to uniformly adjust the patch normal direction; Performing a reordering processing on the newly generated patch region to make the normal direction consistent with the adjacent original patch; Completing the normal consistency processing of the overall model and outputting a three-dimensional mesh model with uniform normal direction.
7. The region growing based interactive 3D mesh segmentation and normal consistent completion method according to claim 1, wherein, After the three-dimensional structure is segmented, completed and processed by the normal rearrangement, a standardized format conversion is performed, and according to the modeling requirements of the user, each vertex coordinate, normal direction and patch topological structure in the original three-dimensional structure are standardized and stored, and the specific steps are as follows: The vertex coordinates are converted by a normalization function Normalize to obtain the standardized vertex coordinates, and the calculation expression is as follows: , where P i is the coordinate of the i-th vertex in the original three-dimensional structure, representing x, y, z values in three-dimensional space, is the corresponding vertex coordinate in normalized format, Normalize being a normalization function; After the completion of the standardized format conversion, a three-dimensional entity model that can be independently called is generated, so that the entity model can be interactively operated in various applications, all standardized vertex coordinates, normal directions and topological structures are summarized to construct a complete three-dimensional entity model, and the construction formula is as follows: , In the formula, M is a three-dimensional entity model finally generated, N i is a normal direction of i vertices, Connectivity(P i ) is a topological connectivity of vertex P i .
Citation Information
Patent Citations
Interactive segmentation method, system and device for quadratic surface fitting-based model
CN109801299A
Target object point cloud feature line and surface extraction method and system
CN113298833A