Three-dimensional grid processing method, device, equipment and readable storage medium
By encoding the geometric information of the low-resolution three-dimensional grid into a two-dimensional image for super-resolution processing, the new three-dimensional grid is reconstructed, which solves the problems of high data processing cost and difficult operation in the existing technology, and realizes the object detection Surface details are enhanced and processing efficiency is improved.
Patent Information
- Application Number
- CN202410718298.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-04
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-06-04
AI Technical Summary
When existing technologies enhance the physical form and deformation effects of object surfaces on low-resolution three-dimensional meshes, the data processing cost is high, the actual operation is difficult, and the fine-grained detail effects cannot be accurately captured.
By encoding the geometric information of the low-resolution three-dimensional grid into a two-dimensional geometric image, image super-resolution processing is performed in the two-dimensional image space, and the super-resolution enhanced three-dimensional geometric information is obtained, thereby reconstructing a new three-dimensional grid and simplifying process and reduce computational costs.
It realizes the enhancement of the physical form and deformation effect of the surface of low-resolution three-dimensional mesh objects, enriches the physical details of the objects, and improves processing efficiency and realism.
Smart Images

Figure CN118298128B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer vision technology, and in particular to a three-dimensional grid processing method, device, equipment and readable storage medium. Background Art
[0002] With the rapid development of virtual reality technology, enhancing the physical form and deformation effect of the surface of objects on low-resolution three-dimensional meshes can ensure that the efficiency of virtual applications is maintained while improving the realism of virtual objects. For example, in a live broadcast scene of a virtual digital human, the wrinkle details can be enhanced on a low-resolution three-dimensional clothing mesh, thereby creating realistic clothing wrinkle effects for the digital human in real time.
[0003] In the related art, the methods for enhancing physical details on low-resolution three-dimensional meshes may include the following: by pre-selecting a geometric optimization algorithm and a mesh interpolation method, the local curvature of the three-dimensional mesh is used for interpolation to improve the mesh smoothness and enhance the physical details in the local range; or, the physical behavior of the object can be simulated on a low-resolution three-dimensional mesh to a force balance state, and then the mesh resolution can be gradually increased and re-simulated until a better enhancement effect is obtained at a high-resolution level; or, the low-resolution normal map corresponding to the low-resolution three-dimensional mesh can be upgraded to a high-resolution normal map, and the corresponding high-resolution three-dimensional mesh can be reconstructed using the high-resolution normal map to obtain a mesh enhancement effect.
[0004] However, the three-dimensional mesh detail enhancement effect of the above processing method has certain limitations. It directly performs complex resolution processing on low-resolution three-dimensional meshes, resulting in high data processing costs, great difficulty in actual operation, and inability to accurately capture and generate fine-grained detail effects. Summary of the invention
[0005] In view of this, in order to solve the above technical problems, the present application provides a three-dimensional grid processing method, device, equipment and readable storage medium.
[0006] Specifically, the present application is implemented through the following technical solutions:
[0007] According to a first aspect of an embodiment of the present application, a three-dimensional mesh processing method is provided, the method comprising:
[0008] According to the two-dimensional grid of the object to be processed, the geometric information of the initial three-dimensional grid of the object to be processed is encoded to generate an initial two-dimensional geometric image; wherein the pixel points of the initial two-dimensional geometric image correspond to the points on the two-dimensional grid in position; the pixel values of the pixel points are determined according to the three-dimensional coordinates of the corresponding points on the two-dimensional grid in the initial three-dimensional grid;
[0009] For each of the plurality of plate images in the initial two-dimensional geometric image, the plate image is divided into a plurality of first image blocks, and image super-resolution enhancement processing is performed on the plurality of first image blocks respectively to obtain a plurality of corresponding second image blocks; wherein the plurality of plate images correspond one-to-one to the constituent plates of the object to be processed;
[0010] Performing image reconstruction processing according to the plurality of second image blocks to obtain a corresponding target two-dimensional geometric image;
[0011] According to the pixel value of each pixel point in the target two-dimensional geometry, the three-dimensional coordinates corresponding to each pixel point are determined, and according to the three-dimensional coordinates corresponding to each pixel point and the position correspondence with the points on the two-dimensional grid, the target three-dimensional grid of the object to be processed is generated.
[0012] Optionally, encoding the geometric information of the initial three-dimensional mesh of the object to be processed to generate an initial two-dimensional geometric image includes:
[0013] Establishing a background grid in the plane space where the two-dimensional grid is located, so that each background grid point of the background grid represents a pixel point of the initial two-dimensional geometric image; the range of the background grid is determined according to the bounding box range of the two-dimensional grid;
[0014] For each background grid point in the two-dimensional grid, determine the three-dimensional coordinates corresponding to the background grid point according to the three-dimensional coordinates corresponding to the vertices of the grid unit where the background grid point is located in the two-dimensional grid;
[0015] According to the three-dimensional coordinates corresponding to the background grid points, the pixel values of the pixels represented by the background grid points are determined, and according to the pixel value of each background grid point and the two-dimensional grid, the initial two-dimensional geometric image is generated.
[0016] Optionally, determining the three-dimensional coordinates corresponding to the background grid point according to the three-dimensional coordinates corresponding to the vertices of the grid unit where the background grid point is located in the two-dimensional grid includes:
[0017] Determining parameterized coordinates of the background grid point according to the two-dimensional coordinates of the vertices of the grid unit where the background grid point is located; the parameterized coordinates are used to describe the position of the background grid point relative to the vertices of the grid unit;
[0018] The three-dimensional coordinates corresponding to the background grid point are obtained by linear interpolation according to the parameterized coordinates and the three-dimensional coordinates of the vertices of the grid unit where the background grid point is located in the initial three-dimensional grid.
[0019] Optionally, determining the pixel value of the pixel represented by the background grid point according to the three-dimensional coordinates corresponding to the background grid point includes:
[0020] For each background grid point in the background grid, normalizing the three-dimensional coordinates corresponding to the background grid point;
[0021] The normalized three-dimensional coordinate values are mapped to a color space to obtain pixel values of the pixels represented by the background grid points.
[0022] Optionally, in the case where the pixel value of the pixel point represented by the background grid point is obtained by normalization and mapping, determining the three-dimensional coordinates corresponding to each pixel point according to the pixel value of each pixel point in the target two-dimensional geometry includes:
[0023] Inversely map the pixel value of the pixel point from the color space to the normalized three-dimensional coordinates;
[0024] An inverse normalization operation is performed on the result of the inverse mapping to obtain the three-dimensional coordinates corresponding to the pixel point.
[0025] Optionally, generating the initial two-dimensional geometric image according to the pixel value of each background grid point and the two-dimensional grid includes:
[0026] Creating a blank geometric image with the same size as the background grid, and mapping the boundary points of each closed area in the two-dimensional grid to the blank geometric image to generate a rendering boundary;
[0027] For each background grid point in the background grid, pixel values of the pixels represented by the background grid point are used to fill the pixels at corresponding positions in the blank geometric image according to the rendering boundary to obtain the initial two-dimensional geometric image.
[0028] Optionally, dividing the plate image into a plurality of first image blocks comprises:
[0029] The plate image is divided into blocks according to a preset image block size; wherein an overlapping area of a set pixel width is reserved between adjacent first image blocks.
[0030] Optionally, in a case where overlapping areas are retained between adjacent first image blocks, performing image reconstruction processing according to the plurality of second image blocks to obtain a corresponding target two-dimensional geometric image includes:
[0031] For a first pixel row in an overlapping area between adjacent second image blocks, obtaining an average value of coordinates of pixels corresponding to the first pixel row in the adjacent second image blocks;
[0032] generating coordinates of the first pixel row subjected to Laplace smoothing according to pixel coordinate information of a second pixel row adjacent to the first pixel row;
[0033] According to a preset weight factor, the average coordinate value corresponding to the first pixel row is merged with the coordinate processed by Laplace smoothing to obtain the pixel coordinates of the first pixel row;
[0034] The adjacent second image blocks are fused according to the pixel coordinates of the first pixel rows to generate the target two-dimensional geometric image.
[0035] Optionally, performing image super-resolution enhancement processing on each of the plurality of first image blocks to obtain corresponding second image blocks includes:
[0036] Extracting low-frequency features of the first image block; the low-frequency features are used to represent overall information of the first image block;
[0037] Generate corresponding high-frequency features according to the low-frequency features; the high-frequency features are used to characterize detail information of the first image block;
[0038] The low-frequency feature is combined with the high-frequency feature to generate the second image block.
[0039] Optionally, performing image super-resolution enhancement processing on each of the plurality of first image blocks to obtain corresponding second image blocks includes:
[0040] The first image block is input into a pre-trained image super-resolution network to obtain a super-resolution sub-image block output by the image super-resolution network as a second image block corresponding to the first image block; wherein the image super-resolution network is used to implement the image super-resolution enhancement processing.
[0041] Optionally, the loss function of the image super-resolution network includes a first-order derivative information loss function term; the first-order derivative information loss function term is constructed according to the deformation gradient of each pixel in the image in different directions.
[0042] Optionally, generating a target three-dimensional grid of the object to be processed according to the three-dimensional coordinates corresponding to each pixel point and the position correspondence with the points on the two-dimensional grid includes:
[0043] For each vertex in the two-dimensional grid, determining adjacent pixel points of the vertex according to the position correspondence between the pixel points in the target two-dimensional geometric image and the points on the two-dimensional grid;
[0044] Obtaining the three-dimensional coordinates of the vertex by linear interpolation according to the three-dimensional coordinates corresponding to the adjacent pixels of the vertex;
[0045] The target three-dimensional mesh is generated according to the three-dimensional coordinates of the vertices and the topological information of the two-dimensional mesh.
[0046] According to a second aspect of an embodiment of the present application, a three-dimensional mesh processing device is provided, the device comprising:
[0047] An initial geometric image generation module is used to encode the geometric information of the initial three-dimensional grid of the object to be processed to generate an initial two-dimensional geometric image according to the two-dimensional grid of the object to be processed; wherein the pixel points of the initial two-dimensional geometric image correspond to the points on the two-dimensional grid in position; and the pixel values of the pixel points are determined according to the three-dimensional coordinates of the corresponding points on the two-dimensional grid in the initial three-dimensional grid;
[0048] a super-resolution enhancement module, for dividing each of the plurality of plate images in the initial two-dimensional geometric image into a plurality of first image blocks, and performing image super-resolution enhancement processing on the plurality of first image blocks respectively, to obtain a plurality of corresponding second image blocks; wherein the plurality of plate images correspond one-to-one to the constituent plates of the object to be processed;
[0049] A geometric image reconstruction processing module, used for performing image reconstruction processing according to the plurality of second image blocks to obtain a corresponding target two-dimensional geometric image;
[0050] The target three-dimensional grid generation module is used to determine the three-dimensional coordinates corresponding to each pixel point according to the pixel value of each pixel point in the target two-dimensional geometry, and generate the target three-dimensional grid of the object to be processed according to the three-dimensional coordinates corresponding to each pixel point and the position correspondence with the points on the two-dimensional grid.
[0051] Optionally, the initial geometric image generation module includes:
[0052] A background grid establishment module is used to establish a background grid in the plane space where the two-dimensional grid is located, so that each background grid point of the background grid represents a pixel point of the initial two-dimensional geometric image; the range of the background grid is determined according to the bounding box range of the two-dimensional grid;
[0053] A background grid point coordinate determination module, for determining the three-dimensional coordinates corresponding to each background grid point in the two-dimensional grid according to the three-dimensional coordinates corresponding to the vertices of the grid unit where the background grid point is located in the two-dimensional grid;
[0054] The pixel value determination and image generation module is used to determine the pixel value of the pixel point represented by the background grid point according to the three-dimensional coordinates corresponding to the background grid point, and generate the initial two-dimensional geometric image according to the pixel value of each background grid point and the two-dimensional grid.
[0055] Optionally, the background grid point coordinate determination module is specifically used for:
[0056] Determining parameterized coordinates of the background grid point according to the two-dimensional coordinates of the vertices of the grid unit where the background grid point is located; the parameterized coordinates are used to describe the position of the background grid point relative to the vertices of the grid unit;
[0057] The three-dimensional coordinates corresponding to the background grid point are obtained by linear interpolation according to the parameterized coordinates and the three-dimensional coordinates of the vertices of the grid unit where the background grid point is located in the initial three-dimensional grid.
[0058] Optionally, the pixel value determination and image generation module is specifically used for:
[0059] For each background grid point in the background grid, normalizing the three-dimensional coordinates corresponding to the background grid point;
[0060] The normalized three-dimensional coordinate values are mapped to a color space to obtain pixel values of the pixels represented by the background grid points.
[0061] Optionally, the target three-dimensional grid generation module is specifically used to:
[0062] Inversely map the pixel value of the pixel point from the color space to the normalized three-dimensional coordinates;
[0063] An inverse normalization operation is performed on the result of the inverse mapping to obtain the three-dimensional coordinates corresponding to the pixel point.
[0064] Optionally, the pixel value determination and image generation module is specifically used for:
[0065] Creating a blank geometric image with the same size as the background grid, and mapping the boundary points of each closed area in the two-dimensional grid to the blank geometric image to generate a rendering boundary;
[0066] For each background grid point in the background grid, pixel values of the pixels represented by the background grid point are used to fill the pixels at corresponding positions in the blank geometric image according to the rendering boundary to obtain the initial two-dimensional geometric image.
[0067] Optionally, the super-resolution enhancement module is specifically used for:
[0068] The plate image is divided into blocks according to a preset image block size; wherein an overlapping area of a set pixel width is reserved between adjacent first image blocks.
[0069] Optionally, based on retaining overlapping areas between adjacent second image blocks, the geometric image reconstruction processing module is specifically used to:
[0070] For a first pixel row in an overlapping area between adjacent second image blocks, obtaining an average value of coordinates of pixels corresponding to the first pixel row in the adjacent second image blocks;
[0071] generating coordinates of the first pixel row subjected to Laplace smoothing according to pixel coordinate information of a second pixel row adjacent to the first pixel row;
[0072] According to a preset weight factor, the average coordinate value corresponding to the first pixel row is merged with the coordinate processed by Laplace smoothing to obtain the pixel coordinates of the first pixel row;
[0073] The adjacent second image blocks are fused according to the pixel coordinates of the first pixel rows to generate the target two-dimensional geometric image.
[0074] Optionally, the super-resolution enhancement module is specifically used for:
[0075] Extracting low-frequency features of the first image block; the low-frequency features are used to represent overall information of the first image block;
[0076] Generate corresponding high-frequency features according to the low-frequency features; the high-frequency features are used to characterize detail information of the first image block;
[0077] The low-frequency feature is combined with the high-frequency feature to generate the second image block.
[0078] Optionally, the super-resolution enhancement module is specifically used for:
[0079] The first image block is input into a pre-trained image super-resolution network to obtain a super-resolution sub-image block output by the image super-resolution network as a second image block corresponding to the first image block; wherein the image super-resolution network is used to implement the image super-resolution enhancement processing.
[0080] Optionally, the loss function of the image super-resolution network includes a first-order derivative information loss function term; the first-order derivative information loss function term is constructed according to the deformation gradient of each pixel in the image in different directions.
[0081] Optionally, the target three-dimensional grid generation module is specifically used to:
[0082] For each vertex in the two-dimensional grid, determining adjacent pixel points of the vertex according to the position correspondence between the pixel points in the target two-dimensional geometric image and the points on the two-dimensional grid;
[0083] Obtaining the three-dimensional coordinates of the vertex by linear interpolation according to the three-dimensional coordinates corresponding to the adjacent pixels of the vertex;
[0084] The target three-dimensional mesh is generated according to the three-dimensional coordinates of the vertices and the topological information of the two-dimensional mesh.
[0085] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising: a memory and a processor; the memory is used to store a computer program; the processor is used to execute the above-mentioned three-dimensional mesh processing method by calling the computer program.
[0086] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned three-dimensional mesh processing method is implemented.
[0087] The technical solution provided by the embodiments of the present application may have the following beneficial effects:
[0088] In the technical solution provided in the present application, the geometric information of a low-resolution three-dimensional mesh is mapped and encoded into a two-dimensional geometric image, and image super-resolution processing is performed on the two-dimensional geometric image in the two-dimensional image space to obtain the three-dimensional geometric information after super-resolution enhancement. The three-dimensional coordinates of the vertices on the two-dimensional mesh are restored according to the two-dimensional geometric image obtained by the image super-resolution processing, thereby reconstructing a new three-dimensional mesh, thereby achieving enhanced processing of the physical morphology and deformation effects of the object surface on the low-resolution three-dimensional mesh, simplifying the three-dimensional mesh processing problem to a two-dimensional plane for processing, reducing data calculation costs, and improving processing speed and efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0089] Figure 1A is a flow chart of a three-dimensional mesh processing method shown in an exemplary embodiment of the present application;
[0090] Figure 1B is a schematic diagram of an initial two-dimensional geometric image corresponding to a three-dimensional clothing grid shown in an exemplary embodiment of the present application;
[0091] Figure 1C is a schematic diagram of an initial three-dimensional grid and a two-dimensional grid of a short-sleeved garment shown in an exemplary embodiment of the present application;
[0092] Figure 1DIt is a schematic diagram of a method of dividing a plate image and processing the plate image in blocks in an initial two-dimensional geometric image, shown in an exemplary embodiment of the present application;
[0093] Figure 1E is a schematic diagram of an initial two-dimensional geometric image and a target two-dimensional geometric image of a sleeveless dress shown in an exemplary embodiment of the present application;
[0094] Figure 1F is a schematic diagram of a target two-dimensional geometric image and a corresponding target three-dimensional mesh reconstructed therefrom, shown in an exemplary embodiment of the present application;
[0095] Figure 2A is a flowchart of a method for constructing an initial two-dimensional geometric image shown in an exemplary embodiment of the present application;
[0096] Figure 2B is a schematic diagram showing an exemplary embodiment of the present application for establishing a background grid on a plane where a two-dimensional grid is located;
[0097] Figure 3 It is a schematic diagram of a process for obtaining three-dimensional coordinates corresponding to a background grid point shown in an exemplary embodiment of the present application;
[0098] Figure 4 is a flowchart of reconstructing a two-dimensional geometric image shown in an exemplary embodiment of the present application;
[0099] Figure 5A is a structural schematic diagram of an image super-resolution network shown in an exemplary embodiment of the present application;
[0100] Figure 5B It is a schematic diagram of a three-dimensional grid presentation effect when a deformation gradient penalty term is applied to a loss function of an image super-resolution network, shown in an exemplary embodiment of the present application;
[0101] Fig. 6A is a schematic diagram of a target three-dimensional mesh reconstruction process shown in an exemplary embodiment of the present application;
[0102] Figure 6B is a schematic diagram of a two-dimensional grid vertex and its adjacent pixel points shown in an exemplary embodiment of the present application;
[0103] Figure 7 It is a schematic diagram of a three-dimensional mesh processing step shown in an exemplary embodiment of the present application;
[0104] Figure 8 is a structural schematic diagram of a three-dimensional grid processing device shown in an exemplary embodiment of the present application;
[0105] Fig. 9It is a hardware schematic diagram of an electronic device shown in an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0106] In some virtual scenes of three-dimensional objects, it is necessary to enhance the physical form and deformation effect of the object surface on a low-resolution three-dimensional mesh, such as enhancing the wrinkle effect on the clothing surface on a low-resolution three-dimensional clothing mesh, so as to maintain the efficiency of virtual applications while improving the realism of virtual objects.
[0107] Related technologies usually use the following methods to enhance the physical form and deformation effect of the surface of objects on low-resolution 3D meshes:
[0108] (1) Super-resolution method based on geometric mesh optimization: By pre-selecting a geometric optimization algorithm and a mesh interpolation method, the local curvature of the three-dimensional mesh is used for high-order nonlinear interpolation to improve mesh smoothness and enhance local physical details. However, this method is limited by the pre-selected algorithm, and the resulting detail effects are similar in the global range. It lacks sufficient flexibility and cannot adapt to the complex and changeable dynamic physical detail effects in practice.
[0109] (2) Physical simulation method based on multiple resolutions: First, use a low-resolution three-dimensional grid to perform physical simulation of the object to obtain a three-dimensional grid that reaches a force balance state, then gradually increase the resolution of the three-dimensional grid, and re-perform physical simulation calculations at each resolution level to achieve a force balance state, thereby obtaining a three-dimensional grid with enhanced detail effects at the high-resolution level. However, this method involves complex algorithms and calculation processes, high data processing costs, and multiple resolution levels of layer-by-layer physical simulation have the problem of simulation instability, which affects the processing effect.
[0110] (3) Super-resolution method based on normal map: The normal map based on the mesh represents the curvature information of the mesh. The low-resolution normal map corresponding to the low-resolution 3D mesh can be upgraded to a high-resolution normal map, and then the high-resolution 3D mesh corresponding to the high-resolution normal map is reconstructed according to the high-resolution normal map, thereby achieving low-resolution 3D mesh detail enhancement. However, since the normal map only contains the normal information of the mesh, the reconstructed 3D mesh lacks the planar deformation information, and it is difficult to obtain the corresponding mesh position from the normal map to achieve reconstruction.
[0111] It can be seen that the three-dimensional mesh detail enhancement effect of the processing method provided by the relevant technology has certain limitations. Complex resolution processing of low-resolution three-dimensional meshes involves complex algorithms and calculation processes, resulting in high data processing costs and great practical difficulty.
[0112] To solve the above problems, the present application provides a three-dimensional mesh processing method, which takes a two-dimensional geometric image containing geometric information of a low-resolution three-dimensional mesh as an operation object, and obtains the three-dimensional geometric information of the corresponding super-resolution three-dimensional mesh by performing image super-resolution on the two-dimensional geometric image corresponding to the three-dimensional mesh in the image space, thereby achieving enhanced processing of the physical morphology and deformation effect of the object surface on the low-resolution three-dimensional mesh, enriching the physical details of the object and enhancing the realism of the object.
[0113] The above method can be executed by a terminal, a server or a system including a terminal and a server, and is applicable to any applicable scenario that requires enhancing the physical form and deformation effect of the object surface on a low-resolution three-dimensional mesh. The scenario may include but is not limited to wrinkle enhancement of three-dimensional clothing meshes, stereo texture enhancement of low-resolution three-dimensional mesh rendering props, physical form effect enhancement of three-dimensional virtual building mesh rendering scenes, and surface form and texture enhancement of three-dimensional virtual object meshes.
[0114] See also Figure 1A The flowchart of the three-dimensional mesh processing method shown in FIG. 1 may include the following steps:
[0115] S101, according to the two-dimensional grid of the object to be processed, encoding the geometric information of the initial three-dimensional grid of the object to be processed to generate an initial two-dimensional geometric image; wherein the pixel points of the initial two-dimensional geometric image correspond in position to the points on the two-dimensional grid; the pixel values of the pixel points are determined according to the three-dimensional coordinates of the corresponding points on the two-dimensional grid in the initial three-dimensional grid;
[0116] A three-dimensional mesh refers to a collection of multiple vertices, edges and faces, which is used to represent a three-dimensional shape or the surface of an object; the geometric information of a three-dimensional mesh is used to describe properties such as the shape, structure, size and position of a three-dimensional object, and may include but is not limited to the three-dimensional coordinates of the vertices of the three-dimensional mesh, vertex connection relationships, texture mapping and other information.
[0117] The initial 3D mesh refers to a 3D mesh with a first resolution, and the physical form and deformation effect of the object surface presented by the 3D mesh needs to be enhanced to enhance the object's realism. For example, for a clothing wrinkle enhancement scene in a digital human live broadcast scene, the above-mentioned object to be processed refers to the clothing to be displayed, and its initial 3D mesh refers to a low-resolution 3D clothing mesh.
[0118] The two-dimensional mesh is a mapping of the initial three-dimensional mesh on a two-dimensional plane, and is composed of vertices, edges, and mesh units (such as triangles, quadrilaterals, etc.), which are consistent with the topological information of the corresponding three-dimensional mesh, and each vertex or face of the three-dimensional mesh corresponds to a point or region on the two-dimensional mesh. For example, during the UV unfolding process, the surface of the three-dimensional mesh is cut into a series of unfoldable plates and laid flat on a two-dimensional plane to generate a two-dimensional mesh, and the connection relationship between the vertices, edges, and regions in the two-dimensional mesh is consistent with the three-dimensional mesh.
[0119] The pixel value of a pixel is used to describe the color of the pixel in the image. The RGB (Red-Green-Blue) color model can be used to represent the pixel value of a pixel. The RGB color model describes the color of a pixel by the numerical value of three components. The value range of each component is usually 0-255. Different combinations of RGB values produce different colors. In this embodiment, the pixel value is used to represent the three-dimensional coordinate information of the vertex in the initial three-dimensional grid. When encoding the three-dimensional coordinates of the vertex into the pixel value of the corresponding pixel, the three RGB channels can be used to encode the three coordinate component values of the three-dimensional coordinates x, y, and z respectively as the pixel value of the pixel.
[0120] The initial two-dimensional geometric image is a visualization tool for representing the geometric information of a three-dimensional mesh. It is generated based on a two-dimensional mesh and displays the three-dimensional coordinate information of the vertices and internal areas on the three-dimensional mesh by means of pixel coding. Based on this, when encoding the initial three-dimensional mesh information into the initial two-dimensional geometric image, the shape and structure information of the initial three-dimensional mesh in the two-dimensional space is provided based on the two-dimensional mesh. The mapping relationship between the initial three-dimensional mesh and the corresponding two-dimensional mesh is known. By establishing a mapping relationship between the two-dimensional mesh and the initial two-dimensional geometric image, the three-dimensional coordinates of the vertices can be converted into the pixel values of the pixels on the initial two-dimensional geometric image, thereby realizing the mapping of the geometric information of the three-dimensional mesh to the two-dimensional image.
[0121] For example, a uniform background grid can be established in the plane space where the two-dimensional clothing grid is located, and each grid point of the background grid is set to represent a pixel point of the first two-dimensional geometric image, and a mapping relationship between the two-dimensional clothing grid and the first two-dimensional geometric image can be established through the grid points of the background grid; or, a blank first two-dimensional geometric image of the same size can be established according to the bounding box size of the two-dimensional clothing grid, and the first two-dimensional geometric image can be evenly divided into pixels, and a mapping relationship between the pixels and the coordinate system of the two-dimensional clothing grid can be established.
[0122] After constructing the correspondence between the pixel points of the initial two-dimensional geometric image and the points on the two-dimensional grid, the three-dimensional coordinates corresponding to the vertices in the two-dimensional grid on the three-dimensional grid and the positional relationship between the corresponding points of the pixel points on the two-dimensional grid and the vertices in the two-dimensional grid can be used to determine the three-dimensional coordinates corresponding to each pixel point, thereby associating the geometric information of the initial three-dimensional grid with the initial two-dimensional geometric image through the two-dimensional grid, and encoding the three-dimensional coordinates corresponding to the pixel points into pixel values of the pixel points, thereby achieving the encoding of the geometric information of the initial three-dimensional grid into the initial two-dimensional geometric image, so that the initial two-dimensional geometric image can not only display the two-dimensional grid layout, but also provide the corresponding three-dimensional coordinate information using pixel values, so as to facilitate intuitive viewing and processing of the geometric data of the three-dimensional grid on a two-dimensional plane.
[0123] For example, see Figure 1B A schematic diagram of an initial two-dimensional geometric image corresponding to a three-dimensional clothing grid is shown as an example, wherein each closed block corresponds to a closed area shape of a component pattern of a sleeveless skirt on a two-dimensional grid, and the color information inside the closed block is rendered according to the pixel value of the pixel point at the corresponding position, and the pixel value of the pixel point is encoded according to the three-dimensional coordinates of the mapping point of the corresponding background grid point on the two-dimensional grid, so that different pixel values in the figure represent different three-dimensional coordinates.
[0124] S102, for each of the plurality of plate images in the initial two-dimensional geometric image, dividing the plate image into a plurality of first image blocks, and performing image super-resolution enhancement processing on the plurality of first image blocks respectively to obtain a plurality of corresponding second image blocks; wherein the plurality of plate images correspond one-to-one to the constituent plates of the object to be processed;
[0125] The component pattern of the object to be processed includes multiple independent parts or components divided into the object to be processed according to its design, structure and function. The component pattern is the basic unit that constitutes the complete object to be processed. Each component pattern has a specific shape, size and function. For example, the component pattern of a sleeveless long skirt may include the front piece, the back piece and the skirt hem piece of the skirt. The component pattern is sewn in a set order and method to form the sleeveless long skirt.
[0126] In the process of mapping the initial three-dimensional grid to a two-dimensional grid, the shape and position information of the component plates of the object to be processed in the three-dimensional space are converted to a two-dimensional plane, and a closed area in the two-dimensional grid is formed to represent the projection of the component plates on the two-dimensional plane. The closed area is defined by lines or boundaries, and each area corresponds to a component plate of the object to be processed. Then, the initial two-dimensional geometric image generated based on the two-dimensional grid includes two-dimensional geometric images corresponding to different component plates. For example, Figure 1CAn initial three-dimensional grid and a two-dimensional grid schematic diagram of a garment are shown as an example (grid units of the two-dimensional grid are not shown), the object to be processed is a "short-sleeved shirt", and its component pieces include the front piece, the back piece, two sleeve connecting pieces and the neckline strip of the short-sleeved shirt, and the five closed areas in the two-dimensional grid correspond to different component pieces, respectively. The generated initial two-dimensional geometric image includes five pattern images corresponding to each closed area.
[0127] Since the amount of computational data for directly performing image super-resolution enhancement processing on the entire initial two-dimensional geometric image is large and the detailed features of the constituent plates may be ignored, the present embodiment divides the initial two-dimensional geometric image into plate images of different constituent plates according to the constituent plates of the object to be processed, and processes each plate image independently. For each plate image, by dividing the plate image into smaller image blocks, an independent image super-resolution enhancement processing can be performed on the local features of each image block to retain and enhance the local details and achieve a more refined and personalized processing effect, thereby enhancing the details and clarity of the entire initial two-dimensional geometric image. The super-resolution enhancement processing is used to convert a low-resolution image block into a high-resolution image block through an algorithm, thereby improving the details and clarity of the image block.
[0128] For example, for Figure 1C The two-dimensional grid of the object to be processed shown in FIG. 1 can correspond to the initial two-dimensional geometric image according to Figure 1D The schematic diagram of the plate image division and image blocking method shown is that it is divided according to the constituent plates to obtain 5 plate images, and each plate image is divided into multiple image blocks as shown in the figure, and image super-resolution enhancement processing is performed on each image block.
[0129] S103, performing image reconstruction processing according to the plurality of second image blocks to obtain a corresponding target two-dimensional geometric image;
[0130] The image reconstruction process is used to recombine multiple scattered image blocks into a complete and coherent image. In this embodiment, during the initial two-dimensional geometric image processing, super-resolution enhancement processing is performed on multiple first image blocks of each original plate image to improve the clarity and details of the image blocks. After step S102, multiple enhanced second image blocks are obtained. The image reconstruction process is used to combine the second image blocks that have undergone super-resolution enhancement processing into a high-resolution image corresponding to the original plate image to obtain an enhanced target two-dimensional geometric image, which includes richer geometric information features.
[0131] For example, Figure 1EA schematic diagram of an initial two-dimensional geometric image and a target two-dimensional geometric image of a sleeveless dress is shown as an example. After the above-mentioned image super-resolution enhancement processing, the color changes and image detail textures of the same component plates of the object to be processed in the target two-dimensional geometric image are clearer and richer than those in the initial two-dimensional geometric image. The color changes and image textures reflect the modification of the geometric information of the three-dimensional grid, thereby achieving the enhancement of the three-dimensional geometric information of the three-dimensional grid.
[0132] In the image reconstruction process, it is necessary to ensure that the position of each second image block is accurately aligned with the corresponding area in the original plate image. The second image block can be translated, rotated or scaled to ensure the spatial accuracy of the first image block and the second image block. After determining the position of each second image block, the second image block is merged and fused. The image block fusion algorithm can include weighted averaging, median filtering, Laplace pyramid and other methods. The specific fusion method can be selected according to the type of object to be processed and the image characteristics. In the fusion process, the boundaries between adjacent image blocks can be smoothed so that the reconstructed image transitions naturally at the boundary. After all the second image blocks are spliced, the global image can be further optimized, such as color correction, contrast enhancement, sharpening and other steps, to further improve the visual quality and clarity of the image, so that the target two-dimensional geometric image remains consistent and natural as a whole.
[0133] S104, determining the three-dimensional coordinates corresponding to each pixel point according to the pixel value of each pixel point in the target two-dimensional geometry, and generating the target three-dimensional grid of the object to be processed according to the three-dimensional coordinates corresponding to each pixel point and the position correspondence with the points on the two-dimensional grid.
[0134] In the process of generating an initial two-dimensional geometric image, the three-dimensional coordinate information of the points on the two-dimensional coordinates is encoded as pixel values and applied to the pixel points of the initial two-dimensional geometric image. Therefore, after the initial two-dimensional geometric image is subjected to image super-resolution enhancement processing, the pixel value of each pixel point in the target two-dimensional geometric image obtained represents the three-dimensional coordinate after super-resolution enhancement processing. By decoding the pixel value of the pixel point, the three-dimensional coordinate of the point on the two-dimensional grid corresponding to the pixel point can be restored, so that each vertex on the two-dimensional grid can be assigned three-dimensional coordinate information.
[0135] Since the two-dimensional grid is composed of vertices and defines the shape and layout of the object to be processed on the two-dimensional plane, by assigning three-dimensional coordinate information to each vertex on the two-dimensional grid, the target three-dimensional grid of the object to be processed can be reconstructed. The target three-dimensional grid not only retains the shape and structural information of the object to be processed, but also has richer spatial geometric information, corresponding to a second resolution, which is greater than the first resolution of the aforementioned initial three-dimensional grid. For example, Figure 1F The schematic diagram of a target two-dimensional geometric image and its corresponding target three-dimensional mesh reconstructed is shown in FIG. Figure 1B The initial 3D mesh shown shows the clothing wrinkle effect. The target 3D mesh shows clear details of the skirt wrinkles and a more realistic physical state of the skirt.
[0136] The process of determining the three-dimensional coordinates corresponding to the pixel point in the target two-dimensional geometric image based on the pixel value of the pixel point is the inverse process of determining the pixel value of the pixel point in the initial three-dimensional grid based on the three-dimensional coordinates of each vertex on the two-dimensional grid in step S101. The pixel value can be converted back to the three-dimensional coordinate value through the same processing algorithm and mapping relationship.
[0137] After obtaining the three-dimensional coordinates corresponding to each pixel point in the target two-dimensional geometric image, the three-dimensional coordinates of the corresponding point of the pixel point on the two-dimensional grid can be determined based on the correspondence between the pixel point and the point on the two-dimensional grid, and the three-dimensional coordinates of each vertex on the two-dimensional network can be obtained, so as to reconstruct a new three-dimensional grid based on the three-dimensional coordinates of each vertex of the two-dimensional grid. In the process of reconstructing a three-dimensional grid from a two-dimensional grid, for a simple three-dimensional grid, the vertices and edges / faces of the three-dimensional grid can be directly defined based on the two-dimensional grid, and for a complex grid, a special grid generation library or tool can be used to generate it, such as CGAL (Computational Geometry Algorithms Library) or the open source three-dimensional library Open3D.
[0138] In the disclosed embodiment, the geometric information of the initial three-dimensional mesh is mapped to a two-dimensional plane in an encoded manner to form a two-dimensional geometric image, and image super-resolution enhancement processing is performed in the image space for the plate images corresponding to each component plate in the two-dimensional geometric image to improve the image quality, thereby reducing the noise and error in the initial three-dimensional mesh, and the information in the two-dimensional geometric image after the image super-resolution enhancement is mapped back to the three-dimensional space, and the vertex positions and topological structure of the three-dimensional mesh are updated to generate a new three-dimensional mesh, thereby enriching the detailed information and geometric complexity of the physical form and deformation of the surface of the object in the three-dimensional mesh, enhancing the realism of the object presented by the three-dimensional mesh, and by simplifying the three-dimensional mesh processing problem to a two-dimensional plane for processing while retaining the geometric information of the three-dimensional mesh, the data calculation cost is reduced and the processing speed and efficiency are improved.
[0139] In some embodiments, with respect to the aforementioned step S101 of encoding the geometric information of the initial three-dimensional mesh of the object to be processed to generate an initial two-dimensional geometric image, see Figure 2A An exemplary embodiment shows a schematic flow chart of a method for constructing an initial two-dimensional geometric image. This step can be implemented in the following manner:
[0140] S201, establishing a background grid in the plane space where the two-dimensional grid is located, so that each background grid point of the background grid represents a pixel point of the initial two-dimensional geometric image; the range of the background grid is determined according to the bounding box range of the two-dimensional grid;
[0141] The background grid may be another grid overlaid on the two-dimensional grid or independent of the two-dimensional grid, and the background grid shares the same coordinate system as the two-dimensional grid. The grid point spacing of the background grid may be set based on experience or based on the average side length of the grid cells in the two-dimensional grid, and the grid point spacing may be directly set to the average side length or a multiple thereof. For example, if the grid cells in the two-dimensional grid are triangles, the mean of the side lengths of the triangles may be taken as the grid point spacing of the background grid.
[0142] The bounding box of the two-dimensional grid is used to describe the minimum rectangular area occupied by the two-dimensional grid vertices in the two-dimensional plane, and the minimum rectangular area is defined by the minimum and maximum values of all vertices in the two-dimensional grid on the x and y axes. That is, the left boundary of the bounding box is the minimum value of the x coordinate, the right boundary is the maximum value of the x coordinate, the lower boundary is the minimum value of the y coordinate, and the upper boundary is the maximum value of the y coordinate. Based on the bounding box boundary of the two-dimensional grid, the boundary of the background grid can be set to coincide with or be slightly larger than the bounding box boundary of the two-dimensional grid to ensure that all points in the two-dimensional grid can be covered by the background grid.
[0143] For example, see Figure 2B A schematic diagram of establishing a background grid on the plane where a two-dimensional grid is located is exemplarily shown. The closed area formed by the lines in the figure constitutes a two-dimensional grid as a whole. There are multiple vertices in the closed area and the vertices are connected to form grid units of the two-dimensional grid. For example, a small triangle marked in the figure is a grid unit on the two-dimensional grid. The boundary of the background grid is the same as the boundary of the bounding box of the two-dimensional grid. The vertex of each square grid in the background grid represents the pixel point at the corresponding position in the initial two-dimensional geometric image.
[0144] S202, for each background grid point in the two-dimensional grid, determining the three-dimensional coordinates corresponding to the background grid point according to the three-dimensional coordinates corresponding to the vertices of the grid unit where the background grid point is located in the two-dimensional grid;
[0145] According to the coordinate systems of the two-dimensional grid and the background grid, the two-dimensional coordinates of the background grid points on the background grid can be mapped to the coordinate system of the two-dimensional grid to establish a corresponding relationship between the background grid points and the points on the two-dimensional grid.
[0146] Based on the fact that the two-dimensional grid is a planar grid structure, including multiple grid units, and the vertices of each grid unit have corresponding three-dimensional coordinates in the initial three-dimensional grid, for each background grid point, when the coordinates of the background grid point mapped to the two-dimensional grid are within the closed area of the two-dimensional grid, the grid unit where the mapping point of the background grid point mapped to the two-dimensional grid is located can be determined, and the three-dimensional coordinates of the mapping point can be determined as the corresponding three-dimensional coordinates of the background grid point according to the corresponding three-dimensional coordinates of the vertices of the grid unit. Among them, when the mapping point of the background grid point mapped to the two-dimensional grid does not directly correspond to the vertex of the grid unit, the three-dimensional coordinates of the mapping point can be determined by linear interpolation or approximate calculation.
[0147] For each background grid point outside the two-dimensional grid, that is, when the coordinates of the background grid point mapped to the two-dimensional grid are outside the closed area of the two-dimensional grid, the grid background point may not be processed, or the three-dimensional coordinates corresponding to the background grid point may be set to a preset three-dimensional coordinate value, which does not coincide with the three-dimensional coordinates of any vertex in the two-dimensional grid, and the pixel value of the pixel point represented by the background grid point determined based on the preset three-dimensional coordinate value is different from the pixel value of the pixel point corresponding to each closed area in the two-dimensional grid, so as to accurately distinguish between each closed area in the two-dimensional grid and the background area in the initial two-dimensional geometric image.
[0148] Still Figure 2B For example, after mapping the background grid points in the background grid to the two-dimensional grid, for each background grid point in the closed area defined by the lines, the three-dimensional coordinates corresponding to the background grid point are determined by the three-dimensional coordinates corresponding to the vertices of the grid unit in which it is located. For example, for the background grid point A in the figure, assuming that the grid unit of the two-dimensional grid is a triangle, based on the mapping point of point A on the two-dimensional grid being inside the triangle shown in the figure, the three-dimensional coordinates corresponding to point A can be obtained by linear interpolation of the three-dimensional coordinates corresponding to the three vertices of the triangle; for the background grid point B in the figure, based on the mapping point of point B coinciding with the vertices of the triangle shown in the figure, the three-dimensional coordinates corresponding to point B are directly taken as the three-dimensional coordinates corresponding to the coinciding vertices.
[0149] S203, determining the pixel value of the pixel represented by the background grid point according to the three-dimensional coordinates corresponding to the background grid point, and generating the initial two-dimensional geometric image according to the pixel value of each background grid point and the two-dimensional grid.
[0150] The three-dimensional coordinates can be encoded as pixel values by normalizing the three-dimensional coordinates corresponding to the background grid points and mapping the normalized results to the color space. For example, if the pixel values are represented by RGB, the three-dimensional coordinates corresponding to each background grid point can be normalized so that the normalized values fall within the interval (0, 1), and the normalized values are mapped to the RGB color space to obtain the pixel value (r, g, b) of the pixel point represented by the background grid point, which represents the corresponding three-dimensional coordinate information.
[0151] In the process of mapping the normalized result to the color space, the mapping process can be implemented in any of the following ways: (1) direct mapping: directly mapping each dimension coordinate in the normalized result to a color channel; (2) HSV (Hue-Saturation-Value) to RGB mapping: converting the normalized result to HSV value, and then converting the HSV value to RGB value; (3) custom mapping: customizing the mapping function between the normalized result and the color space, so that the pixel value generation can be adjusted according to the needs.
[0152] The background grid points based on the background grid represent the pixel points of the initial two-dimensional geometric image. After the pixel values of the pixel points represented by them are obtained, the pixel points of the initial two-dimensional geometric image have pixel values, and the initial two-dimensional geometric image can be generated by rendering according to the pixel values of the pixel points.
[0153] In the embodiment of the present disclosure, a background grid is established on the plane where the two-dimensional grid is located, and the background grid points are used to represent the pixel points of the initial two-dimensional geometric image. Based on the positional relationship between the background grid points and the vertices on the two-dimensional grid, a mapping relationship between the initial two-dimensional geometric image and the two-dimensional grid is established, and the three-dimensional coordinates corresponding to the background grid points can be determined according to the three-dimensional coordinates of the vertices on the two-dimensional grid, thereby determining the pixel values of the pixel points in the initial two-dimensional geometric image and generating a two-dimensional geometric image, and accurately mapping the three-dimensional coordinates to the pixel points of the two-dimensional geometric image, so that the two-dimensional geometric image contains the geometric information of the object to be processed on the two-dimensional plane, and can reflect the geometric features of the three-dimensional grid, so that the modifications made on the two-dimensional image can be accurately reflected in the three-dimensional grid, so as to achieve high-precision three-dimensional grid processing.
[0154] In some embodiments, for the determination of the three-dimensional coordinates corresponding to the background grid points in the aforementioned step S202, the parameterized coordinates can provide an intuitive representation of the contribution of each vertex of the geometric shape to its internal interpolation points. When the parameterized coordinates are used for interpolation, the interpolation result will remain within the convex hull of the original shape. Therefore, this embodiment uses the parameterized coordinates for linear interpolation of the three-dimensional coordinates to determine the three-dimensional coordinates corresponding to the background grid points in the two-dimensional grid. Figure 3The schematic diagram of a process flow for obtaining the three-dimensional coordinates corresponding to a background grid point shown in the figure may include the following steps:
[0155] S301, determining parameterized coordinates of the background grid point according to the two-dimensional coordinates of the vertices of the grid unit where the background grid point is located; the parameterized coordinates are used to describe the position of the background grid point relative to the vertices of the grid unit;
[0156] The parameterized coordinates are used to describe the position of a point relative to the vertices of a certain geometric shape (such as a triangle, quadrilateral, etc.). In two-dimensional space, for a triangle, the parameterized coordinates are the barycentric coordinates, usually represented by three values (u, v, w), the sum of which is 1, and each value represents the relative distance from the point to a vertex of the triangle. For a quadrilateral, the parameterized coordinates are usually represented by two parameters (u, v), which can uniquely determine a point inside or on the boundary of the quadrilateral, and the range of the parameters is usually between [0, 1].
[0157] by Figure 2B For example, the coordinates of the three vertices of the triangular mesh unit are (m1, n1), (m2, n2), and (m3, n3), and the coordinates of the mapping point of the background mesh point A on the two-dimensional mesh are (m, n). Then the coordinates of the center of gravity (u, v, w) of the triangle of point A can be calculated by any of the following methods:
[0158] (1) Solving the equation: Based on u+v+w=1, m=u*m1+v*m2+w*m3, and n=u*n1+v*n2+w*n3, the values of u, v, and w can be calculated by solving the equation, thereby obtaining the centroid coordinates of point A;
[0159] (2) Area ratio solution: Calculate the area S of the triangular mesh unit, and calculate the areas S1, S2, and S3 of the three sub-triangles formed by point A and the two vertices. The centroid coordinates (u, v, w) are: u = S1 / S, v = S2 / S, w = S3 / S.
[0160] S302, obtaining the three-dimensional coordinates corresponding to the background grid point through linear interpolation processing according to the parameterized coordinates and the three-dimensional coordinates of the vertices of the grid unit where the background grid point is located.
[0161] After obtaining the parameterized coordinates, each value of the parameterized coordinates represents the contribution of the corresponding grid unit vertex to the point. When linear interpolation is used to calculate the three-dimensional coordinates corresponding to the background grid point, the coordinate value in each dimension is determined by the weighted average of the coordinate values of the vertices of the grid unit in that dimension under the parameterized coordinates.
[0162] For example, Figure 2B The coordinates of point A in the triangle are (u, v, w), and the three-dimensional coordinates of the three vertices of the triangle mesh unit are (x1, y1, z1), (x2, y2, z2), and (x3, y3, z3). The three-dimensional coordinates (x, y, z) obtained by linear interpolation of point A can be expressed as:
[0163] x= u* x1+ v* x2+ w* x3; y= u* y1+ v* y2+ w* y3; z= u* z1+ v* z2+ w* z3.
[0164] In the disclosed embodiment, the positions of background grid points relative to grid unit vertices are described by parameterized coordinates, and then combined with the three-dimensional coordinates of the grid unit vertices, the three-dimensional coordinates of the background grid points are obtained by linear interpolation, thereby avoiding shape distortion or deformation due to improper interpolation and achieving geometric consistency when the geometric information of the three-dimensional grid is encoded into a geometric image; and, by introducing parameterized coordinates, the calculation process of the three-dimensional coordinates is simplified and the calculation efficiency is improved.
[0165] In some embodiments, based on the fact that each background grid point of the background grid represents a pixel point on the initial two-dimensional geometric image, the process of generating the initial two-dimensional geometric image described in the aforementioned step S203 can reconstruct the two-dimensional geometric image according to the pixel values of the pixel points of the two-dimensional geometric image corresponding to the background grid and each background grid point, and includes the following steps:
[0166] Creating a blank geometric image with the same size as the background grid, and mapping the boundary points of each closed area in the two-dimensional grid to the blank geometric image to generate a rendering boundary;
[0167] For each background grid point in the background grid, pixel values of the pixels represented by the background grid point are used to fill the pixels at corresponding positions in the blank geometric image according to the rendering boundary to obtain the initial two-dimensional geometric image.
[0168] That is, first, according to the number of pixels represented by the background grid points, a corresponding blank geometric image is created, and the pixels of the blank geometric image correspond to the pixels represented by the background grid points. In order to make the final generated initial two-dimensional geometric image accurately reflect the geometric characteristics and structure of the original three-dimensional grid, the boundary points of the closed area are extracted from the two-dimensional grid, and these boundary points are mapped to the blank geometric image through the coordinate mapping relationship between the two-dimensional grid and the points on the background grid, and the mapping of the background grid to the pixels of the two-dimensional geometric image. According to the mapped boundary points, the corresponding boundary contour of the closed area can be drawn as the rendering boundary. Next, the pixel value of the pixel represented by each background grid point in the background grid is used to fill the pixel value of the pixel point at the corresponding position on the blank geometric image, and the color filling range does not exceed the rendering boundary, thereby generating an initial two-dimensional geometric image containing the boundary contour and internal color information of each closed area in the two-dimensional grid.
[0169] Based on the fact that some background grid points are outside the closed area on the two-dimensional grid when mapped to the coordinate system of the two-dimensional grid, the pixel value of the pixel represented by this type of background grid point may not be set, or may be set to a default pixel value. Therefore, in the above process for each background grid point in the background grid, for each background grid point, if the background grid point represents a pixel with a pixel value, the pixel value is used to fill the pixel at the corresponding position in the blank geometric image; if it represents that there is no pixel with a pixel value, that is, the pixel value is empty or undefined, the preset default pixel value can be used to fill the pixel at the corresponding position in the blank geometric image, or it can be chosen not to fill any color, that is, to keep the original blank state of the pixel.
[0170] For example, Figure 1B The schematic diagram of the initial two-dimensional geometric image corresponding to the three-dimensional clothing grid is shown as an example. Each closed block corresponds to the closed area shape of a component pattern of the clothing on the two-dimensional grid. The color information inside the closed block is rendered according to the pixel value of the pixel point at the corresponding position. The pixel value of the pixel point is encoded according to the three-dimensional coordinates of the mapping point of the corresponding background grid point on the two-dimensional grid, so that different pixel values in the figure represent different three-dimensional coordinates. For other areas except the closed blocks in the initial two-dimensional geometric image, when the background grid points representing the pixel points of such areas are mapped to the two-dimensional grid, the parts outside the closed area on the two-dimensional grid can use the preset pixel value (255,255,255), that is, the white color shown in the figure to fill the corresponding pixel points.
[0171] In the disclosed embodiment, by accurately mapping the boundary points of the closed area of the two-dimensional grid to the two-dimensional image as the rendering boundary, and utilizing the correspondence between the background grid and the two-dimensional image, color filling is performed by traversing the background grid points, thereby greatly simplifying the conversion process from three-dimensional to two-dimensional geometric images, improving the efficiency of generating two-dimensional geometric images, and ensuring that the generated two-dimensional geometric images can accurately reflect the geometric features and structure of the original three-dimensional grid.
[0172] In some embodiments, based on the image super-resolution enhancement processing performed on each first image block of the plate image in the aforementioned step S102, there may be inconsistencies between the boundaries of adjacent image blocks of the same plate image. Therefore, in this embodiment, for the aforementioned step S102 of dividing the plate image into multiple first image blocks, in the process of dividing the first image blocks, the plate image can be divided into blocks according to a preset image block size, and an overlapping area of a set pixel width is set to be reserved between adjacent first image blocks. This block division method allows the existence of a common part between adjacent first image blocks, and the image super-resolution enhancement processing will be performed on the part in both first image blocks, thereby increasing the continuity of the two image blocks at the boundary.
[0173] For example, assuming that a plate image is 1000x1000 pixels in size, it is divided into image blocks of 256x256 pixels for super-resolution enhancement. In order to avoid the problem of inconsistent boundaries, a 16-pixel wide overlap area is set between adjacent image blocks. The division process of the plate image is:
[0174] Starting from the upper left corner of the plate image, a 6x256 pixel first image block patch_1 is divided, whose upper left corner coordinates are (0,0) and lower right corner coordinates are (255,255); when moving rightward to divide the first image block patch_2 adjacent to patch_1, its upper left corner coordinates are (240,0) and lower right corner coordinates are (495,255), overlapping with patch_1 by 16 pixels in the horizontal direction; moving rightward and downward in the above manner, each time a new first image block is divided, the first image block retains 16 pixels of overlap with the first image block adjacent to itself in the horizontal and vertical directions.
[0175] Based on the overlapping area of the set pixel width reserved between adjacent first image blocks, there are the same overlapping areas between adjacent second image blocks after image super-resolution enhancement processing. When performing image reconstruction processing, it is necessary to process the pixel fusion of the overlapping area so that the reconstructed image smoothly transitions at the fusion boundary of each second image block without obvious seams or artifacts. Based on this, in this embodiment, in the image reconstruction processing process of the aforementioned step S103, an overlapping area smoothing processing step and a second image block splicing and fusion step can be included, that is, the overlapping area on the adjacent second image blocks is firstly subjected to overlapping area fusion processing to obtain the pixel information of the overlapping area, and then, according to the position of each second image block and the pixel information of the overlapping area on the second image block, each second image block is spliced and fused into a target two-dimensional geometric image, and compared with the initial two-dimensional geometric image, the target two-dimensional geometric image includes richer three-dimensional grid geometric information. Among them, the processing method of the overlapping area can include calculating the weighted average of the coordinates of the pixels in the overlapping area, performing median filtering processing on the overlapping area, Gaussian mixture method, applying Laplace smoothing processing, and the like.
[0176] In some embodiments, in the image reconstruction process of step S103, when Laplace smoothing is applied to implement the overlapping area fusion processing of the second image block, as shown in FIG. Figure 4 The flowchart of target two-dimensional geometric image reconstruction shown in FIG. 1 , step S103 may at least include the following steps:
[0177] S401, for a first pixel row in an overlapping area between adjacent second image blocks, obtaining an average value of coordinates of pixels corresponding to the first pixel row in the adjacent second image blocks;
[0178] For the overlapping area between adjacent second image blocks, for each pixel row in the area, the average coordinates of the pixels corresponding to the pixel row in the two image blocks are calculated to preliminarily fuse the pixel coordinates of the two image blocks in the overlapping area.
[0179] For example, the second image block 1 includes pixel rows a, b, and c, and the adjacent second image block 2 includes pixel rows b, c, and d. The overlapping area of the two corresponds to pixel rows b and c. For pixel row b, for each pixel point of the pixel row, its coordinates in the second image block 1 and the second image block 2 are Pl and Pr respectively, then the coordinate average value P= (Pl +Pr) / 2.
[0180] S402, generating coordinates of the first pixel row subjected to Laplace smoothing according to pixel coordinate information of a second pixel row adjacent to the first pixel row;
[0181] For each pixel row in the overlapping area, in order to ensure that the fused image has better smoothness between adjacent pixel rows and reduce the unevenness, Laplace smoothing is applied to each first pixel row. For the first pixel row, the pixel coordinate information of the second pixel row adjacent to the first pixel row is obtained, and the Laplace smoothed coordinates of the first pixel row are obtained by using the average operation of the pixel coordinate information in the adjacent second pixel row. For example, the average value of the coordinates of the pixel points at the same position on the second pixel row can be directly taken to obtain the Laplace smoothed coordinates of the first pixel row; or, the weighted calculation of the pixel coordinates on the second pixel row can be performed according to the distance between the pixel points, the color difference or other factors to obtain the Laplace smoothed coordinates of the first pixel row.
[0182] In one example, when an adjacent second pixel row belongs to a pixel row in an overlapping area, the coordinate average of the corresponding pixels in the second pixel row can be calculated according to step S401, and then the coordinates of the Laplace smoothing processing of the first pixel row can be calculated based on the coordinate average of the corresponding pixels in the second pixel row.
[0183] For example, still taking the above pixel row b as an example, its adjacent second pixel rows are pixel row a and pixel row c, respectively. For each pixel point on pixel row b, the coordinate average of the pixel points at the same position in pixel row a and pixel row c can be directly taken as the coordinate of the Laplace smoothing process of the pixel point. Since pixel row c exists in both the second image block 1 and the second image block 2, the coordinate average of pixel row c can be calculated by step S401, and then the coordinate of pixel row b for Laplace smoothing process is determined according to the coordinate average of pixel row a and pixel row c.
[0184] S403, according to a preset weight factor, merging the coordinate average corresponding to the first pixel row with the coordinate processed by Laplace smoothing to obtain pixel coordinates of the first pixel row;
[0185] The weight factor is used to balance the influence of Laplace smoothing and direct averaging of coordinate values on the fusion result, and can be set based on experience. For example, the weight factor is set as , then the fusion of the results of step S401 and step S402 can be expressed as , where 𝑃 represents the coordinates of the Laplace smoothing process in step S402, Indicates the average coordinate value of step S401.
[0186] S404: Fusing the adjacent second image blocks according to the pixel coordinates of the first pixel rows to generate the target two-dimensional geometric image.
[0187] Using the fused pixel coordinates obtained in step S403, adjacent second image blocks are fused in the overlapping area to complete the image reconstruction process, generate a final target two-dimensional geometric image, and obtain a smooth and seamlessly spliced target two-dimensional geometric image.
[0188] In the image reconstruction process, after processing the overlapping area, the edge of the second image block can also be smoothed using an image fusion algorithm (such as multi-band fusion, Poisson fusion, etc.) to further reduce the seam effect. Based on the process of image processing and super-resolution enhancement, some noise or artifacts may be introduced. In the final stage of image reconstruction, filters (such as Gaussian filters, bilateral filters, etc.) or other noise suppression algorithms can be used for noise suppression.
[0189] In the disclosed embodiment, by calculating the coordinate average value and Laplace smoothing processing, and combining the weight factor for fusion, smooth fusion of adjacent image blocks in the overlapping area is achieved, effectively reducing the non-smoothness in the fused image, thereby improving the image quality of the reconstructed target two-dimensional geometric image.
[0190] In some embodiments, the image super-resolution enhancement processing is performed on the plurality of first image blocks respectively in the aforementioned step S102 to obtain corresponding second image blocks. The image super-resolution enhancement processing is implemented by the following steps:
[0191] Extract low-frequency features of the first image block; use the low-frequency features to characterize overall information of the first image block; generate corresponding high-frequency features based on the low-frequency features; use the high-frequency features to characterize detail information of the first image block; combine the low-frequency features with the high-frequency features to generate the second image block.
[0192] Among them, in image processing, low-frequency features usually refer to regional features in an image that change slowly and smoothly, and are used to characterize the overall structure or shape of the image. For example, in a geometric image corresponding to a three-dimensional clothing mesh, low-frequency features may include characteristic information such as the basic shape, outline, or general texture of the clothing. The low-frequency features can be extracted through various filters such as Gaussian filters, low-pass filters, etc., or they can be automatically learned and extracted using convolutional neural networks in deep learning.
[0193] In contrast to low-frequency features, high-frequency features can be used to characterize fast-changing and detailed feature information in an image. For example, in a geometric image of a clothing mesh, high-frequency features may include clothing wrinkles, texture details, physical deformation, and other feature information. The high-frequency features may be generated by one or more neural network layers, such as convolutional layers, upsampling layers, and the like.
[0194] Based on the geometric position of the three-dimensional mesh encoded in the initial two-dimensional geometric image, the low-frequency features of the image correspond to low-frequency geometric information, and the high-frequency features correspond to high-frequency geometric information. Therefore, high-quality detail information can appear in the target three-dimensional mesh restored by the target two-dimensional geometric image reconstructed by image super-resolution enhancement processing, such as high-quality wrinkle details in the clothing mesh.
[0195] Combining low-frequency features with high-frequency features refers to fusing the two features together to generate a second image block that contains both overall structure and rich details. The low-frequency and high-frequency features can be combined through common fusion strategies, or the fusion can be achieved by inputting the feature maps corresponding to the two features into one or more additional neural network layers through deep learning.
[0196] In the embodiments of the present disclosure, the image super-resolution enhancement processing generates a super-resolution image with high-quality details by extracting low-frequency features, generating high-frequency features, and combining these two features, thereby ensuring that while increasing the image resolution, the overall structure of the image is not lost or destroyed, and enhancing the detail information of the image.
[0197] In some embodiments, the image super-resolution enhancement processing of the aforementioned step S102 can also be implemented by a pre-trained image super-resolution network, by inputting the first image block into the pre-trained image super-resolution network, obtaining a super-resolution sub-image block output by the image super-resolution network, as the second image block corresponding to the first image block; the image super-resolution network is used to extract low-frequency features of the input first image block, and generate corresponding high-frequency features, and generate an enhanced second image block based on the low-frequency features and the high-frequency features.
[0198] The image super-resolution network is pre-trained on an open source image super-resolution network to be suitable for super-resolution enhancement processing of two-dimensional geometric images in this embodiment. The pre-training process can use two-dimensional geometric images with different resolutions as training samples, input a low-resolution first sample geometric image into the image super-resolution network, compare the predicted geometric image output by the network with a high-resolution second sample geometric image corresponding to the first sample geometric image, and iterate the network parameters of the image super-resolution network by minimizing the loss function until a preset convergence condition is reached, thereby completing the pre-training of the image super-resolution network.
[0199] The loss function of the image super-resolution network is used to measure the difference between the super-resolution geometric image predicted by the network and the actual high-resolution geometric image, and may include at least one loss function among L1 loss, L2 loss, perceptual loss, etc.
[0200] See also Figure 5AThe schematic diagram of the structure of an image super-resolution network is shown as an example. The image super-resolution network may include at least a shallow feature extraction layer, a deep feature extraction layer and a high-quality image reconstruction layer. The shallow feature extraction layer is used to extract low-frequency geometric features of the image input to the network through operations such as convolution, such as local and detail information at the pixel level (such as edges, textures, etc.), so as to quickly capture the basic structure and details of the image and provide a basis for subsequent processing; the deep feature extraction layer is used to extract high-level semantic features in the image through a deep network structure such as a multi-layer residual convolutional network shown in the figure. The high-level semantic features contain more abstract information and contextual relationships, so as to capture the complex structure and details in the image. For example, the residual convolutional network may include a normalization layer, a multi-attention layer and a multi-layer perceptron; the high-quality image reconstruction layer is used to fuse the shallow features with the deep features, and use the fused feature information to generate or restore the missing details in the high-resolution image. The high-quality image reconstruction layer will output a reconstructed high-resolution image, which retains the basic structure and details of the original image input to the network while adding more high-frequency information and details.
[0201] In the embodiments of the present disclosure, by utilizing a pre-trained image super-resolution network, a deep learning method is introduced into the image super-resolution enhancement process, thereby achieving image super-resolution enhancement. Super-resolution enhancement processing can be performed on two-dimensional geometric images quickly and efficiently, saving a large amount of computing resources and time, and effectively improving the clarity and detail richness of the image.
[0202] In some embodiments, the deformation gradient is used to describe the rate and direction of change of the surface shape of an object, and the image super-resolution network is enabled to perceive the out-of-plane curvature and in-plane deformation strain of the three-dimensional mesh. In order to enhance the physical form and deformation effect in the target three-dimensional mesh finally generated, the loss function of the above-mentioned image super-resolution network may also include a first-order derivative information loss function term, that is, a deformation gradient penalty term, to improve the geometric information processing capability of the image super-resolution network. The first-order derivative information loss function term is constructed according to the deformation gradients of each pixel in the image in different directions.
[0203] The definition of deformation gradient is as follows: Assume Represents the pixel at the intersection of the i-th row and the j-th column in the coordinate graph. The deformation gradient of the pixel at this point can be calculated using the finite difference method as follows:
[0204]
[0205]
[0206] in represents 2 times the pixel bandwidth size, Represents the horizontal gradient of the pixel. Represents the vertical gradient of the pixel point, and its corresponding deformation gradient derivative can be expressed as:
[0207]
[0208]
[0209]
[0210]
[0211] like Figure 5B A schematic diagram of the three-dimensional mesh presentation effect when the deformation gradient penalty term is applied to the loss function of the image super-resolution network. When the deformation gradient is applied to enhance the initial two-dimensional geometric image, the clothing wrinkle effect presented by the reconstructed target three-dimensional mesh is better than the wrinkle detail effect without using the deformation gradient.
[0212] In the disclosed embodiment, by introducing a deformation gradient penalty term into the loss function of the image super-resolution network, the network is helped to better understand the geometric information in the two-dimensional geometric image and capture the changes in the surface shape of the object, thereby enhancing the network's ability to process geometric information, thereby improving the physical morphology accuracy of the target three-dimensional mesh finally generated.
[0213] In some embodiments, when the three-dimensional coordinates are normalized as recorded in step S203, and the normalized results are mapped to the color space to determine the pixel values of the pixels, the three-dimensional coordinates corresponding to each pixel in the target two-dimensional geometry are determined according to the pixel values of each pixel in the aforementioned step S104. This can be achieved by using the inverse process, that is, inverse mapping the pixel values of the pixel points from the color space to the normalized three-dimensional coordinates, and performing an inverse normalization operation on the inverse mapping results, thereby obtaining the three-dimensional coordinates corresponding to the pixel point.
[0214] In the disclosed embodiment, after obtaining a target two-dimensional geometric image that has undergone image super-resolution enhancement processing on an initial two-dimensional geometric image, the pixel values of the pixel points of the target two-dimensional geometric image are restored to three-dimensional coordinates by adopting the inverse process of determining the pixel values of the pixel points when generating the initial two-dimensional geometric image, and a new three-dimensional grid can be reconstructed based on the three-dimensional coordinates and the two-dimensional grid, thereby avoiding complex geometric calculations or optimization processes, simplifying the generation process from two-dimensional images to three-dimensional grids, and thus improving processing efficiency.
[0215] In some embodiments, see Fig. 6AThe target three-dimensional mesh reconstruction process diagram shown in the figure, for the process of generating the target three-dimensional mesh of the object to be processed described in the aforementioned step S104, when the three-dimensional coordinates corresponding to each pixel point on the target two-dimensional geometric image are determined, based on the correspondence between the pixel points on the target two-dimensional geometric image and the two-dimensional mesh, the reconstruction from the two-dimensional geometric image to the three-dimensional mesh can be achieved through the following steps:
[0216] S601, for each vertex in the two-dimensional grid, determining adjacent pixel points of the vertex according to a position correspondence between pixel points in the target two-dimensional geometric image and points on the two-dimensional grid;
[0217] S602, obtaining the three-dimensional coordinates of the vertex by linear interpolation according to the three-dimensional coordinates corresponding to the adjacent pixels of the vertex;
[0218] That is, after determining the three-dimensional coordinates corresponding to each pixel point on the target two-dimensional geometric image, the new three-dimensional coordinates of each vertex on the two-dimensional grid of the object to be processed are re-determined according to the three-dimensional coordinates of the pixel points after the image super-resolution enhancement process, so as to update the geometric information contained in the two-dimensional grid. For each vertex on the two-dimensional grid, based on the correspondence between the pixel points and the points on the two-dimensional grid, the pixel points adjacent to the vertex can be determined, and the three-dimensional coordinates of the vertex in the target three-dimensional grid after the image super-resolution enhancement can be determined by linear interpolation by calculating the parameterized coordinates of the vertex relative to the adjacent pixel points and combining the three-dimensional coordinates corresponding to the adjacent pixel points, so as to provide a data basis for the reconstruction of the three-dimensional grid.
[0219] For example, Figure 6B A schematic diagram of a two-dimensional grid vertex and its adjacent pixels is shown as an example, where vertex D is adjacent to pixels F1, F2, F3, and F4 respectively. The parameterized coordinates (u, v) of D can be determined through the two-dimensional coordinates of D and the adjacent pixels. Thus, the three-dimensional coordinates of D can be obtained by bilinear interpolation based on the parameterized coordinates (u, v) and the three-dimensional coordinates corresponding to the pixels F1, F2, F3, and F4.
[0220] S603: Generate the target three-dimensional mesh according to the three-dimensional coordinates of the vertices and the topological information of the two-dimensional mesh.
[0221] The topological information of the two-dimensional grid is used to provide the connection relationship between vertices. By combining the three-dimensional coordinates of the vertices on the two-dimensional grid with the connection relationship of the vertices, the corresponding target three-dimensional grid can be quickly reconstructed. The three-dimensional coordinates of the vertices on the target three-dimensional grid are the three-dimensional coordinates calculated in step S602.
[0222] In the embodiment of the present disclosure, the three-dimensional coordinates of the pixel points after image super-resolution enhancement processing are used in combination with linear interpolation to determine the three-dimensional coordinates of the vertices of the two-dimensional mesh, which accurately reflects the geometric shape and surface details of the object to be processed and improves the computational efficiency. The three-dimensional mesh is reconstructed based on the three-dimensional coordinates of the vertices and the topological information of the two-dimensional mesh, so that the reconstructed three-dimensional mesh maintains and enhances the details and features of the local area while maintaining the overall shape of the object to be processed.
[0223] In order to enable those skilled in the art to better understand the 3D mesh processing method provided by the present application, the following is an example of enhancing the wrinkle effect on a low-resolution 3D clothing mesh to illustrate the method provided by the present application. In this embodiment, the grid units of the 3D clothing mesh and the 2D clothing mesh are both triangles, and the image super-resolution enhancement processing of the 2D geometric image is implemented through an image super-resolution network. The loss function of the image super-resolution includes a deformation gradient penalty term to better generate complex wrinkle details, see Figure 7 The schematic diagram of the three-dimensional mesh processing steps shown in FIG. 1 may include:
[0224] Step 1 (conversion from 3D clothing mesh to 2D geometric image):
[0225] The geometric information of the low-resolution three-dimensional garment mesh is encoded into a first two-dimensional geometric image.
[0226] The essence of this step is to rasterize the triangular mesh units on the two-dimensional network, and transfer the information represented by the triangular unit mesh to the grid points of the uniform grid, thereby forming a two-dimensional geometric image. Based on the mapping relationship between the known three-dimensional clothing mesh and the corresponding two-dimensional clothing mesh, the corresponding relationship between the pixel points of the first two-dimensional geometric image and the points on the two-dimensional clothing mesh can be established, for example, a uniform background mesh is established on the two-dimensional clothing mesh, so as to facilitate the conversion of the three-dimensional coordinates of the vertices into the pixel values of the pixel points on the first two-dimensional geometric image, thereby realizing the mapping of the geometric information of the three-dimensional mesh to the two-dimensional image.
[0227] When the mapping point of a pixel point on the first two-dimensional geometric image on the two-dimensional clothing grid falls inside the triangle of the two-dimensional grid, the centroid coordinates of the mapping point relative to the triangle can be calculated, and a linear interpolation operation is performed based on the three-dimensional coordinates of the vertices of the triangle on the three-dimensional clothing grid combined with the centroid coordinates to obtain the three-dimensional coordinates of the mapping point. The pixel value (r, g, b) of the pixel point corresponds to the three-dimensional coordinates of the mapping point.
[0228] When encoding the three-dimensional coordinate values into pixel values, the coordinate values can be normalized first so that the processed values fall within the interval (0, 1), and the normalized results are mapped to the RGB color space to obtain the corresponding pixel values. The image size of the first two-dimensional geometric image can be determined according to the bounding box size of the two-dimensional clothing grid.
[0229] When the mapping point of the first two-dimensional geometric image on the two-dimensional clothing grid does not fall within the triangle of the two-dimensional grid, the RGB value of this type of pixel point can be set to (0, 0, 0), which is different from the pixel value of each pixel point within the triangle of the two-dimensional grid.
[0230] Step 2 (geometric image division for super-resolution enhancement and reconstruction):
[0231] For each plate geometric image of the constituent plate of the object to be processed in the first two-dimensional geometric image, the plate geometric image is divided into blocks, and each image block is input into the image super-resolution network for processing. By performing high-quality image reconstruction on the output image blocks, an enhanced second two-dimensional geometric image is obtained, and local area overlap is retained between adjacent image blocks to enhance geometric continuity.
[0232] In order to improve the efficiency and generalization ability of the image super-resolution network, the first two-dimensional geometric image of the clothing mesh needs to be processed in blocks. Since the input received by the image super-resolution neural network is a block-processed image block, the image super-resolution network has no obvious perception of the shape information of the clothing pattern, so that the trained network can be applied to the super-resolution processing tasks of different styles of clothing or patterns.
[0233] In addition, block processing improves the computational efficiency and parallelism of the image super-resolution network, thereby improving the efficiency of the overall task. Based on the fact that each image block is independently input into the image super-resolution network, in order to ensure the continuity of information at the boundaries of the image blocks, when the plate geometry image is processed in blocks, a certain width of overlapping areas is reserved between adjacent image blocks, such as 2 pixels.
[0234] The image super-resolution network is used to perform super-resolution enhancement on the geometric information contained in the first two-dimensional geometric image corresponding to the low-resolution three-dimensional clothing mesh, and obtain the second two-dimensional geometric image corresponding to the high-resolution three-dimensional clothing mesh containing richer geometric information. The image super-resolution network first extracts the low-frequency features in the first two-dimensional geometric image, then extracts and generates the corresponding high-frequency features, and finally combines the low-frequency features with the high-frequency features to construct the final second two-dimensional geometric image with high-quality details. In the process of reconstructing the image block output by the image super-resolution network into the second two-dimensional geometric image, the edge of the image block is processed by Laplace smoothing to ensure the smoothness of the overlapping boundaries.
[0235] Based on the fact that what is encoded in the first two-dimensional geometric image is the geometric position of the three-dimensional clothing mesh, the low-frequency feature corresponds to the low-frequency geometric information of the clothing mesh, and the high-frequency feature corresponds to the high-frequency geometric information of the clothing mesh. High-quality wrinkle details can appear on the high-resolution three-dimensional clothing mesh reconstructed by the second two-dimensional geometric image.
[0236] Step 3 (convert the enhanced 2D geometric image into a 3D mesh):
[0237] The enhanced second two-dimensional geometric image is converted into mesh geometric information, so as to reconstruct a three-dimensional mesh based on the mesh geometric information. After obtaining the second two-dimensional geometric image, the three-dimensional coordinate values of the corresponding pixel points can be obtained by inverse mapping and inverse normalization of the pixel values (r, g, b). Based on the three-dimensional coordinate values of each pixel point, the three-dimensional coordinate values corresponding to the vertices on the two-dimensional clothing mesh can be obtained by linear interpolation of the coordinate values of the four neighboring pixel points around the vertex, so as to reconstruct a new three-dimensional mesh based on the three-dimensional coordinates of the vertices on the two-dimensional mesh, which presents rich wrinkle details compared to the low-resolution three-dimensional clothing mesh. For example, Figure 7 Comparing the left and right clothing images shown in , the three-dimensional clothing mesh obtained by processing with the method of the present application presents richer and clearer wrinkle details.
[0238] This application proposes a method of using a geometric image corresponding to a three-dimensional clothing mesh as an operation object, and performing image super-resolution processing on a two-dimensional geometric image corresponding to the three-dimensional clothing mesh in image space, thereby obtaining the three-dimensional geometric information of the corresponding super-resolution three-dimensional mesh, greatly enriching the details of the folds of the clothing and enhancing the realism of the clothing. Since the two-dimensional geometric image encodes the position information of the three-dimensional mesh, there is no need to generate the mesh position from the normal map, and the two-dimensional image super-resolution method can be fully utilized to process the three-dimensional clothing mesh super-resolution task, simplifying the processing flow of the three-dimensional mesh and improving the processing efficiency.
[0239] Corresponding to the above-mentioned embodiment of the three-dimensional grid processing method, see Figure 8 As shown, the present application also provides an embodiment of a three-dimensional grid processing device, the device comprising:
[0240] The initial geometric image generation module 801 is used to encode the geometric information of the initial three-dimensional grid of the object to be processed to generate an initial two-dimensional geometric image according to the two-dimensional grid of the object to be processed; wherein the pixel points of the initial two-dimensional geometric image correspond to the points on the two-dimensional grid in position; the pixel values of the pixel points are determined according to the three-dimensional coordinates of the corresponding points on the two-dimensional grid in the initial three-dimensional grid;
[0241] The super-resolution enhancement module 802 is used for dividing each of the multiple plate images in the initial two-dimensional geometric image into multiple first image blocks, and performing image super-resolution enhancement processing on the multiple first image blocks respectively to obtain multiple corresponding second image blocks; wherein the multiple plate images correspond one-to-one to the constituent plates of the object to be processed;
[0242] A geometric image reconstruction processing module 803 is used to perform image reconstruction processing according to the plurality of second image blocks to obtain a corresponding target two-dimensional geometric image;
[0243] The target three-dimensional grid generation module 804 is used to determine the three-dimensional coordinates corresponding to each pixel point according to the pixel value of each pixel point in the target two-dimensional geometry, and generate the target three-dimensional grid of the object to be processed according to the three-dimensional coordinates corresponding to each pixel point and the position correspondence with the points on the two-dimensional grid.
[0244] In some embodiments, the initial geometric image generation module includes:
[0245] A background grid establishment module is used to establish a background grid in the plane space where the two-dimensional grid is located, so that each background grid point of the background grid represents a pixel point of the initial two-dimensional geometric image; the range of the background grid is determined according to the bounding box range of the two-dimensional grid;
[0246] A background grid point coordinate determination module, for determining the three-dimensional coordinates corresponding to each background grid point in the two-dimensional grid according to the three-dimensional coordinates corresponding to the vertices of the grid unit where the background grid point is located in the two-dimensional grid;
[0247] The pixel value determination and image generation module is used to determine the pixel value of the pixel point represented by the background grid point according to the three-dimensional coordinates corresponding to the background grid point, and generate the initial two-dimensional geometric image according to the pixel value of each background grid point and the two-dimensional grid.
[0248] In some embodiments, the background grid point coordinate determination module is specifically used to:
[0249] Determining parameterized coordinates of the background grid point according to the two-dimensional coordinates of the vertices of the grid unit where the background grid point is located; the parameterized coordinates are used to describe the position of the background grid point relative to the vertices of the grid unit;
[0250] The three-dimensional coordinates corresponding to the background grid point are obtained by linear interpolation according to the parameterized coordinates and the three-dimensional coordinates of the vertices of the grid unit where the background grid point is located in the initial three-dimensional grid.
[0251] In some embodiments, the pixel value determination and image generation module is specifically used to:
[0252] For each background grid point in the background grid, normalizing the three-dimensional coordinates corresponding to the background grid point;
[0253] The normalized three-dimensional coordinate values are mapped to a color space to obtain pixel values of the pixels represented by the background grid points.
[0254] In some embodiments, the target three-dimensional grid generation module is specifically used to:
[0255] Inversely map the pixel value of the pixel point from the color space to the normalized three-dimensional coordinates;
[0256] An inverse normalization operation is performed on the result of the inverse mapping to obtain the three-dimensional coordinates corresponding to the pixel point.
[0257] In some embodiments, the pixel value determination and image generation module is specifically used to:
[0258] Creating a blank geometric image with the same size as the background grid, and mapping the boundary points of each closed area in the two-dimensional grid to the blank geometric image to generate a rendering boundary;
[0259] For each background grid point in the background grid, pixel values of the pixels represented by the background grid point are used to fill the pixels at corresponding positions in the blank geometric image according to the rendering boundary to obtain the initial two-dimensional geometric image.
[0260] In some embodiments, the super-resolution enhancement module is specifically used to:
[0261] The plate image is divided into blocks according to a preset image block size; wherein an overlapping area of a set pixel width is reserved between adjacent first image blocks.
[0262] In some embodiments, based on retaining overlapping areas between adjacent second image blocks, the geometric image reconstruction processing module is specifically used to:
[0263] For a first pixel row in an overlapping area between adjacent second image blocks, obtaining an average value of coordinates of pixels corresponding to the first pixel row in the adjacent second image blocks;
[0264] generating coordinates of the first pixel row subjected to Laplace smoothing according to pixel coordinate information of a second pixel row adjacent to the first pixel row;
[0265] According to a preset weight factor, the average coordinate value corresponding to the first pixel row is merged with the coordinate processed by Laplace smoothing to obtain the pixel coordinates of the first pixel row;
[0266] The adjacent second image blocks are fused according to the pixel coordinates of the first pixel rows to generate the target two-dimensional geometric image.
[0267] In some embodiments, the super-resolution enhancement module is specifically used to:
[0268] Extracting low-frequency features of the first image block; the low-frequency features are used to represent overall information of the first image block;
[0269] Generate corresponding high-frequency features according to the low-frequency features; the high-frequency features are used to characterize detail information of the first image block;
[0270] The low-frequency feature is combined with the high-frequency feature to generate the second image block.
[0271] In some embodiments, the super-resolution enhancement module is specifically used to:
[0272] The first image block is input into a pre-trained image super-resolution network to obtain a super-resolution sub-image block output by the image super-resolution network as a second image block corresponding to the first image block; wherein the image super-resolution network is used to implement the image super-resolution enhancement processing.
[0273] In some embodiments, the loss function of the image super-resolution network includes a first-order derivative information loss function term; the first-order derivative information loss function term is constructed according to the deformation gradient of each pixel in the image in different directions.
[0274] In some embodiments, the target three-dimensional grid generation module is specifically used to:
[0275] For each vertex in the two-dimensional grid, determining adjacent pixel points of the vertex according to the position correspondence between the pixel points in the target two-dimensional geometric image and the points on the two-dimensional grid;
[0276] Obtaining the three-dimensional coordinates of the vertex by linear interpolation according to the three-dimensional coordinates corresponding to the adjacent pixels of the vertex;
[0277] The target three-dimensional mesh is generated according to the three-dimensional coordinates of the vertices and the topological information of the two-dimensional mesh.
[0278] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0279] The present application also provides an electronic device. The structural diagram of the electronic device is as follows: Fig. 9 As shown, the electronic device 900 includes at least one processor 901, a memory 902 and a bus 903, and the at least one processor 901 is electrically connected to the memory 902; the memory 902 is configured to store at least one computer-executable instruction, and the processor 901 is configured to execute the at least one computer-executable instruction, thereby executing the steps of any three-dimensional mesh processing method provided in any embodiment or any optional implementation manner in the present application.
[0280] Furthermore, the processor 901 may be a Field-Programmable Gate Array (FPGA) or other devices with logic processing capabilities, such as a Microcontroller Unit (MCU) or a Central Process Unit (CPU).
[0281] An embodiment of the present application also provides another readable storage medium storing a computer program, which is used to implement the steps of any three-dimensional mesh processing method provided in any embodiment or any optional implementation manner in the present application when executed by a processor.
[0282] The readable storage medium provided in the embodiments of the present application includes, but is not limited to, any type of disk (including floppy disk, hard disk, optical disk, CD-ROM, and magneto-optical disk), ROM (Read-Only Memory), RAM (Random Access Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic card or optical card. In other words, the readable storage medium includes any medium that can store or transmit information in a readable form by a device (e.g., a computer).
[0283] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A three-dimensional grid processing method, characterized in that: The method comprises: According to the two-dimensional grid of the object to be processed, the geometric information of the initial three-dimensional grid of the object to be processed is encoded to generate an initial two-dimensional geometric image; wherein the pixel points of the initial two-dimensional geometric image correspond to the points on the two-dimensional grid in position; the pixel values of the pixel points are determined according to the three-dimensional coordinates of the corresponding points on the two-dimensional grid in the initial three-dimensional grid; For each of the plurality of plate images in the initial two-dimensional geometric image, the plate image is divided into a plurality of first image blocks, and image super-resolution enhancement processing is performed on the plurality of first image blocks respectively to obtain a plurality of corresponding second image blocks; wherein the plurality of plate images correspond one-to-one to the constituent plates of the object to be processed; Performing image reconstruction processing according to the plurality of second image blocks to obtain a corresponding target two-dimensional geometric image; According to the pixel value of each pixel point in the target two-dimensional geometry, the three-dimensional coordinates corresponding to each pixel point are determined, and according to the three-dimensional coordinates corresponding to each pixel point and the position correspondence with the points on the two-dimensional grid, the target three-dimensional grid of the object to be processed is generated.
2. The method according to claim 1, characterized in that The step of encoding the geometric information of the initial three-dimensional grid of the object to be processed to generate an initial two-dimensional geometric image comprises: Establishing a background grid in the plane space where the two-dimensional grid is located, so that each background grid point of the background grid represents a pixel point of the initial two-dimensional geometric image; the range of the background grid is determined according to the bounding box range of the two-dimensional grid; For each background grid point in the two-dimensional grid, determine the three-dimensional coordinates corresponding to the background grid point according to the three-dimensional coordinates corresponding to the vertices of the grid unit where the background grid point is located in the two-dimensional grid; According to the three-dimensional coordinates corresponding to the background grid points, the pixel values of the pixels represented by the background grid points are determined, and according to the pixel value of each background grid point and the two-dimensional grid, the initial two-dimensional geometric image is generated.
3. The method according to claim 2, characterized in that The determining the three-dimensional coordinates corresponding to the background grid point according to the three-dimensional coordinates corresponding to the vertices of the grid unit where the background grid point is located in the two-dimensional grid includes: Determining parameterized coordinates of the background grid point according to the two-dimensional coordinates of the vertices of the grid unit where the background grid point is located; the parameterized coordinates are used to describe the position of the background grid point relative to the vertices of the grid unit; The three-dimensional coordinates corresponding to the background grid point are obtained by linear interpolation according to the parameterized coordinates and the three-dimensional coordinates of the vertices of the grid unit where the background grid point is located in the initial three-dimensional grid.
4. The method according to claim 2, characterized in that: The step of determining the pixel value of the pixel represented by the background grid point according to the three-dimensional coordinates corresponding to the background grid point includes: For each background grid point in the background grid, normalizing the three-dimensional coordinates corresponding to the background grid point; The normalized three-dimensional coordinate values are mapped to a color space to obtain pixel values of the pixels represented by the background grid points.
5. The method according to claim 4, characterized in that Determining the three-dimensional coordinates corresponding to each pixel point according to the pixel value of each pixel point in the target two-dimensional geometry includes: Inversely map the pixel value of the pixel point from the color space to the normalized three-dimensional coordinates; An inverse normalization operation is performed on the result of the inverse mapping to obtain the three-dimensional coordinates corresponding to the pixel point.
6. The method according to claim 2, characterized in that The step of generating the initial two-dimensional geometric image according to the pixel value of each background grid point and the two-dimensional grid comprises: Creating a blank geometric image with the same size as the background grid, and mapping the boundary points of each closed area in the two-dimensional grid to the blank geometric image to generate a rendering boundary; For each background grid point in the background grid, pixel values of the pixels represented by the background grid point are used to fill the pixels at corresponding positions in the blank geometric image according to the rendering boundary to obtain the initial two-dimensional geometric image.
7. The method according to claim 1, characterized in that The step of dividing the plate image into a plurality of first image blocks comprises: The plate image is divided into blocks according to a preset image block size; wherein an overlapping area of a set pixel width is reserved between adjacent first image blocks.
8. The method according to claim 7, characterized in that The image reconstruction process is performed according to the plurality of second image blocks to obtain a corresponding target two-dimensional geometric image, including: For a first pixel row in an overlapping area between adjacent second image blocks, obtaining an average value of coordinates of pixels corresponding to the first pixel row in the adjacent second image blocks; generating coordinates of the first pixel row subjected to Laplace smoothing according to pixel coordinate information of a second pixel row adjacent to the first pixel row; According to a preset weight factor, the average coordinate value corresponding to the first pixel row is merged with the coordinate processed by Laplace smoothing to obtain the pixel coordinates of the first pixel row; The adjacent second image blocks are fused according to the pixel coordinates of the first pixel rows to generate the target two-dimensional geometric image.
9. The method according to claim 1, characterized in that: The performing image super-resolution enhancement processing on the plurality of first image blocks respectively to obtain corresponding second image blocks comprises: Extracting low-frequency features of the first image block; the low-frequency features are used to represent overall information of the first image block; Generate corresponding high-frequency features according to the low-frequency features; the high-frequency features are used to characterize detail information of the first image block; The low-frequency feature is combined with the high-frequency feature to generate the second image block.
10. The method according to claim 1, characterized in that The performing image super-resolution enhancement processing on the plurality of first image blocks respectively to obtain corresponding second image blocks comprises: The first image block is input into a pre-trained image super-resolution network to obtain a super-resolution sub-image block output by the image super-resolution network as a second image block corresponding to the first image block; wherein the image super-resolution network is used to implement the image super-resolution enhancement processing.
11. The method according to claim 10, characterized in that The loss function of the image super-resolution network includes a first-order derivative information loss function term; the first-order derivative information loss function term is constructed according to the deformation gradient of each pixel in the image in different directions.
12. The method according to claim 1, characterized in that The step of generating a target three-dimensional grid of the object to be processed according to the three-dimensional coordinates corresponding to each pixel point and the position correspondence with the points on the two-dimensional grid comprises: For each vertex in the two-dimensional grid, determining adjacent pixel points of the vertex according to the position correspondence between the pixel points in the target two-dimensional geometric image and the points on the two-dimensional grid; Obtaining the three-dimensional coordinates of the vertex by linear interpolation according to the three-dimensional coordinates corresponding to the adjacent pixels of the vertex; The target three-dimensional mesh is generated according to the three-dimensional coordinates of the vertices and the topological information of the two-dimensional mesh.
13. A three-dimensional grid processing device, characterized in that: The device comprises: An initial geometric image generation module is used to encode the geometric information of the initial three-dimensional grid of the object to be processed to generate an initial two-dimensional geometric image according to the two-dimensional grid of the object to be processed; wherein the pixel points of the initial two-dimensional geometric image correspond to the points on the two-dimensional grid in position; and the pixel values of the pixel points are determined according to the three-dimensional coordinates of the corresponding points on the two-dimensional grid in the initial three-dimensional grid; a super-resolution enhancement module, for dividing each of the plurality of plate images in the initial two-dimensional geometric image into a plurality of first image blocks, and performing image super-resolution enhancement processing on the plurality of first image blocks respectively, to obtain a plurality of corresponding second image blocks; wherein the plurality of plate images correspond one-to-one to the constituent plates of the object to be processed; A geometric image reconstruction processing module, used for performing image reconstruction processing according to the plurality of second image blocks to obtain a corresponding target two-dimensional geometric image; The target three-dimensional grid generation module is used to determine the three-dimensional coordinates corresponding to each pixel point according to the pixel value of each pixel point in the target two-dimensional geometry, and generate the target three-dimensional grid of the object to be processed according to the three-dimensional coordinates corresponding to each pixel point and the position correspondence with the points on the two-dimensional grid.
14. An electronic device, characterized in that: include: Memory, processor; The memory is used to store computer programs; The processor is used to call the computer program to implement the method according to any one of claims 1-12.
15. A readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 12 is implemented.
