A texture-based three-dimensional model cutting method

By using a texture-based interactive mesh model clipping method, the surface mesh is projected onto the texture image, the background area is selected, and intersecting triangles are split, which solves the problem of mesh edge extension in 3D reconstruction and achieves higher accuracy 3D model reconstruction.

CN115984476BActive Publication Date: 2026-02-13ZHEJIANG SCENIC DATA TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310030522.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-07-02
Publication Date
2026-02-13
Estimated Expiration
2038-07-02

AI Technical Summary

Technical Problem

In existing 3D reconstruction techniques, especially when reconstructing objects with open curved surfaces such as clothing, the mesh edges tend to extend outwards, causing textures to be mapped onto redundant meshes, resulting in foreground and background blending. Existing methods struggle to achieve accurate edge matching and texture processing.

Method used

By using a texture-based interactive mesh model clipping method, the surface mesh is projected onto the texture image, the background area is selected along the foreground edge, intersecting triangles are filtered and split, and redundant meshes are deleted to form an accurate 3D model.

Benefits of technology

It enables precise trimming of 3D mesh edges, improves the reconstruction accuracy and edge matching of 3D models, simplifies the operation process, and reduces the requirements for operational precision.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115984476B_ABST
    Figure CN115984476B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of texture-based three-dimensional model cutting method, the method comprises: according to the corresponding relationship between the surface grid of reconstructed object three-dimensional model and texture image, the grid triangle in the surface grid is projected on the texture image, obtains the texture triangle set that texture triangle is constituted in texture image;In the projected texture image, along the foreground edge ring, select a polygon region containing only background;According to the corresponding relationship between texture image and surface grid, generate the three-dimensional model of the object to be modeled with texture image and the surface grid after cutting.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Divisional Statement

[0002] The original basis of the divisional application is patent application No. 201810708745.1, filed on July 2, 2018, with the title of "Texture-based interactive mesh model cutting method, device and modeling equipment". TECHNICAL FIELD

[0003] The present application relates to the technical field of three-dimensional modeling, in particular to a texture-based interactive mesh model cutting method and device, and a three-dimensional modeling method and device. BACKGROUND

[0004] At present, after completing camera calibration and point cloud generation, image-based three-dimensional reconstruction generally needs to complete mesh surface reconstruction and texture mapping based on point cloud. However, due to the fact that the edges of the reconstructed point cloud often attach some outliers, combined with the problems of some mesh surface reconstruction algorithms, the reconstructed surface of the object with open surface structure such as clothes will extend outward near the edge of the object, and extra meshes will be reconstructed. After texture mapping, the background will be mapped to the extra generated meshes, resulting in the mixing of foreground and background in the reconstruction result. In view of this situation, it is necessary to take measures to delete the extra meshes mapped as background color from the mesh surface of the reconstructed model, and to restructure the mesh edge so that the edge line corresponds to the edge of the real foreground object.

[0005] At present, the solution to this problem usually involves mesh editing by using 3dMax and other editing software, which requires selecting and deleting extra triangular meshes one by one, and manually cutting the triangular meshes that cross the foreground and background along the real edge and deleting the part mapped as background texture.

[0006] Using 3D editing software such as 3dMax to select and delete meshes is a very complex manual interactive process, which requires considering not only the adjacency relationship of the meshes but also the occlusion relationship, especially when splitting the edge triangular face, which requires high precision and low accuracy of edge matching of the reconstructed object, affecting the reconstruction accuracy of the final object model.

[0007] Patent document No. CN100595796C discloses a triangular mesh cutting reconstruction method based on AIF in the field of computer application technology. The method first converts the triangular three-dimensional mesh model data into an AIF data structure form with adjacent incidence relationship, and further processes the mesh model reconstruction of the data in this form. In the processing process, the triangular mesh along the cutting path is first classified, and then the AIF structure is quickly queried and modified according to the classification result, and finally the new cutting mesh data is obtained, realizing the mesh reconstruction of the cutting body.

[0008] And the patent document with publication number CN107680168B discloses a mesh simplification method based on plane fitting in three-dimensional reconstruction. The invention first extracts point planes and clusters planes from point clouds to obtain separate planes and detail part point clouds; then extracts plane edges, downsamples edges, downsamples inside planes, combines edges and inside planes, triangulates, and combines triangulated planes to obtain triangulation splicing results of separate planes; and triangulates detail part point clouds to obtain triangulation results of details; finally, combines the triangulation results of details with the triangulation splicing results of separate planes to obtain mesh simplification results.

[0009] The technical solution disclosed in the above patent provides a method for reducing the processing range or data volume of point cloud data and mesh models based on mesh identification, processing, and reconstruction, but the above solution does not provide a specific interactive processing method for image edges and mesh models, which is difficult to apply to edge identification and texture processing in image reconstruction to improve image reconstruction accuracy. SUMMARY

