Triangular mesh optimization reconstruction method based on vertex concavity and convexity
By obtaining the vertex normals and concave vectors, we can judge and repair the vertex concavity and convexity in the triangular mesh model, realizing the automatic optimization and reconstruction of the triangular mesh, solving the problems of chaotic structure and abnormal attributes of the original model, and improving the model's performance. Geometric character restoration and aesthetics.
Patent Information
- Application Number
- CN202410922569.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2024-09-10
AI Technical Summary
In the sampling and reconstruction of real objects, the original triangular mesh model leads to structural confusion and abnormal attributes due to discreteness, making it difficult to accurately reflect the characteristics of the object. Moreover, the existing mesh reconstruction technology has deficiencies in handling the concavity and convexity of vertices.
By obtaining the vertex normal and concave vector, the concavity and convexity of the vertex are determined, the mesh is recursively reconstructed within the N-order neighborhood of the vertex, and the vertex connection method is adjusted to repair the abnormal concavity and convexity to form an optimized triangular mesh model.
It realizes the automatic optimization of the concavity and convexity of the triangular mesh without changing the spatial relationship of the vertices, obtains a better and more reasonable triangular mesh model, and improves the geometric feature recovery and beautiful smoothness of the model.
Smart Images

Figure CN118628685A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of triangular mesh reconstruction, and in particular to a triangular mesh optimization reconstruction method based on vertex concavity and convexity. Background Art
[0002] Mesh reconstruction refers to the process of modifying, improving or reconstructing an existing mesh to meet specific needs or optimize the performance of the model. This technology is widely used in computer vision, computer graphics and other fields. A common mesh reconstruction method is elastic smoothing, whose main feature is that the mesh line is similar to a spring, and the nodes at both ends move elastically. In this process, the number of nodes and the connection relationship between nodes generally remain unchanged, that is, the connection properties between nodes remain unchanged, but the spatial relationship between nodes will change. Another common mesh reconstruction method is local reconstruction, whose main feature is that the connection properties between meshes change, that is, the number and connection relationship of nodes are changing. In some specific applications, such as architecture, cultural relics protection, industrial design and other fields, mesh reconstruction technology can help people use discrete three-dimensional space mesh models to more accurately reflect continuous real objects in reality. At the same time, in the field of physical simulation, mesh reconstruction also plays a key role, helping to more accurately simulate the movement and properties of objects.
[0003] A triangular mesh is a polygonal mesh composed entirely of triangles. Common triangular mesh models are usually reconstructed by computer modeling or by collecting data from real objects through laser scanning, cameras, depth sensors and other devices. However, the original triangular mesh model may have problems such as chaotic structure and abnormal properties. Especially in the field of sampling and reconstructing meshes for real objects, the discreteness of the mesh itself leads to abnormal simulation of real objects. Therefore, triangular mesh reconstruction has been committed to optimizing triangular mesh models, so that the mesh can more accurately reflect its properties by changing the spatial relationship or connection properties of the mesh. On the one hand, it is to deal with errors in the connection properties of the mesh, and on the other hand, it is to restore the good details and geometric features of the triangular mesh. One advantage of triangular mesh reconstruction is that it can restore the various geometric features of the mesh, making it more in line with the requirements of use during use, such as making the triangular mesh model accurately reflect the characteristics of real objects or making the model beautiful and smooth. Summary of the invention
[0004] The purpose of the present invention is to provide a triangular mesh optimization reconstruction method based on vertex convexity in order to solve the above-mentioned problem.
[0005] To achieve the above object, the technical solution adopted by the present invention is:
[0006] According to one aspect of the present invention, a triangular mesh optimization reconstruction method based on vertex concavity and convexity is provided, comprising the following steps:
[0007] Step 1: Input the triangular mesh model to be optimized ;
[0008] Step 2: Model from triangular mesh Get the vertex set Each vertex The vertex normal of , and record;
[0009] Step 3: Pass through the set of all triangles around the vertex with the vertex as the triangular vertex Unit vector inside parallel to the face The weighted vector synthesis of the vertex set All vertices of Concave vector Acquisition of
[0010] Step 4: Calculate the triangular mesh model Upper Vertex Set Each vertex The vertex normal of and concave vector The angle of the vertex is determined by the size of the angle. ;
[0011] Step 5: Triangulate the mesh model Upper Vertex Set Each vertex Get the included vertices The vertex set of all adjacent vertices , through the set of adjacent vertices The vertex convexity in the vertex is judged by the vertex Is there an exception? Set the vertex set Used to store abnormal vertices and record abnormal vertices in middle;
[0012] Step 6: Set of vertices with abnormal concavity Each vertex in The surrounding N-order neighborhood performs grid reconstruction and uses a recursive algorithm to obtain the target vertex within the current neighborhood. The best vertex connection method for convexity and concavity is used to reconnect the vertices to form a new triangular mesh, where N is the number of iterations.
[0013] Step 7: Determine the vertex set with abnormal concavity The abnormal vertices in Whether the concavity of the vertex is corrected, if not, the uncorrected vertex continues to enter the next iteration, and the mesh is reconstructed in the N+1 order neighborhood around it until the concavity of the vertex is repaired and the iteration ends;
[0014] Step 8: Export the corrected and optimized triangular mesh model at the vertex convexity level .
[0015] Furthermore, in step 2, obtain the vertex set Each vertex The vertex normal method is:
[0016] Step 2-1: Get the vertices The set of all surrounding triangles with this vertex as the triangle vertex ;
[0017] Step 2-2: Get each patch in the patch set Above The interior angle of the vertex ;
[0018] Step 2-3: Inner Angle is the weight, using each patch The face normal on Perform weighted vector synthesis and finally normalize to obtain vertices The vertex normal of ,Right now:
[0019]
[0020] Among them, m is The number of mid-faces.
[0021] Furthermore, in step 3, the method for obtaining the concave vector from the vertex neighboring face is as follows:
[0022] Step 3-1: Get the vertices The set of all surrounding triangles with this vertex as the triangle vertex ;
[0023] Step 3-2: Get a collection of patches Each patch The geometric center point , and then calculate the vertex Point to the geometric center The unit vector ;
[0024] Step 3-3: Vertex Set The vertices in , with vertex normals and all surrounding neighboring face normals The dot product of is used as the weight to synthesize the weighted vector to obtain the concave vector ,Right now:
[0025]
[0026] Among them, m is The number of mid-faces.
[0027] Furthermore, in step 4, the method of using the angle between the vertex normal and the concave vector to determine the concavity of the vertex is as follows:
[0028] Step 4-1: Calculate the vertex set Every vertex on The vertex normal on and concave vector The dot product of
[0029] Step 4-2: During the determination process, you only need to confirm whether the angle is greater than , the convexity can be determined. If the dot product value is greater than 0, it means that the angle between the two vectors is less than , then the concave direction and the vertex direction are consistent, and the vertex is concave; if the value of the dot product is less than 0, it means that the angle between the two vectors is greater than , then it is determined that the concave direction and the vertex direction are opposite, and the concavity of the vertex is convex.
[0030] Step 4-3: Each vertex Concavity Record.
[0031] Furthermore, in step 5, the method of using the concavity and convexity of adjacent vertices to determine whether the concavity and convexity of the vertex is abnormal is as follows:
[0032] Step 5-1: Get the target vertex The set of all adjacent vertices of , get the concavity and convexity of each adjacent vertex;
[0033] Step 5-2: By setting the tolerance parameters To adjust the judgment range of anomalies, this value determines when a point is judged as an abnormal point, and how many of its adjacent points can have the same concavity and convexity as it. Generally, this parameter is set to 0 or 1; if it is set to 0, then if the adjacent vertex set All vertices in the same concavity and convexity are the same as the target vertex Concavity Different, then determine the target vertex Abnormal convexity.
[0034] Step 5-3: Set up the vertex set Used to store all vertices with abnormal concavity and convexity in the triangular mesh, and put the vertices determined to have abnormal concavity and convexity in step 5-2 into the vertex set middle.
[0035] Furthermore, in step 6, the method for reconstructing the mesh in the N-order neighborhood for all abnormal vertices is as follows:
[0036] Step 6-1: Determine the range of the grid that needs to be reconstructed according to the number of iterations. If it is a first-order neighborhood, the reconstruction range is the target vertex. A collection of triangles with triangular vertices and Each patch The set of adjacent patches The union of ; If it is a 2nd-order neighborhood, the reconstruction range is and Each patch The set of adjacent patches The union of ; Similarly, if it is an N-order neighborhood, the reconstruction range is and Each patch The set of adjacent patches The union of ;
[0037] Step 6-2: Set of vertices with abnormal concavity Each vertex in Both execute the traversal algorithm, traversing each vertex in turn A collection of triangles All patches in , get each The set of adjacent patches , and then for each Each face in continues to obtain the face that does not contain the source (i.e. ) and recursively search for adjacent faces of the recursive function until the recursive depth is equal to the current number of iterations, and record the face sequence experienced by each recursion;
[0038] Step 6-3: Reconstruct each recursive face sequence one by one in reverse order from the end to the beginning. The reconstruction method is: the triangle face currently traversed in the sequence and its previous triangle The four vertices of the triangle are reconnected to form two new patches with different connection modes, and the two reconstructed patches in the sequence are replaced. However, if the new patches intersect with other patches, the reconstruction of the two patches is not performed. Subsequently, if the new patches are reconstructed, the new patches are combined with the adjacent patches that have not been reconstructed. If the new patches are not reconstructed, the current triangle is skipped. , enter the previous triangle The reconstruction process continues until all triangles in the sequence are traversed;
[0039] Step 6-4: Calculate the target vertex after each recursive sequence reconstruction The degree of restoration of the concavity and convexity is determined by selecting the recursive sequence reconstruction method with the highest degree of restoration to be retained. The degree of restoration is evaluated as follows: if the target vertex The convexity is concave, and the angle between the concave vector and the vertex normal after repair and before repair is , if and only if The larger the value, the greater the degree of repair; if the target vertex The concavity is convex. Let the angle between the concave vector and the vertex normal after repair change to the angle before repair: , if and only if The smaller the size, the greater the degree of repair;
[0040] Step 6-5: If If there are patches in the image that are corrected during the reconstruction process, re-obtain the target vertex A collection of triangles with triangular vertices , traverse again All patches in Recursively until If the face in the recursive process does not change, it means that the current triangle mesh geometry is in the current N-order neighborhood for the target vertex Concavity It is already optimal, ending this iteration.
[0041] Furthermore, in step 7, the method for determining whether the abnormal point is repaired is as follows:
[0042] Step 7-1: Get outliers Concavity If it is different from before the iteration, it is considered to have been repaired. If it is the same as before the iteration, it is considered to have not been repaired. The vertices in are updated to the vertices that have not been repaired this time;
[0043] Step 7-2: Order Return to step 6-1 for all vertices in the grid and perform the next iteration until the outliers are repaired, thus obtaining a triangle mesh with better and more reasonable vertex concavity.
[0044] Compared with the prior art, the present invention has the following beneficial effects:
[0045] The present invention realizes automatic mesh reconstruction that optimizes the triangular mesh at the vertex concavity level through a method for judging the concavity of vertices based on the geometric properties of the mesh itself and an iterative reconstruction process based on the original spatial relationship of the vertices. Without changing the original spatial relationship of the vertices, a triangular mesh model with better and more reasonable vertex concavity is obtained. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 A flow chart of a method for reconstructing an original triangular mesh into a triangular mesh with optimal vertex concavity and convexity according to the present invention;
[0047] Figure 2 The input triangular mesh model is "ring";
[0048] Figure 3 The vertices and triangular faces on the "ring" of the triangular mesh model;
[0049] Figure 4 It is a schematic diagram of the set of all triangles around a vertex with the vertex as the triangular vertex;
[0050] Figure 5 This is a diagram showing a method of using the angle as a weight to obtain the vertex normal;
[0051] Figure 6 The method of obtaining the concave vector using the vector parallel to the surface is shown in FIG.
[0052] Figure 7 This is an illustration of using the vertex normal and concave vector to determine the concavity of a vertex;
[0053] Figure 8 A reference image for judging vertex concavity and convexity anomalies;
[0054] Fig. 9 It is an illustration of the first-order neighborhood during the iteration process;
[0055] Fig.10 It is a schematic representation of the second-order domain in the iterative process;
[0056] Fig.11 Comparison of mesh connection methods around the same two vertices before and after iterative reconstruction;
[0057] Fig.12 This is a diagram of the "ring" mesh model after reconstruction and repair;
[0058] Fig.13 Comparison of the "ring" mesh model before and after reconstruction. DETAILED DESCRIPTION
[0059] In order to make the technical means, creative features, objectives and effects achieved by the present invention easy to understand, the present invention is further explained below in conjunction with specific implementation methods.
[0060] The present invention provides a triangular mesh optimization reconstruction method based on vertex concavity and convexity, such as Figure 1 As shown, the specific implementation steps are as follows:
[0061] Step 101: Input the triangular mesh model to be optimized ;
[0062] like Figure 2 , Figure 3 As shown, the input triangular mesh model Contains a collection of vertices , a collection of patches ,in for The vertex index set of for The triangular mesh model can be obtained by computer modeling or laser scanning, camera, depth sensor and other equipment, and the file is saved as format or other easily readable interface format.
[0063] Step 102, obtain a vertex set Each vertex For any triangular mesh model, the specific extraction method used is:
[0064] like Figure 4 As shown, from the triangular mesh model Randomly select a vertex from the vertex set , get the vertex The set of all surrounding triangles with this vertex as the triangle vertex , get each patch in the patch set Above The interior angle of the vertex ;
[0065] like Figure 5 shown, with interior angles is the weight, using each patch The face normal on Perform weighted vector synthesis and finally normalize to obtain vertices The vertex normal of ,Right now:
[0066]
[0067] Among them, m is The number of mid-faces.
[0068] Step 103: Vertex Set The vertices in Concave vector The method of obtaining is:
[0069] like Figure 6 As shown, get the vertex The set of all surrounding triangles with this vertex as the triangle vertex , get the face set Each patch The geometric center point , and then calculate the vertex Point to the geometric center The unit vector ;
[0070] Vertex Set The vertices in , with vertex normals and the surrounding neighboring face normals The dot product of is used as the weight to synthesize the weighted vector to obtain the concave vector ,Right now:
[0071]
[0072] Among them, m is The number of mid-faces.
[0073] Step 104, the method of using the angle between the vertex normal and the concave vector to determine the concave-convexity of the vertex is as follows: Figure 7 , by calculating the vertex set Every vertex on The vertex normal on and concave vector The angle between the two is determined by the dot product of
[0074] In the judgment process, it is only necessary to confirm whether the angle is greater than , the convexity can be determined. If the dot product value is greater than 0, it means that the angle between the two vectors is less than , then the concave direction and the vertex direction are consistent, and the vertex is concave; if the value of the dot product is less than 0, it means that the angle between the two vectors is greater than , then the concave direction and the vertex direction are opposite, and the vertex concave-convexity is convex. The convexity calculated above Record.
[0075] Step 105, the method of using the concavity and convexity of the adjacent vertices to determine whether the concavity and convexity of the vertex is abnormal is as follows:
[0076] Get the target vertex The set of all adjacent vertices of , get the concavity and convexity of each adjacent vertex;
[0077] By setting the tolerance parameter To adjust the judgment range of anomalies, this value determines when a point is judged as an abnormal point, and how many of its adjacent points can have the same concavity and convexity as it. Generally, this parameter is set to 0 or 1; if it is set to 0, then if the adjacent vertex set All vertices in the same concavity and convexity are the same as the target vertex Concavity Different, then determine the target vertex Abnormal convexity, such as Figure 8 .
[0078] Setting up the vertex collection Used to store all vertices with abnormal concavity and convexity in the triangular mesh, and put the vertices determined to have abnormal concavity and convexity in step 5-2 into the vertex set middle.
[0079] Step 106, the method of reconstructing the grid in the Nth-order neighborhood for all abnormal vertices is as follows:
[0080] The range of the grid that needs to be reconstructed is determined according to the number of iterations. If it is a first-order neighborhood, the reconstruction range is all the target vertices. A collection of triangles with triangular vertices and Each patch The set of adjacent patches The union of ,like Fig. 9 ; If it is a 2nd-order neighborhood, the reconstruction range is and Each patch The set of adjacent patches The union of ,like Fig.10 ; Similarly, if it is an N-order neighborhood, the reconstruction range is and Each patch The set of adjacent patches The union of , where N is the number of iteration steps;
[0081] Traverse the triangle patch collection in sequence All patches in , get each The set of adjacent patches , and then for each Each face in continues to obtain the face that does not contain the source (i.e. ) and recursively search for adjacent faces of the recursive function until the recursive depth is equal to the current number of iterations, and record the face sequence experienced by each recursion;
[0082] Reconstruct each recursive face sequence one by one in reverse order from the end to the beginning. The reconstruction method is: the triangle face currently traversed in the sequence and its previous triangle The four vertices of the triangle are reconnected to form two new patches with different connection modes, and the two reconstructed patches in the sequence are replaced. However, if the new patches intersect with other patches, the reconstruction of the two patches is not performed. Subsequently, if the new patches are reconstructed, the new patches are combined with the adjacent patches that have not been reconstructed. If the new patches are not reconstructed, the current triangle is skipped. , enter the previous triangle The reconstruction process continues until all triangles in the sequence are traversed;
[0083] Calculate the target vertex after each recursive sequence reconstruction The degree of restoration of the concavity and convexity is determined by selecting the recursive sequence reconstruction method with the highest degree of restoration to be retained. The degree of restoration is evaluated as follows: if the target vertex The convexity is concave, and the angle between the concave vector and the vertex normal after repair and before repair is , if and only if The larger the value, the greater the degree of repair; if the target vertex The concavity is convex. Let the angle between the concave vector and the vertex normal after repair change to the angle before repair: , if and only if The smaller the size, the greater the degree of repair;
[0084] like If there are patches in the image that are corrected during the reconstruction process, re-obtain the target vertex A collection of triangles with triangular vertices , traverse again All patches in Recursively until If the face in the recursive process does not change, it means that the current triangle mesh geometry is in the current N-order neighborhood for the target vertex Concavity It is already optimal, so end this iteration. Compare the results after iteration with those before iteration. Fig.11 shown.
[0085] Step 107, the method for determining whether the abnormal point has been repaired is as follows:
[0086] Get outliers Concavity If it is different from before the iteration, it is considered to have been repaired. If it is the same as before the iteration, it is considered to have not been repaired. The vertices in are updated to the vertices that have not been repaired this time;
[0087] make Return to step 106 for all vertices in the next iteration, and perform mesh reconstruction on the surrounding N+1 order neighborhood until all outliers are repaired, such as Fig.12 shown.
[0088] Step 108, the method finally outputs a triangular mesh model that is corrected and optimized at the vertex concavity level ,like Fig.13 shown.
[0089] A typical implementation example of the present invention is as follows:
[0090] 1. As Figure 2 The triangular mesh model selected for processing in this example is a "ring".
[0091] 2. Import the above triangular mesh model into the test program written in C++ language according to the method of the present invention.
[0092] 3. In the test program, set the tolerance parameters =1.
[0093] Fig.11 A comparison of the "ring" triangular mesh model before and after optimization and reconstruction is given. It can be seen that the present invention changes the local convexity and concavity of the vertices by only changing the connection method between the vertices to form new triangular facets without changing the spatial position relationship between the vertices, which has little effect on the spatial properties of the triangular mesh itself.
[0094] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
[0095] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.
Claims
1. A triangular mesh optimization reconstruction method based on vertex concavity and convexity, characterized in that: The steps include: Step 1: Input the triangular mesh model to be optimized ; Step 2: Model from triangular mesh Get the vertex set Each vertex The vertex normal of , and record; Step 3: Pass through the set of all triangles around the vertex with the vertex as the triangular vertex Unit vector inside parallel to the face The weighted vector synthesis of the vertex set All vertices of Concave vector Acquisition of Step 4: Calculate the triangular mesh model Upper Vertex Set Each vertex The vertex normal of and concave vector The angle of the vertex is determined by the size of the angle. ; Step 5: Triangulate the mesh model Upper Vertex Set Each vertex Get the included vertices The vertex set of all adjacent vertices , through the set of adjacent vertices The vertex convexity in the vertex is judged by the vertex Is there an exception? Set the vertex set Used to store abnormal vertices and record abnormal vertices in middle; Step 6: Set of vertices with abnormal concavity Each vertex in The surrounding N-order neighborhood performs grid reconstruction and uses a recursive algorithm to obtain the target vertex within the current neighborhood. The best vertex connection method for convexity and concavity is used to reconnect the vertices to form a new triangular mesh, where N is the number of iterations. Step 7: Determine the set of vertices with abnormal concavity The abnormal vertex in Whether the concavity of the vertex is corrected, if not, the uncorrected vertex continues to enter the next iteration, and the mesh is reconstructed in the N+1 order neighborhood around it until the concavity of the vertex is repaired and the iteration ends; Step 8: Export the corrected and optimized triangular mesh model at the vertex convexity level .
2. The method for optimizing and reconstructing a triangular mesh based on vertex concavity and convexity according to claim 1, characterized in that: In step 2, get the vertex set Each vertex The vertex normal method is: Step 2-1: Get the vertices The set of all surrounding triangles with this vertex as the triangle vertex ; Step 2-2: Get each face in the face set Above The interior angle of the vertex ; Step 2-3: Inner Angle is the weight, using each patch The face normal on Perform weighted vector synthesis and finally normalize to obtain vertices The vertex normal of ,Right now: Among them, m is The number of mid-faces.
3. The method for optimizing and reconstructing a triangular mesh based on vertex concavity and convexity according to claim 1, characterized in that: In step 3, the method for obtaining the concave vector from the vertex neighboring face is as follows: Step 3-1: Get the vertices The set of all surrounding triangles with this vertex as the triangle vertex ; Step 3-2: Get a collection of patches Each patch The geometric center point , and then calculate the vertex Point to the geometric center The unit vector ; Step 3-3: Vertex Set The vertices in , with vertex normals and all surrounding neighboring face normals The dot product of is used as the weight to synthesize the weighted vector to obtain the concave vector ,Right now: Among them, m is The number of mid-faces.
4. The method for optimizing and reconstructing a triangular mesh based on vertex concavity and convexity according to claim 1, characterized in that: In step 4, the method of using the angle between the vertex normal and the concave vector to determine the concavity of the vertex is as follows: Step 4-1: Calculate the vertex set Every vertex on The vertex normal on and concave vector The dot product of Step 4-2: During the determination process, you only need to confirm whether the angle is greater than , the convexity can be determined. If the dot product value is greater than 0, it means that the angle between the two vectors is less than , then the concave direction and the vertex direction are consistent, and the vertex is concave; if the value of the dot product is less than 0, it means that the angle between the two vectors is greater than , then it is determined that the concave direction and the vertex direction are opposite, and the vertex concavity is convex; Step 4-3: Each vertex Concavity Record.
5. The method for optimizing and reconstructing a triangular mesh based on vertex concavity and convexity according to claim 1, characterized in that: In step 5, the method of using the concavity and convexity of the adjacent vertices of the vertex to determine whether the concavity and convexity of the vertex is abnormal is as follows: Step 5-1: Get the target vertex The set of all adjacent vertices of , get the concavity and convexity of each adjacent vertex; Step 5-2: By setting the tolerance parameters To adjust the judgment range of anomalies, this value determines when a point is judged as an abnormal point, and how many of its adjacent points can have the same concavity and convexity as it. Generally, this parameter is set to 0 or 1; if it is set to 0, then if the adjacent vertex set All vertices in the same concavity and convexity are the same as the target vertex Concavity Different, then determine the target vertex Abnormal convexity; Step 5-3: Set up the vertex set Used to store all vertices with abnormal concavity and convexity in the triangular mesh, and put the vertices determined to have abnormal concavity and convexity in step 5-2 into the vertex set middle.
6. The method for optimizing and reconstructing a triangular mesh based on vertex concavity and convexity according to claim 1, characterized in that: In step 6, the method for reconstructing the grid in the N-order neighborhood for all abnormal vertices is as follows: Step 6-1: Determine the range of the grid that needs to be reconstructed according to the number of iterations. If it is a first-order neighborhood, the reconstruction range is based on the target vertex. A collection of triangles with triangular vertices and Each patch The set of adjacent patches The union of ; If it is a 2nd-order neighborhood, the reconstruction range is and Each patch The set of adjacent patches The union of ; Similarly, if it is an N-order neighborhood, the reconstruction range is and Each patch The set of adjacent patches The union of ; Step 6-2: Set of vertices with abnormal concavity Each vertex in Both execute the traversal algorithm, traversing each vertex in turn A collection of triangles All patches in , get each The set of adjacent patches , and then for each Each face in continues to obtain the face that does not contain the source (i.e. ) and recursively search for adjacent faces of the recursive function until the recursive depth is equal to the current number of iterations, and record the face sequence experienced by each recursion; Step 6-3: Reconstruct each recursive face sequence one by one in reverse order from the end to the beginning. The reconstruction method is: the triangle face currently traversed in the sequence and its previous triangle The four vertices of the triangle are reconnected to form two new patches with different connection modes, and the two reconstructed patches in the sequence are replaced. However, if the new patches intersect with other patches, the reconstruction of the two patches is not performed. Subsequently, if the new patches are reconstructed, the new patches are combined with the adjacent patches that have not been reconstructed. If the new patches are not reconstructed, the current triangle is skipped. , enter the previous triangle The reconstruction process continues until all triangles in the sequence are traversed; Step 6-4: Calculate the target vertex after each recursive sequence reconstruction The degree of restoration of the concavity and convexity is determined by selecting the recursive sequence reconstruction method with the greatest degree of restoration to be retained; the degree of restoration is evaluated as follows: if the target vertex The convexity is concave, and the angle between the concave vector and the vertex normal after repair and before repair is , if and only if The larger the value, the greater the degree of repair; if the target vertex The concavity is convex. Let the angle between the concave vector and the vertex normal after repair change to the angle before repair: , if and only if The smaller the size, the greater the degree of repair; Step 6-5: If If there are patches in the image that are corrected during the reconstruction process, re-obtain the target vertex A collection of triangles with triangular vertices , traverse again All patches in Recursively until If the face in the recursive process does not change, it means that the current triangle mesh geometry is in the current N-order neighborhood for the target vertex Concavity It is already optimal, ending this iteration.
7. The method for optimizing and reconstructing a triangular mesh based on vertex concavity and convexity according to claim 1, characterized in that: In step 7, the method for determining whether the abnormal point has been repaired is as follows: Step 7-1: Get outliers Concavity If it is different from before the iteration, it is considered to have been repaired. If it is the same as before the iteration, it is considered to have not been repaired. The vertices in are updated to the vertices that have not been repaired this time; Step 7-2: Order Return to step 6-1 for all vertices in the grid and perform the next iteration until the outliers are repaired, thus obtaining a triangle mesh with better and more reasonable vertex concavity.
