A three-dimensional image generation method and device, electronic equipment and storage medium

By using the methods of partial generation and texture fusion, the problems of insufficient detail processing and instability in existing 3D generation models are solved, and high-quality and stable 3D image generation is achieved.

CN122115650APending Publication Date: 2026-05-29TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2024-11-29
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing 3D generative models suffer from inadequate detail processing and unstable generation results when generating 3D cartoon portraits, leading to insufficient generation quality and model distortion.

Method used

The target object's 3D model is generated by dividing it into parts, and geometric smoothing and seam texture fusion are performed, including texture repainting, to ensure a consistent texture style and natural transition.

Benefits of technology

It improves the quality and stability of 3D image generation, avoids loss of detail and distortion, and produces 3D images with good texture continuity and smooth, natural surfaces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122115650A_ABST
    Figure CN122115650A_ABST
Patent Text Reader

Abstract

The application relates to the computer technical field, and in particular to a three-dimensional image generation method and device, electronic equipment and storage medium, to improve the generation quality and stability of a 3D image. The method comprises the following steps: obtaining a three-dimensional model of a target object, the target object comprising a first part and a second part, and the three-dimensional model comprising a three-dimensional model of the first part and a three-dimensional model of the second part; splicing the three-dimensional model of the first part and the three-dimensional model of the second part to obtain a spliced three-dimensional object model, and performing smoothing processing on a joint part in the spliced three-dimensional object model; performing texture fusion on the joint part according to the texture of the first part in the spliced three-dimensional object model to obtain a fused three-dimensional object model; and performing texture redrawing on the first part in the fused three-dimensional object model according to the texture style of the second part in the fused three-dimensional object model to obtain a three-dimensional image of the target object.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, electronic device, and storage medium for generating three-dimensional images. Background Technology

[0002] With the rapid development of 3D generation technology, some methods for generating 3D assets (such as 3D cartoon figures, 3D animal models, 3D building models, 3D vehicles, 3D props, 3D plants, etc.) based on text or images have gradually emerged. This low-cost 3D generation method has quickly attracted public attention and become a research hotspot.

[0003] Taking 3D cartoon avatars as an example, the generation method of 3D cartoon avatars in related technologies mainly consists of the following process: First, the object describes the image of the cartoon character through text or images; then, based on the input text or images, a full-body 3D cartoon avatar is generated through a 3D generation model (referring to a machine learning model) or a two-dimensional (2D) distillation upscaling method. On this basis, some post-processing operations (such as exporting the results) can be performed on the generated results.

[0004] However, the above-mentioned generation methods still face some challenges: on the one hand, the 3D cartoon portraits generated based on existing 3D generation models often lack detail processing and sufficient refinement, resulting in insufficient generation quality; on the other hand, 3D generation models generally suffer from unstable generation results, such as in some cases, some areas of the generated model are prone to distortion, affecting the overall effect.

[0005] In summary, how to achieve stable and high-quality 3D generation is an urgent problem to be solved. Summary of the Invention

[0006] This application provides a method, apparatus, electronic device, and storage medium for generating three-dimensional images, in order to improve the generation quality and stability of 3D images.

[0007] This application provides a method for generating a three-dimensional image, comprising:

[0008] Obtain a three-dimensional model of a target object, wherein the target object includes a first part and a second part, and the three-dimensional model includes a three-dimensional model of the first part and a three-dimensional model of the second part;

[0009] The three-dimensional models of the first part and the second part are spliced ​​together to obtain a spliced ​​three-dimensional object model, and the seams in the spliced ​​three-dimensional object model are smoothed.

[0010] Based on the texture of the first part in the spliced ​​3D object model, the seam part is texture fused to obtain the fused 3D object model.

[0011] Based on the texture style of the second part in the fused 3D object model, the texture of the first part in the fused 3D object model is redrawn to obtain the 3D image of the target object.

[0012] This application provides a three-dimensional image generation device, comprising:

[0013] An acquisition unit is used to acquire a three-dimensional model of a target object, wherein the target object includes a first part and a second part, and the three-dimensional model includes a three-dimensional model of the first part and a three-dimensional model of the second part.

[0014] The splicing unit is used to splice the three-dimensional model of the first part and the three-dimensional model of the second part to obtain the spliced ​​three-dimensional object model, and to smooth the seam part in the spliced ​​three-dimensional object model.

[0015] The fusion unit is used to perform texture fusion on the seam part according to the texture of the first part in the spliced ​​three-dimensional object model to obtain the fused three-dimensional object model.

[0016] The redrawing unit is used to redraw the texture of the first part of the fused three-dimensional object model according to the texture style of the second part in the fused three-dimensional object model, so as to obtain the three-dimensional image of the target object.

[0017] Optionally, the splicing unit is specifically used for:

[0018] The three-dimensional models of the first part and the second part are geometrically spliced ​​together, and the overlapping parts between the three-dimensional models of the first part and the second part are removed during the splicing process to obtain the spliced ​​three-dimensional object model.

[0019] Determine the vertices of each seam in the assembled 3D object model;

[0020] Based on each seam vertex, the seam portion in the spliced ​​3D object model is subjected to progressive smoothing processing.

[0021] Optionally, the splicing unit is specifically used for:

[0022] Obtain neighborhood patches of different levels connected to each seam vertex within a specified range along the target direction; wherein each level corresponds to a sub-range within the specified range; the neighborhood patches are patches composed of vertices connected to the seam vertex; the target direction represents the direction from the first part to the second part;

[0023] The neighborhood patches at different levels are smoothed to different degrees; wherein the smoothing degree of the neighborhood patches at different levels decreases along the target direction.

[0024] Optionally, the fusion unit is specifically used for:

[0025] Obtain the neighboring vertices of different levels connected to each seam vertex within a specified range along the target direction; wherein each level corresponds to a sub-range within the specified range; the target direction represents the direction from the first part to the second part;

[0026] Using each seam vertex and the neighboring vertices of different levels as processing points, for each processing point, the color value of the processing point is updated according to the color value of the first part vertex associated with the processing point; wherein, the first part vertex associated with the processing point refers to the vertex that is closest to the processing point on the first part.

[0027] Optionally, the fusion unit is specifically used for:

[0028] Determine the distance between the processing point and the vertex of the first part;

[0029] Based on the distance value, a first weight corresponding to the vertex of the first part and a second weight corresponding to the processing point are determined; wherein, the first weight is negatively correlated with the distance value, and the second weight is positively correlated with the distance value;

[0030] Based on the first weight and the second weight, a weighted average is performed on the color value of the vertex of the first part and the original color value of the processing point to obtain the updated color value of the processing point.

[0031] Optionally, the first weight corresponding to the first part vertex associated with different processing points conforms to an exponential decay law along the target direction.

[0032] Optionally, for each processing point, the fusion unit is further configured to:

[0033] After updating the color value of the processing point based on the color value of the first part vertex associated with the processing point, the color value of the processing point is updated again using Gaussian blur smoothing.

[0034] Optionally, the fusion unit is specifically used for:

[0035] Obtain all neighboring vertices within a preset range around the processing point;

[0036] The color value of the processing point is obtained by weighting the current color value of each neighboring vertex within the preset range with the corresponding third weight. The third weights corresponding to the processing point and each neighboring vertex within the preset range conform to the Gaussian decay law.

[0037] Optionally, the acquisition unit is specifically used for:

[0038] A three-dimensional model of the target region can be obtained through any of the following methods, wherein the target region is either the first region or the second region:

[0039] A three-dimensional model of the target part is generated based on the image containing the target part of the target object;

[0040] Obtain the 3D model of the selected target part of the target object from a pre-built set of 3D models.

[0041] Optionally, the acquisition unit is specifically used for:

[0042] Based on the image containing the target part of the target object, generate three-dimensional models of the target part multiple times, and retain the three-dimensional models of the target part that meet the expected quality requirements based on the generation quality.

[0043] An electronic device provided in this application includes a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of any of the above-described methods for generating a three-dimensional image.

[0044] This application provides a computer-readable storage medium including a computer program. When the computer program is run on an electronic device, the computer program is used to cause the electronic device to perform the steps of any of the above-described methods for generating a three-dimensional image.

[0045] This application provides a computer program product, which includes a computer program stored in a computer-readable storage medium. When a processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, causing the electronic device to perform the steps of any of the above-described methods for generating a three-dimensional image.

[0046] The beneficial effects of this application are as follows:

[0047] This application provides a method, apparatus, electronic device, and storage medium for generating a three-dimensional image. This application generates three-dimensional models of different parts of a target object, then performs geometric smoothing and seam texture fusion to ultimately generate a high-quality three-dimensional image with a unified texture style.

[0048] Specifically, since this application does not directly generate a 3D cartoon portrait of the object, but generates 3D models of different parts of the target object (such as the head and body) separately, it can better capture and retain the detailed features of each part, avoid the loss of details caused by overall generation, and is less prone to distortion, ensuring that the model of each part is of higher quality and more stable.

[0049] Based on this, smooth stitching of the 3D models of different parts can eliminate stitching marks in the complete 3D model of the target object (i.e., the stitched 3D object model), ensuring the continuity and natural transition of textures, making the surface of the stitched model smoother and more natural. Based on the texture of the first part in the stitched 3D object model, texture fusion is performed on this seam area to further ensure a natural transition between the texture at the stitching point and the texture of the first part.

[0050] Finally, based on the texture style of the second part in the fused 3D object model, the texture of the first part in the fused 3D object model is redrawn, which can obtain a high-quality 3D image with a unified texture style, thus improving the generation quality and stability of the 3D image.

[0051] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description

[0052] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0053] Figure 1 This is a logic block diagram of a method for generating 3D cartoon characters in related technologies;

[0054] Figure 2 This is an optional schematic diagram of an application scenario in an embodiment of this application;

[0055] Figure 3 This is a logic block diagram of a method for generating a 3D cartoon character according to an embodiment of this application;

[0056] Figure 4 A flowchart illustrating the implementation of a method for generating a three-dimensional image, as provided in this application embodiment;

[0057] Figure 5 This is a logic block diagram illustrating a method for acquiring a 3D human head and a 3D human body in an embodiment of this application.

[0058] Figure 6 This is a schematic diagram of the first client-side user interface in the embodiments of this application;

[0059] Figure 7 This is a schematic diagram of a second client-side user interface in an embodiment of this application;

[0060] Figure 8 This is a schematic diagram of a partial surface of a three-dimensional model in an embodiment of this application;

[0061] Figure 9 This is a schematic diagram of a neighborhood patch at different levels in an embodiment of this application;

[0062] Figure 10 This is a logic block diagram of a geometrically smooth splicing method in an embodiment of this application;

[0063] Figure 11 This is a comparison diagram of the before and after effects of progressive smoothing in an embodiment of this application;

[0064] Figure 12 This is a schematic diagram of a neighborhood vertex in an embodiment of this application;

[0065] Figure 13 This is a logic block diagram of a seam texture fusion embodiment in this application;

[0066] Figure 14 This is a comparison image showing the effect of seam optimization before and after in one embodiment of this application;

[0067] Figure 15 This is an interaction diagram between a terminal device and a server in one embodiment of this application;

[0068] Figure 16 This is a schematic diagram of the composition structure of a three-dimensional image generation device according to an embodiment of this application;

[0069] Figure 17 This is a schematic diagram of the hardware structure of an electronic device using an embodiment of this application;

[0070] Figure 18 This is a schematic diagram of the hardware structure of another electronic device using an embodiment of this application. Detailed Implementation

[0071] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this application. Obviously, the described embodiments are only some embodiments of the technical solutions of this application, and not all embodiments. Based on the embodiments recorded in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the technical solutions of this application.

[0072] The following describes some of the concepts involved in the embodiments of this application.

[0073] 1. The 3D model of the first part: refers to a 3D digital model created using 3D modeling technology that represents a specific part or component. This model details the geometry, dimensions, and appearance features of that part.

[0074] 2. The 3D model of the second part: Similar to the 3D model of the first part, but representing a separate 3D model of another part or component. The 3D model of the second part also contains all the geometric and appearance information of the second part, and can be used alone or in combination with other models.

[0075] 3. Three-dimensional object model: This refers to the process of combining two independent three-dimensional models—the first part's three-dimensional model and the second part's three-dimensional model—using specific techniques (such as alignment and fusion) to form a new, complete three-dimensional model. This process requires precise matching of the interfaces or boundaries of the two models to ensure the coherence and integrity of the final model.

[0076] In the embodiments of this application, the spliced ​​3D object model, the fused 3D object model, and even the texture-redrawn 3D object model (obtained by redrawing the texture of the first part of the fused 3D object model according to the texture style of the second part of the fused 3D object model) refer to the 3D object models obtained at different processing stages.

[0077] 4. Three-dimensional figures: These refer to characters or objects created in computer graphics that possess three-dimensional spatial characteristics. These figures can be people, animals, objects, etc., and typically have detailed geometric structures, materials, textures, and animation capabilities. These figures can be used in various applications, such as film special effects, animation, video games, virtual reality (VR), and augmented reality (AR).

[0078] In this embodiment, the 3D image of the target object is a visualization effect presented in a specific scene based on a 3D object model redrawn from textures, commonly used in display, animation, and interactive applications. In short, the 3D object model is the basic data, and the 3D image is its visual representation in a specific application.

[0079] 5. Geometric splicing: This refers to aligning and merging two or more 3D models in space to create a new, complete 3D model.

[0080] In the embodiments of this application, it refers to obtaining a three-dimensional object model by splicing the three-dimensional model of the first part and the three-dimensional model of the second part of the target object.

[0081] 6. Duplicate parts: These refer to situations where, during the stitching process of two 3D models, due to improper alignment or other reasons, certain geometric elements (such as vertices, edges, and faces) overlap or are repeated in both models. These duplicate parts are unnecessary in the final model and may even lead to inconsistencies or errors, and need to be removed.