[0010] Therefore, in view of the above problems, it is necessary to provide an interactive mesh model cutting method based on texture capable of accurately processing edges, a device, and a three-dimensional modeling method and equipment using the mesh cutting method.

[0011] To achieve the purpose of the present application, an interactive mesh model cutting method based on texture is provided, comprising:

[0012] According to the correspondence between the surface mesh of the reconstructed object three-dimensional model and the texture image, project the mesh triangles in the surface mesh onto the texture image to obtain a texture triangle set composed of texture triangles in the texture image;

[0013] Select a polygonal region containing only the background along the foreground edge on the projected texture image; the foreground is the texture image of the object to be reconstructed, and the background is the texture image other than the object to be reconstructed;

[0014] Iterate through all texture triangles in the texture triangle set to filter out texture triangles falling within the polygonal region and texture triangles intersecting the edges of the polygonal region;

[0015] Delete the mesh triangles in the surface mesh corresponding to the texture triangles falling within the polygonal region;

[0016] Split the texture triangles intersecting the edges of the polygonal region and the corresponding surface mesh triangles, and delete the split mesh triangles in the surface mesh corresponding to the split texture triangles falling within the polygonal region;

[0017] All the remaining mesh triangles constitute a new surface mesh of the object to be reconstructed in three dimensions.

[0018] In the texture-based interactive mesh model clipping method of one embodiment, the texture triangle falling in the polygon region is a texture triangle having no intersection with the edge of the polygon region.

[0019] In the texture-based interactive mesh model clipping method of one embodiment, the splitting of the texture triangle intersecting with the edge of the polygon region and the corresponding surface mesh triangle, and the deletion of the split mesh triangle in the surface mesh corresponding to the split texture triangle falling in the polygon region, comprise:

[0020] The intersection of the texture triangle with the edge of the polygon region and the original vertex jointly constitute a plurality of split texture triangles;

[0021] According to the splitting of the texture triangle, the surface mesh is correspondingly split to obtain split mesh triangles;

[0022] The split texture triangles falling in the polygon region are screened out;

[0023] The split mesh triangles corresponding to the split texture triangles falling in the polygon region are deleted.

[0024] In the texture-based interactive mesh model clipping method of one embodiment, the edges of the plurality of split triangles split from the same texture triangle do not cross each other.

[0025] In the texture-based interactive mesh model clipping method of one embodiment, when the texture triangle falling in the polygon region is screened out, and only two edges of the texture triangle have intersections with the edge of the polygon region, the intersection of the texture triangle with the edge of the polygon region and the original vertex jointly constitute a plurality of split texture triangles, comprising:

[0026] When the texture triangle has two edges respectively having one intersection, the two intersections and one of the intersections and the corresponding vertex are connected, and the original texture triangle is split into three split texture triangles;

[0027] When the texture triangle has one intersection on one edge and two or more intersections on another edge, the two farthest intersections among the two or more intersections are respectively connected with the vertices opposite to the edges where the intersections are located, and one of the two farthest intersections is connected with the intersection on the other edge, and the original texture triangle is split into four split texture triangles;

[0028] When the texture triangle has two edges with two or more intersection points respectively, connect the two farthest intersection points on each edge in a zigzag manner, and connect the last intersection point with the vertex opposite to the edge on which it is located, to split the original texture triangle into five split texture triangles.

[0029] In the texture-based interactive mesh model clipping method of one of the embodiments, all texture triangles in the texture triangle set are traversed, and the texture triangles intersecting the polygon region edge are screened out. When the texture triangle has three edges with intersection points with the polygon region edge, the intersection points of the texture triangle with the polygon region and the original vertices are collectively used to form a plurality of split texture triangles, including:

[0030] When the texture triangle has three edges with one intersection point respectively, sequentially connect each intersection point to split the original texture triangle into four split triangles.

[0031] When the texture triangle has two edges with one intersection point respectively and one edge with two or more intersection points, connect one intersection point on one edge with one intersection point and the two farthest intersection points of the two or more intersection points on the other edge, and connect one intersection point on the other edge with the nearest intersection point of the two or more intersection points, to split the original texture triangle into five split triangles.

[0032] When the texture triangle has one intersection point on one edge and two or more intersection points on the other two edges, select the two farthest intersection points on the other two edges respectively, connect the four selected intersection points on the other two edges with the one intersection point, and connect the two adjacent intersection points on the two edges with multiple intersection points, to split the original texture triangle into six split triangles.

[0033] When the texture triangle has three edges with two or more intersection points respectively, select the two farthest intersection points on each edge respectively, connect one intersection point on one edge with the three intersection points on the other two edges in sequence, and connect the other intersection point on the edge with the unconnected intersection points on the other two edges and the other intersection point on the edge, to split the original texture triangle into seven split triangles.

