A method of image topology deformation based on Laplace optimization

CN115222894BActive Publication Date: 2025-09-05HUAIYIN INSTITUTE OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210972406.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-12
Publication Date
2025-09-05
Estimated Expiration
2042-08-12

AI Technical Summary

Technical Problem

[0004]发明目的:针对现有技术中存在的问题,本发明提出一种基于laplace优化的图像拓扑变形方法,依据切分多面体的顶点作为锚点,通过顶点之间的拓扑关系以及顶点之间相互影响的权重进行变形,引入laplace坐标保证网格变形细节,减少锚点的输入能够做到相同的变形效果,弥补了传统网格变形的时间长的问题,提高网格模型变形效率

Benefits of technology

[0032] The present invention uses a grid envelope to encapsulate the chemical figure model, and the figure model is divided into different polyhedrons. The index and coordinates of the grid vertices can be well mastered, and the mobile anchor points and the fixed anchor points can be selected. The three-dimensional coordinates can be converted to a two-dimensional plane to change the point coordinates. The local detail features of the grid are represented by the coordinates of the Laplace coordinates, which can effectively make up for the shortcomings of traditional deformation technology. The coordinates of the changed anchor points are used to calculate the position coordinates of other points through singular value decomposition. The coordinates are accurately generated, the model is generated quickly, and the timeliness is very good. The efficient and realistic grid topology deformation technology of the present invention converts the Cartesian coordinates of the figure model into Laplace coordinates, converts the three-dimensional space coordinates into the changes of the topological structure points in the two-dimensional plane, and quickly solves the changed point coordinate results through singular value decomposition, and regenerates the model to create the deformation effect. The use of control points can be reduced and the deformation effect can be improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115222894B_ABST
    Figure CN115222894B_ABST
Patent Text Reader

Abstract

The present invention discloses a mesh image topology deformation method based on Laplace optimization, comprising the following steps: first, importing a three-dimensional chemical figure model, dividing the figure model into different polyhedrons as envisioned, and recording the complete topological information of the model's triangles, edges, and vertices. Secondly, converting the extracted anchor points into Laplace coordinates, placing the points contained in the cutting surface into a two-dimensional space, selecting a suitable topological structure in the two-dimensional space based on different graphic features, causing the points to change in the two-dimensional space based on the topological knot, and converting the returned results into Cartesian coordinates and re-entering the model. Compared with the prior art, the present invention uses the vertices of the divided polyhedron as anchor points, deforms through the topological relationship between adjacent points and the weights of the mutual influence between the points, introduces Laplace coordinates to ensure mesh deformation details, reduces the input of anchor points to achieve the same deformation effect, compensates for the problem of long time for traditional mesh deformation, and improves the mesh model deformation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical fields of computer graphics and virtual reality, and in particular relates to an image topology deformation method based on Laplace optimization. Background Art

[0002] Mesh deformation primarily involves the user interactively performing a series of operations on an original 3D mesh model to create a new 3D mesh. Free-form deformation, multi-resolution deformation, and deformation based on differential properties are the three major deformation technologies in the field, representing three stages of its development. Free-form deformation embeds the deformed object within a control mesh. The control mesh is manipulated to achieve deformation of the original model. The control mesh serves as a proxy model for the original model. By establishing a mapping relationship between the original model and the proxy model, the proxy model is deformed, and the deformation is then mapped back to the original model to produce the deformed result. Advantages of this method include independence from geometric representation, freedom, high geometric intuitiveness, and convenient local manipulation. Disadvantages include limited ability to preserve local detail, making it difficult to precisely control the object's shape. Multi-resolution deformation transforms the original mesh into a base mesh and a multi-resolution mesh consisting of several refined levels. The base mesh is deformed, and refinement operators are used to automatically restore the collective details of each refined mesh layer to the deformed base mesh, yielding the final result. Multi-resolution representation allows for independent editing of each level of detail, resulting in rich editing effects. The disadvantages are that the selected editing area and boundary constraints are limited, the multi-resolution representation process is complex, the calculation is slow, and the operation is complicated. Deformation technology based on differential attributes uses differential attributes to describe geometric surfaces. Under certain constraints, the differential attributes of the surface are manipulated to keep the differential attributes of the surface unchanged before and after deformation. After deformation, the model is reconstructed from the differential coordinates. The advantage is that boundary constraints and editing areas can be freely selected, and vertices can be indirectly manipulated by manipulating differential attributes, which has a good ability to maintain local details. The disadvantage is that large deformations are prone to volume reduction and local self-intersection, and more constraints need to be added.

