CN115984476A - Three-dimensional model cutting method based on texture - Google Patents

Three-dimensional model cutting method based on texture Download PDF

Info

Publication number
CN115984476A
CN115984476A CN202310030522.5A CN202310030522A CN115984476A CN 115984476 A CN115984476 A CN 115984476A CN 202310030522 A CN202310030522 A CN 202310030522A CN 115984476 A CN115984476 A CN 115984476A
Authority
CN
China
Prior art keywords
texture
triangles
split
triangle
intersection points
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310030522.5A
Other languages
Chinese (zh)
Inventor
史利民
谢一凡
郭复胜
王万请
刘薇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Jingzhi Data Technology Co ltd
Original Assignee
Zhejiang Jingzhi Data Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Jingzhi Data Technology Co ltd filed Critical Zhejiang Jingzhi Data Technology Co ltd
Priority to CN202310030522.5A priority Critical patent/CN115984476A/en
Publication of CN115984476A publication Critical patent/CN115984476A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/30Polynomial surface description

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Physics (AREA)
  • Mathematical Analysis (AREA)
  • Algebra (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Image Generation (AREA)

Abstract

The invention relates to a three-dimensional model cutting method based on texture, which comprises the following steps: projecting the mesh triangles in the surface mesh onto the texture image according to the corresponding relation between the surface mesh of the reconstructed three-dimensional model of the object and the texture image to obtain a texture triangle set formed by the texture triangles in the texture image; selecting a polygonal area only containing the background along the foreground edge circle on the texture image after projection; and generating a three-dimensional model of the object to be modeled by using the texture image and the cut surface mesh according to the corresponding relation between the texture image and the surface mesh.

Description

Three-dimensional model cutting method based on texture
Description of the different cases
The original basis of the divisional application is a patent application with the application number of 201810708745.1 and the application date of 2018, namely 07 month 02 and named as 'interactive grid model cutting method, device and modeling equipment based on textures'.
Technical Field
The invention relates to the technical field of three-dimensional modeling, in particular to a texture-based interactive grid model cutting method and device and a three-dimensional modeling method and device.
Background
At present, after camera calibration and point cloud generation are completed, three-dimensional reconstruction based on an image generally needs to complete mesh surface reconstruction and texture mapping based on the point cloud. However, as the reconstructed point cloud edge often adheres to some external points and some problems of the mesh surface reconstruction algorithm, the reconstructed surface is close to the edge of an object and extends outwards to reconstruct redundant meshes for the object with an open curved surface structure such as clothes, and after texture mapping, a background is mapped to the redundant generated meshes, so that the situation that the foreground and the background are mixed occurs in the reconstruction result. For this case, it is necessary to take measures to remove the redundant mesh mapped as background color from the mesh surface of the reconstructed model and to reconstruct the mesh edge so that its edge line corresponds to the true foreground object edge.
At present, mesh editing is usually performed by means of editing software such as 3dMax, redundant triangular meshes need to be selected and deleted one by one, the triangular meshes crossing over the foreground and the background are manually cut along the real edge, and the part mapped as the background texture is deleted.
The method has the advantages that 3D editing software such as 3dMax is used for carrying out grid screening and deleting, the manual interaction process is very complex, the adjacency relation and the shielding relation of the grids need to be considered, particularly when the edge triangular surface needs to be split, the requirement on the operation fineness is high, the edge matching accuracy of a reconstructed object is low, and the reconstruction accuracy of a final object model is influenced.
The patent document with the publication number of CN100595796C discloses a triangular mesh cutting reconstruction method based on AIF in the technical field of computer application. The method comprises the steps of firstly converting a triangular three-dimensional grid model data expression form into an AIF data structure form with an adjacent incidence relation, further carrying out grid model reconstruction processing on the data in the form, carrying out modeling classification on triangular grids passing through a cutting path in the processing process, then carrying out rapid AIF structure query and modification according to the classification result, finally obtaining brand-new grid data after segmentation, and realizing grid reconstruction of a cut body.
And patent document No. CN107680168B discloses a mesh simplification method based on plane fitting in three-dimensional reconstruction. Firstly, point and plane extraction and plane clustering are carried out on point clouds to obtain a separation plane and a detailed part of the point clouds; then carrying out plane edge extraction, edge downsampling, plane interior downsampling, plane edge and interior combination and triangularization plane combination on the separation plane to obtain a triangularization splicing result of the separation plane; carrying out triangulation processing on the point cloud of the detail part to obtain a triangulation processing result of the detail; and finally, combining the detail triangularization processing result and the triangularization splicing result of the separation plane to obtain a grid simplification result.
The technical scheme 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 recognition, processing and reconstruction, but the above scheme does not provide a specific interactive processing method for image edges and mesh models, and is difficult to be applied to edge recognition and texture processing in image reconstruction to improve the image reconstruction accuracy.
Disclosure of Invention
Based on this, in view of the above problems, it is necessary to provide a texture-based interactive mesh model clipping method and apparatus capable of accurately processing an edge, and a three-dimensional modeling method and apparatus using the mesh clipping method.
The invention provides an interactive grid model cutting method based on texture, which comprises the following steps:
projecting a mesh triangle in the surface mesh onto the texture image according to the corresponding relation between the surface mesh of the reconstructed three-dimensional model of the object and the texture image to obtain a texture triangle set formed by the texture triangles in the texture image;
selecting a polygonal area only containing a background along the foreground edge circle on the texture image after projection; the foreground is a texture image of an object to be reconstructed, and the background is a texture image except the object to be reconstructed;
traversing all texture triangles in the texture triangle set, and screening out texture triangles which fall in the polygon area and texture triangles which are intersected with the edge of the polygon area;
deleting the mesh triangles in the surface mesh corresponding to the texture triangles falling in the polygonal region;
splitting texture triangles intersected with the edges of the polygonal area and corresponding surface mesh triangles, and deleting split mesh triangles in the surface meshes corresponding to the split texture triangles in the polygonal area;
all remaining mesh triangles are formed into a new surface mesh of the object to be reconstructed three-dimensionally.
In the texture-based interactive mesh model clipping method according to one embodiment, the texture triangle falling in the polygon area is a texture triangle having no intersection with an edge of the polygon area.
In an embodiment of the texture-based interactive mesh model clipping method, the splitting a texture triangle intersecting with an edge of a polygon region and a corresponding surface mesh triangle, and deleting a split mesh triangle in a surface mesh corresponding to the split texture triangle falling in the polygon region includes:
combining the intersection points of the texture triangles and the polygon areas with the original vertexes to form a plurality of split texture triangles;
correspondingly splitting the surface mesh according to the splitting of the texture triangles to obtain split mesh triangles;
screening out the split texture triangles which fall in the polygonal area;
and deleting the split mesh triangles corresponding to the split texture triangles falling in the polygon area.
In the texture-based interactive mesh model clipping method according to one embodiment, edges of a plurality of split triangles split in the same texture triangle do not intersect.
In an embodiment of the method for clipping an interactive mesh model based on texture, traversing all texture triangles in the texture triangle set, and if only two edges of a selected texture triangle intersect with an edge of a polygon region, the intersection point of the texture triangle and the polygon region and an original vertex together form a plurality of split texture triangles, where the method includes:
when two sides of the texture triangle are respectively provided with an intersection point, connecting the two intersection points and one of the intersection points with a corresponding vertex, and splitting the original texture triangle into three split texture triangles;
when one edge of the texture triangle has one intersection point and the other edge has two or more intersection points, respectively connecting two intersection points which are farthest away in the two or more intersection points with a vertex opposite to the edge where the two intersection points are located, connecting one of the two intersection points which are farthest away with the intersection point on the other edge, and splitting the original texture triangle into four split texture triangles;
when two or more intersection points are arranged on two sides of the texture triangle respectively, the intersection points which are farthest away on each side are connected in a zigzag mode, the last intersection point is connected with the vertex opposite to the side where the intersection point is located, and the original texture triangle is divided into five divided texture triangles.
In one embodiment of the method for clipping an interactive mesh model based on texture, traversing all texture triangles in the texture triangle set, and when three edges of a selected texture triangle intersect with the edge of a polygon area, and there are intersections between the three edges and the edge of the polygon area, the method for clipping an interactive mesh model based on texture jointly forms a plurality of split texture triangles by the intersections between the texture triangle and the polygon area and an original vertex, and includes:
when three sides of the texture triangle respectively have an intersection point, sequentially connecting each intersection point, and splitting the original texture triangle into four split triangles;
when two sides of the texture triangle are respectively provided with an intersection point and the other side is provided with two or more intersection points, one intersection point on one side is connected with one intersection point on the other side and two farthest intersection points in the two or more intersection points, and one intersection point on the other side is connected with the nearest intersection point in the two or more intersection points, so that the original texture triangle is split into five split triangles;
when one edge of the texture triangle has an intersection point and the other two edges have two or more intersection points, respectively selecting two intersection points with the farthest distance from the other two edges, connecting the four intersection points selected on the other two edges by using the intersection point, and mutually connecting two adjacent intersection points on the two edges with a plurality of intersection points, so as to split the original texture triangle into six split triangles;
when three sides of the texture triangle respectively have two or more intersection points, two intersection points which are farthest away from each side are respectively selected, one intersection point on one side is connected with three intersection points on the other two sides in sequence, the other intersection point on the one side is connected with the intersection points which are not connected on the other two sides and the other intersection point on the side, and the original texture triangle is split into seven split triangles.
In an embodiment of the method for clipping an interactive mesh model based on texture, traversing all texture triangles in the texture triangle set, and if only one edge of a selected texture triangle which intersects with an edge of a polygon area has an intersection with the edge of the polygon area, combining the intersection of the texture triangle and the polygon area with an original vertex to form a plurality of split texture triangles, the method includes:
and respectively connecting the two intersection points with the farthest distance with the opposite vertexes, and splitting the original texture triangle into three split triangles.
The invention discloses a texture-based interactive mesh model cutting device, which comprises:
the mesh projection module is used for projecting a mesh triangle in the surface mesh onto the texture image according to the corresponding relation between the surface mesh of the reconstructed three-dimensional model of the object and the texture image to obtain a texture triangle set formed by the texture triangles in the texture image;
a background separation module, configured to select a polygonal region that only includes a background along a foreground edge circle on the projected texture image; the foreground is a texture image of an object to be reconstructed, and the background is a texture image except the object to be reconstructed;
the triangle screening module is used for traversing all the texture triangles in the texture triangle set and screening out the texture triangles falling in the polygon area and the texture triangles intersected with the edge of the polygon area;
a first surface mesh processing module, configured to delete a mesh triangle in the surface mesh that corresponds to the texture triangle that falls in the polygon area;
the second surface mesh processing module is used for splitting texture triangles intersected with the edge of the polygonal area and corresponding surface mesh triangles and deleting split mesh triangles in the surface meshes corresponding to the split texture triangles in the polygonal area;
a new surface mesh generation module for forming all remaining mesh triangles into a new surface mesh of the object to be three-dimensionally reconstructed.
The method for three-dimensional modeling based on the same invention concept cuts the surface mesh of the reconstructed three-dimensional model of the object by using the method for cutting the interactive mesh model based on the texture of the interactive mesh based on the texture, and generates the three-dimensional model of the object to be modeled by using the texture image and the cut surface mesh according to the corresponding relation between the texture image and the surface mesh.
An apparatus for three-dimensional modeling based on the same inventive concept includes: 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 of three-dimensional modeling.
The beneficial effects of the invention include: the invention provides a texture-based interactive grid model cutting method for an interactive grid based on texture, which comprises the steps of projecting a grid onto a texture image according to the corresponding relation between a surface grid and the texture image, processing the grid on a two-dimensional texture image, particularly processing the grid at the boundary position of a foreground and a background, and correspondingly processing the edge position of the surface grid of an object to be reconstructed. Therefore, the effect of processing the three-dimensional mesh on the two-dimensional plane is achieved, the processing precision is higher, each triangle in the edge position is processed in a mode that the triangles traverse one by one, the three-dimensional mesh is cut accurately, and the edge of the three-dimensional surface mesh of the finally reconstructed object model is more accurate.
Drawings
FIG. 1 is a flowchart of an embodiment of a texture-based interactive mesh model pruning method of the present invention;
FIG. 2 is a reconstructed three-dimensional model of an object with texture in an embodiment of a texture-based interactive mesh model pruning method of the present invention;
FIG. 3 is a surface mesh in a three-dimensional model of an object in an embodiment of a texture-based interactive mesh model clipping method of the present invention;
FIG. 4 is a texture image of a three-dimensional model of an object in an embodiment of a texture-based interactive mesh model clipping method of the present invention;
FIG. 5 is a diagram illustrating the effect of mapping the surface mesh of the three-dimensional model of the object onto a texture image according to an embodiment of the method for clipping an interactive mesh model based on texture of the present invention;
FIG. 6 is a flowchart of the surface mesh processing corresponding to the thread triangle intersecting the edge of the polygonal area in an interactive mesh model clipping method based on texture of the present invention;
FIG. 7 is a schematic diagram illustrating a split of a texture triangle when only one side of the texture triangle has an intersection with an edge of a background polygon region according to an embodiment of the texture-based interactive mesh model segmentation method of the present invention;
FIG. 8 is a schematic diagram illustrating a split of a texture triangle when two sides of the texture triangle have an intersection with the edge of the background polygon region in an embodiment of the texture-based interactive mesh model clipping method according to the present invention;
FIG. 9 is a schematic diagram of a split triangle with one side having an intersection with an edge of a background polygon area and the other side having two or more intersections with the edge of the background polygon area in an embodiment of an interactive mesh model clipping method based on texture according to the present invention;
FIG. 10 is a schematic diagram illustrating a split triangle configuration when a texture triangle has two sides and two or more intersections exist with the edge of the background polygon area in an embodiment of the texture-based interactive mesh model segmentation method of the present invention;
FIG. 11 is a schematic diagram illustrating a split triangle when each edge of the texture triangle and the edge of the background polygon area have an intersection point in an embodiment of the method for clipping an interactive mesh model based on texture;
FIG. 12 is a schematic diagram of a split triangle with two sides of the texture triangle having an intersection with the edge of the background polygon area and the other side having two or more intersections with the edge of the background polygon area in an embodiment of the texture-based interactive mesh model clipping method according to the present invention;
FIG. 13 is a schematic diagram of a triangle split when one side of a texture triangle has an intersection with an edge of a background polygon area and the other two sides have two or more intersections with the edge of the background polygon area in an embodiment of an interactive mesh model clipping method based on texture of the present invention;
fig. 14 is a schematic diagram illustrating splitting of a texture triangle when each edge of the texture triangle has two or more intersection points with an edge of a background polygon region according to an embodiment of the texture-based interactive mesh model clipping method of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more clearly understood, the following description will be made with reference to the accompanying drawings for describing specific embodiments of the texture-based interactive mesh model cropping method and apparatus and the three-dimensional modeling method and apparatus of the present invention. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
Example one
As shown in fig. 1, an interactive mesh model clipping method based on texture of one embodiment includes the following steps:
and S100, projecting the mesh triangles in the surface mesh onto the texture image according to the corresponding relation between the surface mesh of the reconstructed three-dimensional model of the object and the texture image to obtain a texture triangle set formed by the texture triangles in the texture image.
When the object is modeled in three dimensions by the image, the three-dimensional surface mesh showing the surface characteristics of the object corresponding to the object is composed of a huge number of triangles, and the surface mesh and the texture image have a mapping relation. The reconstructed three-dimensional model is a model that completes texture mapping, that is, the existing surface mesh data also includes a model texture image and a mapping relationship between the surface mesh and the texture image. And setting the surface grid of the model as T, the texture image as M and the corresponding mapping relation as P. And projecting triangles in the surface mesh T on the texture image M through the mapping relation P between the mesh T and the texture M, and recording the projection triangle set as Tp. In the following, we will use the named sets and mapping relations to perform the processing.
S200, selecting a polygonal area only containing the background along the foreground edge circle on the projected texture image.
Because the foreground and the background can be easily identified through colors on the texture image, and the boundary of the foreground and the background corresponds to the real edge of the object, the accurate cutting of the surface mesh of the three-dimensional model can be realized through the segmentation of the foreground and the background on the texture image based on the mapping relation between the surface mesh and the texture image.
For convenience of description, the foreground is defined as an object to be reconstructed, and the background is defined as a region outside the object to be reconstructed in the scene. 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 outside the texture of the object to be reconstructed on the image.
In this step, a polygonal region R containing only the background is selected along the foreground edge circle by interaction on the texture image M. Fig. 2 shows a three-dimensional model of a horse, the bottom gray area of the model being the excess. Fig. 3 shows the surface mesh of the main components, fig. 4 shows the texture image, and fig. 5 shows the surface mesh and the texture image after the mapping process.
S300, traversing all texture triangles in the texture triangle set, and screening out texture triangles falling in the polygon region
The texture triangle falling in the polygon area refers to a texture triangle having no intersection with the edge of the polygon area.
S400, mesh triangles in the surface mesh corresponding to the texture triangles falling in the polygonal area are deleted.
The three-dimensional mesh is processed correspondingly to the processing result of the texture image, triangles of the three-dimensional mesh falling in a background area are deleted, edges are modified, and the matching degree of the three-dimensional mesh shape and the object to be modeled is higher.
And S500, splitting the texture triangles intersected with the edge of the polygonal area and the corresponding surface mesh triangles, and deleting the split mesh triangles in the surface meshes corresponding to the split texture triangles in the polygonal area.
S600, forming a new surface mesh of the object to be three-dimensionally reconstructed by all the remaining mesh triangles.
The newly formed new surface grid edge is subjected to redundant deletion processing, the object three-dimensional reconstruction edge is more accurate, and the three-dimensional modeling precision is higher.
The interactive grid model cutting method based on the texture utilizes the corresponding relation between the texture image and the three-dimensional grid to convert the editing of the three-dimensional grid into the two-dimensional image segmentation problem. And by means of interactive image segmentation, accurate cutting of the surface mesh is realized. Because the foreground and the background can be easily identified through colors on the texture image, and the boundary of the foreground and the background corresponds to the real edge of the object, the accurate cutting of the three-dimensional mesh can be realized through the segmentation of the foreground and the background on the texture image based on the mapping relation between the surface mesh and the texture image. Wherein the selection of the polygon area of the background can be performed manually.
Specifically, as shown in fig. 6, in step S500, splitting a texture triangle intersecting with an edge of the polygon region and a corresponding surface mesh triangle, and deleting a split mesh triangle in a surface mesh corresponding to the split texture triangle falling in the polygon region, the method includes the following steps:
s501, forming a plurality of split texture triangles by the intersection points of the texture triangles and the polygon areas and the original vertexes together.
The method comprises the following steps of connecting the intersection points with vertexes or intersection points of original texture triangles, splitting the texture triangles into a plurality of triangles in the interior, subdividing the surface mesh on the basis of ensuring the mesh form, and processing the subdivided mesh so as to realize the thinning processing of the edge of the surface mesh.
S502, correspondingly splitting the surface mesh according to the splitting of the texture triangles to obtain split mesh triangles. The splitting of the surface mesh triangle in this step can be performed according to the corresponding relationship between the surface mesh and the texture mesh.
S503, screening out the split texture triangles which fall in the polygon area.
S504, deleting the split mesh triangles corresponding to the split texture triangles falling in the polygon area.
In this embodiment, the triangle at the edge position of the background polygon region is further processed and split into a plurality of triangles for refinement, so that the edge profile is more accurate.
Preferably, the edges of a plurality of split triangles split in the same texture triangle do not intersect. I.e. directly dividing the interior of the texture triangle into a plurality of triangles which do not intersect with each other. And the surface grid has no other shapes, so that the integral structure of the surface grid is ensured.
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:
1) When two sides of the texture triangle are respectively provided with an intersection point, connecting the two intersection points and one of the intersection points with the corresponding vertex, and splitting the original texture triangle into three split texture triangles;
2) When one edge of the texture triangle is provided with one intersection point and the other edge is provided with two or more intersection points, two intersection points which are farthest away in the two or more intersection points are respectively connected with the corresponding vertexes of the two or more intersection points, one of the two intersection points which are farthest away is connected with the intersection point on the other edge, and the original texture triangle is split into four split texture triangles;
3) When the texture triangle has two or more intersection points on two sides, the zigzag connection is made between two intersection points on each side with the farthest distance, and the last intersection point is connected with the corresponding vertex, so as to split the original texture triangle into five split texture triangles.
When the texture triangle has three edges and has intersection points with the edge of the background polygon, the intersection points of the texture triangle and the polygon region and the original vertex form a plurality of split texture triangles together, which comprises the following steps:
1) When three sides of the texture triangle respectively have an intersection point, sequentially connecting each intersection point, and splitting the original texture triangle into four split triangles;
2) When two sides of the texture triangle are respectively provided with an intersection point and the other side is provided with two or more intersection points, one intersection point on one side is connected with one intersection point on the other side and two intersection points with the farthest distance in the two or more intersection points, and one intersection point on the other side is connected with the nearest intersection point in the two or more intersection points, so that the original texture triangle is split into five split triangles;
3) When one edge of the texture triangle has an intersection point and the other two edges have two or more intersection points, respectively selecting two intersection points with the farthest distance from the other two edges, connecting the four intersection points selected on the other two edges by using one intersection point, and mutually connecting two adjacent intersection points on the two edges with a plurality of intersection points, so as to split the original texture triangle into six split triangles;
4) When three sides of the textured triangle are respectively provided with two or more intersection points, two intersection points which are farthest away from each side are respectively selected, one intersection point on one side is connected with the three intersection points on the other two sides in sequence, the other intersection point on the one side is connected with the intersection points which are not connected with the other two sides and the other intersection point on the side, and the original textured triangle is split into seven split triangles.
When only one edge of the texture triangle has an intersection with the edge of the background polygon, the processing of the texture triangle is special, specifically, when traversing all the texture triangles in the texture triangle set, screening out the texture triangle with only one edge having an intersection with the edge of the polygon area; connecting two intersection points with the farthest distance with opposite vertexes respectively, and splitting the original texture triangle into three split triangles; and deleting the mesh triangle corresponding to the middle triangle in the three split triangles in the surface mesh. Two triangles on two sides are used as reserved triangles, so that the edges are modified. In fact, the deleted middle split triangle is also the split triangle that falls within the polygon area, while the remaining two triangles are also split triangles that fall outside the polygon area.
Example two
The following describes a method for clipping a texture-based interactive mesh model with a specific processing flow.
Step 1: the triangles in the surface mesh T are projected on the texture image M through the mapping relation P between the mesh T and the texture M, and the set of the projected triangles is represented as Tp, as shown in fig. 5.
Step 2: one polygon region R containing only the background is selected along the foreground edge circle by interaction on the texture image M.
And step 3: traverse T p Each triangle in (1) is determined to fall completely within the polygon R and is designated as
Figure BDA0004046420580000111
Is arranged in T and->
Figure BDA0004046420580000112
The corresponding set of triangles is denoted as T i Deleting T from T i
And 4, step 4:
for T p The triangle intersected with the R edge is set as T c ={a 0 ,a 1 ,a 2 In which a0 a 1 ,a 2 Is a triangle T c Three vertices in a counterclockwise order. Let T c The corresponding triangle in T is T 'c = { a' 0 ,a′ 1 ,a′ 2 },a′ 0 ,a′ 1 ,a′ 2 Respectively with a 0 ,a 1 ,a 2 And (7) correspondingly. T is c The intersection with R is p 1 ,p 2 …,p m T 'is found by the following linear interpolation formula' c In (c) p i Of corresponding point p' i ,i=1,2,...m。
Let p i Fall on the edge
Figure BDA0004046420580000113
Above, where j =0,1,2,% is the modulo operation.
Let r = | p i -a j |/|a (j+1)%3 -a j | and | is the modulo length.
Then
Figure BDA0004046420580000114
And 5: t 'is updated by a new triangular surface' c
(1) Intersection point p i i =1,2,. M at T c On one edge of the strip.
Do not assume to be at the edge
Figure BDA0004046420580000115
As shown in fig. 7. Connection a (j+2)%3 And p 1 ,a (j+2)%3 And p m Will T c Split into three triangles, corresponding>
Figure BDA0004046420580000116
T 'will also be set' c Divided into three triangular faces. Combined triangular surface
Figure BDA0004046420580000117
Replace T 'in T' c
(2) Intersection point p i I =1,2,. M at T c On two sides of
Suppose to be at the edge
Figure BDA0004046420580000118
And/or>
Figure BDA0004046420580000119
Above, there are three cases again:
(2-1) there is a crossing point m =2 on each of the two sides, as shown in fig. 8. Connection p 1 p 2 ,a (j+1)%3 p 2 Will T c Split into three triangles, respectively
Figure BDA00040464205800001110
T 'will also be set' c Is divided into three triangular surfaces. Get T c The triangles of the inner three triangles that fall completely outside of R are T' c Corresponding triangle face inside replaces T 'in T' c
(2-2) one of the edgesThere is one intersection point and two or more intersection points on the other side, and it is not assumed that p is set as shown in FIG. 9 m 、p 2 The two intersections with the farthest distance on the multi-intersection edge are included. Connection p 1 p 2 ,p 2a(j+1)%3 ,p ma(j+1)%3, Will T c Split into four triangles, respectively
Figure BDA0004046420580000121
T 'will also be set' c Divided into four triangular surfaces. By T c T 'corresponding to triangle completely falling outside R' c Triangular face T 'in T is replaced by medium triangular face' c
(2-2) there is more than one intersection on each of the two sides, and it is not assumed that p is set as shown in FIG. 10 1 、p s+1 And p s 、p 2 Respectively, the two points of intersection which are the farthest from the two edges. Connection p 1 p 2 ,p 2 p s+1 ,p s+1 p s ,p s a (j+1)%3 Will T c Split into five triangles, corresponding
Figure BDA0004046420580000122
T 'will also be set' c Divided into five triangular faces. By T c T 'corresponding to triangle completely falling outside R' c Triangular face T 'in T is replaced by medium triangular face' c
(3) The point of intersection p i i =1,2,. M at T c On three sides of the panel.
At this time, four cases are distinguished:
(3-1)T c there is one intersection on each side, i.e., m =3, as shown in fig. 11. Connection p 1 p 2 ,p 2 p 3 ,p 8 p 1 Will T c Split into four triangles, respectively
Figure BDA0004046420580000123
T 'will also be set' c Divided into four triangular surfaces. By T c Triangles with interior completely falling outside RT' c Triangular face T 'in T is replaced by medium triangular face' c
(3-2)T c Two sides of the middle part are respectively provided with a crossing point, and the other side is provided with two or more crossing points. It is not assumed that p is as shown in FIG. 12 3 ,p m The two intersections are farthest from each other on the side including the plurality of intersections. Connection p 1 p 2 ,p 2 p 3 ,p 1 p m ,p 1 p 3 Will T c Split into five triangles, corresponding
Figure BDA0004046420580000124
T 'will also be set' c Divided into five triangular faces. By T c T 'corresponding to triangles completely falling outside R in five inner triangles' c Triangular face T 'in T is replaced by medium triangular face' c 。/>
(3-3)T′ c One of the two edges has a point of intersection, and the other two edges have two or more points of intersection. It is not assumed that it is as shown in fig. 13. Let p m 、p s+1 And p s 、p 2 The two intersection points with the farthest distance on the two sides containing the multiple intersection points are respectively. Connection p 1 p 2 ,p s p s+1 ,p 1 p m ,p 1 p s ,p 1 p s+1 Let a triangle T c Split into six triangles, respectively
Figure BDA0004046420580000131
T 'will also be set' c Is divided into six triangular surfaces. By T c T 'corresponding to triangles completely falling outside R in inner six triangles' c Triangular face T 'in T is replaced by medium triangular face' c
(3-4)T c There are two or more intersections on all three sides. It is not assumed that two intersection points p with the farthest distance on three sides are found respectively as shown in FIG. 14 1 、p r 、p t+1 、p s ·p s +1 、p m Is connected to p 1 p m ,p 1 p s+1 ,p 1 p s ,p t p t+1 ,p t p s ,p s p t+1 Let a triangle T c Split into seven triangles, respectively
Figure BDA0004046420580000132
T 'will also be set' c The cutting die is divided into seven triangular surfaces. By T c T 'corresponding to triangles completely falling outside R in seven triangles' c Triangular face T 'in T is replaced by medium triangular face' c
Step 6: repeating the step 2 to the step 5 until the traversal of T is finished p All triangles in (a).
Since the triangles on the surface of the mesh are usually very small, and the manually selected polygons are relatively large, in practical applications, the steps 4-5 can well approach the R edge, that is, the object edge.
EXAMPLE III
Based on the same inventive concept, the embodiment of the invention provides an interactive grid model cutting device based on texture, and as the problem solving principle of the device is similar to that of the interactive grid model cutting method based on texture, the implementation of the system can be realized according to the specific steps of the method, and repeated parts are not repeated.
The interactive mesh based on texture of this embodiment is interactive mesh model trimming device based on texture, includes: the device comprises a grid projection module, a background separation module, a triangle screening module, a first surface grid processing module, a second surface grid processing module and a new surface grid generating module. The mesh projection module is used for projecting mesh triangles in the surface mesh onto the texture image according to the corresponding relation between the surface mesh of the reconstructed three-dimensional model of the object and the texture image to obtain a texture triangle set formed by the texture triangles in the texture image; the background separation module is used for selecting a polygonal area which only contains a background on the projected texture image along a foreground edge circle; the foreground is a texture image of an object to be reconstructed, and the background is a texture image except the object to be reconstructed; the triangle screening module is used for traversing all texture triangles in the texture triangle set and screening out texture triangles falling in the polygon area and texture triangles intersected with the edge of the polygon area; the first surface mesh processing module is used for deleting the mesh triangles in the surface mesh corresponding to the texture triangles falling in the polygonal area; the second surface mesh processing module is used for splitting texture triangles intersected with the edge of the polygonal area and corresponding surface mesh triangles and deleting split mesh triangles in the surface meshes corresponding to the split texture triangles in the polygonal area; the new surface mesh generation module is configured to construct all remaining mesh triangles into a new surface mesh of the object to be three-dimensionally reconstructed. The grid is processed on the two-dimensional texture image according to the corresponding relation between the three-dimensional grid and the texture image, the processing complexity is reduced, and the processing precision is higher.
Example four
The invention also provides a three-dimensional modeling method, which cuts the surface mesh of the reconstructed object model by using the texture-based interactive mesh model cutting method of any one of the embodiments, and generates the three-dimensional model of the object to be modeled by using the texture image and the cut surface mesh according to the corresponding relation between the texture image and the surface mesh.
EXAMPLE five
Based on the same inventive concept, there is also provided an apparatus for three-dimensional modeling, characterized by comprising: 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 of three-dimensional modeling.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by a computer program, which may be stored in a computer readable storage medium and executed by a computer to implement the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent should be subject to the appended claims.