[0034] In the texture-based interactive mesh model clipping method of one of the embodiments, all texture triangles in the texture triangle set are traversed, and the texture triangles intersecting the polygon region edge are screened out. When the texture triangle has only one edge with an intersection point with the polygon region edge, the intersection points of the texture triangle with the polygon region and the original vertices are collectively used to form a plurality of split texture triangles, including:

[0035] The two farthest intersection points are connected with the opposite vertex respectively, and the original texture triangle is split into three split triangles.

[0036] A texture-based interactive mesh model cutting device based on the same inventive concept comprises:

[0037] A mesh projection module is configured to project mesh triangles in a surface mesh of a reconstructed three-dimensional model of an object onto a texture image according to a correspondence between the surface mesh and the texture image, to obtain a texture triangle set composed of texture triangles in the texture image.

[0038] A background separation module is configured to select a polygonal region containing only a background along a foreground edge in the projected texture image; the foreground is a texture image of an object to be reconstructed, and the background is a texture image other than the object to be reconstructed.

[0039] A triangle screening module is configured to traverse all texture triangles in the texture triangle set, and screen out texture triangles falling in the polygonal region and texture triangles intersecting with edges of the polygonal region.

[0040] A first surface mesh processing module is configured to delete mesh triangles in the surface mesh corresponding to the texture triangles falling in the polygonal region.

[0041] A second surface mesh processing module is configured to split the texture triangles intersecting with edges of the polygonal region and corresponding surface mesh triangles, and delete split mesh triangles in the surface mesh corresponding to the texture triangles falling in the polygonal region.

[0042] A new surface mesh generation module is configured to construct a new surface mesh of the object to be three-dimensionally reconstructed from all remaining mesh triangles.

[0043] A three-dimensional modeling method based on the same inventive concept, which cuts a surface mesh of a reconstructed three-dimensional model of an object according to a texture-based interactive mesh model cutting method based on the texture-based interactive mesh model cutting method of any one of the preceding embodiments, and generates a three-dimensional model of the object to be modeled from a texture image and the cut surface mesh according to a correspondence between the texture image and the surface mesh.

[0044] A device for three-dimensional modeling based on the same inventive concept, which comprises at least one processor, at least one memory, and computer program instructions stored in the memory, which, when executed by the processor, implement the three-dimensional modeling method of the preceding embodiments.

[0045] The beneficial effects of the present application include: the texture-based interactive mesh model cutting method provided by the present application projects the mesh onto the texture image according to the corresponding relationship between the surface mesh and the texture image, and processes the mesh on the two-dimensional texture image, especially processes the mesh at the foreground and background boundary position, and correspondingly processes the surface mesh edge position of the object to be reconstructed. Thus, the effect of processing the three-dimensional mesh on the two-dimensional plane is realized, the processing precision is higher, and the triangular shape is traversed one by one to process each triangle at the edge position, the accurate cutting of the three-dimensional mesh is realized, and thus the three-dimensional surface mesh edge of the finally reconstructed object model is more accurate. BRIEF DESCRIPTION OF DRAWINGS

[0046] Figure 1 The flowchart of a specific embodiment of the texture-based interactive mesh model cutting method of the present application;

[0047] Figure 2 The three-dimensional model of the object with texture reconstructed in a specific embodiment of the texture-based interactive mesh model cutting method of the present application;

[0048] Figure 3 The surface mesh in the three-dimensional model of the object in a specific embodiment of the texture-based interactive mesh model cutting method of the present application;

[0049] Figure 4 The texture image in the three-dimensional model of the object in a specific embodiment of the texture-based interactive mesh model cutting method of the present application;

[0050] Figure 5 The effect diagram of the surface mesh of the three-dimensional model of the object in a specific embodiment of the texture-based interactive mesh model cutting method of the present application after being mapped to the texture image;

[0051] Figure 6 The flowchart of the surface mesh processing corresponding to the threaded triangle intersecting with the edge of the polygon region in a specific embodiment of the texture-based interactive mesh model cutting method of the present application;

[0052] Figure 7 The triangle splitting schematic diagram when the texture triangle has only one edge intersecting with the edge of the background polygon region in a specific embodiment of the texture-based interactive mesh model cutting method of the present application;

[0053] Figure 8 The triangle splitting schematic diagram when the texture triangle has two edges each having one intersection point with the edge of the background polygon region in a specific embodiment of the texture-based interactive mesh model cutting method of the present application;

[0054] Figure 9 Fig. 2 is a schematic diagram of triangle splitting when a texture triangle has one edge intersecting with the edge of a background polygon region and the other edge intersecting with the edge of the background polygon region twice or more times, according to one embodiment of the texture-based interactive mesh model clipping method of the present application;

