Geometric normal image generation method and device, geometric normal image reconstruction method and device, equipment and medium

By constructing a relaxation function and applying it to a three-dimensional surface mesh, the problem of the cumbersome generation process of existing geometric normal images is solved, and efficient generation of geometric normal images is achieved, and the generation efficiency and reliability are improved.

CN120047526AActive Publication Date: 2025-05-27SHENZHEN UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510116495.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-24
Publication Date
2025-05-27
Estimated Expiration
2045-01-24

AI Technical Summary

Technical Problem

The generation process of existing geometric normal images is cumbersome, which is not conducive to improving the generation efficiency of geometric normal images.

Method used

By obtaining the three-dimensional surface mesh of the three-dimensional model and the corresponding normal information of each grid, a relaxation function is constructed, and the relaxation function is applied to the three-dimensional surface mesh according to the set iteration interval and iteration amplitude, and the relaxation operation is performed round by round until the number of iterations meets the preset conditions. Then the relaxed three-dimensional surface mesh is rasterized to generate a geometric normal image.

Benefits of technology

The generation time of geometric normal image is reduced, the generation efficiency of geometric normal image is improved, and the reliability of the image is improved, avoiding the influence of manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120047526A_ABST
    Figure CN120047526A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of information, and discloses a geometric normal image generation method and device, a reconstruction method and device, equipment and a medium, and the method comprises the steps: obtaining normal information corresponding to each grid surface in a three-dimensional surface grid; constructing a relaxation function based on normal information corresponding to each grid surface in the three-dimensional surface grid and a predefined construction mode; applying the relaxation function to the three-dimensional surface grid according to a set iteration interval and iteration amplitude, performing relaxation operation round by round, and recording the number of iterations; when the number of iterations meets a preset condition, the relaxation operation is stopped, and a relaxed three-dimensional surface grid is obtained; performing rasterization processing on the relaxed three-dimensional surface grid to obtain a two-dimensional image; and generating a geometric normal image based on the normal information corresponding to each grid surface and the two-dimensional image. According to the method, the geometric normal image can be generated, and the three-dimensional surface grid can be reconstructed according to the geometric normal image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information technology, and in particular to a method and device for generating a geometric normal image, a reconstruction method, a device, a device, and a medium. Background Art

[0002] Geometric normal images play an important role in aspects such as scene rendering of 3D games, production of movie special effects, and experience optimization of virtual reality. Because geometric normal images can enhance the rendering effect by simulating surface details without increasing geometric complexity, which can not only ensure the rendering quality but also reduce the demand for computing resources.

[0003] However, the existing process of generating geometric normal images is cumbersome and not conducive to improving the generation efficiency of geometric normal images. The reason is that the existing technology mainly uses manual operations to generate geometric normal images, and the manual generation method consumes a large amount of human and time resources, increasing the generation time of geometric normal images and being easily affected by manual intervention. Therefore, it is not conducive to improving the generation efficiency of geometric normal images. Summary of the Invention

[0004] The present invention provides a method and device for generating a geometric normal image, a computer device, and a storage medium to solve the technical problem that the existing process of generating geometric normal images is cumbersome and not conducive to improving the generation efficiency of geometric normal images.

[0005] In a first aspect, the present application provides a method for generating a geometric normal image, including:

[0006] Obtain the three-dimensional surface mesh of a three-dimensional model, and obtain the normal information corresponding to each mesh face in the three-dimensional surface mesh;

[0007] Based on the normal information corresponding to each mesh face in the three-dimensional surface mesh and a predefined construction method, construct a relaxation function;

[0008] Apply the relaxation function to the three-dimensional surface mesh at a set iteration interval and iteration amplitude, perform relaxation operations round by round and record the number of iterations;

[0009] When the number of iterations meets a preset condition, stop the relaxation operation to obtain a relaxed three-dimensional surface mesh;

[0010] Perform rasterization processing on the relaxed three-dimensional surface mesh to obtain a two-dimensional image;

[0011] Generate a geometric normal image based on the normal information corresponding to each mesh face and the two-dimensional image.

[0012] Further, the constructing a relaxation function based on the normal information corresponding to each mesh face in the three-dimensional surface mesh and a predefined construction method includes:

[0013] Obtain the configuration file and read the Gaussian convolution kernel in the configuration file;

[0014] Construct a relaxation function according to the normal information corresponding to each mesh face in the three-dimensional surface mesh and the Gaussian convolution kernel.

[0015] Further, the applying the relaxation function to the three-dimensional surface mesh at a set iteration interval and iteration amplitude, performing relaxation operations round by round and recording the number of iterations includes:

[0016] Obtain the relaxation factor and the update amount, and select the product of the relaxation factor and the update amount as the iteration amplitude;

[0017] Apply the relaxation function to the three-dimensional surface mesh at a set iteration interval and iteration amplitude, perform relaxation operations round by round and record the number of iterations.

[0018] Further, the stopping the relaxation operation when the number of iterations meets a preset condition to obtain the relaxed three-dimensional surface mesh includes:

[0019] When the number of iterations is the target number, obtain a stop instruction;

[0020] Execute the stop instruction, stop the relaxation operation, and obtain the three-dimensional surface mesh after relaxation processing.

[0021] Further, the rasterizing the relaxed three-dimensional surface mesh to obtain a two-dimensional image includes:

[0022] Rasterize the relaxed three-dimensional surface mesh through a preset rasterization algorithm to obtain a plurality of pixel fragments;

[0023] Save the plurality of pixel fragments, obtain a synthesis instruction, and execute the synthesis instruction to synthesize the plurality of pixel fragments into a two-dimensional image.

[0024] Further, the generating a geometric normal image based on the normal information corresponding to each mesh face and the two-dimensional image includes:

[0025] Write the normal information corresponding to each mesh face into the pixel information of the two-dimensional image to obtain the modified pixel information of the two-dimensional image;

[0026] Generate a geometric normal image according to the modified pixel information of the two-dimensional image.

[0027] In a second aspect, the present application provides a reconstruction method, and the reconstruction method includes:

[0028] Obtain a geometric normal image, read the data information in the geometric normal image, and from the data information, obtain the normal information corresponding to each mesh face and the vertex information corresponding to each mesh face; according to the vertex information corresponding to each mesh face, determine the center coordinate information corresponding to each mesh face; generate a model through preset projection position data, process the center coordinate information corresponding to each mesh face and the normal information corresponding to each mesh face to obtain the projection position data of each vertex on the target plane; use the least squares optimization method to perform a global fusion operation on the adjusted projection position data of each vertex on the target plane to generate a reconstruction result.

[0029] In a third aspect, the present application provides a geometric normal image generation device, including:

[0030] A first acquisition module, configured to acquire the three-dimensional surface mesh of the three-dimensional model and acquire the normal information corresponding to each mesh face in the three-dimensional surface mesh;

[0031] A construction module, configured to construct a relaxation function based on the normal information corresponding to each mesh face in the three-dimensional surface mesh and a predefined construction method;

[0032] An iteration module, configured to apply the relaxation function to the three-dimensional surface mesh at a set iteration interval and iteration amplitude, perform relaxation operations round by round and record the number of iterations;

[0033] A reading module, configured to stop the relaxation operation when the number of iterations meets a preset condition to obtain the relaxed three-dimensional surface mesh;

[0034] A processing module, configured to perform rasterization processing on the relaxed three-dimensional surface mesh to obtain a two-dimensional image;

[0035] A generation module, configured to generate a geometric normal image based on the normal information corresponding to each mesh face and the two-dimensional image.

[0036] In a fourth aspect, the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above geometric normal image generation method are implemented.

[0037] In a fifth aspect, the present application provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above geometric normal image generation method are implemented.

[0038] The present application provides a method, apparatus, computer device, and storage medium for generating a geometric normal image. The method includes obtaining a three-dimensional surface mesh of a three-dimensional model and obtaining the normal information corresponding to each mesh face in the three-dimensional surface mesh; constructing a relaxation function based on the normal information corresponding to each mesh face in the three-dimensional surface mesh and a predefined construction method; applying the relaxation function to the three-dimensional surface mesh at a set iteration interval and iteration amplitude, performing relaxation operations round by round and recording the number of iterations; stopping the relaxation operation when the number of iterations meets a preset condition to obtain a relaxed three-dimensional surface mesh; performing rasterization processing on the relaxed three-dimensional surface mesh to obtain a two-dimensional image; and generating a geometric normal image based on the normal information corresponding to each mesh face and the two-dimensional image. The beneficial effects are in two aspects. On the one hand, rasterization processing is performed on the relaxed three-dimensional surface mesh to obtain a two-dimensional image, and a geometric normal image is generated based on the normal information corresponding to each mesh face and the two-dimensional image. Since no manual operation is required, the generation time of the geometric normal image is reduced, which is beneficial to improving the generation efficiency of the geometric normal image. On the other hand, since the geometric normal image is automatically generated and not affected by manual intervention, the reliability of the geometric normal image is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments of the present invention. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0040] Figure 1 is a schematic diagram of the application environment of the geometric normal image generation method in an embodiment of the present invention;

[0041] Figure 2 is a flowchart of the geometric normal image generation method provided in an embodiment of the present invention;

[0042] Figure 3 is Figure 2 a flowchart of step S23 in

[0043] Figure 4 is Figure 2 a flowchart of step S25 in

[0044] Figure 5 is a flowchart of the reconstruction method provided in an embodiment of the present invention;

[0045] Figure 6 is a schematic diagram of the structure of the geometric normal image generation apparatus in an embodiment of the present invention;

[0046] Figure 7It is a schematic structural diagram of a computer device in an embodiment of the present invention;

[0047] Figure 8 It is a segmentation diagram of a three-dimensional surface network provided by an embodiment of the present invention;

[0048] Figure 9 It is a sample diagram of a geometric normal image provided by an embodiment of the present invention;

[0049] Figure 10 It is a sample diagram of a reconstruction result provided by an embodiment of the present invention. Specific embodiments

[0050] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0051] Please refer to Figure 1 , Figure 1 It is a schematic application environment diagram of a geometric normal image generation method in an embodiment of the present invention. The geometric normal image generation method provided by the embodiment of the present invention can be applied in an application environment such as Figure 1 , where the client communicates with the server through the network.

[0052] The server obtains the three-dimensional surface mesh of the three-dimensional model through the client, and obtains the normal information corresponding to each mesh face in the three-dimensional surface mesh;

[0053] Based on the normal information corresponding to each mesh face in the three-dimensional surface mesh and a predefined construction method, a relaxation function is constructed;

[0054] According to the set iteration interval and iteration amplitude, the relaxation function is applied to the three-dimensional surface mesh, and relaxation operations are performed round by round and the iteration times are recorded;

[0055] When the iteration times meet the preset conditions, the relaxation operation is stopped to obtain the relaxed three-dimensional surface mesh;

[0056] The relaxed three-dimensional surface mesh is rasterized to obtain a two-dimensional image;

[0057] Based on the normal information corresponding to each mesh face and the two-dimensional image, a geometric normal image is generated.

[0058] In the solution implemented by the above geometric normal image generation method, device, equipment and medium, the beneficial effects are in two aspects. On the one hand, rasterize the relaxed three-dimensional surface mesh to obtain a two-dimensional image; generate a geometric normal image based on the normal information corresponding to each mesh face and the two-dimensional image. Since no manual operation is required, the generation time of the geometric normal image is reduced, which is beneficial to improving the generation efficiency of the geometric normal image. On the other hand, since the geometric normal image is automatically generated and not affected by manual intervention, it is beneficial to improve the reliability of the geometric normal image.

[0059] Among them, the device running the client is simply referred to as: client device.

[0060] Among them, the device running the server is simply referred to as: server device.

[0061] Among them, the client device includes but is not limited to smart phones, personal computers, vehicle networking terminals, tablet computers and portable wearable devices.

[0062] Among them, the server device can be implemented by an independent server or a server cluster composed of multiple servers.

[0063] The present invention will be described in detail below through specific embodiments.

[0064] Please refer to Figure 2 , Figure 2 which is a flowchart of a geometric normal image generation method provided by an embodiment of the present invention, including the following steps:

[0065] S21, obtain the three-dimensional surface mesh of the three-dimensional model, and obtain the normal information corresponding to each mesh face in the three-dimensional surface mesh;

[0066] Among them, the three-dimensional surface mesh of the three-dimensional model is an important part of the three-dimensional model. The three-dimensional surface mesh is composed of many basic geometric units, which are usually triangles or quadrilaterals. Triangles or quadrilaterals are connected to each other to form a network structure covering the surface of the three-dimensional object.

[0067] S22, construct a relaxation function based on the normal information corresponding to each mesh face in the three-dimensional surface mesh and a predefined construction method;

[0068] Among them, the constructing a relaxation function based on the normal information corresponding to each mesh face in the three-dimensional surface mesh and a predefined construction method includes:

[0069] Obtain a configuration file and read the Gaussian convolution kernel in the configuration file;

[0070] Construct a relaxation function according to the normal information corresponding to each mesh face in the three-dimensional surface mesh and the Gaussian convolution kernel.

[0071] Exemplarily, the relaxation function is:

[0072] G(N) = conv(N, type);

[0073] Where G(N) is the relaxation function, conv is the convolution operation, type is the Gaussian convolution kernel, and N is the serial number, representing the normal information corresponding to the Nth grid face in the three-dimensional solid grid.

[0074] Among them, the Gaussian convolution kernel is a kind of filter. The Gaussian convolution kernel defines the weights of the convolution kernel using the Gaussian function. The characteristic of the Gaussian function is that the weight of the center point is the largest, and as the distance from the center point increases, the weight gradually decreases until it approaches zero. This way of weight distribution enables the Gaussian convolution kernel to effectively smooth the image during image convolution operations, reduce noise, and at the same time retain the main features of the image.

[0075] S23. Apply the relaxation function to the three-dimensional surface grid according to the set iteration interval and iteration amplitude, perform relaxation operations round by round and record the number of iterations;

[0076] Exemplarily, applying the relaxation function to the three-dimensional surface grid according to the set iteration interval and iteration amplitude, performing relaxation operations round by round and recording the number of iterations includes:

[0077] Among them, applying the relaxation function to the three-dimensional surface grid according to the set iteration interval and iteration amplitude. In each round, perform relaxation operations on the three-dimensional surface grid through the relaxation function and record the number of iterations of the relaxation operation.

[0078] Among them, the iteration interval refers to the interval of time or steps between each iteration, which determines the update frequency of the algorithm.

[0079] Among them, the iteration amplitude refers to the amplitude of parameter or state update during each iteration, which reflects the step size of the algorithm moving in the search space.

[0080] S24. When the number of iterations meets the preset conditions, stop the relaxation operation to obtain the relaxed three-dimensional surface grid;

[0081] Among them, when the number of iterations meets the preset conditions, stop the relaxation operation to obtain the relaxed three-dimensional surface grid, including:

[0082] When the number of iterations reaches the target number, obtain the stop instruction;

[0083] Execute the stop instruction, stop the relaxation operation, and obtain the three-dimensional surface grid after relaxation processing.

[0084] Exemplarily, execute a stop instruction to stop the relaxation operation and obtain the three-dimensional surface mesh after relaxation processing, including:

[0085] Execute a stop instruction to stop the relaxation operation, obtain the relaxation results obtained in each round of executing the relaxation operation, and combine the relaxation results obtained in each round of executing the relaxation operation to obtain the three-dimensional surface mesh after the relaxation operation.

[0086] Among them, the three-dimensional surface mesh after relaxation processing is the combination of all rounds of relaxation operations.

[0087] Among them, when the number of iterations reaches the target number, obtain a stop instruction. Since the relaxation operation stops after reaching the predetermined target number, unnecessary calculations are avoided, which is beneficial to reducing the computational amount of the relaxation operation.

[0088] S25, perform rasterization processing on the three-dimensional surface mesh after relaxation to obtain a two-dimensional image;

[0089] Among them, the three-dimensional surface mesh after relaxation processing becomes smoother and more continuous, and the two-dimensional image projected or rendered from the three-dimensional surface mesh after relaxation processing onto a two-dimensional plane will also correspondingly exhibit higher visual quality, making the two-dimensional image look more natural and delicate.

[0090] In addition, the three-dimensional surface mesh after relaxation processing has undergone multiple relaxation processes, which can reduce unnecessary distortions or deformations. Therefore, the two-dimensional image projected from the three-dimensional surface mesh after relaxation processing onto a two-dimensional plane is beneficial to reducing the geometric distortion generated during the three-dimensional to two-dimensional conversion process, thereby maintaining the accuracy of the object shape and proportion in the two-dimensional image.

[0091] S26, generate a geometric normal image based on the normal information corresponding to each mesh face and the two-dimensional image.

[0092] Among them, generating a geometric normal image based on the normal information corresponding to each mesh face and the two-dimensional image includes:

[0093] Write the normal information corresponding to each mesh face into the pixel information of the two-dimensional image to obtain the modified pixel information of the two-dimensional image;

[0094] Generate a geometric normal image according to the modified pixel information of the two-dimensional image.

[0095] Exemplarily, generating a geometric normal image according to the modified pixel information of the two-dimensional image includes:

[0096] Input the modified pixel information of the two-dimensional image into a rendering engine, and generate a geometric normal image by processing the modified pixel information of the two-dimensional image through the rendering engine.

[0097] In the embodiments of the present invention, the beneficial effects are in two aspects. On the one hand, rasterize the relaxed three-dimensional surface mesh to obtain a two-dimensional image; generate a geometric normal image based on the normal information corresponding to each mesh face and the two-dimensional image. Since no manual operation is required, the generation time of the geometric normal image is reduced, which is beneficial to improving the generation efficiency of the geometric normal image. On the other hand, since the geometric normal image is automatically generated and not affected by manual intervention, it is beneficial to improve the reliability of the geometric normal image.

[0098] Please refer to Figure 3 , Figure 3 which Figure 2 is the schematic flowchart of step S23 in

[0099] S31, obtain the relaxation factor and the update amount, and select the product of the relaxation factor and the update amount as the iteration amplitude;

[0100] Among them, the relaxation factor is a value between 0 and 1, which is used to adjust the iteration amplitude. When the relaxation factor is close to 0, it means that the iteration amplitude in each iteration is small, and the relaxation function tends to converge slowly;

[0101] When the relaxation factor is close to 1, the iteration amplitude in each iteration is large, and the convergence speed of the relaxation function may be accelerated.

[0102] S32, apply the relaxation function to the three-dimensional surface mesh according to the set iteration interval and iteration amplitude, perform relaxation operations round by round and record the number of iterations. Exemplarily, applying the relaxation function to the three-dimensional surface mesh according to the set iteration interval and iteration amplitude, performing relaxation operations round by round and recording the number of iterations includes:

[0103] Among them, apply the relaxation function to the three-dimensional surface mesh according to the set iteration interval and iteration amplitude. In each round, perform a relaxation operation on the three-dimensional surface mesh through the relaxation function and record the number of iterations of the relaxation operation.

[0104] Among them, the iteration interval makes it possible that in each iteration, each point in the input space can be uniquely transformed into a point in the output space, and this transformation process is reversible, that is, each point in the output space can also be uniquely transformed back into a point in the input space. Therefore, the entire iteration process is reversible. This means that no matter how many times the iteration is performed, it is possible to accurately backtrack to any point in the iteration sequence by applying the same iteration rules and intervals in reverse.

[0105] In the embodiments of the present invention, by combining the optimization of the iteration interval and amplitude, it is also possible to better control the error accumulation and computational complexity during the iteration process, making the iteration method more efficient and reliable when processing three-dimensional surface meshes.

[0106] See also Figure 4 , Figure 4 yes Figure 2 The flow chart of step S25 is described in detail as follows:

[0107] S41, performing rasterization processing on the relaxed three-dimensional surface mesh by using a preset rasterization algorithm to obtain a plurality of pixel fragments;

[0108] Among them, relaxation processing can optimize the grid structure of the three-dimensional surface mesh, reduce redundancy and complexity, and make the rasterization process smoother and more efficient. Through rasterization processing, the relaxed three-dimensional surface mesh can be converted into a series of pixel fragments, each of which contains the projection information and corresponding depth of the relaxed three-dimensional surface mesh on the two-dimensional plane.

[0109] S42, saving the plurality of pixel fragments, obtaining a synthesis instruction, executing the synthesis instruction, and synthesizing the plurality of pixel fragments into a two-dimensional image.

[0110] In an embodiment of the present invention, a synthesis instruction is obtained, the synthesis instruction is executed, and multiple pixel fragments are synthesized into a two-dimensional image. The two-dimensional image, as a carrier of the three-dimensional surface mesh, has the advantage of being easy to store, transmit and process. Compared with the three-dimensional surface mesh, the two-dimensional image occupies less storage space, has a faster transmission speed and higher processing efficiency. In this way, efficient data exchange and information sharing can be achieved under limited resource conditions.

[0111] See also Figure 5 , Figure 5 FIG. 1 is a flow chart of a reconstruction method provided by an embodiment of the present invention, which is described in detail as follows:

[0112] S51, obtaining a geometric normal image, reading data information in the geometric normal image, and obtaining normal information corresponding to each mesh surface and vertex information corresponding to each mesh surface from the data information;

[0113] The normal information corresponding to the mesh surface is a vector, and the vector is perpendicular to the mesh surface.

[0114] S52, determining the center coordinate information corresponding to each mesh surface according to the vertex information corresponding to each mesh surface;

[0115] S53, generating a model through preset projection position data, processing the center coordinate information corresponding to each mesh surface and the normal information corresponding to each mesh surface, and obtaining the projection position data of each vertex on the target plane;

[0116] Exemplarily, the projection position data generation model is:

[0117]

[0118] Among them, p i,i (v k,L ) represents the projection position data of vertex v k,k on the target plane. The row index of vertex v k,k is k, and the column index of vertex v k,k is L;

[0119] Among them, c(i, j) is the center point of the plane with normal n(i, j);

[0120] Among them, c(i, j) is the central coordinate information corresponding to the grid face with row index i and column index j, is the z coordinate of the central coordinate information;

[0121] Among them, n(i, j) is the normal information corresponding to the grid face with row index i and column index j;

[0122] Among them, is the x component in the normal n(i, j); is the y component in the normal n(i, j); the z component in the normal n(i, j), and h is the size of the grid cell.

[0123] Among them, the projection position data generation model is the generation model of the projection position data.

[0124] Among them, the projection position data of each vertex on the target plane reflects the projection of the vertex on the two-dimensional plane. Through the projection position data of each vertex on the target plane, the shape contour of the three-dimensional surface mesh from a specific perspective can be initially understood. The specific perspective is the observation position and observation direction when observing the three-dimensional surface mesh.

[0125] S54. Using the least squares optimization method, perform a global fusion operation on the adjusted projection position data of each vertex on the target plane to generate a reconstruction result.

[0126] Exemplarily, using the least squares optimization method, perform a global fusion operation on the adjusted projection position data of each vertex on the target plane to generate a reconstruction result, including:

[0127] Adopt a smoothing algorithm to adjust the projection position data of each vertex on the target plane to obtain the adjusted projection position data of each vertex on the target plane;

[0128] Using the least squares optimization method, perform a global fusion operation on the adjusted projection position data of each vertex on the target plane to generate a reconstruction result.

[0129] Among them, by adopting a smoothing algorithm to adjust the projection position data of each vertex on the target plane, the surface of the reconstruction result can be made smoother, avoiding local sharp protrusions or depressions, and making the reconstruction result more in line with the geometric characteristics of the actual object.

[0130] For ease of explanation, the following is an example:

[0131] Refer to Figure 8 , Figure 8 which is a segmentation diagram of the three-dimensional surface network provided by an embodiment of the present invention.

[0132] As Figure 8 shown, the closed three-dimensional surface mesh is segmented into two parts, front and back.

[0133] Refer to Figure 9 , Figure 9 which is a sample diagram of the geometric normal image provided by an embodiment of the present invention.

[0134] As Figure 9 shown, in the stage of constructing the geometric normal image, the geometric normal image is divided into two parts, front and back.

