Texture map generation method, rendering method, device, equipment and storage medium

By generating texture maps and estimating the color information of texture patch coordinate points, the problem of loss of color clarity caused by the same vertex projection in 3D model rendering is solved, and the resolution and continuity of the rendering effect are improved.

CN112785674BActive Publication Date: 2024-08-30BEIJING WEIHAI CANYU DIGITAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110089707.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-22
Publication Date
2024-08-30
Estimated Expiration
2041-01-22

AI Technical Summary

Technical Problem

When an image is rendered to a 3D model, multiple vertices of the 3D model may be projected to the same pixel, resulting in a loss of color clarity.

Method used

By generating a texture map, the vertex color information in the two-dimensional texture grid is determined, and the coordinate point color information is estimated based on the vertex color information of the texture patch to ensure that the coordinate point color information and vertex color information in the texture patch are different to avoid color Loss of clarity.

Benefits of technology

It improves the loss of color clarity caused by the same vertex projection, improves the color resolution and continuity of 3D model rendering, and reduces color noise.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112785674B
    Figure CN112785674B
Patent Text Reader

Abstract

The present disclosure provides a method for generating a texture map, a rendering method, an apparatus, a device and a storage medium, and relates to the field of artificial intelligence technology, specifically the field of computer vision and deep learning technology. The specific implementation scheme is: determine a two-dimensional texture mesh for a target object in a two-dimensional image; obtain the color information of the first vertex, the color information of the first vertex is determined based on the color information of the projection point of the first vertex in the two-dimensional image; based on the color information of the first vertex, determine the color information of the second vertex corresponding to the first vertex in the two-dimensional texture mesh; determine the texture patch surrounded by multiple second vertices, estimate the color information of the coordinate point in the texture patch based on the color information of the second vertex corresponding to the texture patch, and obtain a target texture map containing the color information of the second vertex and the color information of the coordinate point. According to the present disclosure, the problem of color clarity loss in the rendering process of a three-dimensional model can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, in particular to the field of artificial intelligence technology, specifically to the field of computer vision and deep learning technology. Background Art

[0002] At present, when using images to render 3D models, the vertices of the 3D model are usually projected directly onto the original 2D image to obtain colors, and then the obtained colors are set to the corresponding vertices on the 3D model. Since multiple vertices of the 3D model may be projected onto the same pixel point of the original 2D image, it is easy to render multiple vertices of the 3D model with the same color, resulting in a loss of color clarity. Summary of the invention

[0003] The present disclosure provides a texture map generation method, rendering method, device, equipment and storage medium.

[0004] According to a first aspect of the present disclosure, a method for generating a texture map is provided, comprising:

[0005] Determine a two-dimensional texture mesh for a target object in the two-dimensional image, wherein the two-dimensional texture mesh is obtained by unfolding a surface of a three-dimensional model of the target object; a first vertex on the surface of the three-dimensional model corresponds to a second vertex in the two-dimensional texture mesh;

[0006] Acquire color information of the first vertex, where the color information of the first vertex is determined based on color information of a projection point of the first vertex in the two-dimensional image;

[0007] Based on the color information of the first vertex, determining the color information of a second vertex corresponding to the first vertex in the two-dimensional texture mesh;

[0008] A texture patch surrounded by a plurality of second vertices is determined, and color information of at least one coordinate point in the texture patch is estimated based on color information of the second vertices corresponding to the texture patch, so as to obtain a target texture map including color information of the second vertices and color information of the coordinate point.

[0009] According to a second aspect of the present disclosure, a method for rendering a texture map is provided, comprising:

[0010] Acquire a three-dimensional model and a target texture map of a target object, wherein the target texture map is generated by the generation method provided in the first aspect above;

[0011] Based on the color information of the second vertices contained in the target texture map and the color information of the coordinate point, the color information of each vertex in the three-dimensional model is determined to render the three-dimensional model of the target object; wherein the coordinate point is a coordinate point in the texture patch surrounded by multiple second vertices.

[0012] According to a third aspect of the present disclosure, a texture map generation device is provided, comprising:

[0013] A first determination module is used to determine a two-dimensional texture mesh for a target object in a two-dimensional image, wherein the two-dimensional texture mesh is obtained by unfolding a surface of a three-dimensional model of the target object; and a first vertex on the surface of the three-dimensional model corresponds to a second vertex in the two-dimensional texture mesh;

[0014] A first acquisition module, used to acquire color information of a first vertex, where the color information of the first vertex is determined based on color information of a projection point of the first vertex in the two-dimensional image;