[0082] 7. Seam Vertices: In 3D modeling, these are the vertices located at the boundaries between two or more 3D models or parts of models when they are joined together. These vertices mark the connecting lines between the models, i.e., the seams. Properly handling seam vertices is crucial for ensuring surface continuity and a natural visual effect when stitching 3D models or mapping textures.

[0083] 8. Progressive Smoothing: In 3D model processing, this refers to a gradual, layered smoothing technique used to reduce or eliminate unnatural seams in the model while preserving the original features and details of other parts. This involves progressively smoothing the seams in the stitched 3D object model in layers. This process typically starts at the seam and gradually extends away from it, adjusting the smoothness of different areas to achieve a natural transition, thus eliminating stitching marks without affecting the overall appearance.

[0084] 9. In 3D modeling and computer graphics, faces and vertices are the basic elements that make up a 3D model.

[0085] A vertex is the basic unit that makes up a 3D model; specifically, it refers to a point in 3D space, usually represented by 3D coordinates (x, y, z). Multiple vertices are connected together by edges to form a face, and a vertex can be shared by multiple faces. A vertex can have not only positional information but also other attributes, such as normal, color, and texture coordinates.

[0086] A facet is a polygon composed of three or more vertices, typically used to represent the surface of a 3D model. Types include, but are not limited to: 1) Triangular facets: composed of three vertices, the most common facet type because any polygon can be decomposed into triangles. 2) Quadrilateral facets: composed of four vertices, often used in certain modeling tools and scenes. 3) Polygonal facets: composed of more than three vertices, but usually decomposed into triangular facets for rendering.

[0087] 10. Neighborhood Patches: In a 3D model, a neighborhood patch refers to a group of adjacent faces surrounding a central vertex or face. These faces are usually directly or indirectly connected to the central vertex or face, forming a local geometric region. Neighborhood patches are very important in tasks such as geometry processing, smoothing, and texture mapping because they provide information about the local geometry, helping to preserve the details and features of the model.

[0088] Neighborhood patches of different levels: These refer to the set of patches surrounding a vertex within different ranges. These levels can be defined as starting from the central vertex (such as the seam vertex) and expanding outward layer by layer.

[0089] In this embodiment, for a seam vertex, different levels refer to multiple layers formed by expanding outward layer by layer from the seam vertex along the target direction. Specifically, each level corresponds to a sub-range (also called a specified sub-range) within a specified range along the target direction. Therefore, the neighborhood patches of different levels specifically include: patches composed of vertices directly or indirectly connected to the seam vertex within different specified sub-ranges that expand outward layer by layer along the target direction, starting from the seam vertex.

[0090] For example, a first-level neighborhood patch includes faces directly connected to the central vertex, while a second-level neighborhood patch includes faces connected to first-level neighborhood patches but not directly connected to the central vertex (i.e., indirectly connected). Neighborhood patches of different levels can help analyze and process geometry at different scales, making them suitable for multi-resolution analysis and local feature extraction.

[0091] 11. Neighborhood vertices: In a 3D model, these are a group of adjacent vertices surrounding a specific vertex. These vertices are usually directly or indirectly connected to the central vertex, forming a local geometric region. Neighborhood vertices are crucial in tasks such as geometry processing, smoothing, and deformation because they provide information about the local geometry, helping to preserve the model's details and features.

[0092] Neighborhood vertices at different levels: These refer to the set of vertices surrounding a certain vertex within different ranges. These levels can be defined as starting from the central vertex (such as the seam vertex) and expanding outward layer by layer.

[0093] In the embodiments of this application, for a seam vertex, the neighboring vertices at different levels specifically include: vertices that are directly or indirectly connected to the seam vertex and extend outward layer by layer along the target direction from the seam vertex.

[0094] For example, first-level neighbor vertices include vertices directly connected to the central vertex, while second-level neighbor vertices include vertices connected to first-level neighbor vertices but not directly connected to the central vertex (i.e., indirectly connected).

[0095] 12. Gaussian Blur Smoothing: In image processing and 3D modeling, Gaussian blur smooths images by applying a Gaussian kernel to each pixel or vertex. The Gaussian kernel is a matrix where the value of each element is calculated according to a Gaussian distribution. Generally, the weight of points farther from the center (i.e., the third weight) gradually decreases, following the Gaussian decay law. This weighting method makes the smoothing effect more natural, preserves edge details, and avoids excessive blurring.

[0096] 13. Gaussian decay law: This refers to the fact that during the Gaussian blur smoothing process, the weights of different vertices (i.e., the third weights) decay according to a Gaussian distribution (also known as a normal distribution).

[0097] The design concept of the embodiments of this application will be briefly explained below:

[0098] With the continuous advancement of computer image processing technology, 3D generation technology has been widely applied in many fields, especially in generating 3D models from 2D images or text information. This technology allows for the rapid generation of personalized 3D cartoon characters from simple user input, such as a photograph or a text description. This not only greatly enriches the ways of creating virtual content but also provides new possibilities for personalized entertainment and social interaction.

[0099] like Figure 1 As shown, it is a logic block diagram of a method for generating 3D cartoon figures in related technologies.

[0100] refer to Figure 1 The generation process of 3D cartoon characters can be roughly divided into three main stages:

[0101] The first step is the user input stage, where users can specify the characteristics of the cartoon character they want to generate by uploading their own photos or text descriptions, such as... Figure 1 The example used is an input image; the next stage is the generation of a 3D model. This stage utilizes advanced 3D generative modeling or 2D distillation and dimensionality enhancement techniques to construct a full-body 3D cartoon model based on the information provided by the user, such as... Figure 1In the process, this stage involves two parts: geometry generation and texture generation; the final stage is the post-processing stage, where the generated 3D model is further optimized, including but not limited to exporting the model as a mesh format and refining the model's texture, in order to improve the quality of the final product and the user experience.

[0102] Despite the many conveniences brought by 3D generation technology, the field still faces several challenges, such as the quality and stability issues listed in the background. Therefore, achieving efficient and stable 3D generation while ensuring output quality has become a key research focus.

[0103] In view of this, this application proposes a method, apparatus, electronic device, and storage medium for generating three-dimensional images. By generating three-dimensional models of different parts of a target object in sections, and then performing geometrically smooth stitching and seam texture fusion, a high-quality three-dimensional image with a unified texture style is ultimately generated.

[0104] Specifically, since this application does not directly generate a 3D cartoon portrait of the object, but generates 3D models of different parts of the target object (such as the head and body) separately, it can better capture and retain the detailed features of each part, avoid the loss of details caused by overall generation, and is less prone to distortion, ensuring that the model of each part is of higher quality and more stable.

[0105] Based on this, smooth stitching of the 3D models of different parts can eliminate stitching marks in the complete 3D model of the target object (i.e., the stitched 3D object model), ensuring the continuity and natural transition of textures, making the surface of the stitched model smoother and more natural. Based on the texture of the first part in the stitched 3D object model, texture fusion is performed on this seam area to further ensure a natural transition between the texture at the stitching point and the texture of the first part.

[0106] Finally, based on the texture style of the second part in the fused 3D object model, the texture of the first part in the fused 3D object model is redrawn, which can obtain a high-quality 3D image with a unified texture style, thus improving the generation quality and stability of the 3D image.

[0107] The preferred embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit this application. Furthermore, the embodiments and features in the embodiments of this application can be combined with each other without conflict.

[0108] like Figure 2 The diagram shown is an application scenario illustration of an embodiment of this application. The application scenario diagram includes a terminal device 210 and a server 220.

[0109] In this embodiment, the terminal device 210 includes, but is not limited to, mobile phones, tablets, laptops, desktop computers, e-book readers, smart voice interaction devices, smart home appliances, and in-vehicle terminals. The terminal device may have a client installed related to 3D image generation. This client can be software (e.g., a browser, instant messaging software with a 3D image generation module, 3D image generation software, etc.), or a webpage, mini-program, etc. The server 220 is the backend server corresponding to the software, webpage, mini-program, etc., or a server specifically used for 3D image generation; this application does not impose specific limitations. The server 220 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0110] It should be noted that the method for generating the three-dimensional image in each embodiment of this application can be executed by an electronic device, which can be a terminal device 210 or a server 220. That is, the method can be executed by the terminal device 210 or the server 220 alone, or by the terminal device 210 and the server 220 together.

[0111] For example, when executed jointly by terminal device 210 and server 220, terminal device 210 can be equipped with a 3D image generation client. The target object can trigger a 3D image generation request through this client. After receiving the request from the client, server 120 can obtain the 3D models of the first and second parts of the target object respectively; stitch the 3D models of the first and second parts together to obtain a stitched 3D object model, and smooth the seams in the stitched 3D object model; according to the texture of the first part in the stitched 3D object model, perform texture fusion on the seams to obtain a fused 3D object model; according to the texture style of the second part in the fused 3D object model, redraw the texture of the first part in the fused 3D object model to obtain a textured 3D object model, and return this model to the client so that the client can present a 3D image of the target object.

[0112] It should be noted that this application does not specifically limit the target object, the first part, and the second part. The three-dimensional image generation method in the various embodiments of this application can be applied to a variety of different objects and their components, and is not limited to specific instances or application scenarios. Specifically, the target object refers to any object that can be converted into a 3D image, while the first part and the second part refer to different parts of the object, which can be any identifiable feature part, and are not limited to specific shapes, sizes, or positions.

[0113] The following example uses a human as the target object, the head as the first body part, and the body as the second body part:

[0114] like Figure 3 The diagram shown is a logic block diagram of a method for generating a 3D cartoon character according to an embodiment of this application. Figure 1 Compared to the generation method shown, this application generates 3D models of different parts of the target object by dividing them into sections, such as... Figure 3 The 3D human body (i.e., a three-dimensional model of a second part) and 3D human head (i.e., a three-dimensional model of a first part) are then geometrically smoothed and the seam textures are blended. Finally, the textures are redrawn to generate a high-quality 3D cartoon portrait with a unified texture style.

[0115] This method not only ensures personalized customization and high quality of the generated results, but also provides greater creative space by generating the head and body separately. At the same time, it eliminates splicing traces through smooth splicing, texture fusion and texture repainting techniques, while improving the stability and naturalness of the generated results.

[0116] In one alternative implementation, the terminal device 210 and the server 220 can communicate via a communication network.

[0117] In one alternative implementation, the communication network is a wired network or a wireless network.

[0118] It should be noted that, Figure 2 The examples shown are merely illustrative; in reality, the number of terminal devices and servers is unlimited and is not specifically limited in the embodiments of this application.

[0119] In this embodiment of the application, when there are multiple servers, the multiple servers can form a blockchain, and the server is a node on the blockchain; as disclosed in the embodiment of the application of the method for generating a three-dimensional image, the three-dimensional model-related data involved can be stored on the blockchain, such as the three-dimensional model of the first part, the three-dimensional model of the second part, the spliced ​​three-dimensional object model, the fused three-dimensional object model, the three-dimensional image, etc.

[0120] Furthermore, the embodiments of this application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, and assisted driving. For example, in cloud technology scenarios, high-quality 3D images can be generated in the cloud to provide users with services such as virtual try-on and virtual character creation, enhancing user experience and interactivity. In artificial intelligence scenarios, personalized 3D images can be generated in AI applications such as virtual assistants and chatbots, enhancing users' emotional connection and immersion. In smart transportation scenarios, realistic pedestrian and vehicle models can be generated in traffic simulation and urban planning for traffic flow analysis and accident simulation, improving the accuracy and efficiency of decision-making. In assisted driving scenarios, high-precision 3D environment models can be generated in autonomous driving and assisted driving systems, helping vehicles better understand their surroundings and improving driving safety and reliability.

[0121] In addition to these applications, in game development, developers can create and customize game characters to enhance visual effects and player experience. Furthermore, they can add animations, including walking, running, and attacking movements, making the characters more lifelike. In film and television production, teams can create realistic 3D characters for movies, TV series, and animations. They can also add animations, including facial expressions and body movements, improving the quality of the works. In education and training, educational institutions can use teaching tools based on the 3D character generation method described in this application to teach students skills such as 3D modeling, animation, and rendering. They can also create virtual laboratories, allowing the created 3D characters to experiment and operate in a virtual environment, improving learning outcomes, and so on.

[0122] It should be noted that the scenarios listed above are just simple examples. Other scenarios are also applicable to the embodiments of this application, and will not be described in detail here.

[0123] It should be emphasized that, in the specific embodiments of this application, data related to the object is involved, such as images containing target parts of the target object as listed above. When the above embodiments of this application are applied to specific products or technologies, permission or consent from the object is required, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions.

[0124] The following describes a method for generating a three-dimensional image provided by an exemplary embodiment of this application, in conjunction with the application scenarios described above and with reference to the accompanying drawings. It should be noted that the above application scenarios are only shown to facilitate understanding of the spirit and principles of this application, and the embodiments of this application are not limited in any way in this respect.

[0125] See Figure 4The diagram shown is a flowchart of a method for generating a three-dimensional image according to an embodiment of this application. Taking a server as the executing entity, the specific implementation process of this method is as follows: S41 to S44:

[0126] S41: Obtain the 3D model of the target object, which includes a first part and a second part, and the 3D model includes the 3D model of the first part and the 3D model of the second part.

[0127] In the embodiments of this application, the target object refers to any object that can be converted into a 3D image, such as people, animals, buildings, vehicles, props, items, plants, etc.

[0128] The first part and the second part refer to different parts of the target object. Specifically, they can be any identifiable feature parts, and are not limited to specific shapes, sizes or positions.

[0129] In one alternative implementation, the first part and the second part together constitute a complete target object. Each part has its specific function or visual focus, but together they constitute the whole object.

[0130] For example, when the target object is a person, the first part is the head, the second part is the body, and the head and body together constitute a complete human image.

[0131] For example, when the target object is a car, the first part is the front of the car, and the second part is the body of the car. The front of the car and the body of the car together constitute a complete car.

[0132] In another alternative implementation, the first part and the second part together constitute a functionally or structurally complete sub-part of the target object. This sub-part can be an independent component or module of the target object.

[0133] For example, when the target object is a mobile phone, the first part is the screen, and the second part is the casing. The screen and casing together constitute the display module of the mobile phone.

[0134] For example, when the target object is a robot, the first part is the joint, and the second part is the connecting rod. The joint and the connecting rod together constitute the robot arm and realize the movement function.

[0135] In this embodiment, by obtaining the 3D models of these parts separately, higher quality and more personalized 3D image generation can be achieved. Below are some possible definitions of the first and second parts:

[0136] Definition Method 1: Classified according to visual importance.

[0137] Optionally, the first part is the most visually appealing area, typically referring to the part of the target object that requires special attention or detailed modeling, including the object's key features or visual focal point. The second part is visually less important but equally important, usually referring to another part of the target object opposite the first part, serving a supporting or auxiliary function. The modeling of the second part also needs to be detailed, but may require slightly less detail compared to the first part. Conversely, the second part can be the most visually appealing area, and the first part the relatively less important.

[0138] For example, when the target is a person, the first part is the head (face, hair, etc.), and the second part is the body (limbs, torso, etc.).

[0139] Definition Method 2: Classified according to functional importance.

[0140] Optionally, the first part is responsible for the main function or core part; the second part is responsible for the auxiliary function or secondary part. Conversely, the second part can be responsible for the main function or core part; the first part can be responsible for the auxiliary function or secondary part.

[0141] For example, if the target object is a vehicle, such as a car, the first part is the front of the car (front face, headlights, etc., the main function), and the second part is the body (doors, windows, wheels, etc., auxiliary functions).

[0142] Definition method 3: Classified by usage frequency.

[0143] Optionally, the first part can be the part used more frequently, and the second part can be the part used less frequently. Conversely, the second part can be the part used more frequently, and the first part can be the part used less frequently.

[0144] For example, if the target object is furniture, such as a table, the first part is the tabletop (used frequently), and the second part is the table legs (used infrequently).

[0145] Definition Method 4: Classification based on structural complexity.

[0146] Optionally, the first part can be structurally more complex, and the second part can be structurally simpler. Conversely, the second part can be structurally more complex, and the first part can be structurally simpler.

[0147] For example, when the target object is a plant, the first part is the flower and fruit (complex structure), and the second part is the stem and root (relatively simple structure).

[0148] Definition method five: Classification according to material properties.

[0149] Optionally, the first part can be a part using special materials or processes, while the second part can be a part using ordinary materials or processes. Conversely, the second part can be a structurally more complex part, while the first part can be a structurally simpler part.

[0150] For example, when the target object is a work of art, the first part is the sculpted part (using special materials) and the second part is the base (using ordinary materials).

[0151] Definition method six: Classification according to motion characteristics.

[0152] Optionally, the first part can be a part that moves frequently or has complex movements, while the second part can be a part that moves less or is static. Conversely, the second part can be a part that moves frequently or has complex movements, while the first part can be a part that moves less or is static.

[0153] For example, when the target object is a robot, the first part is the joints (frequent movement), and the second part is the body (less movement). Similarly, when the target object is an animal, the first part is the limbs (frequent movement), and the second part is the torso (less movement).

[0154] Definition Method 7: Divide according to functional modules.

[0155] Optionally, the first part can be a part containing multiple functional modules; the second part can be a part containing a single functional module. Conversely, the second part can be a part containing multiple functional modules; the first part can be a part containing a single functional module.

[0156] For example, when the target object is a car, the first part is the dashboard (which contains multiple functional modules), and the second part is the seat (which contains a single functional module).

[0157] Of course, in addition to the above methods, random division, equal division, and other methods can also be used to define the first and second parts, which will not be elaborated here.

[0158] By using the different definition methods described above, the division of the first and second parts can be flexibly chosen according to the specific application scenario and the characteristics of the target object. These definition methods ensure that each part can be processed in more detail when generating a 3D image, improving the quality and personalization of the generated result. Regardless of the definition method used, the ultimate goal is to achieve high-quality, personalized, and stable 3D image generation.

[0159] Once the target object and its first and second parts are determined, their respective 3D models can be obtained. The following explains how to obtain the 3D models of the first and second parts of the target object:

[0160] Optionally, the 3D model of the target part of the target object can be obtained in any of the following ways, where the target part is the first part or the second part of the target object:

[0161] Method 1: Generate a 3D model of the target part of the target object based on the image containing the target part of the target object.

[0162] In this embodiment of the application, when generating a 3D model (referring to a 3D digital model) from an image, an image containing the first or second part of the target object can be used as input to a 3D generative model (referring to a machine learning model), and the machine learning model is used to generate a 3D digital model of the corresponding part. The input image to the 3D generative model can be a single image, multiple images, or multi-view images from different perspectives. Commonly used 3D generative models include Large Reconstruction Models (LRM) and Large Diffusion Models (LDM).

[0163] Besides LRM and LDM, 3D generative models can also be other models. Here are a few examples:

[0164] (a) Neural Radiance Fields (NeRF) model: The input of this model is a multi-view image, which generates a high-resolution 3D scene from the multi-view image and can generate realistic images from any viewpoint.

[0165] (ii) Generative Adversarial Networks (GANs): These models take random noise or images as input and generate high-quality 3D models through adversarial training between a generator and a discriminator. Some variants of GANs can directly generate 3D models from images.

[0166] (iii) Pixel to Mesh (Pix2Mesh) model: The input of this model is a single image, which is used to generate a 3D mesh model from a single image. It is suitable for single-image 3D reconstruction.

[0167] (iv) Pixel-Aligned Implicit Function (PIFu) model: The input of this model is one or more images, which are used to extract pixel alignment features from the images to generate high-quality 3D human body models.

[0168] (v) Holographic Generative Adversarial Network (HoloGAN): This model takes a single image as input and generates a 3D view from the single image by generating a hologram. It is suitable for 3D reconstruction of a single image.

[0169] It should be noted that the 3D generation models listed above are merely simple examples. Each model has its own characteristics and is suitable for different 3D generation and reconstruction tasks. The appropriate model can be selected based on specific needs. Of course, other 3D models are also applicable to the embodiments of this application, and will not be elaborated upon here.

[0170] In addition, it should be noted that when generating 3D models from images, besides using 3D generation models, 2D distillation upscaling, deep learning methods, multi-view reconstruction, and feature point-based methods can also be used. Furthermore, 3D models can be generated by combining text or using text alone to meet the needs of different application scenarios.

[0171] Optionally, when generating a 3D model of the target part of the target object based on an image containing the target part of the target object, the model can be generated multiple times, and then, based on the generation quality, a 3D model of the target part that meets the expected quality requirements can be retained.

[0172] Taking the generation of 3D body parts using LRM as an example, the process begins by acquiring an image containing the target object's body. This input image can be preprocessed, including cropping, scaling, and denoising, to ensure the image quality meets the requirements of the generated model. Then, LRM is used to generate 3D models of the body parts multiple times based on the input image.

[0173] In this embodiment of the application, in order to improve the generation quality, a generation number can be set, such as generating 5 or 10 times, and each generation will produce a three-dimensional model.

[0174] Finally, by evaluating the quality of these 3D models, the individual generated quality of each model is determined, and based on the generated quality, one or more of these 3D models that meet the expected quality requirements are retained. For example, the model with the highest generated quality is usually selected.

[0175] In the process of quality assessment, a set of assessment indicators can be predefined, and the 3D model can be scored based on these indicators to obtain the quality of the generated 3D model.

[0176] In this application embodiment, the evaluation indicators include, but are not limited to, some or all of the following:

[0177] (1) Richness of detail: Is the model rich in detail? Are there any missing or blurry parts? (2) Proportional consistency: Are the proportions of the various parts of the model consistent? Is there any distortion? (3) Texture quality: Is the texture of the model clear? Are the colors natural? (4) Style consistency: Is the style of the model consistent with the style of the input image or the target object?

[0178] Once the evaluation indicators are defined, specific scoring criteria can be designed for each indicator.

[0179] Below are some simple examples of specific scoring criteria for designing evaluation indicators, using a maximum score of 10 points as an example:

[0180] For the evaluation metric of richness of detail, for example:

[0181] 9-10 points indicates: very rich in detail, with no obvious missing or blurry details; 6-8 points indicates: relatively rich in detail, with a few missing or blurry details; 3-5 points indicates: average in detail, with many missing or blurry details; 0-2 points indicates: very little detail, with a large number of missing or blurry details.

[0182] For the evaluation indicator of proportionality, for example:

[0183] 9-10 points indicates: Excellent proportions, no distortion. 6-8 points indicates: Relatively harmonious proportions, with slight distortion. 3-5 points indicates: Average proportions, with noticeable distortion. 0-2 points indicates: Unharmonious proportions, with severe distortion.

[0184] For the evaluation metric of texture quality, for example:

[0185] 9-10 points indicates: very clear texture and natural color; 6-8 points indicates: relatively clear texture and relatively natural color; 3-5 points indicates: average texture and somewhat unnatural color; 0-2 points indicates: blurry texture and unnatural color.

[0186] Stylistic consistency (out of 10):

[0187] A score of 9-10 indicates a highly consistent style that perfectly matches the input image or target object; a score of 6-8 indicates a relatively consistent style with slight differences; a score of 3-5 indicates a neutral style with noticeable differences; and a score of 0-2 indicates inconsistent styles with significant differences.

[0188] Subsequently, based on the evaluation indicators and scoring criteria defined above, an automatic evaluation algorithm (such as a convolutional neural network) is used to score each generated 3D model.

[0189] Optionally, when scoring each 3D model, the scores of each evaluation indicator can be weighted and summed to obtain a final comprehensive score. This comprehensive score reflects the quality of the generated 3D model; for example, the higher the comprehensive score, the higher the quality. Therefore, the generated 3D models can be sorted according to the comprehensive score, and one or more 3D models with the highest scores can be selected as the 3D models that meet the expected quality requirements.

[0190] When multiple high-resolution 3D models are selected, they can be fused to obtain the final 3D model for subsequent stitching. Fusion methods include, but are not limited to, geometric fusion (such as surface smoothing and seam treatment) and texture fusion (such as color and material consistency processing). The advantage of this method is that it can combine the strengths of multiple high-quality models, reduce potential defects in individual models, improve the overall quality and consistency of the final model, and thus better meet the expected quality requirements.

[0191] Optionally, when weighting and summing the scores of each evaluation indicator, the weights of the evaluation indicators can be adjusted according to actual needs to highlight the importance of certain key indicators.

[0192] Of course, manual review can also be conducted when necessary to ensure that the quality of the generated 3D model meets expectations.

[0193] In the above implementation, by generating three-dimensional models of the target object and its target parts multiple times, and selecting the results that meet the requirements based on the generation quality, it is possible to ensure that the final generated three-dimensional model has the highest quality and the best visual effect, effectively improving the stability and reliability of the generation.

[0194] Of course, in addition to the above generation methods, some 3D models can be pre-set, allowing the target object to choose a suitable template from them. Specifically, the following method two can be used:

[0195] Method 2: Select the 3D model of the target part of the target object from the preset 3D model set, and use it as the 3D model of the target part of the target object.

[0196] In this embodiment of the application, some high-quality 3D templates (i.e. 3D models) can be prepared in advance. These templates can be manually modeled or pre-generated (such as automatically generated using large models) to ensure that the needs of different application scenarios can be met quickly and efficiently when generating 3D models.

[0197] Optionally, these templates can be 3D images covering the same style and type, or they can be 3D images covering different styles and types, such as cartoon style, retro style, etc. Furthermore, these templates can be categorized by body parts, allowing users or the system to select the appropriate template as needed.

[0198] In this way, based on the characteristics and needs of the target object, the most suitable template can be selected from the preset template set.

[0199] Based on this, the selected template can be adjusted and optimized according to the specific characteristics of the target object to ensure that the generated 3D model better meets the requirements. The adjustments may include, but are not limited to:

[0200] (1) Size adjustment: Adjust the size of the template to match the proportions of the target object and avoid an unnatural appearance. (2) Detail optimization: Refine the details of the template, add or modify certain features to make it more realistic or in line with a specific style.

[0201] Taking a human as the target object, the head as the first part, and the 3D model of the first part as the 3D head model, and the body as the second part, and the 3D model of the second part as the 3D body model, as an example, an optional implementation method for S41 is as follows:

[0202] For the first part (head): Based on the image containing the face of the target object, a three-dimensional head model corresponding to the target object is generated. For the specific generation method, please refer to the above embodiment. Repeated parts will not be described again.

[0203] For example, using 3D generative models or deep learning methods, a high-quality head model can be generated based on a user-provided head image containing a frontal view.

[0204] The head image can be a red-green-blue (RGB) image, an RGB-depth (RGB-D) image, a video frame, a texture, an avatar, etc. This article does not make specific restrictions on this. The same applies to images of other parts, which will not be elaborated on here.

[0205] Optionally, the head image may carry head posture information, facial expression information, and texture information. Head posture refers to the posture information of the head, and facial expression refers to the expression of the face corresponding to the head. This application does not limit the head posture and facial expression corresponding to the head image; they can be fictional exaggerated postures and expressions, real postures and expressions, or postures and expressions with special effects, etc.

[0206] like Figure 5 The diagram shown is a logical block diagram illustrating a method for acquiring a 3D human head and a 3D human body according to an embodiment of this application. Specifically, Figure 5 This indicates that the 3D head and body are generated separately, where the 3D head is based on the input image, such as... Figure 5 The avatar image S501 in the image is generated using a 3D generative model, including but not limited to LDM and LRM.

[0207] Based on this, highly detailed and realistic head models can be generated, ensuring the accuracy of facial features. This is suitable for head generation requiring high personalization and detail, such as customized virtual avatars and game characters. The high degree of personalization in these head models stems not only from their generation being based on the user's actual image or detailed description, ensuring the accuracy and personalization of facial features, but also from their ability to include more details, such as facial expressions and hairstyles, making the generated 3D models more vivid and realistic. Furthermore, users can select different generated models to create head models of various styles, satisfying diverse personalization needs.

[0208] For the second part (body): the three-dimensional body template selected from the preset three-dimensional body template set of the target object is used as the three-dimensional body model. For the specific generation method, please refer to the above embodiment. Repeated parts will not be described again.

[0209] Alternatively, for the second part (body): generate a three-dimensional body model corresponding to the target object based on the image containing the target object's body; on this basis, the three-dimensional body model can also be generated multiple times, and the best result can be selected. For specific generation methods, please refer to the above embodiments, and repeated parts will not be described again.

[0210] Taking template selection as an example, for instance, a set of high-quality body templates are pre-set and stored in the template library. Based on the overall style and requirements of the target object, the most suitable 3D body template is selected from the template library.

[0211] In addition, the size of the 3D body template can be adjusted to ensure that the proportions of the head and body are in harmony. At the same time, the details of the body template can be adjusted as necessary to make it consistent with the style of the head model.

[0212] Still with Figure 5 For example, the 3D human body specifically refers to a 3D human body template selected from the template library S502, which is either manually modeled or pre-generated.

[0213] Based on this, users can directly select preset high-quality body models, which not only reduces generation time and computational costs but also significantly lowers generation costs. This is particularly suitable for scenarios requiring rapid generation of overall images, such as virtual try-on and rapid prototyping. Furthermore, the preset templates cover a variety of styles and body types, allowing users to choose the most suitable template based on their specific needs, increasing generation flexibility. Simultaneously, the selected template supports direct adjustment and optimization to better and faster meet specific application requirements.

[0214] It should be noted that the processes of inputting images for the target object or selecting templates from the template library can be completed based on the relevant client installed on the terminal device.

[0215] The following description, in conjunction with the accompanying diagram, explains the operation process on the client side.

[0216] For example, this client is a platform or tool focused on creating and customizing 3D characters, providing a range of features to help users design, model, animate, and render 3D characters.

[0217] like Figure 6 As shown, this is a schematic diagram of the first client-side user interface in an embodiment of this application. Interface 61 is the main interface of the "3D Character Dream Factory" product, displaying a series of 3D cartoon avatars of other users, i.e., "Everyone's Characters." These characters are generated based on pre-generated body templates. Users can click on these samples to view detailed 3D character information and may choose one as a basis for their own character design.

[0218] In addition, users can click "My Character" at the bottom of interface 61 to enter the corresponding page. Besides viewing their characters, users can also favorite, share, or save them. Furthermore, users can also choose to create their own identical characters.

[0219] like Figure 7 As shown, this is a schematic diagram of the second type of client-side user interface in this application embodiment. Assuming the user clicks "Create Similar Image" at the bottom of interface 71, they can enter interface 72. Interface 72 is a photo upload page where the user can upload a clear, frontal portrait. Several pre-generated 3D character samples (such as character a, character b, character c, character d, character e, etc.) are listed below for the user to browse and select, inspiring their creative inspiration. The user can also choose other suitable body templates. The system will generate a 3D cartoon portrait similar to the input portrait based on this frontal portrait and the currently selected body template. For the specific generation process, please refer to [link to documentation]. Figure 4 This will not be repeated here.

[0220] In summary, the above Figure 6 and Figure 7 The user interfaces listed above together form a complete product process, allowing users to start by selecting a template, upload photos to generate avatars, and finally edit and refine their characters to create personalized 3D cartoon characters.

[0221] In this embodiment, by generating the head and body separately, not only can the model of each part be independently adjusted and optimized during the generation process, providing greater flexibility and creative space—for example, more detailed facial expression modeling can be performed on the head, while more natural motion design can be done on the body—but also, the models generated separately as individual modules facilitate subsequent modification and replacement, greatly improving the maintainability and scalability of the model. The method of generating the head based on the model and the body based on the selected template ensures the consistency and high quality of the generated 3D model in terms of detail and style, while also possessing multiple advantages such as cost-effectiveness, fast generation speed, high degree of personalization, strong flexibility, good stability, and excellent user experience.

[0222] The following text will take a human as the target object, with the head as the first part and the body as the second part as the example, to explain the generation method of each three-dimensional image in this application. Of course, in addition to this type of object and the first and second parts, other objects and the first and second parts are also generated in the same way, which will not be described in detail in this article.

[0223] S42: Combine the 3D models of the first part and the second part to obtain a combined 3D object model, and smooth the seams in the combined 3D object model.

[0224] In S42, in order to ensure the overall geometric consistency of the 3D model of the first part and the 3D model of the second part after splicing, some key steps need to be taken. These steps include not only the splicing itself, but also the fine processing of the geometry and texture at the splicing point to eliminate visible splicing traces.

[0225] For example, it is necessary to remove the overlapping parts between the 3D model of the first part and the 3D model of the second part, and find the vertex index at the seam, so as to perform progressive smoothing on the seam part.