[0055] Figure 10 Fig. 3 is a schematic diagram of triangle splitting when a texture triangle has two edges intersecting with the edge of a background polygon region twice or more times, according to one embodiment of the texture-based interactive mesh model clipping method of the present application;

[0056] Figure 11 Fig. 4 is a schematic diagram of triangle splitting when a texture triangle has each edge intersecting with the edge of a background polygon region twice or more times, according to one embodiment of the texture-based interactive mesh model clipping method of the present application;

[0057] Figure 12 Fig. 5 is a schematic diagram of triangle splitting when a texture triangle has one edge intersecting with the edge of a background polygon region and the other two edges intersecting with the edge of the background polygon region twice or more times, according to one embodiment of the texture-based interactive mesh model clipping method of the present application;

[0058] Figure 13 Fig. 6 is a schematic diagram of triangle splitting when a texture triangle has one edge intersecting with the edge of a background polygon region and the other two edges intersecting with the edge of the background polygon region twice or more times, according to one embodiment of the texture-based interactive mesh model clipping method of the present application;

[0059] Figure 14 Fig. 7 is a schematic diagram of triangle splitting when a texture triangle has each edge intersecting with the edge of a background polygon region twice or more times, according to one embodiment of the texture-based interactive mesh model clipping method of the present application. DETAILED DESCRIPTION

[0060] In order to make the objects, technical solutions and advantages of the present application clearer, the following will describe the texture-based interactive mesh model clipping method, device, three-dimensional modeling method and equipment of the present application with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.

[0061] Embodiment One

[0062] As shown in Fig. 1, one embodiment of the texture-based interactive mesh model clipping method includes the following steps: Figure 1

[0063] ​S100, projecting the grid triangles in the surface grid onto the texture image according to the correspondence between the surface grid of the reconstructed object three-dimensional model and the texture image, to obtain a texture triangle set composed of texture triangles in the texture image.

[0064] When a three-dimensional model of an object is built by using images, a surface grid corresponding to the object and exhibiting surface features of the object in three dimensions is composed of a large number of triangles, and the surface grid has a mapping relationship with a texture image. That is, the reconstructed three-dimensional model refers to a model with texture mapping, that is, the model contains surface grid data and model texture images, and the mapping relationship between the surface grid and the texture image. Let the model surface grid be T, the texture image be M, and the corresponding mapping relationship be P. Project the triangles in the surface grid T onto the texture image M according to the mapping relationship P between the grid T and the texture M, and denote the projected triangle set as Tp. In the following, we will describe the processing mode in combination with the named set and mapping relationship.

[0065] S200, selecting a polygonal region containing only the background along the foreground edge on the projected texture image.

[0066] Since the foreground and the background can be easily distinguished by color on the texture image, and the demarcation line between the foreground and the background corresponds to the real edge of the object, based on the mapping relationship between the surface grid and the texture image, the accurate cutting of the surface grid of the three-dimensional model can be realized by the segmentation of the foreground and the background on the texture image.

[0067] For convenience of description, the foreground is defined as the object to be reconstructed, and the background is defined as the region in the scene other than the object to be reconstructed. On the texture image of the model, the foreground refers to the texture region corresponding to the object to be reconstructed, and the background refers to the region on the image other than the texture of the object to be reconstructed.

[0068] In this step, a polygonal region R containing only the background is selected along the foreground edge on the texture image M by interaction. As shown in FIG. 2, a three-dimensional model of a horse is shown, and the gray region at the bottom of the model is the redundant part. Figure 2 As shown in FIG. 3, the surface grid of the main component of the horse is shown. Figure 3 As shown in FIG. 4, the texture image is shown. Figure 4 As shown in FIG. 5, the processing of the surface grid and the texture image is shown. Figure 5 As shown in FIG. 5, the processing of the surface grid and the texture image is shown.

[0069] S300, traversing all the texture triangles in the texture triangle set, and screening out the texture triangles falling in the polygonal region

[0070] The texture triangles falling in the polygonal region refer to the texture triangles having no intersection with the edges of the polygonal region.

[0071] S400, delete the grid triangle in the surface grid corresponding to the texture triangle falling in the polygon region.

[0072] This step is to process the three-dimensional grid corresponding to the processing result of the texture image, delete the triangle of the three-dimensional grid falling in the background region, and modify the edge to make the three-dimensional grid shape more matched with the object to be modeled.

[0073] S500, split the texture triangle intersecting the edge of the polygon region and the corresponding surface grid triangle, and delete the split grid triangle in the surface grid corresponding to the split texture triangle falling in the polygon region.

[0074] S600, all remaining grid triangles constitute a new surface grid of the object to be three-dimensionally reconstructed.

[0075] The new surface grid edge is processed by redundancy deletion, the object three-dimensionally reconstructed edge is more accurate, and the three-dimensional modeling accuracy is higher.

[0076] The texture-based interactive grid model cutting method of the embodiment converts the editing of the three-dimensional grid into a two-dimensional image segmentation problem by using the correspondence between the texture image and the three-dimensional grid. Through interactive image segmentation, accurate cutting of the surface grid is realized. Since the foreground and background can be easily identified on the texture image by color, and the boundary between the foreground and the background corresponds to the real edge of the object, based on the mapping relationship between the surface grid and the texture image, accurate cutting of the three-dimensional grid can be realized by segmentation of the foreground and the background on the texture image. The polygon region selection of the background can be manually performed.

[0077] Specifically, as shown in Figure 6 S500, split the texture triangle intersecting the edge of the polygon region and the corresponding surface grid triangle, and delete the split grid triangle in the surface grid corresponding to the split texture triangle falling in the polygon region, comprising the following steps:

[0078] S501, the intersection point of the texture triangle and the polygon region and the original vertex jointly constitute a plurality of split texture triangles.

[0079] This step is to connect the intersection point and the vertex of the original texture triangle or between the intersection points, thereby splitting the texture triangle into a plurality of triangles inside, ensuring the grid form, and then processing the split grid to realize the refinement processing of the surface grid edge.

[0080] S502, split the surface mesh according to the splitting of the texture triangle to obtain split mesh triangles. In this step, the splitting of the surface mesh triangle can be performed according to the corresponding relationship between the surface mesh and the texture mesh.

[0081] S503, screen out the split texture triangles falling within the polygon region.

[0082] S504, delete the split mesh triangles corresponding to the split texture triangles falling within the polygon region.

[0083] The embodiment further processes the triangles at the edge positions of the background polygon region, splits them into multiple triangles for refinement, and makes the edge contour more accurate.

[0084] Better, the edges of the multiple split triangles split from the same texture triangle do not intersect. That is, the interior of the texture triangle is directly divided into multiple non-intersecting triangles. There is no other shape to ensure the overall structure of the surface mesh.

[0085] For the splitting of the texture triangle, when only two edges have intersection points with the background polygon region, the splitting can be performed in the following manner:

[0086] 1) When the texture triangle has two edges with one intersection point on each edge, connect the two intersection points and one of the intersection points with the corresponding vertex to split the original texture triangle into three split texture triangles;

[0087] 2) When the texture triangle has one intersection point on one edge and two or more intersection points on the other edge, connect the two or more intersection points that are farthest apart with their corresponding vertices, and connect one of the two or more intersection points that are farthest apart with the intersection point on the other edge to split the original texture triangle into four split texture triangles;

[0088] 3) When the texture triangle has two edges with two or more intersection points on each edge, connect the two intersection points that are farthest apart on each edge in a zigzag manner, and connect the last intersection point with its corresponding vertex to split the original texture triangle into five split texture triangles.

[0089] When the texture triangle has three edges with intersection points with the edge of the background polygon, the intersection points of the texture triangle and the polygon region and the original vertices jointly form multiple split texture triangles, including:

[0090] 1) When the texture triangle has one intersection point on each of the three edges, sequentially connect each intersection point to split the original texture triangle into four split triangles;

[0091] 2) When there is one intersection point on each of two edges of the texture triangle and two or more intersection points on the other edge, one intersection point on one edge is connected to one intersection point and the two farthest intersection points on the other edge, and one intersection point on the other edge is connected to the two nearest intersection points, to split the original texture triangle into five split triangles;

[0092] 3) When there is one intersection point on one edge of the texture triangle and two or more intersection points on the other two edges, the two farthest intersection points on the other two edges are selected, one intersection point is connected to the four selected intersection points on the other two edges, and the two adjacent intersection points on the two edges with multiple intersection points are connected to each other, to split the original texture triangle into six split triangles;

[0093] 4) When there are two or more intersection points on each of the three edges of the texture triangle, the two farthest intersection points on each edge are selected, one intersection point on one edge is connected to the three intersection points on the other two edges in sequence, and the other intersection point on the edge is connected to the other two unconnected intersection points on the other two edges and the other intersection point on the edge, to split the original texture triangle into seven split triangles.

[0094] When only one edge of the texture triangle intersects the edge of the background polygon, the processing of the texture triangle is special. Specifically, when all the texture triangles in the texture triangle set are traversed, the texture triangles with only one edge intersecting the edge of the polygon region are screened out; the two farthest intersection points are connected to the opposite vertices, respectively, to split the original texture triangle into three split triangles; the mesh triangle corresponding to the middle triangle in the three split triangles is deleted from the surface mesh. The two triangles on the edges are retained as the retained triangles, thereby modifying the edges. In fact, the deleted middle split triangle is the split triangle falling within the polygon region, and the other two retained triangles are the split triangles falling outside the polygon region.