Claims (10)

1. A three-dimensional model cropping method based on texture, characterized by comprising:
projecting the mesh triangles in the surface mesh onto the texture image according to the corresponding relation between the surface mesh of the reconstructed three-dimensional model of the object and the texture image to obtain a texture triangle set formed by the texture triangles in the texture image;
selecting a polygonal area only containing a background along the foreground edge circle on the texture image after projection;
and generating a three-dimensional model of the object to be modeled by using the texture image and the cut surface mesh according to the corresponding relation between the texture image and the surface mesh.
2. The method according to claim 1, characterized in that it comprises:
traversing all texture triangles in the texture triangle set, and screening out texture triangles intersected with the edge of the polygonal area;
splitting texture triangles intersected with the edge of the polygonal area and corresponding surface mesh triangles, and deleting split mesh triangles in the surface meshes corresponding to the split texture triangles in the polygonal area;
all remaining mesh triangles are formed into a new surface mesh of the object to be reconstructed in three dimensions.
3. The method according to claim 2, wherein the splitting texture triangles intersecting the edge of the polygon region and corresponding surface mesh triangles and deleting split mesh triangles in the surface meshes corresponding to the split texture triangles falling within the polygon region comprises:
combining the intersection points of the texture triangles and the polygon region with the original vertexes to form a plurality of split texture triangles;
correspondingly splitting the surface mesh according to the splitting of the texture triangles to obtain split mesh triangles;
screening out the split texture triangles which fall in the polygonal area;
and deleting the split grid triangles corresponding to the split texture triangles falling in the polygon area.
4. The method according to claim 3, wherein edges of the split triangles split in the same texture triangle do not intersect.
5. Method according to one of the preceding claims 1 to 3, characterized in that it comprises: traversing all texture triangles in the texture triangle set, screening out texture triangles falling in the polygon area, and deleting mesh triangles corresponding to the texture triangles falling in the polygon area in the surface mesh.
6. The method according to one of the preceding claims 1 to 3, wherein traversing all texture triangles in the texture triangle set, and selecting texture triangles that intersect with edges of a polygon region, when only one edge has an intersection with the edges of the polygon region, said combining the intersection of the texture triangle with the polygon region and an original vertex into a plurality of split texture triangles comprises:
and respectively connecting the two intersection points with the farthest distance with the opposite vertexes, and splitting the original texture triangle into three split triangles.
7. The method according to one of the preceding claims 1 to 3, wherein traversing all texture triangles in the texture triangle set, and selecting texture triangles that intersect with the edge of the polygon region, when only two edges have intersection points with the edge of the polygon region, the intersection points of the texture triangles and the polygon region are combined with the original vertices to form a plurality of split texture triangles.
8. The method of claim 7, wherein the combining the intersection points of the texture triangles and the polygon region with the original vertices into a plurality of split texture triangles comprises:
when two sides of the texture triangle are respectively provided with an intersection point, connecting the two intersection points and one of the intersection points with a corresponding vertex, and splitting the original texture triangle into three split texture triangles;
when one edge of the texture triangle has one intersection point and another edge has two or more intersection points, respectively connecting two intersection points which are farthest away from each other in the two or more intersection points with the vertex opposite to the edge where the two intersection points are located, connecting one of the two intersection points which are farthest away from each other with the intersection point on the other edge, and splitting the original texture triangle into four split texture triangles;
when the texture triangle has more than two intersection points on two sides, the intersection points are connected with two intersection points which are farthest away on each side in a zigzag manner, the last intersection point is connected with the vertex which is opposite to the side where the intersection point is located, and the original texture triangle is divided into five divided texture triangles.
9. The method according to one of the preceding claims 1 to 3, wherein traversing all texture triangles in the texture triangle set, and when three edges of selected texture triangles intersecting with the edge of the polygon region have intersection points with the edge of the polygon region, combining the intersection points of the texture triangles and the polygon region with the original vertices to form a plurality of split texture triangles.
10. The method of claim 9, wherein the combining the intersection points of the texture triangles and the polygon region with the original vertices into a plurality of split texture triangles comprises:
when three sides of the texture triangle respectively have an intersection point, sequentially connecting each intersection point, and splitting the original texture triangle into four split triangles;
when two sides of the texture triangle are respectively provided with an intersection point and the other side is provided with two or more intersection points, one intersection point on one side is connected with one intersection point on the other side and two farthest intersection points in the two or more intersection points, and one intersection point on the other side is connected with the nearest intersection point in the two or more intersection points, so that the original texture triangle is split into five split triangles;
when one edge of the texture triangle has an intersection point and the other two edges have two or more intersection points, respectively selecting two intersection points with the farthest distance on the other two edges, connecting the four intersection points selected on the other two edges by using the intersection point, and mutually connecting two adjacent intersection points on the two edges with a plurality of intersection points to split the original texture triangle into six split triangles;
when three sides of the texture triangle respectively have two or more intersection points, two intersection points which are farthest away from each side are respectively selected, one intersection point on one side is connected with three intersection points on the other two sides in sequence, the other intersection point on the one side is connected with the intersection points which are not connected on the other two sides and the other intersection point on the side, and the original texture triangle is split into seven split triangles.
CN202310030522.5A 2018-07-02 2018-07-02 Three-dimensional model cutting method based on texture Pending CN115984476A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310030522.5A CN115984476A (en) 2018-07-02 2018-07-02 Three-dimensional model cutting method based on texture

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810708745.1A CN109003333B (en) 2018-07-02 2018-07-02 Interactive grid model cutting method and device based on texture and modeling equipment
CN202310030522.5A CN115984476A (en) 2018-07-02 2018-07-02 Three-dimensional model cutting method based on texture

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201810708745.1A Division CN109003333B (en) 2018-07-02 2018-07-02 Interactive grid model cutting method and device based on texture and modeling equipment