[0226] Therefore, an optional implementation of S42 is as follows, including S421 to S423 ( Figure 4 (Not shown):

[0227] S421: Geometrically stitch the 3D model of the first part and the 3D model of the second part together, and remove the overlapping parts between the 3D model of the first part and the 3D model of the second part during the stitching process to obtain the stitched 3D object model.

[0228] To ensure overall geometric consistency after splicing, this application employs a geometric union method for geometric splicing, while simultaneously removing overlapping portions of the 3D head (i.e., the 3D model of the first part) and the 3D human body template (i.e., the 3D model of the second part). The specific steps are as follows:

[0229] First, load the mesh data of the 3D human head and 3D human body template.

[0230] This mesh data is a collection describing all the vertex and face information of a 3D model, typically including a vertex list and a face list. The vertex list contains the coordinates and other attributes of all vertices (such as normals, color, texture coordinates, etc.). The face list contains the vertex index information of all faces; each face consists of a set of vertex indices that point to specific vertices in the vertex list.

[0231] Then, based on the previously loaded mesh data, the union of the two 3D models is calculated, and duplicate parts are removed to ensure that there are no duplicate vertices in the merged model.

[0232] Optionally, this step can be implemented using the union operation in Boolean operations. Based on the previously loaded mesh data, the 3D head and the 3D human body template are merged into a new model (i.e., the stitched 3D object model). The new model contains all the vertices and faces of the 3D head and the 3D human body template, while removing duplicate vertices, duplicate faces, duplicate edges, and other geometry in the overlapping parts. It is a complete 3D model without duplicate geometry.

[0233] Besides the geometric stitching methods mentioned above, Boolean operations such as difference or intersection can also be used to stitch 3D models together while ensuring overall geometric consistency after stitching. For example, the overlapping portion between the 3D human head and the 3D human body template can be subtracted first, and then the processed 3D human head can be merged with the 3D human body template. Alternatively, the intersection of the two models can be calculated, and only this part can be retained to connect the two, thus achieving seamless stitching. These methods can also effectively remove duplicate geometry and ensure smooth transitions between models, and will not be elaborated on further here.

[0234] Of course, besides Boolean operations, other techniques can be used to stitch two 3D models together to achieve a more natural or specific effect integration. For example, blending can apply a smooth transition at the contact boundary of two models, making the connection between the two models look more natural by adjusting the vertex positions at the boundary or adding additional geometric details. Morphing changes the shape of one model to better match another, suitable for scenes that require maintaining a certain continuity or animation effect. Texturing can use special texture maps at the stitching point to cover the seams and enhance visual continuity. In addition, skeleton binding adds bones to the models, allowing the two models to move in a coordinated manner during animation, which is particularly suitable for stitching together character models.

[0235] It should be noted that each of the splicing technologies listed above has its own characteristics, and the most suitable splicing technology can be selected according to specific needs. Furthermore, the splicing technologies listed above are merely simple examples; other splicing technologies are also applicable to the embodiments of this application, and will not be elaborated upon here.

[0236] After obtaining the stitched 3D object model, it is necessary to remove geometric stitching marks. For subsequent operations, it is necessary to first find the vertex indices at the seams, as shown in S422 below:

[0237] S422: Determine the vertices of each seam in the assembled 3D object model.

[0238] In the embodiments of this application, determining the seam vertices in the spliced ​​3D object model is an important step to ensure that the model is smooth and natural.

[0239] For example, when geometrically stitching a 3D human head and a 3D human body template, the original identical vertices in the overlapping areas of these two 3D models will be merged. In this process, in order to maintain the geometric continuity of the model and ensure that the surface of the merged model is smooth and the topological structure is correct, some new vertices will be generated at the junction of the two 3D models. These new vertices are often located at the seams of the models. Therefore, the method of finding the newly generated vertices after geometric deduplication can be used to find the vertex index at the seam to accurately find the seam location.

[0240] Specifically, newly generated vertices can be determined by comparing vertex indices. By comparing the vertex list of the newly generated model (i.e., the stitched 3D object model) with the vertex lists of the original 3D head and 3D human body templates, these new vertices can be identified, thus determining the seam vertices.

[0241] Furthermore, newly generated vertices can be identified through neighborhood analysis. Specifically, each vertex's neighboring vertices are examined. If a vertex's neighboring vertices come from different original models (i.e., some from the 3D human head and others from the 3D human template), then this vertex is likely a seam vertex.

[0242] Alternatively, newly generated vertices can be determined by the difference in normal directions. Specifically, at the seam, since the surfaces of the two models may originate from different directions, the normal directions of the seam vertices may differ significantly. By comparing the normal directions of adjacent vertices, the seam vertices can be identified.

[0243] Alternatively, newly generated vertices can be determined through geometric feature detection. Specifically, computer vision and machine learning techniques are used to detect geometric features in the stitched 3D object model, such as edges and corners. There are usually obvious geometric feature changes at the seams, and these features can be used to locate the seam vertices.

[0244] It should be noted that each of these methods has its own advantages and disadvantages. In practical applications, the most suitable method can be selected according to the specific circumstances, or multiple methods can be combined to improve accuracy. Furthermore, the methods for determining the joint vertices listed above are merely simple examples; other methods are also applicable to the embodiments of this application, and will not be elaborated upon here.

[0245] After locating the seam vertices, in order to ensure overall geometric consistency and a smooth visual transition, the seam area needs to be smoothed. This application adopts a progressive smoothing method, as shown in step S423 below:

[0246] S423: Based on each seam vertex, perform progressive smoothing on the seam portion of the spliced ​​3D object model.

[0247] In this embodiment, after locating the seam vertices, a progressive smoothing process is performed on the seam. This progressive smoothing process refers to smoothing the seam portion of the spliced ​​3D object model step-by-step and layer-by-layer. For example, starting from the seam, the process gradually extends away from the seam to gradually eliminate splicing marks, making the surface of the seam smoother and more natural.

[0248] An optional implementation is to carry out S423 according to the following process, including the following steps S4231 to S4232 ( Figure 4 (Not shown):

[0249] S4231: Obtain the neighborhood patches of different levels connected to each seam vertex within a specified range along the target direction.

[0250] Each level corresponds to a sub-range within a specified range; the neighborhood patch is a patch composed of vertices connected to the seam vertex (directly or indirectly); the target direction indicates the direction from the first part to the second part.

[0251] In this embodiment, the neighborhood patches can be divided into different levels according to their distance from the vertex, and each level contains patches within a different range.

[0252] For a seam vertex, different levels refer to multiple layers formed by expanding outwards layer by layer from the seam vertex along the target direction. Specifically, each level corresponds to a sub-range within a specified range along the target direction. Therefore, the neighborhood patches of different levels specifically include: patches formed by vertices directly or indirectly connected to the seam vertex within different specified sub-ranges expanding outwards layer by layer along the target direction, starting from the seam vertex.

[0253] The target direction refers to the direction from the first part to the second part. By setting the target direction, it can be ensured that the smoothing process is mainly concentrated at and around the seam, especially at the junction of the first and second parts. This avoids unnecessary smoothing of areas far from the seam, thereby improving efficiency, maintaining the original features of the model, ensuring the smoothness and natural transition at the seam, and enhancing the overall aesthetics.

[0254] The specified range is used to determine the facets that can be reached from the seam vertex along the target direction. Specifically, it can refer to a distance range defined in this target direction, or it can be a hierarchical range used to determine which surrounding facets will be taken into account.

[0255] The distance range refers to a fixed distance value or interval defined in the target direction, starting from the vertices of the seam, which can be adjusted according to specific needs. Within this range, all faces that meet the criteria will be selected.

[0256] For example, the seam vertex is located at the junction of the head and body, and the target direction is from the head to the body. A specified range can be defined as a distance of 10 units from the seam vertex along the path from the head to the body. This means that all faces within this 10-unit distance will be selected and smoothed. The number of neighboring faces within this 10-unit distance is not fixed for different seam vertices and may vary. For instance, one seam vertex might have 6 neighboring faces within 10 units, while another might have 5, and so on.

[0257] In addition, different specified sub-ranges within 10 unit distances can be: 0 to 2 unit distances, 2 to 4 unit distances (excluding 2), 4 to 6 unit distances (excluding 4), and so on.

[0258] The hierarchy range refers to a defined number of levels in the target direction, starting from the seam vertex. This number of levels reflects a fixed neighborhood size, which is adjusted according to specific needs. Each level represents the progressive hierarchy from the current vertex to its neighboring vertices.

[0259] For example, you can set the processing to start from the seam vertex and proceed along the neighborhood of 8 levels from the head to the body. This means that all faces within these 8 levels will be selected and smoothed. Alternatively, you can set the processing to start from the seam vertex and proceed along the neighborhood of 6 levels from the head to the body. This means that all faces within these 6 levels will be selected and smoothed.

[0260] Furthermore, the different designated sub-ranges within the 8 levels can be: each level of neighborhood represents a designated sub-range, and so on.

[0261] In this embodiment, the distance range is suitable for situations requiring precise control of physical distances during smoothing, especially when the model structure is relatively uniform. The hierarchy range is suitable for situations requiring smoothing based on the local complexity of the model, especially when the model structure is complex and variable. By selecting an appropriate range type, the area and degree of smoothing can be controlled more effectively, ensuring a natural transition at seams while keeping other parts of the model unaffected. In practical applications, the specific setting of this range can be flexibly adjusted according to requirements and is not specifically limited here.

[0262] Specifically, in a 3D model, a facet is a polygon consisting of three or more vertices, and is typically used to represent the surface of a 3D model.

[0263] Taking a triangular facet as an example, such as Figure 8 As shown, this is a schematic diagram of a local surface of a three-dimensional model in an embodiment of this application. It consists of many triangular facets that are interconnected to form a complex geometric structure. Notably, some triangular facets share the same vertices, meaning they are closely connected in three-dimensional space and together constitute part of the model. This construction method helps improve the accuracy and expressiveness of the model, especially when dealing with curved surfaces and smooth transitions.

[0264] As in the embodiments of this application, for a seam vertex, the neighborhood patches of different levels include patches composed of vertices directly or indirectly connected to the seam vertex within a specified range of the target direction. These patches can also be referred to as patches directly or indirectly connected to the seam vertex. For example, a first-level neighborhood patch refers to a patch directly connected to the seam vertex; these patches share the vertex and reflect the vertex's direct local geometry. A second-level neighborhood patch refers to a patch connected to the vertices (i.e., neighboring vertices) of a first-level neighborhood patch, but excluding the first-level neighborhood patches themselves; these patches reflect the vertex's secondary local geometry. A third-level neighborhood patch refers to a patch connected to the vertices of a second-level neighborhood patch, but excluding the first and second-level neighborhood patches; these patches reflect the vertex's broader local geometry. ... and so on.

[0265] like Figure 9 As shown, it is a schematic diagram of a neighborhood patch of different levels in an embodiment of this application, wherein the neighborhood patches of different levels are represented by different filling patterns.

[0266] Suppose there is a seam vertex A that belongs to faces ABC and ABD, meaning vertex A is directly connected to faces ABC and ABD. These faces constitute the first-order neighborhood of vertex A. Other faces connected to vertices B, C, and D (excluding ABC and ABD) constitute the second-order neighborhood of vertex A, such as... Figure 9 In the diagram, BDE, BEF, BFC, CIJ, and CFI are considered. Other faces connected to vertices E, F, and I (excluding first-order and second-order neighbor faces) constitute the third-order neighbor faces of the seam vertex A, such as... Figure 9 EFG, FGH, and FHI in the formula.

[0267] It should also be noted that the above example is based on the first-level neighborhood patch including the seam vertex itself. When the first-level neighborhood patch does not include the seam vertex itself, in S4232, the seam vertex also needs to be smoothed. Moreover, the seam vertex has the highest degree of smoothness compared to its neighboring patches at different levels (that is, the seam vertex is regarded as a separate level).

[0268] S4232: Performs different degrees of smoothing on neighboring patches at different levels.

[0269] The smoothness of neighborhood patches at different levels decreases along the target direction. Here, "neighborhood patch" refers to the seam vertex; therefore, the smoothness of each neighborhood patch is negatively correlated with the distance between that neighborhood patch and the seam vertex.

[0270] In this paper, the distance between a face and a vertex can refer to the distance between the centroid of the face (or a specific point) and the vertex, such as Euclidean distance, Manhattan distance, or Chebyshev distance, etc., without being specifically limited here.

[0271] For example, when the target object is a person, with the first part being the head and the second part being the body, that is, the farther away from the head (and the farther away from the seam vertex) the neighboring patch has a lower degree of smoothness.

[0272] Specifically, progressive smoothing of neighboring faces at different levels of the seam vertex refers to the following: after finding the seam vertex, applying different degrees of mesh smoothing to neighboring faces at different levels gradually increases the smoothing range to update the positions of vertices contained in each level of neighboring faces. The operation starts with neighboring faces closer to the seam and gradually expands towards those farther away, with the degree of smoothing decreasing each time. This effectively eliminates geometric discontinuities and visual abrupt changes at the seam, ensuring a natural smoothing effect without affecting the overall geometric structure of the model.

[0273] In the embodiments of this application, the smoothing methods include, but are not limited to, Laplacian smoothing and Taubin smoothing. These two methods are commonly used 3D mesh smoothing techniques to improve the surface quality of 3D models and reduce noise and irregularities.

[0274] Specifically, different degrees of smoothing can be achieved by adjusting the smoothing parameters during the smoothing process, such as the smoothing factor and the number of smoothing iterations. A smaller smoothing factor (meaning a smaller absolute value when a negative smoothing factor exists) and fewer smoothing iterations achieve light smoothing, while a larger smoothing factor (meaning a larger absolute value when a negative smoothing factor exists) and more smoothing iterations achieve strong smoothing.

[0275] The principles and applications of these two smoothing methods will be introduced below:

[0276] (a) Laplacian smoothing reduces surface irregularities by moving each vertex to the average position of its directly connected neighboring vertices. It is suitable for simple noise removal and surface smoothing tasks. This method is simple to implement, computationally efficient, and mainly affects the local neighborhood of a vertex without changing the overall shape of the model. It can effectively improve the surface quality of 3D models, making them appear smoother.

[0277] Specifically, in this application, for each vertex contained in a neighborhood patch, when performing Laplacian smoothing, the smoothing factor λ (positive smoothing factor) is used to control the average position of the vertex moving towards its directly connected neighboring vertices, thereby achieving smoothing of the model surface.

[0278] A larger λ value results in more vertex movement, making the model surface smoother, but may lead to a loss of more geometric details. A smaller λ value results in less vertex movement and a weaker smoothing effect, but better preserves the model's geometric features and details. Choosing the right λ value allows for smoothing the model surface while maintaining its geometric features and details.

[0279] (ii) Taubin smoothing is an improvement on Laplacian smoothing. By alternating between positive and negative smoothing factors, Taubin smoothing can preserve more detail while smoothing the surface. Compared to simple Laplacian smoothing, Taubin smoothing is better at preventing the model surface from becoming too smooth, making it suitable for 3D models that require high-quality smoothing while preserving detail.

[0280] Specifically, the Taubin smoothing algorithm uses two smoothing factors, typically denoted as λ and μ. The effects of these two factors are as follows:

[0281] The positive smoothing factor λ is mainly used to smooth the surface of the model, reduce high-frequency noise and small-scale irregularities. Its value is usually a small positive value, and the specific value depends on the characteristics of the model and the required smoothness.

[0282] The negative smoothing factor μ is used to counteract the oversmoothing effect caused by λ, preventing the model from becoming too smooth and losing important geometric features. Its value is usually a small negative value, and the specific value needs to be adjusted according to the characteristics of the model and the required degree of smoothness.

[0283] By properly setting λ and μ, ensuring that λ>0 and |μ|<λ, the Taubin smoothing algorithm can smooth the model surface while preserving the model's geometric features and details.

[0284] In practical applications, to achieve different levels of smoothness, one can adjust only the smoothing factor or the number of smoothing iterations, or both. Below are a few simple examples of different ways to adjust the smoothness level:

[0285] Adjustment Method 1: The number of smoothing cycles is fixed, and only the smoothing factor is adjusted.

[0286] (1) When achieving different degrees of Laplace smoothing, the smoothing number can be kept constant while the smoothing factor λ can be increased or decreased, for example:

[0287] For light smoothing, set the smoothing factor λ = 0.1 and the smoothing times to 5.

[0288] For moderate smoothing, set the smoothing factor λ = 0.2 and the smoothing times to 5.

[0289] When smoothing the intensity, set the smoothing factor λ = 0.3 and the smoothing times to 5.

[0290] (2) When achieving different degrees of Taubin smoothing, the number of smoothing iterations can be kept constant, while the smoothing factors λ and |μ| can be increased or decreased, for example:

[0291] Mild smoothing factor: λ = 0.5, μ = -0.1, smoothing order 5;

[0292] Moderate smoothing factor: λ = 0.6, μ = -0.2, smoothing order 5;

[0293] Intensity smoothing factor: λ = 0.8, μ = -0.3, smoothing order is 5.

[0294] In summary, by adjusting the smoothing factor, different degrees of smoothing effect can be achieved with a fixed number of smoothing operations.

[0295] Adjustment Method 2: Fix the smoothing factor and only adjust the number of smoothing cycles.

[0296] (1) When achieving different degrees of Laplace smoothing, the smoothing factor λ can be kept constant while the smoothing order can be increased or decreased, for example:

[0297] For light smoothing, set the smoothing factor λ = 0.1 and the smoothing times to 3.

[0298] For moderate smoothing, set the smoothing factor λ = 0.1 and the smoothing times to 5.

[0299] When smoothing the intensity, set the smoothing factor λ = 0.1 and the smoothing times to 10.

[0300] (2) When achieving different degrees of Taubin smoothing, the smoothing factors λ and μ can be kept fixed, while the smoothing order can be increased or decreased, for example:

[0301] Mild smoothing factor: λ = 0.5, μ = -0.1, smoothing order 3;

[0302] Moderate smoothing factor: λ = 0.5, μ = -0.1, smoothing order 5;

[0303] Intensity smoothing factor: λ = 0.5, μ = -0.1, smoothing times are 10.

[0304] In summary, by adjusting the number of smoothing iterations, different degrees of smoothing effects can be achieved with a fixed smoothing factor λ.

[0305] Adjustment Method 3: Adjust both the smoothing count and the smoothing factor simultaneously.

[0306] (1) To achieve different degrees of Laplace smoothing, the smoothing factor λ and the number of smoothing operations can be adjusted simultaneously:

[0307] For light smoothing, set the smoothing factor λ = 0.1 and the smoothing times to 3.

[0308] For moderate smoothing, set the smoothing factor λ = 0.2 and the smoothing times to 5.

[0309] When smoothing the intensity, set the smoothing factor λ = 0.3 and the smoothing times to 10.

[0310] (2) To achieve different degrees of Taubin smoothing, the smoothing factors λ and μ, as well as the number of smoothing operations, can be adjusted simultaneously:

[0311] Mild smoothing factor: λ = 0.5, μ = -0.1, smoothing order 3;

[0312] Moderate smoothing factor: λ = 0.6, μ = -0.2, smoothing order 5;

[0313] Intensity smoothing factor: λ = 0.8, μ = -0.3, smoothing times are 10.

[0314] In summary, by simultaneously adjusting the smoothing count and smoothing factor, the degree of smoothing can be controlled more flexibly, achieving different levels of smoothing effects.

[0315] It should be noted that, in addition to the smoothing methods listed above, other smoothing methods can also be used. For example, by applying a Gaussian filter around each seam vertex and using a weighted average based on the distance between the seam vertex and its neighboring vertices, the model surface can be smoothed, thus better preserving the local features of the model. Another example is by calculating the mean curvature of each seam vertex and adjusting the vertex position according to the curvature value, so that the model surface gradually becomes flatter. Yet another example is by calculating the Laplacian coordinates of each seam vertex (i.e., the difference between the average position of the seam vertex and its neighboring vertices) and keeping these coordinates relatively unchanged during the smoothing process, thereby preserving the local features of the model while smoothing the surface. These methods will not be elaborated on here.

[0316] In practical applications, the most suitable smoothing method can be selected according to specific needs to ensure the smoothness and natural transition of the spliced ​​3D model in the seam area.

[0317] In practical applications, the smoothing method and smoothing parameters can be adjusted according to specific needs to achieve different degrees of smoothing effect.

[0318] In the above implementation, by combining the target direction and the specified range, the scope and degree of smoothing can be precisely controlled. By limiting the processing range, the amount of computation can be reduced, processing efficiency can be improved, and a natural transition at the seams can be ensured while keeping other parts of the model unaffected. Furthermore, by performing progressive smoothing on neighborhood patches at different levels, it is possible to analyze the local geometric characteristics of vertices, such as curvature and smoothness, thereby gaining a more detailed understanding of the local geometric structure of the 3D model, providing more refined control and optimization, eliminating seam traces while ensuring the overall natural and aesthetically pleasing effect, and reducing the impact on non-seam areas.

[0319] Furthermore, based on the above implementation method, it can be ensured that the first and second parts are seamlessly connected in the spliced ​​model, forming a high-quality, natural 3D object model. Specifically, removing duplicate parts can avoid geometric conflicts, and finding the vertex indices at the seams helps to accurately perform smoothing, thereby achieving overall geometric consistency and a smooth visual transition.

[0320] Taking a human as the target, with the head as the first part and the body as the second part, step S42 mainly focuses on the process of... Figure 5The 3D head and 3D human body templates obtained in the manner shown are geometrically smoothed together to eliminate geometric stitching marks.

[0321] See Figure 10 As shown, it is a logic block diagram of a geometrically smooth splicing embodiment of this application. Figure 10 As shown, to ensure overall geometric consistency after splicing, the overlapping parts of the 3D head and 3D body templates are first removed using the geometric union method; then, the seam position is calculated to determine the seam vertex; after finding the seam vertex, the seam neighborhood is progressively smoothed. Specific implementation details of these processes are given in the above embodiments, and repeated parts will not be described again. This method differs from hard geometric splicing and can effectively eliminate seam traces.

[0322] See Figure 11 As shown, this is a comparison diagram of the effects before and after progressive smoothing in an embodiment of this application. Specifically, Figure 11 Indicates based on Figure 10 The results of progressively smoothing the texture of the seam area are shown below. It is clear that before progressive smoothing, the seam area where the head and body are spliced ​​together (referring to the neck area) has obvious seam marks, as shown in the dashed box S111. However, before progressive smoothing, the seam marks are eliminated, making the overall 3D model more natural and beautiful, as shown in the dashed box S112.

[0323] After performing geometric smooth splicing in S42, although a unified and natural geometric shape is achieved, there may still be a noticeable difference in color between the two different spliced ​​parts at the seam, affecting the visual experience. Therefore, based on identifying the seam location, it is necessary to blend the colors of the two parts at the seam to ensure a natural color transition and improve the overall visual effect. The specific process is as follows in S43:

[0324] S43: Based on the texture of the first part in the spliced ​​3D object model, perform texture fusion on the seam part to obtain the fused 3D object model.

[0325] In this step, the seam is textured based on the texture of the first part. This allows for the priority preservation of high-quality texture details, reduces visual discontinuities at the seam, maintains overall style consistency, simplifies the processing flow, and results in a more natural and realistic 3D model.

[0326] For example, first, the texture of the first part (such as the head) in the stitched 3D object model is loaded, and key features such as color, brightness, and texture details are extracted. Then, the texture at the seam is fused based on the features of the first part's texture. Various texture fusion algorithms can be used, such as weighted averaging, texture synthesis, and texture transfer. Furthermore, the fused texture can be smoothed to ensure a natural transition at the seam without obvious boundaries.

[0327] The common method is to directly perform texture fusion using linear averaging (i.e., weighted averaging with equal weights). However, linear averaging does not conform to the perception of the human eye, as the sensitivity of the human eye to different brightness or color decreases exponentially.

[0328] To better simulate the perception patterns of the human eye, this application employs texture transfer for texture fusion instead of simple linear averaging. Texture transfer can more naturally handle varying degrees of brightness and color sensitivity, ensuring smoother and more natural texture transitions at seams.

[0329] Therefore, an optional implementation method is to carry out S43 according to the following process, including the following steps S431 to S432:

[0330] S431: Get the neighboring vertices of different levels connected to each seam vertex within a specified range along the target direction.

[0331] Each level corresponds to a sub-range within a specified range, and the neighboring vertex is the vertex connected to the seam vertex (directly or indirectly); the target direction indicates the direction from the first part to the second part.

[0332] In the embodiments of this application, neighboring vertices are similar to neighboring patches. These vertices can be divided into different levels according to their distance from a specific vertex, and each level contains vertices within a different range.

[0333] For a seam vertex, the neighboring vertices at different levels specifically include: vertices directly or indirectly connected to the seam vertex within different specified sub-ranges extending outwards layer by layer along the target direction. For example, a first-level neighboring vertex is a vertex directly connected to the seam vertex. A second-level neighboring vertex is a vertex connected to a first-level neighboring vertex, but does not include the first-level neighboring vertex itself. A third-level neighboring vertex is a vertex connected to a second-level neighboring vertex, but does not include first-level and second-level neighboring vertices. ...and so on.

[0334] It should be noted that, based on obtaining the neighborhood patches in S4231 above, the vertices contained in these neighborhood patches are also the neighborhood vertices in S431. Continuing with the above... Figure 9For example, for the seam vertex A, its corresponding first-level neighbor vertices are: vertices B, C, and D; its corresponding second-level neighbor vertices are: vertices E, F, and I; and its corresponding third-level neighbor vertices are: vertices H and G.

[0335] S432: Using each seam vertex and neighboring vertices at different levels as processing points, for each processing point, update the color value of the processing point according to the color value of the first part vertex associated with the processing point.

[0336] In this context, the first vertex associated with a processing point refers to the vertex in the first part that is closest to the processing point.

[0337] In 3D models, vertex color values ​​are typically used to define the appearance of the model's surface. These color values ​​can be used for various purposes such as rendering, texture mapping, and lighting calculations. The color value of each vertex usually consists of three components: red (R), green (G), and blue (B), and sometimes also includes an alpha (A) component, forming the RGBA format.

[0338] In 3D model files, vertex colors are typically represented as floating-point numbers or integers. For example, floating-point numbers: each color component typically ranges from 0.0 to 1.0. Or integers: each color component typically ranges from 0 to 255.

[0339] In this step, the color values ​​of each processing point need to be updated individually. Specifically, for a processing point, firstly, the vertex of the first part of the 3D object model that is closest to the processing point needs to be determined. This can be achieved by calculating the Euclidean distance or other distance metrics (such as Manhattan distance or Chebyshev distance).

[0340] For example, for a processing point P, there are head vertices V1, V2, ..., Vn in the three-dimensional object model. Then, by calculating the distance between each head vertex Vi (i∈[1,n]) and the processing point P, the head vertex with the smallest distance can be selected, which is denoted as Vp.

[0341] Then, the color value of the processing point can be updated based on the color value of the vertex of the first part.

[0342] Specifically, the update method can be a simple assignment, or a weighted average based on the color of the first part's vertex. Alternatively, it can combine the color values ​​of multiple first part vertices around the processing point (i.e., the closest, second closest, etc.) for updating, thereby passing the color of the first part's vertex at the seam towards the second part.

[0343] An optional implementation is to carry out S432 according to the following process, including the following steps S4331 to S4333 ( Figure 4 (Not shown):

[0344] S4331: Determine the distance between the processing point and the vertex of the first part.

[0345] Specifically, Euclidean distance or other distance metrics can be used to calculate the distance between two vertices.

[0346] S4332: Based on the distance value, determine the first weight corresponding to the vertex of the first part and the second weight corresponding to the processing point; wherein, the first weight is negatively correlated with the distance value, and the second weight is positively correlated with the distance value.

[0347] The first weight is negatively correlated with distance; that is, the closer the processing point is to the vertex of the first part, the greater the weight. This means that the closer the vertex of the first part is to the processing point, the greater its influence on the color value of the processing point. This ensures that the color value of the processing point is mainly influenced by nearby vertices, thus maintaining the consistency of local features. Of course, it can also be considered that the farther the processing point is from the first part, the greater the influence of its original color value, avoiding over-reliance on the color of distant vertices and maintaining the original color features of the processing point.

[0348] The second weight is positively correlated with distance; that is, the greater the distance, the greater the weight. This means that the farther the vertex of the first part is from the processing point, the less influence its color value has on the processing point, while the influence of the processing point's own original color value is relatively greater. This helps to maintain the original color characteristics of the processing point and avoids over-reliance on the colors of distant vertices. Of course, it can also be considered that the closer the processing point is to the first part, the less influence its original color value has, and the more it is influenced by the color values ​​of nearby vertices of the first part, thus achieving a smooth transition.

[0349] Optionally, to ensure that the updated color values ​​are within a valid range (e.g., RGB values ​​between 0 and 255, and floating-point values ​​between 0.0 and 1.0) and to guarantee the accuracy of the results, the sum of the first and second weights can be set as a target value, such as 1. That is, by normalizing the weights, the sum of the first and second weights is ensured to be 1, thereby guaranteeing the accuracy of the results.

[0350] Of course, you can also add up all the weighted color values ​​and divide by the sum of all weights to ensure the accuracy of the result.

[0351] S4333: Based on the first weight and the second weight, perform a weighted average of the color values ​​of the vertices of the first part and the original color values ​​of the processing points to obtain the updated color values ​​of the processing points.

[0352] Specifically, based on the first and second weights, a weighted average is applied to the color values ​​of the vertices of the first part and the original color values ​​of the processed points. By using a weighted average, a smooth transition of color values ​​can be achieved, avoiding abrupt color changes, thus ensuring that the texture at the seam is more natural and reducing visual discontinuity.

[0353] For example, extract the color value c1 of the first part vertex Vp from the vertex attributes, and process the color value c2 of point P, where the first weight is w1 and the second weight is w2. The updated color value of the processed point is denoted as c2', and its calculation method is as follows:

[0354] c2'=w1×c1+w2×c2 (Formula 1)

[0355] For each color component in the color value, the weighted average can be calculated using the method described above.

[0356] Texture fusion based on the above implementation method can preserve the details and features of the source texture, avoiding the loss of details caused by simple linear averaging. Furthermore, through vertex-by-vertex transfer and optimization processing, it ensures a smooth texture transition at the seams, reducing visual discontinuities.

[0357] Furthermore, in the above implementation, by considering the distance factor, it is ensured that the color value of the processed point is mainly influenced by nearby vertices, while maintaining the original color characteristics of the processed point. This helps to achieve a smooth transition of color values, conforming to the perception rules of the human eye, thereby improving the texture blending effect at the seams and making the visual effect of the model more natural and realistic.

[0358] Furthermore, considering that the sensitivity of the human eye to different brightness and color decreases exponentially, this application proposes an exponential averaging method to transfer the color of the vertex of the first part of the seam to the second part in an exponentially decreasing manner.

[0359] One alternative implementation is that the first weight corresponding to the first part vertex associated with different processing points follows an exponential decay law along the target direction, so as to better simulate this law during texture transfer and ensure a more natural transition of color and brightness.

[0360] Taking the target as a person, the first part as the head, and the second part as the body as an example:

[0361] Specifically, an exponential decay function is used to calculate the first weight, ensuring that the closer the processing point is to the head, the larger the first weight, meaning the greater the influence of the head vertex's color value on the processing point. Conversely, the farther the processing point is from the head, the smaller the first weight, meaning the smaller the influence of the head vertex's color value on the processing point, and the first weight decays exponentially. This simulates the exponential decay of the human eye's sensitivity to different brightness and color, ensuring a more natural transition between color and brightness.

[0362] In this case, the color at the beginning of the seam is transferred downwards with exponential decay. The formula for calculating the transferred color is as follows:

[0363] c new =c head *e n +(1-a n )*c body (Formula 2)

[0364] Among them, c head Let c1 be the color of the head vertex closest to the processing point, n be the neighborhood distance between the processing point and the nearest head vertex, and α be the exponential decay coefficient (here, α is a positive number less than 1). n The first weight corresponding to the head vertex, i.e., w1, c body To process the original color of the point, i.e., c2, 1-theoretical n The second weight corresponding to the processing point, namely w2,c new The color is updated after processing the point.

[0365] In Formula 2, α is a positive number less than 1. In the direction from the head to the body, for different processing points, the greater the distance from the top of the head (i.e., the larger n), the higher α becomes. n The smaller it is, the more it conforms to the law of exponential decay.

[0366] In the above method, exponential averaging color fusion is performed using distance-related weights. The texture of the first part decreases exponentially towards the second part, which better simulates the human eye's sensitivity to different brightness and color levels, ensuring a more natural transition between color and brightness. Furthermore, by considering distance factors, local details are better preserved, avoiding the loss of detail caused by simple linear averaging.

[0367] Based on the above, this application considers that color fusion through the above-mentioned texture transfer method, such as exponential average color fusion, may occasionally result in color unevenness. In response, this application designs a color Gaussian blur smoothing method to further smooth the color values ​​of the points, ensuring that the color transition after texture transfer is more uniform and natural, and reducing color unevenness.

[0368] An optional implementation method is as follows:

[0369] For each processing point, after updating the color value of the processing point based on the color value of the first part vertex associated with the processing point, the color value of the processing point is updated again using Gaussian blur smoothing.

[0370] Specifically, Gaussian blur smoothing refers to assigning appropriate weights to a vertex and its neighbors using the Gaussian distribution principle, calculating the color mean of the vertex and its neighbors according to the weights, and using this color mean as the updated color value of the processed point. This process can be implemented based on a Gaussian filter, which can achieve the goal of preserving the main structure while eliminating minor fluctuations.

[0371] The process of Gaussian blur smoothing is explained in detail below:

[0372] For each processing point, one possible Gaussian blur smoothing method is as follows:

[0373] For a processing point, first obtain the neighboring vertices within a preset range around the processing point;

[0374] Then, the current color values ​​of the processing point and each of its neighboring vertices within a preset range are weighted and averaged according to their respective third weights to obtain the updated color value of the processing point; wherein, the third weights corresponding to the processing point and each of its neighboring vertices within a preset range conform to the Gaussian decay law.

[0375] Specifically, for a processing point, its surrounding neighboring vertices are first determined. These neighboring vertices are usually several vertices near the processing point, also known as the neighbors of that vertex. Similar to the determination method of neighboring patches and neighboring vertices mentioned above, the neighboring vertices in this process are not limited to the target direction, but can be around the processing point. In addition, the preset range can also be a distance range or a hierarchical range.

[0376] Taking the hierarchical range as an example, for instance, if the requirement is a second-level neighborhood, suppose: for a processing point A, its directly connected first-level neighborhood vertices are B, C, and D, and its indirectly connected second-level neighborhood vertices based on vertices B, C, and D are E and F. Then, the neighborhood vertices of processing point A within the preset range are: B, C, D, E, and F.

[0377] Taking distance range as an example, for instance, all vertices within a spherical neighborhood with radius r centered on processing point A are considered as neighborhood vertices of processing point A within a preset range.

[0378] Then, the color values ​​of these neighboring vertices can be weighted and averaged according to their respective third weights. The resulting color mean is used as the updated color value of processing point A. In this calculation process, the original color value of processing point A is the color value obtained by updating it using formula 1 or formula 2 mentioned above.

[0379] The following is a brief explanation of how the third weight is calculated for each vertex (including the processing point and its neighboring vertices):

[0380] Specifically, based on the distance between the processing point and the vertex, the third weight of the vertex is calculated. Here, it refers to the Gaussian weight. The closer the vertex is to the processing point, the larger its third weight, and vice versa. This third weight reflects the degree of influence of neighboring vertices on the color value of the processing point.

[0381] Specifically, the third weight corresponding to each vertex can be calculated using a Gaussian function to ensure that these third weights conform to the Gaussian decay law. The calculation formula is as follows:

[0382]

[0383] In formula 3, w i It is the third weight corresponding to the i-th vertex (such as the processing point or its neighboring vertices), d i σ is the distance between the i-th vertex and the processing point, and σ is the standard deviation of the Gaussian function, used to control the decay rate of the weights.

[0384] Specifically, σ is a positive number that determines the width of the Gaussian distribution. A smaller σ value results in a narrower Gaussian curve, which means that the weights will decrease more rapidly with increasing distance; conversely, a larger σ value produces a wider Gaussian curve, causing the weights to change more slowly with distance.

[0385] As σ increases, the weight decays more slowly, meaning vertices farther from the processing point also have a higher impact. Conversely, if σ is small, only vertices very close to the processing point will significantly affect the final result, as the weights of slightly farther vertices become extremely low. Therefore, by adjusting the size of σ, the intensity of the Gaussian blur and the fineness of the smoothing effect can be controlled. Smaller σ values ​​produce stronger local smoothing effects, while larger σ values ​​may lead to more widespread global smoothing, thus allowing for customization according to different application needs.

[0386] Based on the above, the color value of the processing point and each neighboring vertex is multiplied by its corresponding third weight. The final result is the new color value of the processing point, which is the mean of the color values ​​of its neighboring vertices after Gaussian weighting.

[0387] Optionally, to ensure that the updated color value is within a valid range (e.g., RGB values ​​between 0 and 255, and floating-point values ​​between 0.0 and 1.0), the sum of the third weights can be set to a target value, such as 1. That is, by normalizing the weights, the sum of the third weights of the processing point and all its corresponding neighboring vertices within a preset range is ensured to be 1, thereby guaranteeing the accuracy of the result.

[0388] Of course, you can also add up all the weighted color values ​​and divide by the sum of all weights to ensure the accuracy of the result.

[0389] like Figure 12 As shown, this is a schematic diagram of a neighborhood vertex in an embodiment of this application. For Figure 12 For processing point A, without restricting the direction, but only limiting the preset range around it, its corresponding first-level neighboring vertices are O, P, Q, D, B, C, S, R, and its corresponding second-level neighboring vertices are M, N, J, I, F, E, for a total of 14 neighboring vertices. Then, by calculating the third weight based on the above formula 3 for these 14 neighboring vertices and processing point A, and then performing a weighted average on the color value, the updated color value of processing point A can be obtained.

[0390] In this embodiment, for each processing point, after updating the color value based on the color value of the first vertex associated with the processing point, the color value of the processing point is updated again using Gaussian blur smoothing or other methods. This further smooths the color value of the processing point, ensuring a more uniform and natural color transition, thereby ensuring a natural texture transition at the seams without obvious boundaries. In this way, the color value of the processing point is influenced by the color values ​​of neighboring vertices, achieving a smooth transition, effectively reducing color unevenness, ensuring a more uniform and natural color value for the processing point, and thus improving the texture fusion effect.

[0391] Of course, besides Gaussian filtering, other methods such as bilateral filtering, median filtering, mean filtering, nonlocal mean filtering, and adaptive filtering can also be used to smooth the color values ​​of the processed points, ensuring a more uniform and natural color transition. The following is a brief explanation of these filtering methods:

[0392] (I) Bilateral Filtering: Bilateral filtering considers not only spatial distance but also color differences. It smooths color values ​​while preserving edges and details. The specific process is as follows:

[0393] First, select the neighboring vertices around the processing point; then, calculate the weights based on the spatial distance and color difference between the processing point and the neighboring vertices, and normalize all weights to ensure that the sum is 1; finally, calculate the updated color value of the processing point by weighted averaging the color values ​​of the neighboring vertices based on the normalized weights.

[0394] (ii) Median filtering: The color value is smoothed by taking the median of the color values ​​of the neighboring vertices, which effectively removes salt and pepper noise.

[0395] (iii) Mean filtering: smoothing color values ​​by calculating a simple average of the color values ​​of neighboring vertices.

[0396] (iv) Nonlocal mean filtering, which smooths color values ​​by considering similar regions over a larger range.

[0397] The specific process is as follows:

[0398] First, select the neighboring vertices around the processing point. Then, calculate the weights based on the similarity between the processing point and its neighboring vertices and other regions, and normalize all weights to ensure that the sum is 1. Finally, calculate the updated color value of the processing point by performing a weighted average of the color values ​​of similar regions based on the normalized weights.

[0399] (v) Adaptive filtering: Filtering parameters are dynamically adjusted based on local features. The specific process is as follows:

[0400] First, select the neighboring vertices around the processing point; then, analyze the local features of the processing point and its neighboring vertices, such as gradients and textures, and dynamically adjust the filtering parameters based on the local features; finally, based on the adjusted filtering parameters, smooth the color values ​​of the neighboring vertices and calculate the updated color value of the processing point.

[0401] Of course, the filtering and smoothing methods listed above are just simple examples. Other smoothing methods are also applicable to the embodiments of this application, and will not be described in detail here.

[0402] Taking a human as the target, with the head as the first part and the body as the second, step S43 mainly focuses on... Figure 10 The output results are used to blend the seam texture, reducing the color difference between two different spliced ​​parts at the seam.

[0403] See Figure 13 As shown, it is a logic block diagram of seam texture fusion in an embodiment of this application. Figure 13 As shown, in order to reduce color differences at the seams, based on the previously calculated seam location, adjustments can be made based on this location. Figure 10The obtained results are processed by seam index averaging color fusion and neighborhood color Gaussian blur smoothing, etc. For specific implementation methods, please refer to the above embodiments, and repeated parts will not be described again.

[0404] See Figure 14 As shown, this is a comparison diagram of the seam optimization effect before and after in an embodiment of this application. Specifically, Figure 14 Indicates based on Figure 13 The diagram shows the results before and after texture optimization (texture fusion) of the seam area. Clearly, before optimization, the color difference between the upper and lower parts of the seam (neck) where the head and body are joined is significant, as shown in S141 within the solid line. After optimization, the color difference between the upper and lower parts of the seam (neck) is reduced, as shown in S142 within the solid line. In the 3D model splicing process, fusion of the seam based on the head texture (i.e., seam optimization) prioritizes the preservation of high-quality and important texture details, reduces visual discontinuities, maintains overall style consistency, and simplifies the processing flow, thereby improving the model's naturalness, realism, and consistency.

[0405] S44: Based on the texture style of the second part in the merged 3D object model, redraw the texture of the first part in the merged 3D object model to obtain the 3D image of the target object.

[0406] In this embodiment of the application, the three-dimensional image of the target object can be a three-dimensional model of any style. Specifically, the three-dimensional image of the target object can include, but is not limited to, the following:

[0407] Cartoon style, realistic style, abstract style, retro style, science fiction style, minimalist style, fantasy style, etc.

[0408] The methods for generating 3D images in the various embodiments of this application can be flexibly applied to the generation of 3D images of different styles to meet the needs of various application scenarios.

[0409] The following is a detailed explanation of the texture redrawing process in S44:

[0410] After completing the above S41 to S43 processes, there may be a situation where the texture styles of the first part and the second part are inconsistent. In order to obtain a three-dimensional image with a consistent overall style, the texture style of the second part can be referenced to redraw the texture of the first part.

[0411] Taking the target as a person, the first part as the head, and the second part as the body as an example:

[0412] To obtain a 3D cartoon portrait with a consistent style, the face portion of the stitched 3D cartoon portrait needs to be masked (specifically, blurred to preserve the original outline). Then, referencing the body portion, the texture of this part is redrawn using a texturing tool to obtain a 3D cartoon portrait with a consistent style.

[0413] Among them, text-based image tools include, but are not limited to:

[0414] Stable diffusion models, Dali-E 2 models, and GAN-based models (such as StyleGAN).

[0415] After completing S44, a final check can be performed on the merged 3D object model to ensure that the texture styles of the first and second parts are consistent and natural. If necessary, fine-tuning can be done to optimize the final effect. For example, to further ensure natural color transitions, the redrawn textures can be smoothed to ensure there are no obvious boundaries or unnatural transitions. This process can use methods such as Gaussian blur and bilateral filtering, which will not be repeated here.

[0416] The following is a brief summary of the 3D cartoon character generation process from the perspective of interaction between terminal devices and servers:

[0417] See Figure 15 The diagram shown illustrates the interaction between a terminal device and a server in an embodiment of this application. The specific implementation process of this method is as follows:

[0418] A 3D avatar generation client can be installed on the terminal device. The target object can upload its avatar and select a body template through this client, triggering a 3D avatar generation request. Upon receiving the request from the client, the server executes the following process: First, it acquires the target object's 3D head and body models. Then, it stitches the head and body models together to obtain a stitched 3D object model, smoothing the seams. Next, based on the head texture in the stitched 3D object model, it performs texture fusion on the seams to obtain a fused 3D object model. Finally, based on the body texture style in the fused 3D object model, it re-textures the head to obtain the target object's 3D avatar. The server can then return this result to the client, allowing the client to display the target object's 3D avatar.

[0419] In summary, this application proposes a method for smoothly stitching together 3D cartoon head and body templates. By generating the head and body separately and employing progressive geometric smoothing and texture index transfer redrawing techniques, it solves the problems of blurriness, unstable results, and obvious stitching marks existing in current 3D cartoon character generation. This solution not only supports more refined personalized customization but also ensures the quality and stability of the final image. Furthermore, it allows for the use of higher-quality models on complex body parts, thereby creating a consistent and high-quality 3D cartoon character.

[0420] Of course, the above example uses the splicing of two parts of the model to generate a three-dimensional image. In addition, the same principle applies to splicing three or more parts of the model to generate a three-dimensional image. All three-dimensional image generation methods listed in this application can be used, and no specific limitation is made here.

[0421] Based on the same inventive concept, embodiments of this application also provide a device for generating a three-dimensional image. For example... Figure 16 As shown, this is a structural schematic diagram of a three-dimensional image generation device 1600, which may include:

[0422] The acquisition unit 1601 is used to acquire a three-dimensional model of a target object, the target object including a first part and a second part, and the three-dimensional model including a three-dimensional model of the first part and a three-dimensional model of the second part; the splicing unit 1602 is used to splice the three-dimensional model of the first part and the three-dimensional model of the second part to obtain a spliced ​​three-dimensional object model, and to smooth the seam part in the spliced ​​three-dimensional object model.

[0423] The fusion unit 1603 is used to perform texture fusion on the seam part according to the texture of the first part in the spliced ​​three-dimensional object model to obtain the fused three-dimensional object model.

[0424] The redrawing unit 1604 is used to redraw the texture of the first part of the fused three-dimensional object model according to the texture style of the second part of the fused three-dimensional object model, so as to obtain the three-dimensional image of the target object.

[0425] Optionally, the splicing unit 1602 is specifically used for:

[0426] The three-dimensional models of the first part and the second part are geometrically spliced ​​together, and the overlapping parts between the three-dimensional models of the first part and the second part are removed during the splicing process to obtain the spliced ​​three-dimensional object model.

[0427] Determine the vertices of each seam in the assembled 3D object model;

[0428] Based on each seam vertex, the seam portion in the spliced ​​3D object model is subjected to progressive smoothing processing.

[0429] Optionally, the splicing unit 1602 is specifically used for:

[0430] Obtain neighborhood patches of different levels connected to each seam vertex within a specified range along the target direction; wherein each level corresponds to a sub-range within the specified range; the neighborhood patches are patches composed of vertices connected to the seam vertex; the target direction represents the direction from the first part to the second part;

[0431] The neighborhood patches at different levels are smoothed to different degrees; wherein the smoothing degree of the neighborhood patches at different levels decreases along the target direction.

[0432] Optionally, the fusion unit 1603 is specifically used for:

[0433] Obtain the neighboring vertices of different levels connected to each seam vertex within a specified range along the target direction; wherein each level corresponds to a sub-range within the specified range; the target direction represents the direction from the first part to the second part;

[0434] Using each seam vertex and the neighboring vertices of different levels as processing points, for each processing point, the color value of the processing point is updated according to the color value of the first part vertex associated with the processing point; wherein, the first part vertex associated with the processing point refers to the vertex that is closest to the processing point on the first part.

[0435] Optionally, the fusion unit 1603 is specifically used for:

[0436] Determine the distance between the processing point and the vertex of the first part;

[0437] Based on the distance value, a first weight corresponding to the vertex of the first part and a second weight corresponding to the processing point are determined; wherein, the first weight is negatively correlated with the distance value, and the second weight is positively correlated with the distance value;

[0438] Based on the first weight and the second weight, a weighted average is performed on the color value of the vertex of the first part and the original color value of the processing point to obtain the updated color value of the processing point.

[0439] Optionally, the first weight corresponding to the first part vertex associated with different processing points conforms to an exponential decay law along the target direction.

[0440] Optionally, for each processing point, the fusion unit 1603 is further configured to:

[0441] After updating the color value of the processing point based on the color value of the first part vertex associated with the processing point, the color value of the processing point is updated again using Gaussian blur smoothing.

[0442] Optionally, the fusion unit 1603 is specifically used for:

[0443] Obtain all neighboring vertices within a preset range around the processing point;

[0444] The color value of the processing point is obtained by weighting the current color value of each neighboring vertex within the preset range with the corresponding third weight. The third weights corresponding to the processing point and each neighboring vertex within the preset range conform to the Gaussian decay law.

[0445] Optionally, the acquisition unit 1601 is specifically used for:

[0446] A three-dimensional model of the target region can be obtained through any of the following methods, wherein the target region is either the first region or the second region:

[0447] A three-dimensional model of the target part is generated based on the image containing the target part of the target object;

[0448] Obtain the 3D model of the selected target part of the target object from a pre-built set of 3D models.

[0449] Optionally, the acquisition unit 1601 is specifically used for:

[0450] Based on the image containing the target part of the target object, generate three-dimensional models of the target part multiple times, and retain the three-dimensional models of the target part that meet the expected quality requirements based on the generation quality.

[0451] This application generates 3D models of different parts of the target object by dividing them into sections, and then performs geometric smooth splicing and seam texture fusion to finally generate a high-quality 3D image with a unified texture style.

[0452] Specifically, since this application does not directly generate a 3D cartoon portrait of the object, but generates 3D models of different parts of the target object (such as the head and body) separately, it can better capture and retain the detailed features of each part, avoid the loss of details caused by overall generation, and is less prone to distortion, ensuring that the model of each part is of higher quality and more stable.

[0453] Based on this, smooth stitching of the 3D models of different parts can eliminate stitching marks in the complete 3D model of the target object (i.e., the stitched 3D object model), ensuring the continuity and natural transition of textures, making the surface of the stitched model smoother and more natural. Based on the texture of the first part in the stitched 3D object model, texture fusion is performed on this seam area to further ensure a natural transition between the texture at the stitching point and the texture of the first part.

[0454] Finally, based on the texture style of the second part in the fused 3D object model, the texture of the first part in the fused 3D object model is redrawn, which can obtain a high-quality 3D image with a unified texture style, thus improving the generation quality and stability of the 3D image.

[0455] For ease of description, the above sections are divided into modules (or units) according to their functions and described separately. Of course, in implementing this application, the functions of each module (or unit) can be implemented in one or more software or hardware components.

[0456] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0457] Having introduced the method and apparatus for generating three-dimensional images according to exemplary embodiments of this application, we will now introduce an electronic device according to another exemplary embodiment of this application.

[0458] Those skilled in the art will understand that various aspects of this application can be implemented as a system, method, or program product. Therefore, various aspects of this application can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, collectively referred to herein as a "circuit," "module," or "system."

[0459] Based on the same inventive concept as the above-described method embodiments, this application also provides an electronic device. In one embodiment, the electronic device may be a server, such as... Figure 2 The server 220 is shown. In this embodiment, the structure of the electronic device can be as follows: Figure 17 As shown, it includes a memory 1701, a communication module 1703, and one or more processors 1702.

[0460] The memory 1701 is used to store computer programs executed by the processor 1702. The memory 1701 may mainly include a program storage area and a data storage area. The program storage area may store the operating system and programs required to run instant messaging functions, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.

[0461] Memory 1701 may be volatile memory, such as random-access memory (RAM); memory 1701 may also be non-volatile memory, such as read-only memory, flash memory, hard disk drive (HDD), or solid-state drive (SSD); or memory 1701 may be any other medium capable of carrying or storing a desired computer program having the form of instructions or data structures and accessible by a computer, but is not limited thereto. Memory 1701 may be a combination of the above-described memories.

[0462] Processor 1702 may include one or more central processing units (CPUs) or digital processing units, etc. Processor 1702 is used to implement the above-described method for generating three-dimensional images when it calls the computer program stored in memory 1701.

[0463] The communication module 1703 is used to communicate with terminal devices and other servers.

[0464] This application embodiment does not limit the specific connection medium between the memory 1701, communication module 1703, and processor 1702. This application embodiment... Figure 17 The memory 1701 and the processor 1702 are connected via a bus 1704, and the bus 1704 is in Figure 17 The diagram uses thick lines to describe the connections between other components; these are for illustrative purposes only and should not be considered limiting. The 1704 bus can be divided into address bus, data bus, control bus, etc. For ease of description, Figure 17 It is described using only a thick line, but does not indicate that there is only one bus or one type of bus.

[0465] The memory 1701 stores a computer storage medium, which stores computer-executable instructions for implementing the three-dimensional image generation method of this application embodiment. The processor 1702 is used to execute the above-described three-dimensional image generation method, such as... Figure 4 As shown.

[0466] In another embodiment, the electronic device may also be other electronic devices, such as... Figure 2 The terminal device 210 is shown. In this embodiment, the electronic device can be structured as follows: Figure 18 As shown, it includes components such as: communication component 1810, memory 1820, display unit 1830, camera 1840, sensor 1850, audio circuit 1860, Bluetooth module 1870, processor 1880, etc.

[0467] The communication component 1810 is used to communicate with the server. In some embodiments, it may include a Circuit-Based Wireless Fidelity (WiFi) module, which is a short-range wireless transmission technology. Electronic devices can use the WiFi module to help users send and receive information.

[0468] The memory 1820 can be used to store software programs and data. The processor 1880 executes various functions of the terminal device 210 and performs data processing by running the software programs or data stored in the memory 1820. The memory 1820 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. The memory 1820 stores an operating system that enables the terminal device 210 to run. In this application, the memory 1820 may store the operating system and various application programs, and may also store a computer program that executes the three-dimensional image generation method of the embodiments of this application.

[0469] The display unit 1830 can also be used to display information input by the user or information provided to the user, as well as various menus of the terminal device 210, forming a graphical user interface (GUI). Specifically, the display unit 1830 may include a display screen 1832 disposed on the front of the terminal device 210. The display screen 1832 may be configured as a liquid crystal display, a light-emitting diode, or the like. The display unit 1830 can be used to display the user interface of the client in the embodiments of this application (e.g., ...). Figure 6 or Figure 7 )wait.

[0470] The display unit 1830 can also be used to receive input digital or character information and generate signal inputs related to user settings and function control of the terminal device 210. Specifically, the display unit 1830 may include a touch screen 1831 disposed on the front of the terminal device 210, which can collect touch operations of the user on or near it, such as clicking buttons, dragging scroll boxes, etc.

[0471] The touchscreen 1831 can be placed on top of the display screen 1832, or the touchscreen 1831 and the display screen 1832 can be integrated to realize the input and output functions of the terminal device 210. After integration, it can be referred to as a touch display screen. In this application, the display unit 1830 can display the application and the corresponding operation steps.

[0472] Camera 1840 can be used to capture still images, which users can then share via an application. There can be one or multiple cameras 1840. An object is projected onto a photosensitive element through a lens, generating an optical image. This photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then transmitted to the processor 1880 for conversion into a digital image signal.

[0473] The terminal device may also include at least one sensor 1850, such as an accelerometer 1851, a proximity sensor 1852, a fingerprint sensor 1853, and a temperature sensor 1854. The terminal device may also be equipped with other sensors such as a gyroscope, barometer, hygrometer, thermometer, infrared sensor, light sensor, and motion sensor.

[0474] Audio circuitry 1860, speaker 1861, and microphone 1862 provide an audio interface between the user and terminal device 210. Audio circuitry 1860 converts received audio data into electrical signals, which are then transmitted to speaker 1861, where they are converted into sound signals for output. Terminal device 210 may also be equipped with volume buttons for adjusting the volume of the sound signal. On the other hand, microphone 1862 converts collected sound signals into electrical signals, which are received by audio circuitry 1860, converted back into audio data, and then output to communication component 1810 for transmission to, for example, another terminal device 210, or to memory 1820 for further processing.

[0475] The Bluetooth module 1870 is used to interact with other Bluetooth devices that also have a Bluetooth module via the Bluetooth protocol. For example, a terminal device can establish a Bluetooth connection with a wearable electronic device (such as a smartwatch) that also has a Bluetooth module through the Bluetooth module 1870, thereby exchanging data.

[0476] The processor 1880 is the control center of the terminal device, connecting various parts of the terminal through various interfaces and lines. It executes software programs stored in the memory 1820 and calls data stored in the memory 1820 to perform various functions and process data. In some embodiments, the processor 1880 may include one or more processing units; the processor 1880 may also integrate an application processor and a baseband processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the baseband processor mainly handles wireless communication. It is understood that the baseband processor may not be integrated into the processor 1880. In this application, the processor 1880 can run the operating system, applications, user interface display and touch response, and the three-dimensional image generation method of this application embodiment. Furthermore, the processor 1880 is coupled to the display unit 1830.

[0477] In some possible implementations, various aspects of the three-dimensional image generation method provided in this application can also be implemented in the form of a program product, which includes a computer program. When the program product is run on an electronic device, the computer program causes the electronic device to perform the steps in the three-dimensional image generation method according to the various exemplary embodiments of this application described above. For example, the electronic device can perform actions such as... Figure 4 The steps are shown in the figure.

[0478] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0479] The program product of the embodiments of this application may employ a portable compact disc read-only memory (CD-ROM) and include a computer program, and may run on an electronic device. However, the program product of this application is not limited thereto. In this document, the readable storage medium may be any tangible medium that contains or stores a program that may be used by or in conjunction with a command execution system, apparatus, or device.