[0095] Embodiment Two

[0096] The texture-based interactive mesh model cutting method will be described below with a specific processing flow.

[0097] Step 1: Project the triangles in the surface mesh T onto the texture image M through the mapping relationship P between the mesh T and the texture M, and denote the projected triangle set as Tp, as shown in Figure 5 .

[0098] Step 2: Select a polygon region R containing only the background by interaction along the foreground edge on the texture image M.

[0099] Step 3: Traverse T pEach triangle in T, judge completely fall in polygon R triangle, recorded as T Set in T with The corresponding triangle set is T i , T i .

[0100] Step 4:

[0101] For T p The triangle intersecting the edge of R is T c ={a0,a1,a2}, where a0,a1,a2 are the three vertices of triangle T c in counterclockwise order. Set T c The corresponding triangle in T is T c ′={a′0,a′1,a′2}, a′0,a′1,a′2 correspond to a0,a1,a2 respectively. T c The intersection point of R is p1,p2…,p m , find the corresponding point p c ′ in T i ′, i=1,2,…m by the following linear interpolation formula. i

[0102] Let p i Fall on the edge , where j=0,1,2, % is the modulo operation.

[0103] Let r=|p i -a j | / |a (j+1)%3 -a j |, |·| is the length of the module.

[0104] Then p i ′=a j ′+r(a′ (j+1)%3 -a j ′), i=1,2,…m.

[0105] Step 5: update T c ′ in the following cases with new triangular face:

[0106] (1) Intersection point p i i=1,2,…m on the edge of T c .

[0107] Without loss of generality, assume that in the edge , as shown in Figure 7 . Connect a (j+2)%3 and p1, a (j+2)%3 and p m , T c ​It splits into three triangles, corresponding to p i ′, i=1,2,…m will also form the triangular face T c It is divided into three triangular faces. And the triangular face Δa is used as the dividing line. j ′p′1a′ (j+2)%3 , Δp′ m a′ (j+1)%3 a′ (j+2)%3 Replace T in T c ′.

[0108] (2) Intersection point p i , i = 1, 2, ..., m in T c On the two sides

[0109] Assume on the edge and At this point, three situations exist:

[0110] (2-1) There is one intersection point on each of the two sides, i.e., m = 2, such as Figure 8 As shown. Connect p1p2, a (j+1)%3 p2, T c It splits into three triangles, corresponding to p i ′, i=1,2,…m will also form the triangular face T c It is divided into three triangular faces. Take T... c The triangle that lies entirely outside the radius of the inner triangle is located at point T. c Replace the corresponding triangle face in T with the triangle face in T. c ′.

[0111] (2-2) One edge has one intersection point, and the other edge has two or more intersection points. Without loss of generality, assume that... Figure 9 As shown, let p m p1 and p2 are the two intersection points that are farthest apart on an edge containing multiple intersection points. Connect p1p2 and p2a. (j+1)%3 p m a (j+1)%3 , will T c It splits into four triangles, corresponding to p i ′, i=1,2,…m will also form the triangular face T c It is divided into four triangular faces. Using T... c The triangle T' that lies completely outside R c Replace the triangular face T in T with the middle triangular face. c ′

[0112] (2-2) Each of the two edges has more than one intersection point. Without loss of generality, assume that... Figure 10 As shown, let p1, p s+1 and p s, p2 are two intersection points on the two edges respectively. Connect p1p2, p2p s+1 , p s+1 , p s , p s a (j+1)%3 , T c is divided into five triangles, and the corresponding p i ', i = 1, 2,... m also divides the triangular surface T c ' into five triangular surfaces. Replace the triangular surface T c ' in T c ' corresponding to the triangular surface in T c which completely falls in R outside.

[0113] (3) The intersection points p i i = 1, 2,... m are on the three edges of T c .

[0114] At this time, there are four cases:

[0115] (3-1) T c has one intersection point on each edge, that is, m = 3. As shown in Figure 11 , connect p1p2, p2p3, p3p1, and divide T c into four triangles. The corresponding p i ', i = 1, 2,... m also divides the triangular surface T c ' into four triangular surfaces. Replace the triangular surface T c ' in T c ' corresponding to the triangular surface in T c which completely falls in R outside.

[0116] (3-2) T c has one intersection point on each of two edges, and two or more intersection points on the other edge. Without loss of generality, assume as shown in Figure 12 , let p3, p m be the two intersection points on the edge with multiple intersection points that are farthest apart. Connect p1p2, p2p3, p1p m , p1p3, and divide T c into five triangles. The corresponding p i ', i = 1, 2,... m also divides the triangular surface T c ' into five triangular surfaces. Replace the triangular surface T c ' in T c ' corresponding to the triangular surface in T c which completely falls in R outside.

[0117] (3-3) T cOne edge has one intersection point, and the other two edges have two or more intersection points. Let's assume... Figure 13 As shown. Let p m p s+1 and p s p1 and p2 are the two furthest intersection points on two edges with multiple intersection points. Connect p1 and p2. s p s+1 p1p m p1p s p1p s+1 Triangle T c It splits into six triangles, corresponding to p i ′, i=1,2,…m will also form the triangular face T c It is divided into six triangular faces. Using T... c The triangle T that lies completely outside the radius of the six inner triangles. c Replace the triangular face T in T with the triangular face in T. c ′.

[0118] (3-4)T c All three edges have two or more intersection points. Let's assume, for example... Figure 14 As shown, find the two intersection points p1 and p2 that are farthest apart on the three sides respectively. t p t+1 p s p s+1 p m Connect to P1P m p1p s+1 p1p s p t p t+1 p t p s p s p s+1 Triangle T c It splits into seven triangles, corresponding to p′ i i = 1, 2, ... m will also form the triangular face T c It is divided into seven triangular faces. Using T... c The triangle T that lies completely outside the radius of the seven inner triangles. c Replace the triangular face T in T with the triangular face in T. c ′.

[0119] Step 6: Repeat steps 2 through 5 until T has been traversed. p All the triangles in it.

[0120] Since the triangles on the mesh surface are usually very small, while the manually selected polygons are relatively large, in practical applications, steps 4-5 can approximate the R edge, that is, the edge of the object, very well.

[0121] Embodiment three

[0122] Based on the same inventive concept, the embodiment of the present application provides a texture-based interactive mesh model cutting device. Since the principle of the device for solving the problem is similar to the aforementioned texture-based interactive mesh model cutting method, the implementation of the system can be realized according to the specific steps of the aforementioned method, and the repeated parts will not be described again.

[0123] The texture-based interactive mesh model cutting device of the embodiment comprises a mesh projection module, a background separation module, a triangle screening module, a first surface mesh processing module, a second surface mesh processing module, and a new surface mesh generation module. The mesh projection module is configured to project mesh triangles in a surface mesh of a reconstructed three-dimensional model of an object onto a texture image according to a corresponding relationship between the surface mesh and the texture image, to obtain a texture triangle set composed of texture triangles in the texture image. The background separation module is configured to select a polygon region containing only a background along a foreground edge in the projected texture image. The foreground is a texture image of the object to be reconstructed, and the background is a texture image other than the object to be reconstructed. The triangle screening module is configured to traverse all texture triangles in the texture triangle set, and screen out texture triangles falling in the polygon region and texture triangles intersecting with edges of the polygon region. The first surface mesh processing module is configured to delete mesh triangles in the surface mesh corresponding to the texture triangles falling in the polygon region. The second surface mesh processing module is configured to split the texture triangles intersecting with edges of the polygon region and corresponding surface mesh triangles, and delete mesh triangles in the surface mesh corresponding to the texture triangles falling in the polygon region after splitting. The new surface mesh generation module is configured to generate a new surface mesh of the object to be reconstructed by using all remaining mesh triangles. According to the corresponding relationship between the three-dimensional mesh and the texture image, the mesh is processed on the two-dimensional texture image, the processing complexity is reduced, and the processing accuracy is higher.

[0124] Embodiment four

[0125] The present application also provides a three-dimensional modeling method. The surface mesh of a reconstructed object model is cut by using the texture-based interactive mesh model cutting method of any one of the aforementioned embodiments. According to the corresponding relationship between the texture image and the surface mesh, a three-dimensional model of an object to be modeled is generated by using the texture image and the cut surface mesh.

[0126] Embodiment five

[0127] Based on the same inventive concept, there is also provided a device for three-dimensional modeling, characterized in that it comprises at least one processor, at least one memory, and computer program instructions stored in the memory, which, when executed by the processor, implement the aforementioned method for three-dimensional modeling.

[0128] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware. The program can be stored in a computer readable storage medium, and when the program is executed, the program can include the processes of the above-mentioned embodiment methods. The storage medium can be a magnetic disc, an optical disc, a read-only memory (ROM), a random access memory (RAM), or the like.

