A skeleton embedding method of a three-dimensional human body model and an electronic device

CN117292049BActive Publication Date: 2026-10-20JUHAOKAN TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211563048.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-07
Publication Date
2026-10-20
Estimated Expiration
2042-12-07

AI Technical Summary

Technical Problem

但是,这种骨架生成方式的工作量较大,当需要生成多个三维人体模型时,时间开销会变得很大

Benefits of technology

[0019]本申请的上述实施例中,通过从目标三维人体模型中提取出的人体骨架的手腕骨骼节点对该人体骨架进行拆分,得到手部骨架和身体骨架,然后根据所述身体骨架和待处理三维人体模型,得到所述身体骨架在所述待处理三维人体模型中的目标三维位置,并利用所述身体骨架在所述待处理三维人体模型中的目标三维位置,将所述身体骨架嵌入到所述待处理三维人体模型中,得到中间三维人体模型;然后通过所述中间三维人体模型中手部三维模型,得到所述手部骨架的目标三维位置,最后基于所述手部骨架的目标三维位置将所述手部骨架嵌入到所述中间三维人体模型中,得到包含骨架的三维人体模型。由此,本实施例中可以自动将人体骨架嵌入到待处理的三维人体模型中,并不需要人工手动生成三维人体模型的人体骨架,提高了三维人体模型的骨架生成效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117292049B_ABST
    Figure CN117292049B_ABST
Patent Text Reader

Abstract

The application provides a skeleton embedding method of a three-dimensional human body model and an electronic device, and is used for improving the skeleton generation efficiency of the three-dimensional human body model. The method comprises the following steps: based on a wrist skeleton node of a human skeleton extracted from a target three-dimensional human body model, the human skeleton is split to obtain a hand skeleton and a body skeleton; according to the body skeleton and a to-be-processed three-dimensional human body model, a target three-dimensional position of the body skeleton in the to-be-processed three-dimensional human body model is obtained, wherein the action posture of the to-be-processed three-dimensional human body model and the target three-dimensional human body model is a T-shaped posture; the body skeleton is embedded into the to-be-processed three-dimensional human body model by using the target three-dimensional position of the body skeleton in the to-be-processed three-dimensional human body model, so as to obtain an intermediate three-dimensional human body model; a target three-dimensional position of the hand skeleton is obtained through a hand three-dimensional model of the intermediate three-dimensional human body model; and the hand skeleton is embedded into the intermediate three-dimensional human body model based on the target three-dimensional position of the hand skeleton, so as to obtain a three-dimensional human body model containing a skeleton.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of virtual reality technology, and in particular to a method for embedding the skeleton of a three-dimensional human body model and an electronic device. Background Technology

[0002] Virtual human animation technology is widely used in simulation systems and 3D animation. The motion control of virtual humans primarily involves driving changes in the 3D human body model through skeletal animation. The skeletal structure of the 3D human body model effectively preserves the topological connectivity of the geometric model, allowing for the description of the key physical features of the 3D human body model.

[0003] In existing technologies, the skeleton generation method for 3D human body models involves manually adding a human skeleton to the model after its initial creation, using third-party software tools based on functional and application requirements. Simultaneously, the positions of each joint within the skeleton are manually and precisely adjusted to ensure accurate and reasonable bone placement. However, this skeleton generation method is labor-intensive, and the time cost becomes significant when generating multiple 3D human body models, resulting in low efficiency in 3D human body model skeleton generation. Summary of the Invention

[0004] This application provides a method and electronic device for embedding the skeleton of a three-dimensional human body model, which can automatically embed the human skeleton into the three-dimensional human body model and improve the skeleton generation efficiency of the three-dimensional human body model.

[0005] In a first aspect, embodiments of this application provide a method for embedding the skeleton of a three-dimensional human body model, the method comprising:

[0006] The human skeleton is extracted from the target 3D human body model, and the human skeleton is split based on the wrist bone nodes in the human skeleton to obtain the hand skeleton and the body skeleton.

[0007] Based on the body skeleton and the three-dimensional human body model to be processed, the target three-dimensional position of the body skeleton in the three-dimensional human body model to be processed is obtained, wherein the three-dimensional human body model to be processed and the target three-dimensional human body model have the same action posture, and the action posture is a T-shaped posture.

[0008] Using the target 3D position of the body skeleton in the 3D human body model to be processed, the body skeleton is embedded into the 3D human body model to be processed to obtain an intermediate 3D human body model.

[0009] The target three-dimensional position of the hand skeleton is obtained by using the three-dimensional hand model in the intermediate three-dimensional human body model.

[0010] Based on the target three-dimensional position of the hand skeleton, the hand skeleton is embedded into the intermediate three-dimensional human body model to obtain a three-dimensional human body model containing the human skeleton.

[0011] A second aspect of this application provides an electronic device, including a processor and a memory, wherein the processor and the memory are connected via a bus;

[0012] The memory stores a computer program, and the processor is configured to perform the following operations based on the computer program:

[0013] The human skeleton is extracted from the target 3D human body model, and the human skeleton is split based on the wrist bone nodes in the human skeleton to obtain the hand skeleton and the body skeleton.

[0014] Based on the body skeleton and the three-dimensional human body model to be processed, the target three-dimensional position of the body skeleton in the three-dimensional human body model to be processed is obtained, wherein the three-dimensional human body model to be processed and the target three-dimensional human body model have the same action posture, and the action posture is a T-shaped posture.

[0015] Using the target 3D position of the body skeleton in the 3D human body model to be processed, the body skeleton is embedded into the 3D human body model to be processed to obtain an intermediate 3D human body model.

[0016] The target three-dimensional position of the hand skeleton is obtained by using the three-dimensional hand model in the intermediate three-dimensional human body model.

[0017] Based on the target three-dimensional position of the hand skeleton, the hand skeleton is embedded into the intermediate three-dimensional human body model to obtain a three-dimensional human body model containing the human skeleton.

[0018] According to a third aspect of the present invention, a computer storage medium is provided, the computer storage medium storing a computer program for performing the method as described in the first aspect.

[0019] In the above embodiments of this application, the human skeleton is split by extracting the wrist bone nodes from the target 3D human body model to obtain the hand skeleton and the body skeleton. Then, based on the body skeleton and the 3D human body model to be processed, the target 3D position of the body skeleton in the 3D human body model to be processed is obtained. Using the target 3D position of the body skeleton in the 3D human body model to be processed, the body skeleton is embedded into the 3D human body model to be processed, resulting in an intermediate 3D human body model. Then, using the 3D hand model in the intermediate 3D human body model, the target 3D position of the hand skeleton is obtained. Finally, based on the target 3D position of the hand skeleton, the hand skeleton is embedded into the intermediate 3D human body model, resulting in a 3D human body model containing the skeleton. Therefore, this embodiment can automatically embed the human skeleton into the 3D human body model to be processed, without the need for manual generation of the human skeleton of the 3D human body model, thus improving the efficiency of skeleton generation of the 3D human body model. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 An exemplary illustration shows one of the application scenarios provided in the embodiments of this application;