[0480] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a readable computer program. This propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting a program for use by or in conjunction with a command execution system, apparatus, or device.

[0481] Computer programs contained on readable media may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0482] Computer programs for performing the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The computer program can execute entirely on the user's electronic device, partially on the user's electronic device, as a standalone software package, partially on the user's electronic device and partially on a remote electronic device, or entirely on a remote electronic device or server. In cases involving remote electronic devices, the remote electronic device can be connected to the user's electronic device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external electronic device (e.g., via the Internet using an Internet service provider).

[0483] It should be noted that although several units or sub-units of the device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units.

[0484] Furthermore, although the operations of the method of this application are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.

[0485] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing a computer-usable computer program.

[0486] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, produce a machine for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0487] These computer program commands may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the commands stored in the computer-readable storage medium produce an article of manufacture including command means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0488] These computer program commands can also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing the commands executed on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0489] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0490] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A method for generating a three-dimensional image, characterized in that, The method includes: Obtain a three-dimensional model of a target object, wherein the target object includes a first part and a second part, and the three-dimensional model includes a three-dimensional model of the first part and a three-dimensional model of the second part; The three-dimensional models of the first part and the second part are spliced ​​together to obtain a spliced ​​three-dimensional object model, and the seams in the spliced ​​three-dimensional object model are smoothed. Based on the texture of the first part in the spliced ​​3D object model, the seam part is texture fused to obtain the fused 3D object model. Based on the texture style of the second part in the fused 3D object model, the texture of the first part in the fused 3D object model is redrawn to obtain the 3D image of the target object.