[0015] A second determination module, configured to determine color information of a second vertex corresponding to the first vertex in the two-dimensional texture mesh based on the color information of the first vertex;

[0016] The generation module is used to determine the texture patch surrounded by multiple second vertices, and estimate the color information of at least one coordinate point in the texture patch based on the color information of the second vertices corresponding to the texture patch, so as to obtain a target texture map containing the color information of the second vertices and the color information of the coordinate point.

[0017] According to a fourth aspect of the present disclosure, a texture map rendering device is provided, comprising:

[0018] A second acquisition module, used to acquire a three-dimensional model of a target object and a target texture map, where the target texture map is generated using the method provided in the first aspect above;

[0019] A rendering module is used to determine the color information of each vertex in the three-dimensional model based on the color information of the second vertices contained in the target texture map and the color information of the coordinate point, so as to render the three-dimensional model of the target object; wherein the coordinate point is a coordinate point in the texture patch surrounded by multiple second vertices.

[0020] According to a fifth aspect of the present disclosure, there is provided an electronic device, including:

[0021] at least one processor; and

[0022] a memory communicatively connected to the at least one processor; wherein,

[0023] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method in any embodiment of the present disclosure.

[0024] According to a sixth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the method in any embodiment of the present disclosure.

[0025] According to a seventh aspect of the present disclosure, a computer program product is provided, including a computer program, which implements the method in any embodiment of the present disclosure when executed by a processor.

[0026] The technology disclosed in the present invention can improve the problem of color clarity loss caused by the first vertex directly taking color from the original two-dimensional image, which leads to the rendering of the three-dimensional model.

[0027] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0029] Figure 1 A schematic diagram showing a method for generating a texture map according to an embodiment of the present disclosure;

[0030] Figure 2A yes Figure 1 A schematic diagram of step S104;

[0031] Figure 2B is a schematic diagram of the positional relationship between the coordinate point S on the texture patch and the texture coordinate points corresponding to the plurality of second vertices;

[0032] Figure 3A yes Figure 1 A schematic diagram of step S102 in FIG.

[0033] Figure 3B is a schematic diagram of the positional relationship between the projection point of the first vertex and a plurality of field pixel points of the pixel points of the two-dimensional image;

[0034] Figure 4 An application example of the generation method according to the present disclosure is shown;

[0035] Figure 5 A rendering method according to an embodiment of the present disclosure is shown;

[0036] Figure 6 A schematic diagram showing a device for generating a texture map according to an embodiment of the present disclosure;

[0037] Figure 7 A schematic diagram showing a rendering device for a texture map according to an embodiment of the present disclosure;

[0038] Figure 8 The block diagram is a block diagram of an electronic device for implementing the method of the embodiment of the present disclosure. DETAILED DESCRIPTION

[0039] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0040] Figure 1 A schematic diagram showing a method for generating a texture map according to an embodiment of the present disclosure is shown. Figure 1 As shown, the method may include:

[0041] Step S101, determining a two-dimensional texture mesh for a target object in a two-dimensional image, wherein the two-dimensional texture mesh is obtained by unfolding a surface of a three-dimensional model of the target object; a first vertex on the surface of the three-dimensional model corresponds to a second vertex in the two-dimensional texture mesh;

[0042] Step S102, obtaining color information of a first vertex, where the color information of the first vertex is determined based on color information of a projection point of the first vertex in a two-dimensional image;

[0043] Step S103, based on the color information of the first vertex, determining the color information of the second vertex corresponding to the first vertex in the two-dimensional texture mesh;

[0044] Step S104, determine the texture patch surrounded by multiple second vertices, and estimate the color information of at least one coordinate point in the texture patch based on the color information of the second vertices corresponding to the texture patch to obtain a target texture map including the color information of the second vertices and the color information of the coordinate point.

[0045] According to the method of the embodiment of the present disclosure, after determining the two-dimensional texture grid for the target object in the two-dimensional image, the color information of the second vertex in the two-dimensional texture grid is determined by using the color information of the first vertex obtained, and for the texture patch in the two-dimensional texture grid, the color information of at least one coordinate point in the texture patch is estimated based on the color information of the multiple second vertices that form the texture patch, so that a target texture map containing the color information of the second vertex and the color information of the coordinate point can be obtained. Since the color information of the second vertex is determined based on the color information of the projection point of the first vertex, the color information of the coordinate point in the texture patch is jointly estimated by the color information of the multiple second vertices that form the texture patch. Therefore, even if the color information of the projection points of the multiple first vertices corresponding to the multiple second vertices that form the texture patch is the same as the color information of some of the first vertices, the color information of the coordinate point in the texture patch will be different from the color information of this part of the first vertices. In this way, the three-dimensional model of the target object is rendered using the target texture map provided by the embodiment of the present disclosure, which can improve the problem of color clarity loss caused by the existing three-dimensional model rendering due to the same color of the first vertex.