Publications (1)

Publication Number Publication Date
CN115984476A true CN115984476A (en) 2023-04-18

Family

ID=64598017

Family Applications (3)

Application Number Title Priority Date Filing Date
CN202310030522.5A Pending CN115984476A (en) 2018-07-02 2018-07-02 Three-dimensional model cutting method based on texture
CN202310030475.4A Pending CN115937434A (en) 2018-07-02 2018-07-02 Three-dimensional model cutting device based on texture
CN201810708745.1A Active CN109003333B (en) 2018-07-02 2018-07-02 Interactive grid model cutting method and device based on texture and modeling equipment

Family Applications After (2)

Application Number Title Priority Date Filing Date
CN202310030475.4A Pending CN115937434A (en) 2018-07-02 2018-07-02 Three-dimensional model cutting device based on texture
CN201810708745.1A Active CN109003333B (en) 2018-07-02 2018-07-02 Interactive grid model cutting method and device based on texture and modeling equipment

Country Status (1)

Country Link
CN (3) CN115984476A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117541751A (en) * 2024-01-04 2024-02-09 支付宝(杭州)信息技术有限公司 Three-dimensional model degradation method and device

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109840914B (en) * 2019-02-28 2022-12-16 华南理工大学 Texture segmentation method based on user interaction
CN112906241B (en) * 2021-03-17 2023-07-04 青岛慧拓智能机器有限公司 Mining area automatic driving simulation model construction method, mining area automatic driving simulation model construction device, mining area automatic driving simulation model construction medium and electronic equipment
CN114528730B (en) * 2022-01-25 2022-11-29 水利部交通运输部国家能源局南京水利科学研究院 Construction method of real coral sand particle discrete element model
CN114972265B (en) * 2022-05-30 2024-08-09 广州虎牙科技有限公司 Texture image segmentation method, generation method, device and equipment
CN118037992A (en) * 2024-02-28 2024-05-14 北京四维远见信息技术有限公司 Triangular network local reconstruction method, system, equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7065242B2 (en) * 2000-03-28 2006-06-20 Viewpoint Corporation System and method of three-dimensional image capture and modeling
CN102945565B (en) * 2012-10-18 2016-04-06 深圳大学 A kind of three dimension realistic method for reconstructing of object, system and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117541751A (en) * 2024-01-04 2024-02-09 支付宝(杭州)信息技术有限公司 Three-dimensional model degradation method and device