2. The method as described in claim 1, characterized in that, The step of stitching together the 3D models of the first part and the second part to obtain a stitched 3D object model, and smoothing the seams in the stitched 3D object model, includes: The three-dimensional models of the first part and the second part are geometrically spliced ​​together, and the overlapping parts between the three-dimensional models of the first part and the second part are removed during the splicing process to obtain the spliced ​​three-dimensional object model. Determine the vertices of each seam in the assembled 3D object model; Based on each seam vertex, the seam portion in the spliced ​​3D object model is subjected to progressive smoothing processing.

3. The method as described in claim 2, characterized in that, The progressive smoothing process for the seam portion in the stitched 3D object model based on the seam vertices includes: Obtain neighborhood patches of different levels connected to each seam vertex within a specified range along the target direction; wherein each level corresponds to a sub-range within the specified range; the neighborhood patches are patches composed of vertices connected to the seam vertex; the target direction represents the direction from the first part to the second part; The neighborhood patches at different levels are smoothed to different degrees; wherein the smoothing degree of the neighborhood patches at different levels decreases along the target direction.

4. The method as described in claim 1, characterized in that, The step of performing texture fusion on the seam portion based on the texture of the first part in the spliced ​​3D object model to obtain the fused 3D object model includes: Obtain the neighboring vertices of different levels connected to each seam vertex within a specified range along the target direction; wherein each level corresponds to a sub-range within the specified range; the target direction represents the direction from the first part to the second part; Using each seam vertex and the neighboring vertices of different levels as processing points, for each processing point, the color value of the processing point is updated according to the color value of the first part vertex associated with the processing point, wherein the first part vertex associated with the processing point refers to the vertex that is closest to the processing point in the first part.

5. The method as described in claim 4, characterized in that, The step of updating the color value of the processing point based on the color value of the first part vertex associated with the processing point includes: Determine the distance between the processing point and the vertex of the first part; Based on the distance value, a first weight corresponding to the vertex of the first part and a second weight corresponding to the processing point are determined; wherein, the first weight is negatively correlated with the distance value, and the second weight is positively correlated with the distance value; Based on the first weight and the second weight, a weighted average is performed on the color value of the vertex of the first part and the original color value of the processing point to obtain the updated color value of the processing point.

6. The method as described in claim 5, characterized in that, The first weights corresponding to the first part vertices associated with different processing points conform to an exponential decay law along the target direction.

7. The method as described in claim 4, characterized in that, For each processing point, after updating the color value of the processing point based on the color value of the first part vertex associated with the processing point, the method further includes: The color values ​​of the processed points are updated again using Gaussian blur smoothing.

8. The method as described in claim 7, characterized in that, The step of updating the color values ​​of the processed points again using Gaussian blur smoothing includes: Obtain all neighboring vertices within a preset range around the processing point; The color value of the processing point is obtained by weighting the current color value of each neighboring vertex within the preset range with the corresponding third weight. The third weights corresponding to the processing point and each neighboring vertex within the preset range conform to the Gaussian decay law.

9. The method according to any one of claims 1 to 8, characterized in that, The process of obtaining the three-dimensional model of the target object includes: A three-dimensional model of the target region can be obtained through any of the following methods, wherein the target region is either the first region or the second region: A three-dimensional model of the target part is generated based on the image containing the target part of the target object; Obtain the 3D model of the selected target part of the target object from a pre-built set of 3D models.

10. The method as described in claim 9, characterized in that, The step of generating a three-dimensional model of the target part based on an image containing the target part of the target object includes: Based on the image containing the target part of the target object, generate three-dimensional models of the target part multiple times, and retain the three-dimensional models of the target part that meet the expected quality requirements based on the generation quality.

11. A device for generating a three-dimensional image, characterized in that, include: An acquisition unit is used to acquire a three-dimensional model of a target object, wherein the target object includes a first part and a second part, and the three-dimensional model includes a three-dimensional model of the first part and a three-dimensional model of the second part. The splicing unit is used to splice the three-dimensional model of the first part and the three-dimensional model of the second part to obtain the spliced ​​three-dimensional object model, and to smooth the seam part in the spliced ​​three-dimensional object model. The fusion unit is used to perform texture fusion on the seam part according to the texture of the first part in the spliced ​​three-dimensional object model to obtain the fused three-dimensional object model. The redrawing unit is used to redraw the texture of the first part of the fused three-dimensional object model according to the texture style of the second part in the fused three-dimensional object model, so as to obtain the three-dimensional image of the target object.

12. An electronic device, characterized in that, It includes a processor and a memory, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the steps of any of the methods described in claims 1 to 10.

13. A computer-readable storage medium, characterized in that, It includes a computer program that, when run on an electronic device, causes the electronic device to perform the steps of any of the methods described in claims 1 to 10.

14. A computer program product, characterized in that, The method includes a computer program stored in a computer-readable storage medium; when a processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, causing the electronic device to perform the steps of any one of claims 1 to 10.