[0046] In one example, the target object may be an object occupying a certain space, such as a human body, an animal, or an object. The surface of the three-dimensional model of the target object has a first vertex. When the three-dimensional model is unfolded to obtain a two-dimensional texture mesh, the first vertex corresponds to a second vertex in the two-dimensional texture mesh, so that a corresponding relationship is established between the first vertex on the surface of the three-dimensional model and the second vertex in the two-dimensional texture mesh.

[0047] Specifically, the correspondence between the first vertices and the second vertices may be a correspondence between a group of first vertices forming a surface patch in a three-dimensional model and a group of second vertices forming a two-dimensional texture mesh.

[0048] For example, the surface of a three-dimensional model has K first vertices, and the K first vertices can be surrounded by J surface patches, where K is an integer greater than 0 and J is an integer greater than 0 and less than K; the surface patch set Vertexfaces can be expressed as They respectively represent a group of first vertices that enclose the i-th surface patch.

[0049] For the K second vertices in the two-dimensional texture grid, the texture face set Texturefaces surrounded by the three second vertices can be expressed as Texturefaces = {[f i 0 , f i 1 , f i 2 ],i=1,2…,J},fi 0 , f i 1 , f i 2 Represents a set of second vertices that enclose the i-th texture patch.

[0050] Therefore, the mapping relationship between the surface face set and the texture face set can be constructed through the formula map[Texturefaces]=Vertexfaces, and then the corresponding relationship between a group of first vertices and a group of second vertices can be determined.

[0051] In one example, the determined two-dimensional texture mesh is a two-dimensional texture mesh without color; the obtained target texture map is a colored texture map, which can be obtained by adding the color information of the second vertex and the color information of the coordinate point to the two-dimensional texture mesh, or it can be a new texture map generated based on the color information of the second vertex and the color information of the coordinate point.

[0052] In another example, the texture patch may be surrounded by at least three second vertices. For example, the texture patch may be surrounded by three, four or five second vertices. The embodiment of the present disclosure does not limit the number of second vertices that surround the texture patch.

[0053] In one embodiment, if Figure 2A As shown, the above-mentioned estimating the color information of at least one coordinate point in the texture patch based on the color information of the second vertex corresponding to the texture patch may include:

[0054] Step S201, selecting at least one coordinate point from the texture patch, and determining the positional relationship between the coordinate point and a plurality of second vertices surrounding the texture patch;

[0055] Step S202: Based on the positional relationship, the color information of the plurality of second vertices forming the texture patch is merged to obtain the color information of the coordinate point.

[0056] In one example, the second vertex has a texture coordinate in the two-dimensional texture mesh, wherein the texture coordinate is a UV coordinate, which is used to characterize the position of each pixel point in the two-dimensional plane corresponding to the surface of the three-dimensional model in the texture mesh. It is assumed that each texture patch in the two-dimensional texture mesh is surrounded by three second vertices, and selecting at least one coordinate point from the texture patch may include:

[0057] Get the texture coordinates of three second vertices in the two-dimensional texture grid;

[0058] Determine a set of coordinate points within an area surrounded by texture coordinates of three second vertices;

[0059] At least one coordinate point is selected from the coordinate point set.

[0060] For example, Figure 2B As shown, the three second vertices of the i-th texture patch in the two-dimensional texture grid are in, The corresponding texture coordinate point is P1, and the texture coordinate of P1 is The corresponding texture coordinate point is P2, and the texture coordinate of P2 is The corresponding texture coordinate point P3, the texture coordinate of P3 is Then we can determine the coordinate point set InnerSet in the area surrounded by P1, P2 and P3, and then select at least one coordinate point S from InnerSet. The texture coordinates of the coordinate point S are [u S , v S ].

[0061] In this way, based on the texture coordinates of the coordinate points S, P1, P2 and P3, the positional relationship between the coordinate point S and the texture coordinate points P1, P2 and P3 corresponding to the three second vertices can be determined, and based on the positional relationship between the coordinate point S and the texture coordinate points P1, P2 and P3 corresponding to the three second vertices, the color information of the three second vertices is merged to obtain the color information of the coordinate point S. In this way, when the color information of the three second vertices is different, the color information of the coordinate point S is close to the color information of the three second vertices, so that the color information of the coordinate point S is continuous with respect to the color information of the three second vertices; when the color information of some of the three second vertices is the same, the color information of the coordinate point S is different from the color information of these second vertices, which can improve the problem of clarity loss caused by the same color information of some second vertices.