[0022] Figure 2 The second example illustration shows a schematic diagram of an application scenario provided in an embodiment of this application;

[0023] Figure 3 This document exemplarily illustrates the third application scenario diagram provided in the embodiments of this application;

[0024] Figure 4 One of the flowcharts of the skeleton embedding method for a three-dimensional human body model provided in the embodiments of this application is illustrated by example;

[0025] Figure 5 An exemplary schematic diagram of the human skeleton in the three-dimensional human body model provided in the embodiments of this application is shown;

[0026] Figure 6 An exemplary flowchart illustrating the disassembly of the human skeleton provided in an embodiment of this application is shown;

[0027] Figure 7 An exemplary diagram illustrating the disassembly of the human skeleton provided in an embodiment of this application is shown;

[0028] Figure 8 An exemplary schematic diagram of the process for determining the target position of the body skeleton in a three-dimensional human body model to be processed, provided in an embodiment of this application, is shown.

[0029] Figure 9 An exemplary diagram shows a schematic diagram of the centerline of a three-dimensional human body model provided in an embodiment of this application;

[0030] Figure 10 An exemplary flowchart illustrating the process of determining a set of centerline points provided in an embodiment of this application is shown;

[0031] Figure 11 An exemplary illustration shows the process for determining the target three-dimensional position of the hand skeleton provided in an embodiment of this application. Figure 2

[0032] Figure 12 This application provides an exemplary embodiment of the process for determining a projected image of a hand. Figure 2

[0033] Figure 13 An exemplary illustration shows a hand projection image provided in an embodiment of this application. Figure 2

[0034] Figure 14 An exemplary illustration of a hand outline provided in an embodiment of this application is shown. Figure 2

[0035] Figure 15 An exemplary schematic diagram of a hand bulge defect provided in an embodiment of this application is shown;

[0036] Figure 16 An exemplary flowchart illustrating the process of determining the target three-dimensional position of the hand skeleton provided in an embodiment of this application is shown.

[0037] Figure 17 A second flowchart of the skeleton embedding method for a three-dimensional human body model provided in this application embodiment is shown as an example;

[0038] Figure 18 An exemplary schematic diagram of the skeleton embedding device for a three-dimensional human body model provided in an embodiment of this application is shown;

[0039] Figure 19 An exemplary hardware structure diagram of an electronic device provided in an embodiment of this application is shown. Detailed Implementation

[0040] To make the objectives, implementation methods and advantages of this application clearer, the exemplary implementation methods of this application will be clearly and completely described below with reference to the accompanying drawings of the exemplary embodiments of this application. Obviously, the described exemplary embodiments are only some embodiments of this application, and not all embodiments.

[0041] Based on the exemplary embodiments described in this application, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of the appended claims. Furthermore, although the disclosures in this application are presented by way of one or more exemplary examples, it should be understood that each aspect of these disclosures can also constitute a complete implementation on its own.

[0042] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.

[0043] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to be omnipresent but not exclusive; for example, a product or device comprising a series of components is not necessarily limited to those explicitly listed, but may include other components not explicitly listed or inherent to such product or device.

[0044] As used in this application, the term "module" refers to any known or subsequently developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code capable of performing the functions associated with that element.

[0045] The following is an overview of the ideas behind the embodiments of this application.

[0046] Current methods for generating the skeleton of 3D human models involve manually adding a skeleton to the model after its initial creation, using third-party software tools based on functional and application requirements. Simultaneously, the positions of each joint within the skeleton are manually and meticulously adjusted to ensure accurate and logical bone placement. However, this method is labor-intensive, and the time cost becomes significant when generating multiple 3D human models, resulting in low efficiency in 3D human model skeleton generation.

[0047] To address the issue of low efficiency in generating 3D human skeletons in existing technologies, this application provides a method for embedding the skeleton of a 3D human model. The method involves extracting wrist bone nodes from a target 3D human model, splitting the skeleton to obtain a hand skeleton and a body skeleton. Then, based on the body skeleton and the 3D human model to be processed, the target 3D position of the body skeleton within the model is determined. Using this target 3D position, the body skeleton is embedded into the model to obtain an intermediate 3D human model. Next, the target 3D position of the hand skeleton is obtained from the 3D hand model within the intermediate 3D human model. Finally, based on this target 3D position, the hand skeleton is embedded into the intermediate 3D human model, resulting in a 3D human model containing the skeleton. Therefore, this embodiment automatically embeds the human skeleton into the 3D human model to be processed, eliminating the need for manual generation of the skeleton and improving the efficiency of 3D human model skeleton generation.

[0048] The embodiments of this application are described in detail below with reference to the accompanying drawings.

[0049] Figure 1 An exemplary illustration shows a schematic diagram of an application scenario for the skeleton embedding method of a three-dimensional human body model provided in an embodiment of this application; as shown below. Figure 1 As shown, this application scenario uses an electronic device as the server as an example. This application scenario includes a terminal device 110 and a server 120. Server 120 can be implemented using a single server or multiple servers. Server 120 can be implemented using a physical server or a virtual server.

[0050] In one possible application scenario, server 120 extracts the human skeleton from the target 3D human model, and splits the human skeleton based on the wrist bone nodes in the human skeleton to obtain the hand skeleton and the body skeleton; and according to the body skeleton and the 3D human model to be processed, obtains the target 3D position of the body skeleton in the 3D human model to be processed, wherein the 3D human model to be processed and the target 3D human model have the same action posture, and the action posture is a T-shaped posture; then server 120 uses the target 3D position of the body skeleton in the 3D human model to be processed to embed the body skeleton into the 3D human model to be processed to obtain an intermediate 3D human model; then server 120 obtains the target 3D position of the hand skeleton through the hand 3D model in the intermediate 3D human model, and embeds the hand skeleton into the intermediate 3D human model based on the target 3D position of the hand skeleton to obtain a 3D human model containing the human skeleton, and sends the 3D human model containing the skeleton to terminal device 110 for display.

[0051] like Figure 2 The diagram shown is a schematic diagram of another application scenario of this application, which includes a terminal device 110, a server 120 and a memory 130. Specifically, server 120 extracts the human skeleton from the target 3D human model, and splits the human skeleton based on the wrist bone nodes in the human skeleton to obtain the hand skeleton and the body skeleton. Based on the body skeleton and the 3D human model to be processed, server 120 obtains the target 3D position of the body skeleton within the 3D human model to be processed, wherein the 3D human model to be processed and the target 3D human model have the same pose, and the pose is a T-shape. Then, server 120 uses the target 3D position of the body skeleton within the 3D human model to be processed to embed the body skeleton into the 3D human model to be processed, obtaining an intermediate 3D human model. Then, server 120 obtains the target 3D position of the hand skeleton from the 3D hand model in the intermediate 3D human model, and embeds the hand skeleton into the intermediate 3D human model based on the target 3D position of the hand skeleton, obtaining a 3D human model containing the human skeleton. After storing the 3D human model containing the skeleton in memory 130, server 120 sends it to terminal device 110 for display.

[0052] like Figure 3The diagram shown illustrates another application scenario of this application, where an electronic device is used as the terminal device for illustration. This application scenario includes a terminal device 110 and a memory 130. The terminal device 110 extracts the human skeleton from the target 3D human model, and splits the human skeleton based on the wrist bone nodes in the human skeleton to obtain the hand skeleton and the body skeleton. Based on the body skeleton and the 3D human model to be processed, the terminal device 110 obtains the target 3D position of the body skeleton in the 3D human model to be processed. The 3D human model to be processed and the target 3D human model have the same pose, which is a T-shape. Then, the terminal device 110 uses the target 3D position of the body skeleton in the 3D human model to be processed to embed the body skeleton into the 3D human model to be processed, obtaining an intermediate 3D human model. The terminal device 110 then obtains the target 3D position of the hand skeleton from the 3D hand model in the intermediate 3D human model. Finally, the terminal device 110 embeds the hand skeleton into the intermediate 3D human model based on the target 3D position of the hand skeleton, obtaining a 3D human model containing the skeleton. The terminal device 110 stores the 3D human model containing the skeleton in the memory 130 and then displays the 3D human model containing the skeleton.

[0053] in, Figure 1 and Figure 2 The server 120 and the terminal device 110 can exchange information through a communication network. The communication network can be either wireless or wired.

[0054] For example, server 120 can access the network via cellular mobile communication technology and communicate with terminal device 110, wherein the cellular mobile communication technology includes, for example, 5th generation mobile networks (5G) technology.

[0055] Optionally, the server 120 can access the network and communicate with the terminal device 110 via short-range wireless communication, such as Wireless Fidelity (Wi-Fi) technology.

[0056] Furthermore, the description in this application focuses only on a single terminal device 110, server 120, and memory 130. However, those skilled in the art should understand that the illustrated terminal device 110, server 120, and memory 130 are intended to illustrate the operation of the terminal device 110, server 120, and memory 130 involved in the technical solutions of this application, and do not imply any limitation on the number, type, or location of the terminal device 110, server 120, and memory 130. It should be noted that adding additional modules to or removing individual modules from the illustrated environment will not change the underlying concept of the exemplary embodiments of this application.

[0057] It should be noted that the memory in the embodiments of this application can be, for example, a cache system, hard disk storage, memory storage, etc. Furthermore, the skeleton embedding method for three-dimensional human models proposed in this application is not only applicable to… Figure 1 , Figure 2 and Figure 3 The application scenarios shown can also be applied to any device with a skeleton embedded in a three-dimensional human body model.

[0058] For example, terminal device 110 includes, but is not limited to: large visual screens, tablet computers, laptops, handheld computers, mobile internet devices (MID), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminal devices in industrial control, wireless terminal devices in autonomous driving, wireless terminal devices in smart grids, wireless terminal devices in transportation safety, wireless terminal devices in smart cities, or wireless terminal devices in smart homes, etc.; the terminal device may have a related client installed, which may be software (e.g., browsers, short video software, etc.), or web pages, mini-programs, etc.

[0059] The following describes an exemplary embodiment of the skeleton embedding method for a three-dimensional human body model, 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 methods and principles of this application, and the implementation of this application is not limited in any way in this respect.

[0060] like Figure 4 The diagram shown illustrates a flowchart of a method for embedding the skeleton of a 3D human body model, which may include the following steps:

[0061] Step 401: Extract the human skeleton from the target 3D human body model, and split the human skeleton based on the wrist bone nodes in the human skeleton to obtain the hand skeleton and the body skeleton.

[0062] like Figure 5 The image shows a schematic diagram of the human skeleton in a 3D human body model. The human skeleton can be extracted using applications such as Maya and 3ds Max. This embodiment does not limit the extraction method; the extraction method can be set according to the actual situation.

[0063] The following is a detailed explanation of the breakdown of the human skeleton, such as... Figure 6 The diagram shown illustrates the process of disassembling a human skeleton, including the following steps:

[0064] Step 601: Start traversing from the root bone node among the bone nodes of the human skeleton;

[0065] In the human skeleton, the skeletal nodes have a hierarchical relationship, i.e., a parent-child relationship. Each skeletal node also has a corresponding index.

[0066] Step 602: For any traversed bone node, if the index of the bone node is determined to be a wrist bone node, then the wrist bone node is taken as the target root bone node, and each child bone node under the target root bone node is determined as the hand skeleton.

[0067] Step 603: The skeleton other than the hand skeleton in the human skeleton is identified as the body skeleton.

[0068] like Figure 7 As shown in the figure, the human skeleton is divided starting from the wrist bone node, resulting in two hand skeletons and a body skeleton.

[0069] Step 402: Based on the body skeleton and the three-dimensional human body model to be processed, obtain the target three-dimensional position of the body skeleton in the three-dimensional human body model to be processed, wherein the three-dimensional human body model to be processed and the target three-dimensional human body model have the same action posture, and the action posture is a T-shaped posture.

[0070] like Figure 8 The diagram illustrates the process of determining the target location of the body skeleton within a 3D human model, including the following steps:

[0071] Step 801: Input the body skeleton and the three-dimensional human body model to be processed into the skeleton embedding algorithm to obtain the initial three-dimensional position of each bone node in the body skeleton in the three-dimensional human body model to be processed;

[0072] In this embodiment, the skeleton embedding algorithm used is the Pinocchio skeleton embedding algorithm. However, the specific skeleton embedding algorithm can be selected according to the actual situation. This embodiment does not limit the skeleton embedding algorithm.

[0073] Step 802: For any skeletal node, based on the initial 3D position of the skeletal node, determine the target center point in the set of centerline points of the 3D human body model to be processed that is closest to the skeletal node; wherein, the set of centerline points consists of points on the centerline of the 3D human body model to be processed.

[0074] like Figure 9 As shown, Figure 9 The dashed line in the diagram represents the center line of the 3D human body model to be processed.

[0075] In one embodiment, the distance between each point in the centerline point set and the skeletal node is determined in the following way:

[0076] For any point in the set of centerline points, the distance between the point and the bone node is obtained based on the three-dimensional position coordinates of the point and the three-dimensional position coordinates of the bone node. The distance d between the point and the bone node can be obtained using formula (1):

[0077]

[0078] Where x1 is the abscissa of the three-dimensional position coordinates of the bone node, y1 is the total coordinate of the three-dimensional position coordinates of the bone node, z1 is the ordinate of the three-dimensional position coordinates of the bone node, x2 is the abscissa of the three-dimensional position coordinates of the point, y2 is the ordinate of the three-dimensional position coordinates of the point, and z2 is the ordinate of the three-dimensional position coordinates of the point.

[0079] The following describes the specific method for determining the set of centerline points. In one embodiment, such as... Figure 10 The flowchart for determining the set of centerline points includes the following steps:

[0080] Step 1001: For any bone node in the three-dimensional human body model to be processed, determine the normal vector corresponding to the bone node based on the bone node and the target human body surface where the bone node is located; wherein, the direction of the normal vector points to the outside of the target human body surface.

[0081] The normal vector corresponding to the skeletal node passes through the skeletal node. Furthermore, the method for determining the normal vector of the target human body surface patch is the same as the method for determining the normal vector of a plane in existing technologies, which will not be elaborated upon in this embodiment.

[0082] Step 1002: Move the bone node in the opposite direction to the direction of the normal vector corresponding to the bone node;

[0083] The distance of each movement of the skeletal node is preset and can be limited according to the actual situation. This embodiment does not limit it.

[0084] Step 1003: When it is determined that the bone node intersects with other human face patches in the three-dimensional human model to be processed, except for the target human face patch, the current three-dimensional position of the bone node is determined as the three-dimensional position of the center point.

[0085] In one embodiment, whether the skeletal node intersects with other human face patches in the 3D human model to be processed, excluding the target human face patch, is determined by the following method:

[0086] For any other human facet, based on the position coordinates of the facet vertices in the other human facet, the plane equation of the other human facet is obtained. The current three-dimensional position of the bone node is substituted into the plane equation. If both sides of the plane equation are equal, it is determined that the bone node intersects with the other human facet. If both sides of the plane equation are not equal, it is determined that the bone node does not intersect with the other human facet.

[0087] It should be noted that determining the planar equations of other human face patches based on the position coordinates of vertices is a method in the prior art, and will not be elaborated on in this embodiment.

[0088] Step 1004: Based on the three-dimensional position of the center point corresponding to each bone node, obtain the set of centerline points.

[0089] Specifically, the center point and the three-dimensional position of each bone node are added to the set of centerline points.

[0090] Step 803: Determine the position of the target center point as the target three-dimensional position of the skeletal node;

[0091] Step 804: Based on the target three-dimensional position of each skeletal node, obtain the target three-dimensional position of the body skeleton in the three-dimensional human body model to be processed.

[0092] Specifically, the target three-dimensional position of each skeletal node is determined as the target three-dimensional position of the body skeleton in the three-dimensional human body model to be processed.

[0093] Step 403: Using the target 3D position of the body skeleton in the 3D human body model to be processed, embed the body skeleton into the 3D human body model to be processed to obtain an intermediate 3D human body model.

[0094] Step 404: Obtain the target three-dimensional position of the hand skeleton using the three-dimensional hand model in the intermediate three-dimensional human body model;

[0095] like Figure 11 The diagram shown illustrates the process for determining the target 3D position of the hand skeleton, including the following steps:

[0096] Step 1101: Based on the wrist bone nodes in the intermediate 3D human body model, obtain the 3D models of each hand in the intermediate 3D human body model;

[0097] Since the body skeleton is already embedded in the intermediate 3D human body model, and the body skeleton includes wrist bone nodes, the wrist bone nodes in the intermediate 3D human body model can be directly obtained. Since all 3D human body models in this embodiment are in a T-shaped pose, the intermediate 3D human body model is divided by using a straight line passing through the wrist bone nodes and perpendicular to the arm as a dividing line, and the two hand 3D models of the intermediate 3D human body model can be directly obtained.

[0098] Step 1102: For any three-dimensional hand model, project the three-dimensional hand model onto the target two-dimensional image to obtain a hand projection image of a specified size;

[0099] In this embodiment, the three-dimensional coordinate system is established with the direction the finger is pointing as the horizontal axis, the direction the finger is at height as the vertical axis, and the direction the face is facing as the vertical axis.

[0100] like Figure 12 The diagram shown illustrates the process of determining a projected image of a hand, including the following steps:

[0101] Step 1201: Based on the dimensions of the three-dimensional hand model and the dimensions of the target two-dimensional image, obtain the second scaling ratio;

[0102] The dimensions include length and height, and the second scaling ratio can be determined in the following way:

[0103] Divide the length of the target 2D image by the length of the hand 3D model to obtain a first intermediate scaling ratio; and divide the width of the target 2D image by the width of the hand 3D model to obtain a second intermediate scaling ratio, and determine the smaller of the first and second intermediate scaling ratios as the second scaling ratio.

[0104] Step 1202: Scale the three-dimensional hand model using the second scaling ratio to obtain a scaled three-dimensional hand model;

[0105] Specifically, the x-coordinate of each vertex in the 3D hand model is multiplied by the second scaling factor to obtain the scaled x-coordinate of each vertex, and the y-coordinate of each vertex in the 3D hand model is multiplied by the second scaling factor to obtain the scaled y-coordinate of each vertex. Based on the scaled x-coordinates and y-coordinates of each vertex, the scaled 3D hand model is obtained.

[0106] It should be noted that the vertical coordinates of each vertex in the scaled-up 3D hand model are the same as those in the unscaled 3D hand model.

[0107] Step 1203: Obtain the position offset based on the position of the center point of the scaled 3D hand model and the position of the center point of the 2D image;

[0108] In this embodiment, the position offset includes a first offset and a second offset.

[0109] In one embodiment, the position offset is obtained in the following manner:

[0110] The first offset is obtained by subtracting the x-coordinate of the center point of the two-dimensional image from the x-coordinate of the center point of the scaled three-dimensional hand model; and the second offset is obtained by subtracting the y-coordinate of the center point of the two-dimensional image from the y-coordinate of the center point of the scaled three-dimensional hand model.

[0111] Step 1204: Determine the two-dimensional position coordinates of each model vertex in the scaled hand 3D model using the position offset;

[0112] In one embodiment, the two-dimensional position coordinates of each vertex in the scaled 3D hand model are obtained in the following manner:

[0113] For any one of the model vertices in the scaled 3D hand model, add the x-coordinate of the two-dimensional position coordinates of the model vertex to the first offset to obtain the two-dimensional position x-coordinate of the model vertex, and add the y-coordinate of the two-dimensional position coordinates of the model vertex to the second offset to obtain the two-dimensional position y-coordinate of the model vertex; the two-dimensional position x-coordinate and the two-dimensional position y-coordinate of the model vertex are determined as the two-dimensional position coordinates of the model vertex.

[0114] Step 1205: Obtain the hand projection image of the specified size based on the two-dimensional position coordinates of each model vertex in the scaled three-dimensional hand model.

[0115] Specifically, the two-dimensional position coordinates of each vertex in the scaled 3D hand model are determined as the two-dimensional position coordinates of each model vertex in the hand projection image. For example, as... Figure 13 The image shown is a schematic diagram for obtaining a projected image of the hand.

[0116] Step 1103: Use the convex hull detection algorithm to perform contour detection on the hand projection image to obtain the contour of the hand;

[0117] The convex hull detection algorithm in this embodiment is a method in the prior art, and will not be described in detail here.

[0118] like Figure 14 As shown, Figure 14 The area enclosed by the outer gray lines in the middle hand projection image is the outline of the hand.

[0119] Step 1104: Use a convex hull defect detection algorithm to perform convex hull defect detection on the contour of the hand, and obtain each convex hull defect of the contour of the hand and the depth of each convex hull defect; wherein, the convex hull defect is formed by the fingertips of two adjacent fingers and the gap between the two fingers;

[0120] Step 1105: Based on the depth of each convex hull defect, obtain the target convex hull defects;

[0121] For each convex hull defect consisting of two identical adjacent fingertips, the convex hull defect with the largest depth among the convex hull defects is determined as the target convex hull defect corresponding to the two adjacent fingertips.

[0122] like Figure 15 As shown, the target convex hull defect corresponding to fingertip 1 and fingertip 2 is triangle 12A. The target convex hull defect corresponding to fingertip 2 and fingertip 3 is triangle 23B. The target convex hull defect corresponding to fingertip 3 and fingertip 4 is triangle 34C. The target convex hull defect corresponding to fingertip 4 and fingertip 5 is triangle 45D.

[0123] Step 1106: For any finger in the hand projection image, obtain the two-dimensional position of the finger root bone node based on the two-dimensional position of the finger gap in the two adjacent target convex hull defects corresponding to the finger.

[0124] In one embodiment, step 1106 can be specifically implemented as follows: weighted summation of the two-dimensional positions of the finger gaps in the two adjacent target convex hull defects to obtain the intermediate two-dimensional position; dividing the intermediate two-dimensional position by a specified threshold to obtain the two-dimensional position of the finger root bone node.

[0125] In this embodiment, the weights of the target convex hull defects corresponding to different fingers can be the same or different, and can be set according to the actual situation. This embodiment does not impose any limitation on this. Furthermore, the specified threshold in this embodiment is 2, but the specified threshold can also be set according to the actual situation. This embodiment does not impose any limitation on the specified threshold.

[0126] Step 1107: Using the number of bone nodes in each finger skeleton in the hand skeleton and the length between each bone node, determine the two-dimensional position of each bone node between the fingertip bone node and the finger root bone node in the hand projection image.

[0127] In one embodiment, step 1107 may be specifically implemented as follows: for any finger in the hand projection image, determine the number of bone nodes in the finger skeleton corresponding to the finger in the hand skeleton as the number of bone nodes between the fingertip bone node and the finger root bone node of the finger; and obtain a first scaling ratio based on the size of the finger projection image and the size of the hand skeleton; and obtain the two-dimensional position of each bone node between the fingertip bone node and the finger root bone node of the finger according to the length between each bone node in the finger skeleton and the first scaling ratio.

[0128] The dimensions include length and height. In one embodiment, the first scaling ratio is determined by dividing the length of the finger projection image by the length of the hand skeleton to obtain a first sub-scaling ratio; and by dividing the height of the finger projection image by the height of the finger projection image to obtain a second sub-scaling ratio, and the sub-scaling ratio with the smaller value between the first sub-scaling ratio and the second sub-scaling ratio is determined as the first scaling ratio.

[0129] In one embodiment, the two-dimensional positions of each bone node between the fingertip bone node and the finger root bone node are determined in the following manner:

[0130] The hand projection image is scaled according to the first scaling ratio to obtain a scaled hand projection image. Starting from the fingertip bone node in the finger skeleton, each bone node in the finger skeleton is traversed. For any traversed bone node, the length between two bone nodes is obtained based on the three-dimensional position coordinates of the bone node connected to it but not traversed, and the three-dimensional position coordinates of the bone node. Based on the length and the position coordinates of the target bone node in the scaled hand projection image, the two-dimensional position coordinates of the adjacent bone node connected to the target bone node but whose position is not determined are determined. The adjacent bone node is identified as the target bone node, and the process returns to the step of traversing each bone node in the finger skeleton starting from the fingertip bone node, until there are no untraversed bone nodes in the finger skeleton, at which point the process ends.

[0131] Step 1108: Based on the two-dimensional positions of the fingertip bone nodes, the two-dimensional positions of the finger root bone nodes, and the two-dimensional positions of the bone nodes between the fingertip and the finger root bone nodes, the target three-dimensional position of the hand skeleton is obtained.

[0132] like Figure 16 The flowchart for determining the target 3D position of the hand skeleton includes the following steps:

[0133] Step 1601: For any one of the bone nodes, use the second scaling ratio and the position offset to back-project the two-dimensional position of the bone node to obtain the three-dimensional horizontal coordinate and three-dimensional vertical coordinate of the bone node. The bone nodes include the fingertip bone node, the finger root bone node, and the bone nodes between the fingertip and the finger root bone node.

[0134] As mentioned above, the position offset in this embodiment includes a first offset and a second offset;

[0135] In one embodiment, the three-dimensional horizontal and vertical coordinates of the skeletal node are obtained in the following manner:

[0136] 3D horizontal coordinate: Subtract the second offset from the 2D horizontal coordinate of the skeletal node's 2D position to obtain the offset 2D horizontal coordinate of the skeletal node. Divide the offset 2D horizontal coordinate by the second scaling factor to obtain the 3D horizontal coordinate of the skeletal node.

[0137] 3D vertical coordinate: Subtract the 2D vertical coordinate of the 2D position of the bone node from the second offset to obtain the 2D vertical coordinate of the bone node after offset. Divide the 2D vertical coordinate of the bone node by the second scaling factor to obtain the 3D vertical coordinate of the bone node.

[0138] Step 1602: Based on the three-dimensional horizontal and vertical coordinates of the bone node, obtain a straight line parallel to the vertical axis in the three-dimensional coordinate system;

[0139] The straight line is a straight line that passes through the three-dimensional horizontal coordinate and the three-dimensional vertical coordinate.

[0140] Step 1603: Determine the three-dimensional ordinate of the center point of the two intersection points of the straight line and the three-dimensional hand model as the three-dimensional ordinate of the bone node;

[0141] Step 1604: Obtain the three-dimensional position coordinates of the bone node based on its three-dimensional horizontal coordinate, three-dimensional vertical coordinate, and three-dimensional ordinate.

[0142] Step 1605: Obtain the target three-dimensional position of the hand skeleton by using the three-dimensional position coordinates of each bone node in each finger.

[0143] Specifically, the three-dimensional position coordinates of each bone node in each finger are determined as the target three-dimensional position of the hand skeleton.

[0144] Step 405: Based on the target three-dimensional position of the hand skeleton, embed the hand skeleton into the intermediate three-dimensional human body model to obtain a three-dimensional human body model containing the human skeleton.

[0145] Specifically, the hand skeleton is moved to the target three-dimensional position to obtain the three-dimensional human body model containing the skeleton.

[0146] To further connect the technical solutions in this application, the following is combined with... Figure 17 A detailed explanation may include the following steps:

[0147] Step 1701: Start traversing from the root bone node among the bone nodes of the human skeleton. For any traversed bone node, if the index of the bone node is determined to be a wrist bone node, then the wrist bone node is taken as the target root bone node, and each child bone node under the target root bone node is determined as the hand skeleton; and the skeletons in the human skeleton other than the hand skeleton are determined as the body skeleton.

[0148] Step 1702: Input the body skeleton and the three-dimensional human model to be processed into the skeleton embedding algorithm to obtain the initial three-dimensional position of each bone node in the body skeleton in the three-dimensional human model to be processed; wherein, the three-dimensional human model to be processed and the target three-dimensional human model have the same action posture, and the action posture is a T-shaped posture;

[0149] Step 1703: For any skeletal node, based on the initial 3D position of the skeletal node, determine the target center point in the set of centerline points of the 3D human body model to be processed that is closest to the skeletal node; wherein, the set of centerline points consists of the points on the centerline of the 3D human body model to be processed.

[0150] Step 1704: Determine the position of the target center point as the target three-dimensional position of the skeletal node;

[0151] Step 1705: Based on the target three-dimensional position of each skeletal node, obtain the target three-dimensional position of the body skeleton in the three-dimensional human body model to be processed;

[0152] Step 1706: Using the target 3D position of the body skeleton in the 3D human body model to be processed, embed the body skeleton into the 3D human body model to be processed to obtain an intermediate 3D human body model.

[0153] Step 1707: Based on the wrist bone nodes in the intermediate 3D human body model, obtain the 3D models of each hand in the intermediate 3D human body model;

[0154] Step 1708: For any three-dimensional hand model, project the three-dimensional hand model onto the target two-dimensional image to obtain a hand projection image of a specified size;

[0155] Step 1709: Use a convex hull detection algorithm to perform contour detection on the hand projection image to obtain the contour of the hand; and use a convex hull defect detection algorithm to perform convex hull defect detection on the contour of the hand to obtain each convex hull defect of the hand contour and the depth of each convex hull defect; wherein, the convex hull defect is formed by the fingertips of two adjacent fingers and the gap between the two fingers;

[0156] Step 1710: Based on the depth of each convex hull defect, obtain the target convex hull defects;

[0157] Step 1711: For any finger in the hand projection image, obtain the two-dimensional position of the finger root bone node based on the two-dimensional position of the finger gap in the two adjacent target convex hull defects corresponding to the finger.

[0158] Step 1712: Using the number of bone nodes in each finger skeleton in the hand skeleton and the length between each bone node, determine the two-dimensional position of each bone node between the fingertip bone node and the finger root bone node in the hand projection image.

[0159] Step 1713: Based on the two-dimensional positions of the fingertip bone nodes, the two-dimensional positions of the finger root bone nodes, and the two-dimensional positions of the bone nodes between the fingertip and the finger root bone nodes, the target three-dimensional position of the hand skeleton is obtained.

[0160] Step 1714: Based on the target three-dimensional position of the hand skeleton, embed the hand skeleton into the intermediate three-dimensional human body model to obtain a three-dimensional human body model containing the human skeleton.

[0161] Based on the same inventive concept, the skeleton embedding method for a three-dimensional human body model as described above can also be implemented by a skeleton embedding device for a three-dimensional human body model. The effect of this skeleton embedding device is similar to that of the aforementioned method, and will not be described again here.

[0162] Figure 18 This is a schematic diagram of the structure of a skeleton embedding device for a three-dimensional human body model according to an embodiment of the present disclosure.

[0163] like Figure 18 The skeleton embedding device 1800 for the three-dimensional human body model disclosed herein may include a skeleton splitting module 1810, a body skeleton position determination module 1820, a body skeleton embedding module 1830, a hand skeleton position determination module 1840, and a hand skeleton embedding module 1850.

[0164] The skeleton splitting module 1810 is used to extract the human skeleton from the target three-dimensional human body model, and split the human skeleton based on the wrist bone nodes in the human skeleton to obtain the hand skeleton and the body skeleton.

[0165] The body skeleton position determination module 1820 is used to obtain the target three-dimensional position of the body skeleton in the three-dimensional human body model to be processed based on the body skeleton and the three-dimensional human body model to be processed, wherein the three-dimensional human body model to be processed and the target three-dimensional human body model have the same action posture, and the action posture is a T-shaped posture.

[0166] The body skeleton embedding module 1830 is used to embed the body skeleton into the three-dimensional human body model to be processed by utilizing the target three-dimensional position of the body skeleton in the three-dimensional human body model to be processed, thereby obtaining an intermediate three-dimensional human body model.

[0167] The hand skeleton position determination module 1840 is used to obtain the target three-dimensional position of the hand skeleton through the three-dimensional hand model in the intermediate three-dimensional human body model;

[0168] The hand skeleton embedding module 1850 is used to embed the hand skeleton into the intermediate three-dimensional human body model based on the target three-dimensional position of the hand skeleton, so as to obtain a three-dimensional human body model containing the human skeleton.

[0169] In one embodiment, the human skeleton includes skeletal nodes;

[0170] The skeleton splitting module 1810 is specifically used for:

[0171] The traversal begins from the root bone node among all the bone nodes of the human skeleton;

[0172] For any traversed bone node, if the index of the bone node is determined to be a wrist bone node, then the wrist bone node is taken as the target root bone node, and each child bone node under the target root bone node is determined as the hand skeleton; and,

[0173] The skeleton other than the hand skeleton in the human skeleton is defined as the body skeleton.

[0174] In one embodiment, the body skeleton position determination module 1820 is specifically used for:

[0175] The body skeleton and the three-dimensional human body model to be processed are input into the skeleton embedding algorithm to obtain the initial three-dimensional position of each bone node in the body skeleton in the three-dimensional human body model to be processed.

[0176] For any skeletal node, based on the initial three-dimensional position of the skeletal node, determine the target center point two that is closest to the skeletal node in the set of centerline points of the three-dimensional human body model to be processed, wherein the set of centerline points consists of points on the centerline of the three-dimensional human body model to be processed.

[0177] The position of the target center point is determined as the target three-dimensional position of the skeletal node.

[0178] Based on the target three-dimensional position of each skeletal node, the target three-dimensional position of the body skeleton in the three-dimensional human body model to be processed is obtained.

[0179] In one embodiment, the apparatus further includes:

[0180] The centerline point set determination module 1860 is used to determine the centerline point set in the following manner:

[0181] For any skeletal node in the 3D human body model to be processed, based on the skeletal node and the target human body surface where the skeletal node is located, the normal vector corresponding to the skeletal node is determined; wherein the direction of the normal vector points outward from the target human body surface; and,

[0182] The bone node is moved in the opposite direction to the direction of the normal vector corresponding to the bone node;

[0183] When it is determined that the bone node intersects with other human face patches in the three-dimensional human model to be processed, excluding the target human face patch, the current three-dimensional position of the bone node is determined as the three-dimensional position of the center point.

[0184] The set of centerline points is obtained based on the three-dimensional position of the center point corresponding to each skeletal node.

[0185] In one embodiment, the hand skeleton position determination module 1840 is specifically used for:

[0186] Based on the wrist bone nodes in the intermediate three-dimensional human body model, the three-dimensional models of each hand in the intermediate three-dimensional human body model are obtained;

[0187] For any given 3D hand model, the 3D hand model is projected onto a target 2D image to obtain a hand projection image of a specified size;

[0188] The contour of the hand is obtained by performing contour detection on the projected image of the hand using a convex hull detection algorithm; and,

[0189] The convex hull defect detection algorithm is used to detect convex hull defects in the contour of the hand, thereby obtaining each convex hull defect and the depth of each convex hull defect; wherein, the convex hull defect is formed by the fingertips of two adjacent fingers and the gap between the two fingers;

[0190] Based on the depth of each convex hull defect, the target convex hull defects are obtained;

[0191] For any finger in the hand projection image, the two-dimensional position of the finger root bone node is obtained based on the two-dimensional position of the finger gap in the two adjacent target convex hull defects corresponding to the finger.

[0192] By using the number of bone nodes in each finger skeleton in the hand skeleton and the length between each bone node, the two-dimensional position of each bone node between the fingertip bone node and the finger root bone node in the hand projection image is determined.

[0193] The target three-dimensional position of the hand skeleton is obtained based on the two-dimensional position of the fingertip bone nodes, the two-dimensional position of the finger root bone nodes, and the two-dimensional position of each bone node between the fingertip and the finger root bone nodes.

[0194] In one embodiment, the hand skeleton position determination module 1840 performs the step of obtaining the two-dimensional position of the finger root bone node based on the two-dimensional position of the finger gap in two adjacent target convex hull defects corresponding to the finger, specifically for:

[0195] The two-dimensional positions of the finger gaps in the two adjacent target convex hull defects are weighted and summed to obtain the middle two-dimensional position. The middle two-dimensional position is divided by a specified threshold to obtain the two-dimensional position of the finger root bone node.

[0196] In one embodiment, the hand skeleton position determination module 1840 performs the function of determining the two-dimensional position of each bone node between the fingertip bone node and the base bone node of each finger in the hand projection image by using the number of bone nodes in each finger skeleton and the length between each bone node, specifically for:

[0197] For any finger in the hand projection image, the number of bone nodes in the finger skeleton corresponding to that finger is determined as the number of bone nodes between the fingertip bone node and the finger root bone node of that finger; and,

[0198] Based on the size of the finger projection image and the size of the hand skeleton, a first scaling ratio is obtained; and,

[0199] Based on the lengths between the bone nodes in the finger skeleton and the first scaling ratio, the two-dimensional positions of each bone node between the fingertip bone node and the finger root bone node are obtained.

[0200] In one embodiment, the hand skeleton position determination module 1840 performs the step of projecting any given hand 3D model onto a target 2D image to obtain a hand projection image of a specified size, specifically for:

[0201] Based on the dimensions of the three-dimensional hand model and the dimensions of the target two-dimensional image, a second scaling ratio is obtained;

[0202] The hand 3D model is scaled using the second scaling ratio to obtain a scaled hand 3D model;

[0203] The position offset is obtained based on the position of the center point of the scaled 3D hand model and the position of the center point of the 2D image;

[0204] The two-dimensional position coordinates of each model vertex in the scaled three-dimensional hand model are determined by the position offset.

[0205] Based on the two-dimensional position coordinates of each vertex in the scaled three-dimensional hand model, the projected image of the hand of the specified size is obtained.

[0206] In one embodiment, the three-dimensional coordinate system of the three-dimensional human body model to be processed is established with the direction of finger pointing as the horizontal axis, the direction of finger height as the vertical axis, and the direction of face facing as the vertical axis.

[0207] The hand skeleton position determination module 1840 executes the two-dimensional positions of the fingertip bone nodes, the two-dimensional positions of the finger root bone nodes, and the two-dimensional positions of the bone nodes between the fingertips and the finger roots to obtain the target three-dimensional position of the hand skeleton, specifically for:

[0208] For any one of the bone nodes, the two-dimensional position of the bone node is back-projected using the second scaling ratio and the position offset to obtain the three-dimensional horizontal coordinate and three-dimensional vertical coordinate of the bone node. The bone nodes include the fingertip bone node, the finger root bone node, and the bone nodes between the fingertip and the finger root bone node.

[0209] Based on the three-dimensional horizontal and vertical coordinates of the bone nodes, a straight line parallel to the vertical axis in the three-dimensional coordinate system is obtained.

[0210] The three-dimensional ordinate of the center point of the two intersection points of the straight line and the three-dimensional hand model is determined as the three-dimensional ordinate of the bone node; and,

[0211] Based on the three-dimensional horizontal coordinate, three-dimensional vertical coordinate, and three-dimensional ordinate of the bone node, the three-dimensional position coordinates of the bone node are obtained;

[0212] The target three-dimensional position of the hand skeleton is obtained by using the three-dimensional position coordinates of each bone node in each finger.

[0213] After introducing a method and apparatus for embedding the skeleton of a three-dimensional human body model according to an exemplary embodiment of the present invention, the following describes an electronic device according to another exemplary embodiment of the present invention.

[0214] Those skilled in the art will understand that various aspects of the present invention can be implemented as systems, methods, or program products. Therefore, various aspects of the present invention 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 aspects, collectively referred to herein as "circuit", "module", or "system".

[0215] In some possible implementations, the electronic device according to the present invention may include at least one processor and at least one computer storage medium. The computer storage medium stores program code that, when executed by the processor, causes the processor to perform the steps in the skeleton embedding method for a three-dimensional human model according to various exemplary embodiments of the present invention described above. For example, the processor may perform actions such as... Figure 4 Steps 401-405 are shown in the diagram.

[0216] The following reference Figure 19 To describe an electronic device 1900 according to this embodiment of the present invention. Figure 19 The electronic device 1900 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.

[0217] like Figure 19 As shown, the electronic device 1900 is manifested in the form of a general electronic device. The components of the electronic device 1900 may include, but are not limited to: at least one processor 1901, at least one computer storage medium 1902, and a bus 1903 connecting different system components (including the computer storage medium 1902 and the processor 1901).

[0218] Bus 1903 represents one or more of several bus architectures, including computer storage media bus or computer storage media controller, peripheral bus, processor, or local bus using any of the various bus architectures.

[0219] Computer storage medium 1902 may include readable media in the form of volatile computer storage media, such as random access computer storage medium (RAM) 1921 and / or cache storage medium 1922, and may further include read-only computer storage medium (ROM) 1923.

[0220] The computer storage medium 1902 may also include a program / utility 1925 having a set (at least one) of program modules 1924, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

[0221] Electronic device 1900 can also communicate with one or more external devices 1904 (e.g., keyboard, pointing device, etc.), one or more devices that enable a user to interact with electronic device 1900, and / or any device that enables electronic device 1900 to communicate with one or more other electronic devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 1905. Furthermore, electronic device 1900 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 1906. As shown, network adapter 1906 communicates with other modules used in electronic device 1900 via bus 1903. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 1900, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0222] In some possible implementations, various aspects of the skeleton embedding method for a three-dimensional human body model provided by the present invention can also be implemented in the form of a program product, which includes program code that, when the program product is run on a computer device, causes the computer device to perform the steps in the skeleton embedding method for a three-dimensional human body model according to various exemplary embodiments of the present invention as described above.

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

Claims