[0135] Refer to Figure 10 , Figure 10 which is a sample diagram of the reconstruction result provided by an embodiment of the present invention.

[0136] Figure 10 shows that the reconstruction result is the three-dimensional surface mesh of a three-dimensional model, and the three-dimensional surface mesh has important uses in many aspects. For ease of explanation, the following is an example:

[0137] For example, in game development, elements such as character models, buildings, and props can all be constructed from three-dimensional surface meshes. By assigning different textures and lighting conditions, players can be immersed in a virtual world full of details and realism.

[0138] For example, in industrial design and manufacturing, three-dimensional surface meshes can assist designers in product design evaluation and modification. Designers can check whether the shape of the product meets the design requirements, whether there are interferences or non-smooth surfaces based on the reconstructed three-dimensional surface mesh, and can conveniently perform dimensional measurement and modification to ensure the design optimization of the product before actual manufacturing and avoid problems in the subsequent manufacturing process.

[0139] In the embodiment of the present invention, since the bijectivity is guaranteed for each round of relaxation of the three-dimensional surface mesh when constructing the geometric normal image, this process is reversible. Through the combination of all rounds of reconstructions, the reconstruction result, which is the three-dimensional surface mesh of a three-dimensional model, can be obtained. Therefore, the present invention can reconstruct the three-dimensional surface mesh based on the geometric normal image.

[0140] Please refer toFigure 6 , Figure 6 is a schematic structural diagram of a geometric normal image generation device in an embodiment of the present invention. As Figure 6 shown, the geometric normal image generation device includes a first acquisition module 101, a construction module 102, an iteration module 103, a reading module 104, a processing module 105, and a generation module 106. The detailed description of each functional module is as follows:

[0141] The first acquisition module 101 is configured to acquire the three-dimensional surface mesh of the three-dimensional model and acquire the normal information corresponding to each mesh face in the three-dimensional surface mesh;

[0142] The construction module 102 is configured to construct a relaxation function based on the normal information corresponding to each mesh face in the three-dimensional surface mesh and a predefined construction method;

[0143] The iteration module 103 is configured to apply the relaxation function to the three-dimensional surface mesh at a set iteration interval and iteration amplitude, perform relaxation operations round by round, and record the number of iterations;

[0144] The reading module 104 is configured to stop the relaxation operation when the number of iterations meets a preset condition, and obtain the relaxed three-dimensional surface mesh;

[0145] The processing module 105 is configured to perform rasterization processing on the relaxed three-dimensional surface mesh to obtain a two-dimensional image;

[0146] The generation module 106 is configured to generate a geometric normal image based on the normal information corresponding to each mesh face and the two-dimensional image.

[0147] In the embodiment of the present invention, the beneficial effects are in two aspects. On the one hand, rasterization processing is performed on the relaxed three-dimensional surface mesh to obtain a two-dimensional image; a geometric normal image is generated based on the normal information corresponding to each mesh face and the two-dimensional image. Since no manual operation is required, the generation time of the geometric normal image is reduced, which is beneficial to improving the generation efficiency of the geometric normal image; on the other hand, since the geometric normal image is automatically generated and is not affected by manual intervention, it is beneficial to improving the reliability of the geometric normal image.

[0148] For the specific limitations of the geometric normal image generation device, reference can be made to the limitations of the geometric normal image generation method in the above text, which will not be elaborated here.

[0149] Each module in the above geometric normal image generation device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor of the computer device in hardware form or be independent of it, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above modules.

[0150] Please refer to Figure 7 , Figure 7 which is a schematic structural diagram of a computer device in an embodiment of the present invention. In one embodiment, a computer device is provided. The computer device is a server device or a client device, and its internal structure diagram can be as shown in Figure 7 . The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with external devices. When the computer program is executed by the processor, it can implement the functions or steps of a geometric normal image generation method.

[0151] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented:

[0152] Obtain the three-dimensional surface mesh of the three-dimensional model, and obtain the normal information corresponding to each mesh face in the three-dimensional surface mesh;

[0153] Based on the normal information corresponding to each mesh face in the three-dimensional surface mesh and a predefined construction method, construct a relaxation function;

[0154] Apply the relaxation function to the three-dimensional surface mesh at a set iteration interval and iteration amplitude, perform relaxation operations round by round, and record the number of iterations;

[0155] When the number of iterations meets a preset condition, stop the relaxation operation to obtain a relaxed three-dimensional surface mesh;

[0156] Perform rasterization processing on the relaxed three-dimensional surface mesh to obtain a two-dimensional image;

[0157] Generate a geometric normal image based on the normal information corresponding to each mesh face and the two-dimensional image.

[0158] In some embodiments, the processor is used to implement:

[0159] Obtain a configuration file, and read the Gaussian convolution kernel in the configuration file;

[0160] Construct a relaxation function according to the normal information corresponding to each mesh face in the three-dimensional surface mesh and the Gaussian convolution kernel.

[0161] In some embodiments, the processor is used to implement:

[0162] Obtain the relaxation factor and the update amount, and select the product of the relaxation factor and the update amount as the iteration amplitude;

[0163] According to the set iteration interval and iteration amplitude, apply the relaxation function to the three-dimensional surface mesh, perform relaxation operations round by round and record the number of iterations.

[0164] In some embodiments, a processor is used to implement:

[0165] When the number of iterations reaches the target number, obtain a stop instruction;

[0166] Execute the stop instruction, stop the relaxation operation, and obtain the three-dimensional surface mesh after relaxation processing.

[0167] In some embodiments, a processor is used to implement:

[0168] Through a preset rasterization algorithm, perform rasterization processing on the three-dimensional surface mesh after relaxation to obtain a plurality of pixel fragments;

[0169] Save the plurality of pixel fragments, obtain a synthesis instruction, execute the synthesis instruction, and synthesize the plurality of pixel fragments into a two-dimensional image.

[0170] In some embodiments, a processor is used to implement:

[0171] Write the normal information corresponding to each mesh face into the pixel information of the two-dimensional image to obtain the modified pixel information of the two-dimensional image;

[0172] Generate a geometric normal image according to the modified pixel information of the two-dimensional image.

[0173] In some embodiments, a processor is used to implement:

[0174] Obtain the geometric normal image, read the data information in the geometric normal image, and from the data information, obtain the normal information corresponding to each mesh face and the vertex information corresponding to each mesh face;

[0175] According to the vertex information corresponding to each mesh face, determine the center coordinate information corresponding to each mesh face;

[0176] Generate a model through preset projection position data, process the center coordinate information corresponding to each mesh face and the normal information corresponding to each mesh face, and obtain the projection position data of each vertex on the target plane;

[0177] Use the least squares optimization method to perform a global fusion operation on the adjusted projection position data of each vertex on the target plane to generate a reconstruction result.

[0178] The above-mentioned processor may be a general-purpose processor, including a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), and a Network Processor (NP); it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

[0179] An embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it can implement the steps in the above-mentioned various method embodiments.

[0180] Program code is stored in the computer-readable storage medium, and the program code can be called by the processor to execute the geometric normal image generation method in the above-mentioned method embodiments.

[0181] The computer-readable storage medium has a storage space for program code.

[0182] The program code includes the code for any step in the geometric normal image generation method described in the above-mentioned method embodiments. For example, when the program code is called by the processor, the following steps can be executed:

[0183] Obtain the three-dimensional surface mesh of the three-dimensional model, and obtain the normal information corresponding to each mesh face in the three-dimensional surface mesh;

[0184] Based on the normal information corresponding to each mesh face in the three-dimensional surface mesh and a predefined construction method, construct a relaxation function;

[0185] According to the set iteration interval and iteration amplitude, apply the relaxation function to the three-dimensional surface mesh, perform relaxation operations round by round and record the number of iterations;

[0186] When the number of iterations meets the preset conditions, stop the relaxation operation to obtain the relaxed three-dimensional surface mesh;

[0187] Perform rasterization processing on the relaxed three-dimensional surface mesh to obtain a two-dimensional image;

[0188] Generate a geometric normal image based on the normal information corresponding to each mesh face and the two-dimensional image.

[0189] The program code also includes the code for any steps in the reconstruction method described in the above method embodiments. For example, when the program code is called by a processor, the following steps may be executed:

[0190] Obtain a geometric normal image, read the data information in the geometric normal image, and from the data information, obtain the normal information corresponding to each mesh face and the vertex information corresponding to each mesh face;

[0191] Determine the central coordinate information corresponding to each mesh face according to the vertex information corresponding to each mesh face;

[0192] Generate a model through preset projection position data, process the central coordinate information corresponding to each mesh face and the normal information corresponding to each mesh face to obtain the projection position data of each vertex on the target plane;

[0193] Use the least squares optimization method to perform a global fusion operation on the adjusted projection position data of each vertex on the target plane to generate a reconstruction result.

[0194] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure, enabling those skilled in the art to practice them. In this article, what each embodiment focuses on may be the differences from other embodiments, and the same or similar parts among the various embodiments may be referred to each other. For the methods and products disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, the relevant parts may refer to the description of the method part.

[0195] Those skilled in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner may depend on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of the embodiments of the present disclosure. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be repeated here.

[0196] In the embodiments disclosed in this article, the disclosed methods and products (including but not limited to devices and equipment) can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units can be merely a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some sub-samples can be ignored or not executed. Additionally, the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of devices or units can be in electrical, mechanical, or other forms. The units described as separate components can be or can not be physically separated. The components shown as units can be or can not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to implement this embodiment. Additionally, in the embodiments of the present disclosure, the various functional units can be integrated in one processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit.

[0197] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to the embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions marked in the blocks can occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, which can depend on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different blocks can also occur in a different order than that disclosed in the description. Sometimes, there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, which can depend on the functions involved. Each block in the block diagram and / or flowchart, as well as the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

Claims

1. A method for generating a geometric normal image, characterized in that: include: Obtaining a three-dimensional surface mesh of a three-dimensional model, and obtaining normal information corresponding to each mesh face in the three-dimensional surface mesh; Based on the normal information corresponding to each mesh face in the three-dimensional surface mesh and a predefined construction method, a relaxation function is constructed; According to the set iteration interval and iteration amplitude, the relaxation function is applied to the three-dimensional surface mesh, and the relaxation operation is performed round by round and the number of iterations is recorded; When the number of iterations meets the preset conditions, the relaxation operation is stopped to obtain the relaxed three-dimensional surface mesh; Rasterizing the relaxed three-dimensional surface mesh to obtain a two-dimensional image; A geometric normal image is generated based on the normal information and two-dimensional image corresponding to each mesh surface.

2. The method for generating a geometric normal image according to claim 1, characterized in that: The relaxation function is constructed based on normal information corresponding to each mesh face in the three-dimensional surface mesh and a predefined construction method, including: Get the configuration file and read the Gaussian convolution kernel in the configuration file; A relaxation function is constructed according to the normal information and Gaussian convolution kernel corresponding to each mesh face in the three-dimensional surface mesh.

3. The method for generating a geometric normal image according to claim 1, characterized in that: The relaxation function is applied to the three-dimensional surface mesh according to the set iteration interval and iteration amplitude, and the relaxation operation is performed round by round and the number of iterations is recorded, including: Obtain the relaxation factor and the update amount, and select the product of the relaxation factor and the update amount as the iteration amplitude; According to the set iteration interval and iteration amplitude, the relaxation function is applied to the three-dimensional surface mesh, and the relaxation operation is performed round by round and the number of iterations is recorded.

4. The method for generating a geometric normal image according to claim 1, characterized in that: When the number of iterations meets the preset condition, the relaxation operation is stopped to obtain the relaxed three-dimensional surface mesh, including: When the number of iterations reaches the target number, a stop instruction is obtained; Execute the stop command to stop the relaxation operation and obtain the three-dimensional surface mesh after relaxation.

5. The method for generating a geometric normal image according to claim 1, characterized in that: The step of performing rasterization processing on the relaxed three-dimensional surface mesh to obtain a two-dimensional image includes: The relaxed three-dimensional surface mesh is rasterized by a preset rasterization algorithm to obtain a plurality of pixel fragments; The plurality of pixel fragments are saved, a synthesis instruction is obtained, the synthesis instruction is executed, and the plurality of pixel fragments are synthesized into a two-dimensional image.

6. The method for generating a geometric normal image according to claim 1, characterized in that: The generating of a geometric normal image based on normal information corresponding to each mesh surface and a two-dimensional image includes: Writing normal information corresponding to each mesh surface into pixel information of the two-dimensional image to obtain pixel information of the modified two-dimensional image; A geometric normal image is generated according to the pixel information of the modified two-dimensional image.

7. A reconstruction method, characterized in that: The reconstruction method comprises: Acquire a geometric normal image, read data information in the geometric normal image, and acquire normal information corresponding to each mesh surface and vertex information corresponding to each mesh surface from the data information; According to the vertex information corresponding to each mesh surface, determine the center coordinate information corresponding to each mesh surface; The model is generated by the preset projection position data, and the center coordinate information corresponding to each mesh surface and the normal information corresponding to each mesh surface are processed to obtain the projection position data of each vertex on the target plane; Using the least squares optimization method, the projection position data of each adjusted vertex on the target plane are globally fused to generate the reconstruction result.

8. A geometric normal image generating device, characterized in that: include: A first acquisition module is used to acquire a three-dimensional surface mesh of a three-dimensional model and acquire normal information corresponding to each mesh face in the three-dimensional surface mesh; A construction module, used for constructing a relaxation function based on normal information corresponding to each mesh face in the three-dimensional surface mesh and a predefined construction method; An iteration module is used to apply the relaxation function to the three-dimensional surface mesh according to the set iteration interval and iteration amplitude, perform relaxation operation round by round and record the number of iterations; A reading module is used to stop the relaxation operation when the number of iterations meets a preset condition, and obtain a relaxed three-dimensional surface mesh; A processing module, used for performing rasterization processing on the relaxed three-dimensional surface mesh to obtain a two-dimensional image; The generation module is used to generate a geometric normal image based on normal information corresponding to each mesh surface and a two-dimensional image.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the processor implements the steps of the geometric normal image generation method according to any one of claims 1 to 7 or the steps of the reconstruction method according to claim 8.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for generating a geometric normal image according to any one of claims 1 to 7 or the steps of the reconstruction method according to claim 8 are implemented.

Citation Information

Patent Citations

  • Three-dimensional surface construction method and device, computer equipment and storage medium

    CN114842168A

  • Use of normal meshes in three-dimensional imaging

    US7129947B1

  • System and method for rendering a particle-based fluid surface

    US8947430B1