[0062] In one implementation, the above-mentioned merging the color information of a plurality of second vertices forming a texture patch based on the position relationship to obtain the color information of the coordinate point may include:

[0063] Based on the positional relationship, determining weights of the plurality of second vertices;

[0064] Based on the weights, the color information of the plurality of second vertices is weighted to obtain the color information of the coordinate point.

[0065] In one example, if Figure 2B As shown, the weights of the plurality of second vertices may be determined by the areas of triangular regions segmented by lines connecting the coordinate point S and the texture coordinate points P1 , P2 , and P3 corresponding to the three second vertices.

[0066] For example, the coordinate point S divides the triangle patch surrounded by the texture coordinate points P1, P2 and P3 corresponding to the three second vertices into three triangle areas, specifically, the triangle area SP2P3 with an area of ​​area1, the triangle area SP1P3 with an area of ​​area2 and the triangle area SP1P2 with an area of ​​area3. i 0 The weights are w0, f i 1 The weights are w1, f i 2 The weight of is w2; among them,

[0067]

[0068] For f i 0 、f i 1 and f i 2 The color information of the second vertex is then and Color information and Correspondingly, as the first vertex f i 0 、f i 1 and f i 2 The color information of the coordinate point S is uvtexture(u S , v S ) can be obtained by the formula Calculated.

[0069] Based on this, the weight of the second vertex is determined by using the positional relationship between the coordinate point and the multiple second vertices, and the color information of the multiple second vertices is weighted based on the weight, so that the color information of the coordinate point and the color information of the multiple second vertices can be mixed and blurred, so that the color information has better continuity. Furthermore, when the first vertices on the surface of the three-dimensional model are relatively sparse, the color information of the coordinate point can be estimated by the above-mentioned generation method, so that the color information in the generated target texture map is denser, which is conducive to restoring the color information of the target object and improving the resolution. In addition, when the color information of the first vertex or the second vertex is erroneous during the generation process, the color information of the multiple second vertices is weighted based on the weight, and the erroneous color information can be weakened to avoid color noise.

[0070] In one embodiment, if Figure 3A As shown, the above-mentioned acquisition of the color information of the first vertex may include:

[0071] Step S301: when there is no projection point of the first vertex in the pixel points of the two-dimensional image, determine a plurality of area pixel points of the projection point of the first vertex from the two-dimensional image;

[0072] Step S302: Based on the positional relationship between the projection point and the plurality of field pixel points, the color information of the plurality of field pixel points is merged to obtain the color information of the first vertex.

[0073] In one example, if Figure 3B As shown, P(x, y) is set as the projection point of the first vertex P1. In step S301, when P(x, y) does not exist in the pixel points of the two-dimensional image, four area pixel points Q of P(x, y) can be determined from the two-dimensional image. 11 , Q 12 , Q 21 and Q 22 ; Among them, Q 11 The coordinates are (x1, y1), Q 12 The coordinates are (x2, y1), Q 21 The coordinates are (x1, y2), Q 22 The coordinates of Q are (x2, y2), 11 The color information is RGB (Q 11 ), Q 12 The color information is RGB (Q 12 ), Q 21 The color information is RGB (Q 21 ), Q 22 The color information is RGB (Q 22 ).

[0074] The color information RGB(P1) of the first vertex P1 can be calculated by the following formula:

[0075]

[0076] Based on this, when there is no projection point of the first vertex in the pixel points of the two-dimensional image, the color information of multiple field pixels of the projection point can be interpolated to determine the color information of the first vertex, which can avoid the discontinuity of color information and is also beneficial to improving the resolution of the texture map.

[0077] Among them, since the values ​​of the x coordinate and the y coordinate in the pixel coordinates of the two-dimensional image are both integers, therefore, when it is determined that the coordinates of the projection point of the first vertex are decimals, it can be determined that the projection point of the first vertex does not exist in the pixel points of the two-dimensional image. For example, if the coordinates of the projection point of the first vertex are (300.123, 645.724), it is determined that the projection point of the first vertex does not exist in the pixels of the two-dimensional image, and then the coordinates of the multiple field pixel points of the projection point of the first vertex can be determined to be (300, 645), (300, 646), (301, 645) and (301, 646), and then the color information of the first vertex is determined based on the multiple field pixel points.