Also Published As

Publication number Publication date
CN109003333A (en) 2018-12-14
CN115937434A (en) 2023-04-07
CN109003333B (en) 2022-11-25

Similar Documents

Publication Publication Date Title
CN109003333B (en) Interactive grid model cutting method and device based on texture and modeling equipment
JP6878011B2 (en) Rebuilding 3D modeled objects
US6952204B2 (en) 3D computer modelling apparatus
KR101388133B1 (en) Method and apparatus for creating a 3D model from 2D photograph image
CN111581776B (en) Iso-geometric analysis method based on geometric reconstruction model
CN108352082B (en) Techniques to crowd 3D objects into a plane
JP2013507679A (en) Method and system capable of 3D printing of 3D object model
EP3379495B1 (en) Seamless fracture in an animation production pipeline
KR20080022551A (en) Triangulating procedural geometric objects
CN110084894B (en) Local amplification display method and device of three-dimensional model and electronic equipment
CN107886569B (en) Measurement-controllable surface parameterization method and system based on discrete lie derivative
CN113724401B (en) Three-dimensional model cutting method and device, computer equipment and storage medium
KR101552827B1 (en) Method Of Dividing Three-dimensional Object Model
Maruya Generating a Texture Map from Object‐Surface Texture Data
CN109983509A (en) A kind of instant boolean operation method using geometric surface
KR101032397B1 (en) Apparatus and method for representing 3d shape using spherical coordinate system
CN112200906B (en) Entity extraction method and system for inclined three-dimensional model
Wang et al. Freeform extrusion by sketched input
Santos et al. Integration of CAD Models into Game Engines.
Brown Interactive part selection for mesh and point models using hierarchical graph-cut partitioning
CN112819108B (en) Slice fusion method and system of multi-source heterogeneous model and storage medium
JP2020035216A (en) Image processing device, method, and program
Phothong et al. Quality improvement of 3D models reconstructed from silhouettes of multiple images
JP4904638B2 (en) Method and apparatus for generating three-dimensional shape data and computer program
Lin et al. A feature-adaptive subdivision method for real-time 3D reconstruction of repeated topology surfaces

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination