A method for flattening three-dimensional curved surface patterns of cultural relics
By calculating the axis of symmetry, normal angle cutting, texture sampling and conformal mapping of the three-dimensional cultural relics surface, combined with affine transformation, the problem of flattening the pattern of the three-dimensional cultural relics surface is solved, and the image integrity and morphology are retained.
Patent Information
- Application Number
- CN202210251243.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-15
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2042-03-15
AI Technical Summary
The existing technology is difficult to effectively flatten the curved patterns of three-dimensional cultural relics, resulting in deformation and incomplete patterns, and cannot accurately reflect the geometric structure and artistic style of cultural relics.
The axis of symmetry was obtained by collecting sample points and iteratively computed. The normal angle cut grid model was used, and the three-dimensional grid was parameterized to the two-dimensional plane using texture sampling and conformal mapping, and finally a complete pattern flattening image was obtained through affine transformation.
It realizes effective flattening of the curved surface patterns of three-dimensional cultural relics, retains the original morphological structure and proportional size, has good versatility, and is suitable for cultural relics of different configurations.
Smart Images

Figure CN114612538B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the fields of computer graphics and computer vision, and in particular to a method for flattening three-dimensional curved surface patterns of cultural relics. Background Art
[0002] In different periods, there are cultural relics with different shapes and patterns. The patterns on cultural relics have important reference value for our study of the social outlook and folk culture at that time, and they are also of great value for artistic re-creation. In order to reflect the organizational structure and artistic style of the curved surface patterns of cultural relics, it is necessary to expand the patterns. The patterns are carried on different cultural carriers. Since the surface of the cultural relics is composed of irregular curved surfaces, the patterns obtained through photography have undergone a certain degree of deformation. How to obtain traditional patterns with more complete geometry and richer meanings is a very challenging problem.
[0003] Traditional cultural relics are characterized by a wide variety of types and complex designs. They are all designed by hand, rather than mechanized production. Flattening the surface patterns of three-dimensional cultural relics is essentially to obtain the pattern of the surface pattern while preserving its fidelity. The input data sources are all three-dimensional models. The three-dimensional models are mainly composed of meshes and textures. The mesh is composed of many point clouds of the object. The texture is a color pattern mapped to the surface by establishing a mapping relationship between the image and the mesh.
[0004] Due to the complex geometric shape of cultural relics, 3D surface mesh processing becomes a difficult task. For the flattening of 3D surface patterns of cultural relics, the core issues include mesh model cutting, mesh model mapping to 2D parameter domain, texture mapping, mesh affine transformation, etc.
[0005] Currently, no effective solution has been proposed for the problems in the related technologies. Summary of the invention
[0006] In view of the problems in the related art, the present invention proposes a method for flattening three-dimensional curved surface patterns of cultural relics to overcome the above-mentioned technical problems existing in the existing related art.
[0007] To this end, the specific technical solution adopted by the present invention is as follows:
[0008] A method for flattening a three-dimensional curved surface pattern of a cultural relic, the method comprising the following steps:
[0009] S1: Collect sample points and perform iterative calculation to obtain the symmetry axis;
[0010] S2: Use the normal angle as a metric to cut the mesh model;
[0011] S3: Texture sampling is used to identify the texture area and subdivide the cut mesh model, and then the 3D mesh is parameterized into a 2D plane domain using conformal mapping;
[0012] S4: Affine transformation is used to transform the texture corresponding to the three-dimensional model mesh to the mapped two-dimensional mesh, and a complete flattened image of the pattern is obtained.
[0013] Furthermore, the collecting of sample points and performing iterative calculation to obtain the symmetry axis in S1 further includes the following steps:
[0014] S11: firstly, some sampling points are obtained in the preset grid model, and the neighborhood of the sampling point is determined by taking the Mahalanobis distance between the sampling point and the neighboring point as less than the threshold ∈ as the judgment basis;
[0015] S12: At the sampling point, the cutting plane is continuously updated by iterative calculation so that the cutting plane can best simulate the rotational symmetry of the mesh model to obtain the best cutting plane;
[0016] S13: By minimizing the minimum value of the square of the normal vector distance from the sampling point to the optimal cutting plane, the corresponding local rotational symmetry points are calculated, and then all the rotational symmetry points are connected to obtain the rotational symmetry axis of the mesh model.
[0017] Furthermore, the step of using the normal angle as a metric to cut the mesh model in S2 further includes the following steps:
[0018] S21: determine a cross section with the centroid and the symmetry axis of the triangular mesh, establish a local coordinate system with the intersection of the centroid and the symmetry axis as the horizontal axis and the symmetry axis as the vertical axis;
[0019] S22: Select two edges in the triangular mesh with three points in the counterclockwise direction, solve the normal vector of the triangular mesh through the two edges, and orthogonally project the normal vector to the cross section to obtain the projection vector, and then calculate the angle of the projection vector in the local coordinate system. When the angle of the projection vector in the local coordinate system is not within the specified input angle range, the triangular mesh will be discarded and the mesh model after cutting will be obtained.
[0020] Furthermore, the step of identifying the texture area by texture sampling and subdividing the cut mesh model, and then parameterizing the three-dimensional mesh into the two-dimensional plane domain by conformal mapping in S3 further includes the following steps:
[0021] S31: Draw perpendicular lines from the center of the triangular mesh to the three sides, divide the triangular mesh into three areas and perform texture sampling on each area, and then mark the triangular mesh according to whether the three areas are target textures;
[0022] S32: Based on the relationship that the angles of the triangular meshes before and after mapping are equal and the two sides are proportional to each other, all angle values that satisfy the target texture area are brought into the relationship to determine a linear equation group, the solution of which is a set of two-dimensional triangular points after mapping.
[0023] Furthermore, the calculation formula in S11 using the Mahalanobis distance between the sampling point and the neighboring point being less than the threshold ∈ as the judgment basis is as follows:
[0024] d(pj,pi)≤∈
[0025] Among them, p j represents the sampling point, p i represents the Mahalanobis distance.
[0026] Furthermore, the calculation formula for minimizing the minimum value of the square of the normal vector distance from the sampling point to the optimal cutting plane in S13 is as follows:
[0027]
[0028] Among them, n(p j ) represents point p j The normal vector of point p j The distance to the optimal cutting plane, R represents the global coordinate space, N i Represents the neighborhood coordinate space of vertex i.
[0029] Furthermore, the calculation formula for obtaining the projection vector proj in S22 is as follows:
[0030]
[0031] Among them, u represents the vector to be projected, and n represents the normal vector of the projection plane.
[0032] Furthermore, the calculation formula for the angle of the projection vector in the local coordinate system obtained in S22 is as follows:
[0033]
[0034] Among them, v1 represents the projected vector, and v2 represents the positive direction of the horizontal axis of the local coordinate system.
[0035] Furthermore, in S31, perpendicular lines are drawn from the center of the triangular mesh to the three sides, the triangular mesh is divided into three regions and texture sampling is performed respectively, and then the triangular mesh is marked according to whether the three regions are target textures. The marking result is as follows:
[0036]
[0037] Where i represents the i-th triangle mesh.
[0038] Furthermore, the calculation formula of the affine transformation in S4 is as follows:
[0039]
[0040] Among them, the four coefficients a, b, c and d of the affine transformation matrix represent rotation, scaling and cropping operations, and tx and ty represent translation operations.
[0041] The beneficial effects of the present invention are as follows: the present invention completes the entire process of flattening the three-dimensional curved surface patterns of cultural relics through the specific algorithm flow described above, and obtains the pattern image result after flattening. For the flattening results of the three-dimensional curved surfaces of cultural relics with different configurations, the original morphological structure and proportional size are basically retained, and it has good versatility. Therefore, for cultural relics with smoother curved surfaces, the present invention can realize the flattening of the three-dimensional curved surface patterns of cultural relics through the algorithm of this article, regardless of the format, lighting, material, resolution, etc. of the three-dimensional curved surface. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0043] Figure 1 It is a flow chart of a method for flattening three-dimensional curved surface patterns of cultural relics according to an embodiment of the present invention. DETAILED DESCRIPTION
[0044] To further illustrate each embodiment, the present invention provides drawings, which are part of the disclosure of the present invention and are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, ordinary technicians in the field should be able to understand other possible implementations and advantages of the present invention. The components in the figures are not drawn to scale, and similar component symbols are generally used to represent similar components.
[0045] According to an embodiment of the present invention, a method for flattening a three-dimensional curved surface pattern of a cultural relic is provided.
[0046] The present invention will now be further described with reference to the accompanying drawings and specific embodiments. Figure 1 As shown, according to the method for flattening a three-dimensional curved surface pattern of a cultural relic according to an embodiment of the present invention, the method comprises the following steps:
[0047] S1: Collect sample points and perform iterative calculation to obtain the symmetry axis;
[0048] S2: Use the normal angle as a metric to cut the mesh model;
[0049] S3: Texture sampling is used to identify the texture area and subdivide the cut mesh model, and then the 3D mesh is parameterized into a 2D plane domain using conformal mapping;
[0050] S4: Affine transformation is used to transform the texture corresponding to the three-dimensional model mesh to the mapped two-dimensional mesh, and a complete flattened image of the pattern is obtained.
[0051] In one embodiment, the collecting of sample points and performing iterative calculation to obtain the symmetry axis in S1 further comprises the following steps:
[0052] S11: firstly, some sampling points are obtained in the preset grid model, and the neighborhood of the sampling point is determined by taking the Mahalanobis distance between the sampling point and the neighboring point as less than the threshold ∈ as the judgment basis;
[0053] S12: At the sampling point, the cutting plane is continuously updated by iterative calculation so that the cutting plane can best simulate the rotational symmetry of the mesh model to obtain the best cutting plane;
[0054] S13: by minimizing the minimum value of the square of the normal vector distance from the sampling point to the optimal cutting plane, and calculating the corresponding local rotational symmetry point, and then connecting all the rotational symmetry points to obtain the rotational symmetry axis of the mesh model;
[0055] Among them, the three-dimensional surface model of the cultural relic to be processed needs to be a centrally symmetrical model with clear surface patterns and a data model in a general format such as obj.
[0056] In one embodiment, the step of cutting the mesh model using the normal angle as a metric in S2 further includes the following steps:
[0057] S21: determine a cross section with the centroid and the symmetry axis of the triangular mesh, establish a local coordinate system with the intersection of the centroid and the symmetry axis as the horizontal axis and the symmetry axis as the vertical axis;
[0058] S22: Select two edges in the triangular mesh with three points in the counterclockwise direction, solve the normal vector of the triangular mesh through the two edges, and orthogonally project the normal vector to the cross section to obtain the projection vector, and then calculate the angle of the projection vector in the local coordinate system. When the angle of the projection vector in the local coordinate system is not within the specified input angle range, the triangular mesh will be discarded and the mesh model after cutting will be obtained.
[0059] In one embodiment, the step of identifying the texture area by texture sampling and subdividing the cut mesh model, and then parameterizing the three-dimensional mesh into the two-dimensional plane domain by conformal mapping in S3 further includes the following steps:
[0060] S31: Draw perpendicular lines from the center of the triangular mesh to the three sides, divide the triangular mesh into three areas and perform texture sampling on each area, and then mark the triangular mesh according to whether the three areas are target textures;
[0061] S32: according to the relationship that the angles of the triangular meshes before and after mapping are equal and the two sides thereof correspond to each other in proportion, all angle values satisfying the target texture area are brought into the relationship to determine a linear equation group, wherein the solution of the equation group is a set of two-dimensional triangular points after mapping;
[0062] Among them, the angles of the triangular meshes before and after the mapping are equal, and the corresponding proportional relationship of the two sides is as follows:
[0063] u k -u i =r jik R(θ jik )(u j -u i )
[0064] Among them, u represents the triangle vertex, i, j, and k represent the triangle vertex indexes, r is the ratio of the lengths of the two sides of the angle, and R represents the rotation transformation. is the rotation matrix for the plane rotation by angle θ.
[0065] In one embodiment, the calculation formula in S11 that the Mahalanobis distance between the sampling point and the neighboring point is less than the threshold ∈ is as follows:
[0066] d(pj,pi)≤∈
[0067] Among them, p j represents the sampling point, p i represents the Mahalanobis distance.
[0068] In one embodiment, the calculation formula for minimizing the minimum square of the distance between the sampling point and the normal vector of the optimal cutting plane in S13 is as follows:
[0069]
[0070] Among them, n(p j ) represents point p j The normal vector of point p j The distance to the optimal cutting plane, R represents the global coordinate space, N i Represents the neighborhood coordinate space of vertex i.
[0071] In one embodiment, the calculation formula for obtaining the projection vector proj in S22 is as follows:
[0072]
[0073] Among them, u represents the vector to be projected, and n represents the normal vector of the projection plane.
[0074] In one embodiment, the calculation formula for obtaining the angle of the projection vector in the local coordinate system in S22 is as follows:
[0075]
[0076] Among them, v1 represents the projected vector, and v2 represents the positive direction of the horizontal axis of the local coordinate system.
[0077] In one embodiment, in S31, perpendicular lines are drawn from the center of the triangular mesh to the three sides, the triangular mesh is divided into three regions and texture sampling is performed respectively, and then the triangular mesh is marked according to whether the three regions are target textures. The marking result is as follows:
[0078]
[0079] Where i represents the i-th triangle mesh.
[0080] In one embodiment, the calculation formula of the affine transformation in S4 is as follows:
[0081]
[0082] Among them, the four coefficients a, b, c and d of the affine transformation matrix represent rotation, scaling and cropping operations, and tx and ty represent translation operations.
[0083] In summary, with the help of the above technical solution of the present invention, the present invention completes the entire process of flattening the three-dimensional surface pattern of cultural relics through the specific algorithm flow described above, and obtains the pattern image result after flattening. For the flattening results of the three-dimensional surfaces of cultural relics with different configurations, the original morphological structure and proportional size are basically retained, and it has good versatility. Therefore, for cultural relics with smoother surfaces, the present invention can realize the flattening of the three-dimensional surface patterns of cultural relics through the algorithm of this article, regardless of the format, lighting, material, resolution, etc. of the three-dimensional surface.
[0084] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for flattening three-dimensional curved surface patterns of cultural relics. It is characterized in that The method comprises the following steps: S1: Collect sample points and perform iterative calculation to obtain the symmetry axis; S2: Use the normal angle as a metric to cut the mesh model; S3: Texture sampling is used to identify the texture area and subdivide the cut mesh model, and then the 3D mesh is parameterized into a 2D plane domain using conformal mapping; S4: using affine transformation to transform the texture corresponding to the 3D model grid to the mapped 2D grid, and obtain a complete flattened image of the pattern; The step of cutting the mesh model using the normal angle as a metric in S2 further includes the following steps: S21: determine a cross section with the centroid and the symmetry axis of the triangular mesh, establish a local coordinate system with the intersection of the centroid and the symmetry axis as the horizontal axis and the symmetry axis as the vertical axis; S22: selecting two edges from three points in the counterclockwise direction in the triangular mesh, solving the normal vector of the triangular mesh through the two edges, and orthogonally projecting the normal vector to the cross section to obtain the projection vector, and then calculating the angle of the projection vector in the local coordinate system. When the angle of the projection vector in the local coordinate system is not within the specified input angle range, the triangular mesh will be eliminated, and a mesh model after cutting will be obtained; In the S3, texture sampling is used to identify the texture area and the cut mesh model is subdivided, and then the three-dimensional mesh is parameterized into the two-dimensional plane domain by conformal mapping, which also includes the following steps: S31: Draw perpendicular lines from the center of the triangular mesh to the three sides, divide the triangular mesh into three areas and perform texture sampling on each area, and then mark the triangular mesh according to whether the three areas are target textures; S32: Based on the relationship that the angles of the triangular meshes before and after mapping are equal and the two sides are proportional to each other, all angle values that satisfy the target texture area are brought into the relationship to determine a linear equation group, the solution of which is a set of two-dimensional triangular points after mapping.
2. A method for flattening three-dimensional curved surface patterns of cultural relics according to claim 1, It is characterized in that The collecting of sample points and performing iterative calculation to obtain the symmetry axis in S1 further includes the following steps: S11: firstly, some sampling points are obtained in the preset grid model, and the neighborhood of the sampling point is determined by taking the Mahalanobis distance between the sampling point and the neighboring point as less than the threshold ∈ as the judgment basis; S12: At the sampling point, the cutting plane is continuously updated by iterative calculation so that the cutting plane can best simulate the rotational symmetry of the mesh model to obtain the best cutting plane; S13: By minimizing the minimum value of the square of the normal vector distance from the sampling point to the optimal cutting plane, the corresponding local rotational symmetry points are calculated, and then all the rotational symmetry points are connected to obtain the rotational symmetry axis of the mesh model.
3. A method for flattening three-dimensional curved surface patterns of cultural relics according to claim 2, It is characterized in that The calculation formula in S11 that the Mahalanobis distance between the sampling point and the neighboring point is less than the threshold value v is as follows: d(pj,pi)≤∈ Among them, p j represents the sampling point, p i represents the Mahalanobis distance.
4. A method for flattening a three-dimensional curved surface pattern of a cultural relic according to claim 2, It is characterized in that The calculation formula for minimizing the minimum square of the distance between the sampling point and the normal vector of the optimal cutting plane in S13 is as follows: Among them, n(p j ) represents point p j The normal vector of point p j The distance to the optimal cutting plane, R represents the global coordinate space, N i Represents the neighborhood coordinate space of vertex i.
5. A method for flattening three-dimensional curved surface patterns of cultural relics according to claim 1, It is characterized in that The calculation formula for obtaining the projection vector proj in S22 is as follows: Among them, u represents the vector to be projected, and n represents the normal vector of the projection plane.
6. A method for flattening three-dimensional curved surface patterns of cultural relics according to claim 1, It is characterized in that The calculation formula for obtaining the angle of the projection vector in the local coordinate system in S22 is as follows: Among them, v1 represents the projected vector, and v2 represents the positive direction of the horizontal axis of the local coordinate system.
7. The method for flattening a three-dimensional curved surface pattern of a cultural relic according to claim 1, It is characterized in that In S31, perpendicular lines are drawn from the center of the triangular mesh to the three sides, the triangular mesh is divided into three regions and texture sampling is performed respectively, and then the triangular mesh is marked according to whether the three regions are target textures. The marking result is as follows: Where i represents the i-th triangle mesh.
8. A method for flattening three-dimensional curved surface patterns of cultural relics according to claim 1, It is characterized in that The calculation formula of the affine transformation in S4 is as follows: Among them, the four coefficients a, b, c and d of the affine transformation matrix represent rotation, scaling and cropping operations, and tx and ty represent translation operations.
Citation Information
Patent Citations
A design and modeling method for corrective brace maintaining fitting all the time, and system
CN109717995A
Systems and methods for intraoperative segmentation
CN110101355A