[0078] In one embodiment, the obtaining of the color information of the first vertex may include: when there is a projection point of the first vertex in the pixel point of the two-dimensional image, using the color information of the projection point of the first vertex in the two-dimensional image as the color information of the first vertex. This is conducive to maintaining the consistency of the color information of the target texture map and the color information of the two-dimensional image.

[0079] In one embodiment, the method may further include:

[0080] Inputting the two-dimensional image into a preset first parameter estimation network to obtain the morphological features of the target object;

[0081] The morphological features are input into a preset 3D reconstruction model to obtain a 3D model of the target object.

[0082] In this embodiment, the 2D image is input into a preset first parameter estimation network, so that the first parameter estimation network outputs the morphological features of the target object; and then the morphological features of the target object are input into a preset 3D reconstruction model to obtain a 3D model of the target object. In this way, the 3D model of the target object can be obtained quickly, and the generation speed of the target texture map can be improved.

[0083] The morphological features of the target object include shape parameters and posture parameters of the target object, and the first parameter estimation network may be a human body model parameter estimation network commonly used in the art.

[0084] The three-dimensional reconstruction model may be an SMPL (Skinned Multi-Person Linear Model) model. The SMPL model is a parameterized human body model. By inputting shape parameters and posture parameters of the body into the SMPL model, a three-dimensional human body T-pose model with both hands stretched out in a T shape may be obtained, wherein the surface of the three-dimensional human body T-pose model has 6890 first vertices, and the 6890 first vertices may form a surface mesh of the three-dimensional human body T-pose model.

[0085] Optionally, the SMPL model may be a SMPL-X model or a SMPL+H model, wherein -X in the SMPL-X model indicates that the face of the target object obtained has a finer surface mesh; and +H in the SMPL+H model indicates that the fingers of the target object obtained have a finer surface mesh.

[0086] In one embodiment, the method may further include:

[0087] Inputting the two-dimensional image into a preset second parameter estimation network to obtain acquisition features of the two-dimensional image;

[0088] Based on the collected features, a projection relationship between a first vertex of the three-dimensional model and a pixel point of the two-dimensional image is established.

[0089] Based on this, by inputting the two-dimensional image into a preset second parameter estimation network, the acquisition features of the two-dimensional image can be quickly obtained, and then the projection relationship between the first vertex of the three-dimensional model and the pixel point of the two-dimensional image is suggested based on the acquisition features, which is conducive to improving the efficiency of determining the color information of the first vertex.

[0090] In one example, the acquisition characteristics of the two-dimensional image may include the camera intrinsic parameter matrix K and the camera extrinsic parameter matrix T of the image acquisition device used to acquire the two-dimensional image. w2c ;in, f x With f y is the focal length of the image acquisition device, c x With c y are the coordinates of the principal point of the image acquisition device; R is the rotation matrix from the camera coordinate system of the image acquisition device to the world coordinate system, and t is the translation matrix from the camera coordinate system of the image acquisition device to the world coordinate system. Therefore, for any first vertex P1 on the three-dimensional model, its three-dimensional coordinates are set to [P X , P Y , P Z ], the projection point P2 of the first vertex P1 in the two-dimensional image can be determined by the following formula:

[0091]

[0092] Thereby, a projection relationship between the first vertex of the three-dimensional model and the pixel point of the two-dimensional image is established; based on the projection relationship, the color information of the first vertex can be determined.

[0093] Figure 4An application example of the generation method according to the present disclosure is shown. According to the application example, firstly, a two-dimensional image is input into a three-dimensional human body model parameter estimation network to obtain the morphological features of the human body model and the acquisition features of the two-dimensional image, wherein the human body model parameter estimation network may be integrated with a first parameter estimation network and a second parameter estimation network; then, the morphological features are input into the SMPL model to obtain a three-dimensional human body mesh model; the three-dimensional human body mesh model is unfolded to obtain a two-dimensional human body texture mesh and a correspondence between a second vertex in the two-dimensional human body texture mesh and a first vertex on the surface of the three-dimensional human body mesh model; after obtaining the three-dimensional human body mesh model, based on the acquisition features, the first vertex on the surface of the three-dimensional human body mesh model is projected onto the two-dimensional image to color the first vertex and determine the color information of the first vertex; then, based on the correspondence between the first vertex and the second vertex, the color information of the first vertex is used as the color information of the corresponding second vertex in the two-dimensional human body texture mesh to determine the color information of the second vertex; for a texture patch surrounded by multiple second vertices, at least one coordinate point is selected from the texture patch, and the color information of the coordinate point is estimated based on the color information of the multiple second vertices to obtain a target texture map containing the color information of the second vertex and the color information of the coordinate point.

[0094] Based on this, since the color information of the coordinate point in the texture patch is estimated by the color information of the multiple second vertices that surround the texture patch, even if the color information of some of the multiple second vertices that surround the texture patch is the same, the color information of the coordinate point in the texture patch will be different from the color information of these second vertices. In this way, using the target texture map to render the three-dimensional model of the target object can improve the problem of clarity loss caused by the same color of the first vertices in the rendering of the three-dimensional model.

[0095] Figure 5 A schematic diagram showing a rendering method according to an embodiment of the present disclosure is shown, and the method may include:

[0096] S501, obtaining a three-dimensional model and a target texture map of a target object, wherein the target texture map is generated by any of the above-mentioned implementation methods;

[0097] S502, based on the color information of the second vertices contained in the target texture map and the color information of the coordinate point, determine the color information of each vertex in the three-dimensional model to render the three-dimensional model of the target object; wherein the coordinate point is a coordinate point in the texture patch surrounded by multiple second vertices.

[0098] According to the rendering method disclosed in the present invention, for the three-dimensional model of the target object, based on the color information of the second vertex contained in the target texture map and the color information of the coordinate point, the color information of each vertex in the three-dimensional model is determined to render the three-dimensional model of the target object; wherein the target texture map is generated by the above-mentioned generation method. Since the color information of the second vertex is determined based on the color information of the projection point of the first vertex, the color information of the coordinate point in the texture patch is jointly estimated by the color information of the multiple second vertices that form the texture patch. Therefore, even if the color information of some of the first vertices in the color information of the projection points of the multiple first vertices corresponding to the multiple second vertices that form the texture patch is the same, the color information of the coordinate point in the texture patch will be different from the color information of this part of the first vertex. In this way, the three-dimensional model of the target object is rendered using the target texture map provided by the embodiment of the present invention, which can improve the problem of clarity loss caused by the same color selection of the first vertex in the existing rendering of the three-dimensional model.

[0099] In one example, the three-dimensional model of the target object and the target texture map may be input into a rendering engine, so that the rendering engine outputs a rendered three-dimensional model.

[0100] Figure 6 FIG. 1 is a schematic diagram showing a device for generating a texture map according to an embodiment of the present disclosure. Figure 6 As shown, the texture map generation device 600 may include:

[0101] A first determination module 610 is used to determine a two-dimensional texture mesh for a target object in a two-dimensional image, wherein the two-dimensional texture mesh is obtained by unfolding a surface of a three-dimensional model of the target object; and a first vertex on the surface of the three-dimensional model corresponds to a second vertex in the two-dimensional texture mesh;

[0102] A first acquisition module 620, configured to acquire color information of a first vertex, where the color information of the first vertex is determined based on color information of a projection point of the first vertex in the two-dimensional image;

[0103] A second determination module 630, configured to determine color information of a second vertex corresponding to the first vertex in the two-dimensional texture mesh based on the color information of the first vertex;

[0104] The generation module 640 is used to determine the texture patch surrounded by multiple second vertices, and estimate the color information of at least one coordinate point in the texture patch based on the color information of the second vertices corresponding to the texture patch, so as to obtain a target texture map including the color information of the second vertices and the color information of the coordinate points.

[0105] In one implementation, the generation module 640 may include:

[0106] A first determination submodule is used to select at least one coordinate point from the texture patch and determine the positional relationship between the coordinate point and a plurality of second vertices surrounding the texture patch;

[0107] The first fusion submodule is used to fuse the color information of multiple second vertices surrounding the texture patch based on the position relationship to obtain the color information of the coordinate point.

[0108] In one embodiment, the first fusion submodule may include:

[0109] A first determining unit, configured to determine weights of a plurality of second vertices based on the position relationship;

[0110] The weighted processing unit is used to perform weighted processing on the color information of multiple second vertices based on the weights to obtain the color information of the coordinate point.

[0111] In one implementation, the acquisition module 620 may include:

[0112] A second determination submodule is used to determine a plurality of area pixel points of the projection point of the first vertex from the two-dimensional image when there is no projection point of the first vertex in the pixel points of the two-dimensional image;

[0113] The second fusion submodule is used to fuse the color information of the multiple field pixel points based on the positional relationship between the projection point and the multiple field pixel points to obtain the color information of the first vertex.