1. A method for embedding the skeleton of a three-dimensional human body model, characterized in that, The method includes: The human skeleton is extracted from the target 3D human body model, and the human skeleton is split based on the wrist bone nodes in the human skeleton to obtain the hand skeleton and the body skeleton. Based on the body skeleton and the three-dimensional human body model to be processed, the target three-dimensional position of the body skeleton in the three-dimensional human body model to be processed is obtained, wherein the three-dimensional human body model to be processed and the target three-dimensional human body model have the same action posture, and the action posture is a T-shaped posture. Using the target 3D position of the body skeleton in the 3D human body model to be processed, the body skeleton is embedded into the 3D human body model to be processed to obtain an intermediate 3D human body model. Based on the wrist bone nodes in the intermediate three-dimensional human body model, the three-dimensional models of each hand in the intermediate three-dimensional human body model are obtained; For any given 3D hand model, the 3D hand model is projected onto a target 2D image to obtain a hand projection image of a specified size; The contour of the hand is obtained by performing contour detection on the projected image of the hand using a convex hull detection algorithm; and, The convex hull defect detection algorithm is used to detect convex hull defects in the contour of the hand, and the depth of each convex hull defect is obtained; wherein, the convex hull defect is formed by the fingertip of two adjacent fingers and the gap between the two fingers; Based on the depth of each convex hull defect, the target convex hull defects are obtained; For any finger in the hand projection image, the two-dimensional position of the finger root bone node is obtained based on the two-dimensional position of the finger gap in the two adjacent target convex hull defects corresponding to the finger. By using the number of bone nodes in each finger skeleton in the hand skeleton and the length between each bone node, the two-dimensional position of each bone node between the fingertip bone node and the finger root bone node in the hand projection image is determined. Based on the two-dimensional positions of the fingertip bone nodes, the two-dimensional positions of the finger root bone nodes, and the two-dimensional positions of the bone nodes between the fingertip and the finger root bone nodes, the target three-dimensional position of the hand skeleton is obtained. Based on the target three-dimensional position of the hand skeleton, the hand skeleton is embedded into the intermediate three-dimensional human body model to obtain a three-dimensional human body model containing the human skeleton.

2. The method according to claim 1, characterized in that, The human skeleton includes various skeletal nodes; The process of disassembling the human skeleton based on wrist bone nodes to obtain a hand skeleton and a body skeleton includes: The traversal begins from the root bone node among all the bone nodes of the human skeleton; For any traversed bone node, if the index of the bone node is determined to be a wrist bone node, then the wrist bone node is taken as the target root bone node, and each child bone node under the target root bone node is determined as the hand skeleton; and, The skeleton other than the hand skeleton in the human skeleton is defined as the body skeleton.

3. The method according to claim 1, characterized in that, The step of obtaining the target 3D position of the body skeleton in the 3D human body model to be processed based on the body skeleton and the 3D human body model to be processed includes: The body skeleton and the three-dimensional human body model to be processed are input into the skeleton embedding algorithm to obtain the initial three-dimensional position of each bone node in the body skeleton in the three-dimensional human body model to be processed. For any given skeletal node, based on the initial 3D position of the skeletal node, determine the target center point that is closest to the skeletal node from the set of centerline points of the 3D human body model to be processed; wherein, the set of centerline points consists of points on the centerline of the 3D human body model to be processed. The position of the target center point is determined as the target three-dimensional position of the skeletal node; and... Based on the target three-dimensional position of each skeletal node, the target three-dimensional position of the body skeleton in the three-dimensional human body model to be processed is obtained.

4. The method according to claim 3, characterized in that, The set of centerline points is determined in the following manner: For any bone node in the 3D human body model to be processed, based on the bone node and the target human body surface where the bone node is located, determine the normal vector corresponding to the bone node; wherein, the direction of the normal vector points outward from the target human body surface; and, The bone node is moved in the opposite direction to the direction of the normal vector corresponding to the bone node; When it is determined that the bone node intersects with other human face patches in the three-dimensional human model to be processed, except for the target human face patch, the current three-dimensional position of the bone node is determined as the three-dimensional position of the center point. The set of centerline points is obtained based on the three-dimensional position of the center point corresponding to each skeletal node.

5. The method according to claim 1, characterized in that, The step of obtaining the two-dimensional position of the finger root bone node based on the two-dimensional position of the finger gap in the two adjacent target convex hull defects corresponding to the finger includes: The two-dimensional positions of the finger gaps in the two adjacent target convex hull defects are weighted and summed to obtain the middle two-dimensional position; Divide the intermediate two-dimensional position by the specified threshold to obtain the two-dimensional position of the finger root bone node.

6. The method according to claim 1, characterized in that, The step of determining the two-dimensional position of each bone node between the fingertip bone node and the base bone node in the hand projection image by utilizing the number of bone nodes in each finger skeleton and the length between each bone node includes: For any finger in the hand projection image, the number of bone nodes in the finger skeleton corresponding to that finger is determined as the number of bone nodes between the fingertip bone node and the finger root bone node of that finger; and, Based on the size of the finger projection image and the size of the hand skeleton, a first scaling ratio is obtained; and, Based on the lengths between the bone nodes in the finger skeleton and the first scaling ratio, the two-dimensional positions of each bone node between the fingertip bone node and the finger root bone node are obtained.

7. The method according to claim 1, characterized in that, The step of projecting any given 3D hand model onto a target 2D image to obtain a projected hand image of a specified size includes: Based on the dimensions of the three-dimensional hand model and the dimensions of the target two-dimensional image, a second scaling ratio is obtained; The hand 3D model is scaled using the second scaling ratio to obtain a scaled hand 3D model; The position offset is obtained based on the position of the center point of the scaled 3D hand model and the position of the center point of the 2D image; The two-dimensional position coordinates of each model vertex in the scaled three-dimensional hand model are determined by the position offset. Based on the two-dimensional position coordinates of each vertex in the scaled three-dimensional hand model, the projected image of the hand of the specified size is obtained.

8. The method according to claim 7, characterized in that, The three-dimensional coordinate system of the three-dimensional human body model to be processed is established with the direction of the finger pointing as the horizontal axis, the direction of the finger height as the vertical axis, and the direction of the face facing as the vertical axis. The target three-dimensional position of the hand skeleton is obtained based on the two-dimensional positions of the fingertip bone nodes, the two-dimensional positions of the finger root bone nodes, and the two-dimensional positions of the bone nodes between the fingertips and the finger roots, including: For any one of the bone nodes, the two-dimensional position of the bone node is back-projected using the second scaling ratio and the position offset to obtain the three-dimensional horizontal coordinate and three-dimensional vertical coordinate of the bone node. The bone nodes include the fingertip bone node, the finger root bone node, and the bone nodes between the fingertip and the finger root bone node. Based on the three-dimensional horizontal and vertical coordinates of the bone nodes, a straight line parallel to the vertical axis in the three-dimensional coordinate system is obtained. The three-dimensional ordinate of the center point of the two intersection points of the straight line and the three-dimensional hand model is determined as the three-dimensional ordinate of the bone node; and, Based on the three-dimensional horizontal coordinate, three-dimensional vertical coordinate, and three-dimensional ordinate of the bone node, the three-dimensional position coordinates of the bone node are obtained; The target three-dimensional position of the hand skeleton is obtained by using the three-dimensional position coordinates of each bone node in each finger.

9. An electronic device, characterized in that, It includes a processor and a memory, which are connected via a bus; The memory stores a computer program, and the processor is configured to perform the method according to any one of claims 1-8 based on the computer program.

Citation Information

Patent Citations

  • 3D role model skeleton extraction method based on level set center clustering

    CN105513136A