[0129] The above-mentioned embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it should not be understood as a limitation on the patent scope of the present application. It should be pointed out that, for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A texture-based three-dimensional model clipping method, characterized by, The method comprises: According to the correspondence between the surface grid of the reconstructed three-dimensional model of the object and the texture image, projecting the grid triangles in the surface grid onto the texture image to obtain a texture triangle set composed of texture triangles in the texture image; Selecting a polygonal region containing only the background on the projected texture image along the foreground edge; Traversing all the texture triangles in the texture triangle set, and screening out the texture triangles intersecting the edge of the polygonal region; Splitting the texture triangles intersecting the edge of the polygonal region and the corresponding surface grid triangles, and deleting the split grid triangles in the surface grid corresponding to the texture triangles falling within the polygonal region after splitting; Constructing a new surface grid of the object to be three-dimensionally reconstructed by all the remaining grid triangles; The intersection points of the texture triangles and the polygonal region and the original vertices jointly constitute a plurality of split texture triangles; According to the correspondence between the texture image and the surface grid, generating a three-dimensional model of the object to be modeled by the texture image and the cut surface grid.

2. The method of claim 1, wherein, The splitting of the texture triangles intersecting the edge of the polygonal region and the corresponding surface grid triangles, and the deletion of the split grid triangles in the surface grid corresponding to the texture triangles falling within the polygonal region after splitting, comprises: According to the splitting of the texture triangles, performing corresponding splitting on the surface grid to obtain split grid triangles; Screening out the split texture triangles falling within the polygonal region; Deleting the split grid triangles corresponding to the split texture triangles falling within the polygonal region.

3. The method of claim 2, wherein, The edges of the plurality of split triangles split in the same texture triangle do not intersect.

4. The method according to claim 1 or 2, characterized in that, The method comprises: traversing all the texture triangles in the texture triangle set, screening out the texture triangles falling within the polygonal region, and deleting the grid triangles in the surface grid corresponding to the texture triangles falling within the polygonal region.

5. The method according to claim 1 or 2, characterized in that, When only one edge of the texture triangles intersecting the edge of the polygonal region has an intersection point with the edge of the polygonal region, the splitting of the texture triangles and the polygonal region intersection points and the original vertices jointly constitutes a plurality of split texture triangles. Connecting the two farthest intersection points with the opposite vertices to split the original texture triangle into three split triangles.

6. The method of claim 1 or 2, wherein, When only two edges of the texture triangles intersecting the edge of the polygonal region have intersection points with the edge of the polygonal region, the splitting of the texture triangles and the polygonal region intersection points and the original vertices jointly constitutes a plurality of split texture triangles.

7. The method of claim 6, wherein, The splitting of the texture triangles and the polygonal region intersection points and the original vertices jointly constitutes a plurality of split texture triangles, comprising: When the texture triangle has two edges respectively having one intersection point, connecting the two intersection points and one intersection point with the corresponding vertex to split the original texture triangle into three split texture triangles; When the texture triangle has one intersection point on one side and two or more intersection points on another side, the two farthest intersection points on the other side are connected to the vertices opposite the sides they are on, and one of the two farthest intersection points is connected to an intersection point on the other side, splitting the original texture triangle into four split texture triangles; When the texture triangle has two sides with two or more intersection points on each side, the two farthest intersection points on each side are connected in a zigzag pattern, and the last intersection point is connected to the vertex opposite the side it is on, splitting the original texture triangle into five split texture triangles.

8. The method of claim 1 or 2, wherein, All texture triangles in the set of texture triangles are traversed, and the texture triangles that intersect the edges of the polygon region are screened. When a texture triangle has three sides with intersection points on the edges of the polygon region, the intersection points of the texture triangle and the polygon region are combined with the original vertices to form multiple split texture triangles.

9. The method of claim 8, wherein, The combining of the intersection points of the texture triangle and the polygon region with the original vertices to form multiple split texture triangles includes: When the texture triangle has one intersection point on each of the three sides, the intersection points are sequentially connected, splitting the original texture triangle into four split triangles; When the texture triangle has one intersection point on each of two sides and two or more intersection points on the other side, one intersection point on one side is connected to one intersection point and the two farthest intersection points on the other side, and one intersection point on the other side is connected to the nearest intersection point, splitting the original texture triangle into five split triangles; When the texture triangle has one intersection point on one side and two or more intersection points on the other two sides, the two farthest intersection points on the other two sides are selected, the one intersection point is connected to the four selected intersection points on the other two sides, and the two adjacent intersection points on the two sides with multiple intersection points are connected to each other, splitting the original texture triangle into six split triangles; When the texture triangle has two or more intersection points on each of the three sides, the two farthest intersection points on each side are selected, one intersection point on one side is connected to the three intersection points on the other two sides in sequence, and the other intersection point on the side is connected to the unconnected intersection points on the other two sides and another intersection point on the side, splitting the original texture triangle into seven split triangles.

Citation Information

Patent Citations

  • Triangular net cutting and reconstruction method based on AIF

    CN100595796C

  • Mesh simplification methods based on plane fitting in 3D reconstruction

    CN107680168B

  • Texture-based interactive mesh model cutting method and device and modeling device

    CN109003333A