[0114] In one implementation, the acquisition module 620 may include:

[0115] The third determination submodule is used to use the color information of the projection point of the first vertex in the two-dimensional image as the color information of the first vertex when there is a projection point of the first vertex in the pixel points of the two-dimensional image.

[0116] In one embodiment, the device may further include:

[0117] A third determination module is used to input the two-dimensional image into a preset first parameter estimation network to obtain the morphological characteristics of the target object;

[0118] The fourth determination module is used to input the morphological features into a preset three-dimensional reconstruction model to obtain a three-dimensional model of the target object.

[0119] In one embodiment, the device may further include:

[0120] A fifth determination module, used for inputting the two-dimensional image into a preset second parameter estimation network to obtain acquisition features of the two-dimensional image;

[0121] The establishing module is used to establish the projection relationship between the first vertex of the three-dimensional model and the pixel point of the two-dimensional image based on the collected features.

[0122] Figure 7 A schematic diagram of a texture map rendering device according to an embodiment of the present disclosure is shown. The texture map rendering device 700 may include:

[0123] A second acquisition module 710 is used to acquire a three-dimensional model of a target object and a target texture map, where the target texture map is generated by the above-mentioned generating device;

[0124] The rendering module 720 is used to determine the color information of each vertex in the three-dimensional model based on the color information of the second vertices contained in the target texture map and the color information of the coordinate point, so as to render the three-dimensional model of the target object; wherein the coordinate point is a coordinate point in the texture patch surrounded by multiple second vertices.

[0125] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0126] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0127] like Figure 8 As shown, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0128] A number of components in the device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0129] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as a texture map generation method and / or a texture map rendering method. For example, in some embodiments, a texture map generation method and / or a texture map rendering method may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the texture map generation method and / or the texture map rendering method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to execute the texture map generation method and / or the texture map rendering method in any other appropriate manner (for example, by means of firmware).

[0130] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0131] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0132] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0133] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0134] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0135] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.

[0136] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0137] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for generating a texture map, comprising: Determine a two-dimensional texture mesh for a target object in a two-dimensional image, wherein the two-dimensional texture mesh is obtained by unfolding a surface of a three-dimensional model of the target object; a first vertex on the surface of the three-dimensional model has a corresponding relationship with a second vertex in the two-dimensional texture mesh; Acquire color information of the first vertex, where the color information of the first vertex is determined based on color information of a projection point of the first vertex in the two-dimensional image; Determining, based on the color information of the first vertex, color information of a second vertex in the two-dimensional texture mesh corresponding to the first vertex; Determine a texture patch surrounded by a plurality of the second vertices, and estimate color information of at least one coordinate point in the texture patch based on color information of the second vertices corresponding to the texture patch, so as to obtain a target texture map including color information of the second vertices and color information of the coordinate point; Among them, estimating the color information of at least one coordinate point in the texture patch based on the color information of the second vertex corresponding to the texture patch includes: selecting at least one coordinate point from the texture patch, and determining the positional relationship between the coordinate point and a plurality of second vertices forming the texture patch; based on the positional relationship, fusing the color information of the plurality of second vertices forming the texture patch to obtain the color information of the coordinate point.

2. The method according to claim 1, wherein: The step of fusing the color information of a plurality of the second vertices surrounding the texture patch based on the positional relationship to obtain the color information of the coordinate point includes: Based on the positional relationship, determining weights of a plurality of the second vertices; Based on the weight, the color information of the plurality of second vertices is weighted to obtain the color information of the coordinate point.

3. The method according to claim 1, wherein: The obtaining the color information of the first vertex includes: In the case that the projection point of the first vertex does not exist in the pixel points of the two-dimensional image, determining a plurality of area pixel points of the projection point of the first vertex from the two-dimensional image; Based on the positional relationship between the projection point and the plurality of field pixel points, the color information of the plurality of field pixel points is fused to obtain the color information of the first vertex.

4. The method according to claim 1, wherein: The obtaining the color information of the first vertex includes: When there is a projection point of the first vertex in the pixel points of the two-dimensional image, color information of the projection point of the first vertex in the two-dimensional image is used as color information of the first vertex.

5. The method according to claim 1, further comprising: Inputting the two-dimensional image into a preset first parameter estimation network to obtain the morphological features of the target object; The morphological features are input into a preset three-dimensional reconstruction model to obtain the three-dimensional model of the target object.

6. The method according to claim 1, further comprising: Inputting the two-dimensional image into a preset second parameter estimation network to obtain acquisition features of the two-dimensional image; Based on the acquisition features, a projection relationship between a first vertex of the three-dimensional model and a pixel point of the two-dimensional image is established.

7. A method for rendering a texture map, comprising: Acquire a three-dimensional model and a target texture map of a target object, wherein the target texture map is generated by the generation method according to any one of claims 1 to 6; Based on the color information of the second vertices contained in the target texture map and the color information of the coordinate point, the color information of each vertex in the three-dimensional model is determined to render the three-dimensional model of the target object; wherein the coordinate point is a coordinate point in the texture patch surrounded by multiple second vertices.

8. A texture map generation device, comprising: A first determination module is used to determine a two-dimensional texture mesh for a target object in a two-dimensional image, wherein the two-dimensional texture mesh is obtained by unfolding a surface of a three-dimensional model of the target object; and a first vertex on the surface of the three-dimensional model corresponds to a second vertex in the two-dimensional texture mesh; A first acquisition module, used to acquire color information of the first vertex, where the color information of the first vertex is determined based on color information of a projection point of the first vertex in the two-dimensional image; A second determining module, configured to determine color information of a second vertex corresponding to the first vertex in the two-dimensional texture mesh based on the color information of the first vertex; A generating module, configured to determine a texture patch surrounded by a plurality of second vertices, and estimate color information of at least one coordinate point in the texture patch based on color information of the second vertices corresponding to the texture patch, so as to obtain a target texture map including color information of the second vertices and color information of the coordinate point; Among them, the generation module is also used to estimate the color information of at least one coordinate point in the texture patch based on the color information of the second vertex corresponding to the texture patch by executing the following steps: selecting at least one coordinate point from the texture patch, and determining the positional relationship between the coordinate point and multiple second vertices that surround the texture patch; based on the positional relationship, fusing the color information of the multiple second vertices that surround the texture patch to obtain the color information of the coordinate point.

9. The device according to claim 8, wherein: The generation module comprises: A first determination submodule, configured to select at least one coordinate point from the texture patch, and determine a positional relationship between the coordinate point and a plurality of second vertices surrounding the texture patch; The first fusion submodule is used to fuse the color information of a plurality of the second vertices surrounding the texture patch based on the positional relationship to obtain the color information of the coordinate point.

10. The device according to claim 9, wherein: The first fusion submodule includes: A first determining unit, configured to determine weights of a plurality of second vertices based on the positional relationship; A weighted processing unit is used to perform weighted processing on the color information of multiple second vertices based on the weight to obtain the color information of the coordinate point.

11. The device according to claim 8, wherein: The acquisition module comprises: A second determination submodule is used to determine a plurality of area pixel points of the projection point of the first vertex from the two-dimensional image when there is no projection point of the first vertex in the pixel points of the two-dimensional image; The second fusion submodule is used to fuse the color information of the plurality of field pixel points based on the positional relationship between the projection point and the plurality of field pixel points to obtain the color information of the first vertex.

12. The device according to claim 8, wherein: The acquisition module comprises: The third determination submodule is used to use the color information of the projection point of the first vertex in the two-dimensional image as the color information of the first vertex when the projection point of the first vertex exists in the pixel points of the two-dimensional image.

13. The apparatus according to claim 8, further comprising: A third determination module is used to input the two-dimensional image into a preset first parameter estimation network to obtain the morphological features of the target object; The fourth determination module is used to input the morphological features into a preset three-dimensional reconstruction model to obtain the three-dimensional model of the target object.

14. The apparatus according to claim 8, further comprising: a fifth determination module, configured to input the two-dimensional image into a preset second parameter estimation network to obtain acquisition features of the two-dimensional image; An establishing module is used to establish a projection relationship between a first vertex of the three-dimensional model and a pixel point of the two-dimensional image based on the acquisition feature.

15. A texture map rendering device, comprising: A second acquisition module, used to acquire a three-dimensional model and a target texture map of a target object, wherein the target texture map is generated by a generation method according to any one of claims 1 to 6; A rendering module is used to determine the color information of each vertex in the three-dimensional model based on the color information of the second vertices contained in the target texture map and the color information of the coordinate point, so as to render the three-dimensional model of the target object; wherein the coordinate point is a coordinate point in the texture patch surrounded by multiple second vertices.

16. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.

17. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Texture rendering method and system for real-time three-dimensional human body reconstruction, chip, equipment and medium

    CN111243071A

  • Method and apparatus for generating a three-dimensional model

    US20200320727A1