[0003] Mesh deformation technology is widely used in fields such as computer animation and gaming, so research on deformation technology for these applications is of great practical significance. Existing papers on the deformation of chemical engineering character mesh models have primarily focused on traditional mesh deformation, but many issues remain to be addressed: the number of control vertices required for deformation: a greater number means longer deformation time; the timeliness of deformation: ensuring that model generation is completed as quickly as possible. For example, in motion prediction applications, model generation must be completed before the next action is formed to be meaningful; and the quality of the model after deformation: partially completed deformations can become indistinguishable. Summary of the Invention

[0004] Purpose of the invention: In response to the problems existing in the prior art, the present invention proposes an image topology deformation method based on Laplace optimization. The vertices of the segmented polyhedron are used as anchor points, and deformation is performed through the topological relationship between the vertices and the weights of the mutual influence between the vertices. Laplace coordinates are introduced to ensure the details of mesh deformation. Reducing the input of anchor points can achieve the same deformation effect, which makes up for the problem of long time of traditional mesh deformation and improves the efficiency of mesh model deformation.

[0005] Technical solution: The present invention proposes an image topology deformation method based on Laplace optimization, comprising the following steps:

[0006] Step 1: Create a chemical figure model, generate a human tetrahedron mesh, completely envelop the figure model with the mesh, divide the figure model into different polyhedrons according to predefined sections, and generate 2D views of the relevant sections;

[0007] Step 2: Record the topological structure of each polyhedron in turn. The recorded topological structure includes vertices, lines between adjacent vertices, and each face of the polyhedron. Select the required anchor points from the recorded vertices. Anchor points are divided into fixed anchor points and movable anchor points. The mesh vertices that remain unchanged during the deformation process are fixed anchor points, and the vertices that change before and after the deformation are movable anchor points.

[0008] Step 3: Based on the topological structure between vertices recorded in step 2, the Laplace matrix created by the selected anchor point is obtained using the weighted formula, and the vertex coordinates are converted into the corresponding Laplace differential coordinates δ;

[0009] Step 4: Based on the vertex and face information recorded in step 2, place the face composed of adjacent vertices into a two-dimensional plane. The recorded basic topological structures of the face are triangles and quadrilaterals. Find the connection between the triangular and quadrilateral structures and obtain a one-to-one mapping method that is applicable to both structural shapes and has a two-dimensional intuitive solution for triangular and quadrilateral structures. Combined with the need to achieve different deformations through interpolation, calculate the point coordinate matrix PoAf after the anchor point is moved;

[0010] Step 5: Use the laplace differential coordinates δ of the vertex and the point coordinate matrix PoAf after the anchor point is moved to automatically solve the sparse symmetric positive definite matrix A, perform singular value decomposition, and quickly back-substitute to obtain the changed mesh vertex coordinates, which are brought into the model to complete the deformation.

[0011] Furthermore, the specific steps of creating the Laplace matrix in step 3 are:

[0012] Step 3.1: After the model is divided into different parts, the complete topological information of triangles, edges and vertices is established according to each part of the division, and the anchor point index value is recorded as M = (V, E, F), where M represents the model, V represents the vertex set, including the coordinates and index of the vertex, E represents the edge set, and F represents the face set. The Cartesian coordinates of each vertex i∈V in the mesh are v i =(x i ,y i , z i ), the mathematical expression is as formula (1); use vector container to put all vertex coordinates into PoBe matrix;

[0013]

[0014] Where i=jN(i)={j|(i, j)∈E} is v i The adjacent vertex set of d i =|N(i)| is the number of adjacent vertices of the i-th vertex, As the weight to construct the coordinates, for the vertex v i Make an average value of the surrounding adjacent vertices, and calculate the weight as shown in formula (2):

[0015]

[0016] Among them, W ij is the weight of all selected vertices, N(i) represents the weight of v i The point set of adjacent vertices;

[0017] Step 3.2: Select a predefined anchor point, find the original coordinates of the anchor point according to the index, traverse the face set to find the adjacent vertices of the selected anchor point, and obtain the Laplace matrix L of the selected anchor point by weighting according to formula (1) and formula (2), and calculate v by formula (3) i The differential coordinates of the point give the result:

[0018] L * PoBe=δ (3)

[0019] Among them, L is the conversion matrix between Cartesian coordinates and Laplace coordinates, called the operator coefficient matrix, which represents the topological relationship of the mesh model and is independent of the geometric position of the vertices.

[0020] Furthermore, the one-to-one mapping method for finding a two-dimensional intuitive solution with a triangular and quadrilateral structure in step 4 is specifically as follows:

[0021] The point set of the selected anchor point is recorded as S = {S(i)|i = 1, 2, ..., n}, and the feature point set after the anchor point is translated is recorded as D = {D(i)|i = 1, 2, ..., n}. The required triangular or quadrilateral mesh set N is generated according to the feature points. S 、N D , the points in S and D also have a one-to-one correspondence.

[0022] Furthermore, a one-to-one mapping method for finding a two-dimensional intuitive solution with a triangular structure is:

[0023] If the triangle formed by three points S(i), S(j) and S(k) in S is in the grid set N S In the case of D, the triangle formed by the three points D(i), D(j) and D(k) in D is in the corresponding grid set N D In the case of nonlinear deformation, it is also necessary to set N D The offset ΔP is obtained by translating the midpoint of the triangle edge in the corresponding structure; for each pixel in the target image, according to N S The grid calculates its coordinate value in the corresponding topological structure coordinate system; according to the obtained coordinate value, use N D The Cartesian coordinates of the corresponding topological structure in the grid are inversely calculated in the target image to obtain the coordinates PoAf after the anchor point changes, while the coordinates before and after the fixed anchor point remain unchanged.

[0024] Furthermore, the specific operations in step 5 are:

[0025] Step 5.1: The Laplace differential coordinates δ of the vertex and the coordinates of the anchor point after the change PoAf form a matrix B, where δ is the upper half and PoAf is the lower half. According to formula (4), the Laplace matrix L of the selected anchor point is obtained, and the Ls matrix after adding the anchor point information is obtained:

[0026]

[0027] Among them, d i represents the number of adjacent vertices of the i-th vertex, (Ls)ij represents the corresponding matrix obtained according to the vertex, and N(i) represents the number of adjacent vertices of v i The point set of adjacent vertices, the Cartesian coordinates of each vertex i∈V in the grid are v i =(x i ,y i , z i );

[0028] Step 5.2: Let the value of the new matrix A be A=Ls TLs, A is a sparse symmetric positive definite matrix that is only related to the index of the input anchor point. Fixed and mobile anchor points are selected, and singular value decomposition is used to accelerate the calculation. The Cartesian coordinates of the changed mesh vertices are obtained by fast back substitution through formula (5):

[0029] Ax=B (5)

[0030] Where x is the coordinate value of the required vertex after the change.

[0031] Beneficial effects:

[0032] The present invention uses a grid envelope to encapsulate the chemical figure model, and the figure model is divided into different polyhedrons. The index and coordinates of the grid vertices can be well mastered, and the mobile anchor points and the fixed anchor points can be selected. The three-dimensional coordinates can be converted to a two-dimensional plane to change the point coordinates. The local detail features of the grid are represented by the coordinates of the Laplace coordinates, which can effectively make up for the shortcomings of traditional deformation technology. The coordinates of the changed anchor points are used to calculate the position coordinates of other points through singular value decomposition. The coordinates are accurately generated, the model is generated quickly, and the timeliness is very good. The efficient and realistic grid topology deformation technology of the present invention converts the Cartesian coordinates of the figure model into Laplace coordinates, converts the three-dimensional space coordinates into the changes of the topological structure points in the two-dimensional plane, and quickly solves the changed point coordinate results through singular value decomposition, and regenerates the model to create the deformation effect. The use of control points can be reduced and the deformation effect can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 This is a flowchart based on Laplace mesh deformation;

[0034] Figure 2 This is the initial generated model rendering;

[0035] Figure 3 A diagram showing the effect of the model's deformed arm. DETAILED DESCRIPTION

[0036] The present invention is further illustrated below with reference to specific examples. It should be understood that these examples are only used to illustrate the present invention and are not used to limit the scope of the present invention. After reading the present invention, modifications of various equivalent forms of the present invention made by those skilled in the art all fall within the scope defined by the claims attached to this application.

[0037] The present invention discloses an image topology deformation method based on Laplace optimization, and the implementation steps are as follows:

[0038] Step 1: Instead of creating a mesh first and then embedding the model, use 3D Max or Blender to create a chemical figure model, generate a tetrahedron mesh, and completely envelop the figure model with the mesh. Divide the figure model into different polyhedrons according to predefined requirements and generate 2D views of the relevant sections to ensure the integrity of the model.

[0039] Step 2: Record the topological structure of each polyhedron in turn. The recorded topological structure includes vertices, lines between adjacent vertices, and each face of the polyhedron; select the required anchor points from the recorded vertices. Anchor points are divided into fixed anchor points and movable anchor points. The mesh vertices that remain unchanged during the deformation process are fixed anchor points, and the vertices that change before and after deformation are movable anchor points.

[0040] Step 3: Based on the topological structure between vertices recorded in step 2, the Laplace matrix created by the selected anchor point is obtained using the weighted formula, and the vertex coordinates are converted into the corresponding Laplace differential coordinates δ.

[0041] Step 4: Based on the vertex and face information recorded in step 2, place the face composed of adjacent vertices into a two-dimensional plane. The recorded basic topological structures are triangles and quadrilaterals. Find the connection between the triangular and quadrilateral structures and obtain a one-to-one mapping method that is applicable to both structural forms and has a two-dimensional intuitive solution for both triangular and quadrilateral structures. Combined with the need for interpolation to achieve different deformations, calculate the point coordinate matrix PoAf after the moving anchor point is changed.

[0042] Step 5: Use the laplace differential coordinates δ of the vertex and the point coordinate matrix PoAf after the anchor point is moved to automatically solve the sparse symmetric positive definite matrix A, perform singular value decomposition, and quickly back-substitute to obtain the changed mesh vertex coordinates, which are brought into the model to complete the deformation.

[0043] The embodiment of the present invention is described with the following example:

[0044] 1. After the model is divided into different parts, the complete topological information of triangles, edges and vertices is established according to each part of the segmentation, and the anchor point index value is recorded as M = (V, E, F), where M represents the model, V represents the vertex set, including the coordinates and index of the vertex, E represents the edge set, and F represents the face set. The Cartesian coordinates of each vertex i∈V in the mesh are v i =(x i ,y i , z i ), the mathematical expression is as formula (1); use vector container to put all vertex coordinates into PoBe matrix;

[0045]

[0046] Where i=jN(i)={j|(i, j)∈E} is v i The adjacent vertex set of d i =|N(i)| is the number of adjacent vertices of the i-th vertex, As the weight to construct the coordinates, for the vertex v i Make an average value of the surrounding adjacent vertices, and calculate the weight as shown in formula (2):

[0047]

[0048] Among them, W ij is the weight of all selected vertices, N(i) represents the weight of v i The set of adjacent vertices.

[0049] 2. Select a predefined anchor point, find the original coordinates of the anchor point according to the index, traverse the face set to find the adjacent vertices of the selected anchor point, and obtain the Laplace matrix L of the selected anchor point by weighting according to formula (1) and formula (2), and calculate v by formula (3) i The differential coordinates of the point are obtained.

[0050] L * PoBe=δ (3)

[0051] Among them, L is the conversion matrix between Cartesian coordinates and Laplace coordinates, called the operator coefficient matrix, which represents the topological relationship of the mesh model and is independent of the geometric position of the vertices.

[0052] 3. The point set of the selected anchor point is recorded as S = {S(i)|i = 1, 2, ..., n} and the feature point set after the anchor point is translated is recorded as D = {D(i)|i = 1, 2, ..., n}. Generate the required triangle or quadrilateral mesh set N according to the feature points S 、N D The points in S and D also have a one-to-one correspondence.

[0053] Taking a triangle as an example, if the triangle formed by three points S(i), S(j) and S(k) in S is in the grid set N S In the case of D, the triangle formed by the three points D(i), D(j) and D(k) in D is in the corresponding grid set N D In case of nonlinear deformation, it is also necessary to set N D The offset ΔP is obtained by translating the midpoint of the triangle edge in the corresponding structure. For each pixel in the target image, according to N S The grid calculates its coordinate values ​​in the corresponding topological structure coordinate system. According to the obtained coordinate values, use N DThe corresponding topological structure in the grid is calculated inversely, and its Cartesian coordinate value in the target image is obtained to calculate the coordinate PoAf after the anchor point changes. The coordinates before and after the fixed anchor point do not change.

[0054] 4. The Laplace differential coordinates δ of the vertex and the coordinates PoAf after the anchor point changes are combined into a matrix B, where δ is the upper half and PoAf is the lower half. According to formula (4), the Laplace matrix L of the selected anchor point is obtained, and the Ls matrix after adding the anchor point information is obtained:

[0055]

[0056] Among them, d i represents the number of adjacent vertices of the i-th vertex, (Ls)ij represents the corresponding matrix obtained according to the vertex, and N(i) represents the number of adjacent vertices of v i The point set of adjacent vertices, the Cartesian coordinates of each vertex i∈V in the grid are v i =(x i ,y i , z i ).

[0057] 5. Since the Laplace coefficient matrix is ​​non-positive definite, it is necessary to fix at least one moving anchor point as a condition to ensure that the equation system has a unique solution. Let the value of the new matrix A be A=Ls T Ls, A is a sparse symmetric positive definite matrix that is only related to the index of the input anchor point. Fixed and mobile anchor points are selected, and the singular value decomposition is used to accelerate the calculation. The Cartesian coordinates of the changed mesh vertices are obtained by fast back substitution through formula (5):

[0058] Ax=B (5)

[0059] Where x is the coordinate value of the required vertex after the change.

[0060] The above embodiments are intended only to illustrate the technical concepts and features of the present invention. Their purpose is to enable those skilled in the art to understand the contents of the present invention and implement them accordingly. They are not intended to limit the scope of protection of the present invention. Any equivalent changes or modifications made in accordance with the spirit of the present invention are intended to be covered by the scope of protection of the present invention.

Claims

1. A method for image topology deformation based on Laplace optimization, characterized in that: The steps include: Step 1: Create a chemical figure model, generate a human tetrahedron mesh, completely envelop the figure model with the mesh, divide the figure model into different polyhedrons according to predefined sections, and generate 2D views of the relevant sections; Step 2: Record the topological structure of each polyhedron in turn. The recorded topological structure includes vertices, lines between adjacent vertices, and each face of the polyhedron. Select the required anchor points from the recorded vertices. Anchor points are divided into fixed anchor points and movable anchor points. The mesh vertices that remain unchanged during the deformation process are fixed anchor points, and the vertices that change before and after the deformation are movable anchor points. Step 3: Based on the topological structure between vertices recorded in step 2, the Laplace matrix created by the selected anchor point is obtained using the weighted formula, and the vertex coordinates are converted into the corresponding Laplace differential coordinates δ; Step 4: Based on the vertex and face information recorded in step 2, place the face composed of adjacent vertices into a two-dimensional plane. The recorded basic topological structures of the face are triangles and quadrilaterals. Find the connection between the triangular and quadrilateral structures and obtain a one-to-one mapping method that is applicable to both structural shapes and has a two-dimensional intuitive solution for triangular and quadrilateral structures. Combined with the need to achieve different deformations through interpolation, calculate the point coordinate matrix PoAf after the anchor point is moved; The point set of the selected anchor point is recorded as S = {S(i)|i = 1, 2, ..., n}, and the feature point set after the anchor point is translated is recorded as D = {D(i)|i = 1, 2, ..., n}. The required triangular or quadrilateral mesh set N is generated according to the feature points. S 、N D , the points in S and D also have a one-to-one correspondence; The one-to-one mapping method for finding a two-dimensional intuitive solution with a triangular structure is: If the triangle formed by three points S(i), S(j) and S(k) in S is in the grid set N S In the case of D, the triangle formed by the three points D(i), D(j) and D(k) in D is in the corresponding grid set N D In the case of nonlinear deformation, it is also necessary to set N D The offset ΔP is obtained by translating the midpoint of the triangle edge in the corresponding structure; for each pixel in the target image, according to N S The grid calculates its coordinate value in the corresponding topological structure coordinate system; according to the obtained coordinate value, use N D The corresponding topological structure in the grid is inversely calculated to obtain its Cartesian coordinate value in the target image, and the coordinate PoAf after the anchor point changes is obtained, while the coordinates before and after the fixed anchor point do not change; Step 5: Use the laplace differential coordinates δ of the vertex and the point coordinate matrix PoAf after the anchor point is moved to automatically solve the sparse symmetric positive definite matrix A, perform singular value decomposition, and quickly back-substitute to obtain the changed mesh vertex coordinates. Bring it into the model to complete the deformation; Step 5.1: The Laplace differential coordinates δ of the vertex and the coordinates of the anchor point after the change PoAf form a matrix B, where δ is the upper half and PoAf is the lower half. According to formula (4), the Laplace matrix L of the selected anchor point is obtained, and the Ls matrix after adding the anchor point information is obtained: Among them, d i represents the number of adjacent vertices of the i-th vertex, (Ls)ij represents the corresponding matrix obtained according to the vertex, and N(i) represents the number of adjacent vertices of v i The point set of adjacent vertices, the Cartesian coordinates of each vertex i∈V in the grid are v i =(x i ,y i ,z i ), V represents the vertex set; Step 5.2: Let the value of the new matrix A be A=Ls T Ls, A is a sparse symmetric positive definite matrix that is only related to the index of the input anchor point. Fixed and mobile anchor points are selected, and singular value decomposition is used to accelerate the calculation. The Cartesian coordinates of the changed mesh vertices are obtained by fast back substitution through formula (5): Ax=B (5) Where x is the coordinate value of the required vertex after the change.

2. The image topology deformation method based on Laplace optimization according to claim 1, characterized in that: The specific steps of creating the Laplace matrix in step 3 are: Step 3.1: After the model is divided into different parts, the complete topological information of triangles, edges and vertices is established according to each part of the division, and the anchor point index value is recorded as M = (V, E, F), where M represents the model, V represents the vertex set, including the coordinates and index of the vertex, E represents the edge set, and F represents the face set. The Cartesian coordinates of each vertex i∈V in the mesh are v i =(x i ,y i ,z i ), the mathematical expression is as formula (1); use vector container to put all vertex coordinates into PoBe matrix; Among them, i=jN(i)={j|(i,j)∈E}, N(i) is v i The adjacent vertex set of d i =|N(i)| is the number of adjacent vertices of the i-th vertex, As the weight to construct the coordinates, for the vertex v i Make an average value of the surrounding adjacent vertices, and calculate the weight as shown in formula (2): Among them, W ij is the weight of all selected vertices, N(i) is v i The set of adjacent vertices of ; Step 3.2: Select a predefined anchor point, find the original coordinates of the anchor point according to the index, traverse the face set to find the adjacent vertices of the selected anchor point, and obtain the Laplace matrix L of the selected anchor point by weighting according to formula (1) and formula (2), and calculate v by formula (3) i The differential coordinates of the point give the result: L * PoBe=δ (3) Among them, L is the conversion matrix between Cartesian coordinates and Laplace coordinates, called the operator coefficient matrix, which represents the topological relationship of the mesh model and is independent of the geometric position of the vertices.