A human body model penetration detection method, device, electronic equipment and storage medium
By calculating the sum of the minimum distance, radius and preset distance between the preset areas of the mannequin model, the mold penetration phenomenon is automatically detected, which solves the problem of long-term manual detection, improves detection efficiency and saves manual consumption.
Patent Information
- Application Number
- CN202011603484.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-30
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2040-12-30
AI Technical Summary
In the prior art, manual detection of mannequin models is time-consuming and inefficient, resulting in huge artificial consumption.
By obtaining the triangle identification and joint node coordinate data in the preset area of the mannequin model, calculate the minimum distance between the radius of each preset area and the different preset areas, and determine whether it is less than the sum of the radius and the preset distance, so as to Automatically detect mold penetration.
It improves the efficiency of mannequin-width detection, reduces the need for manual detection, and saves manual consumption.
Smart Images

Figure CN112652043B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method, device, electronic equipment and storage medium for detecting penetration of a human model. Background Art
[0002] At present, due to the increasingly widespread application of 3D virtual characters in animation production and movie special effects, the production of 3D virtual characters has become increasingly important. At present, the production of 3D virtual characters mainly includes: capturing various actions of the target character through motion capture technology, and then migrating the captured actions to a specified 3D human body model, and driving the 3D human body model to perform various actions. However, there are many problems in the process of migrating the captured actions to the specified 3D human body model. For example, due to the different body shapes of the target character and the 3D human body model to be driven, the 3D human body model may be driven to perform some actions that are not in line with the principles of physics, such as Figure 1 As shown, the driven 3D human body model 110 may cause the hand 101 to extend into the limb 102. This situation where the 3D human body model is driven to perform some actions that do not conform to the principles of physics is called "piercing the model".
[0003] Currently, the problem of mold penetration is mainly solved by staff manually checking whether there is mold penetration in the human body model. When the problem of mold penetration is detected, the mold penetration of the human body model is corrected through manual correction.
[0004] However, when manually inspecting whether there is penetration in the human body model, the staff needs to perform penetration inspection on the human body model frame by frame. This method is not only labor-intensive and time-consuming, but also has low inspection efficiency. Summary of the invention
[0005] The purpose of the embodiments of the present invention is to provide a method, device, electronic device and storage medium for detecting human body model penetration, so as to improve the efficiency of human body model penetration detection.
[0006] In order to achieve the above object, an embodiment of the present invention provides a method for detecting human body model penetration, comprising:
[0007] For multiple preset areas corresponding to multiple preset parts of a human body model in a preset state, the identifiers of multiple triangles in the human body model included in the multiple preset areas are obtained; wherein the skin of the human body model is formed by splicing multiple triangles; each preset part of the human body model corresponds to a preset area, and the preset area corresponding to each preset part of the human body model is an area determined based on two specified human body joint points of the preset part, and the preset area includes the two specified human body joint points of the preset part; the human body model includes multiple joint points;
[0008] For each frame of three-dimensional mesh, according to the identifiers of multiple triangles in the human body model included in each preset area, the coordinate data of the vertices of the multiple triangles included in each preset area in the human body model corresponding to the frame of three-dimensional mesh is obtained; and the coordinate data of two specified human body joint points included in each preset area in the human body model corresponding to the frame of three-dimensional mesh is obtained; wherein each frame of three-dimensional mesh corresponds to the human body model in the action posture of the frame, and each frame of three-dimensional mesh includes: the skinning information of the human body model in the action posture of the frame;
[0009] For each preset area, based on the coordinate data of the vertices of the multiple triangles included in the preset area and the coordinate data of the two specified human joint points included in the preset area, the average of the distances between the vertices of all the triangles included in the preset area and the center line segment of the preset area is calculated as the radius corresponding to the preset area; wherein the center line segment of each preset area is: a line segment determined by the two specified human joint points included in each preset area;
[0010] Calculate the minimum distance between the center line segments of every two different preset areas;
[0011] For each two different preset areas, determine whether the minimum distance between the center line segments of the two preset areas is less than the sum of the radius and the preset distance respectively corresponding to the two preset areas;
[0012] If the minimum distance between the center line segments of two preset areas in the human body model corresponding to the three-dimensional grid of the frame is less than the sum of the radius and the preset distance corresponding to the two preset areas respectively, it is determined that the human body model corresponding to the three-dimensional grid in the action posture of the frame has a model penetration phenomenon.
[0013] Furthermore, after determining, for each two different preset areas, whether the minimum distance between the center line segments of the two preset areas is less than the sum of the radius and the preset distance respectively corresponding to the two preset areas, the method further includes:
[0014] If the minimum distance between the center line segments of each two preset areas in the human body model corresponding to the three-dimensional grid of the frame is not less than the sum of the radius and the preset distance corresponding to the two preset areas respectively, it is determined that the human body model corresponding to the three-dimensional grid of the frame in the action posture of the frame does not have a model penetration phenomenon.
[0015] Furthermore, each preset area is: an area included in a geometric body consisting of a cylinder and two hemispheres whose radius is the same as the radius of the bottom surface of the cylinder, calculated based on the coordinate data of two specified human joint points of the preset part corresponding to the preset area and the coordinate data of each vertex of each triangle of the preset part corresponding to the preset area; wherein the two hemispheres in each geometric body are respectively connected to the two bottom surfaces of the cylinder in the geometric body, and the centers of the two bottom surfaces of the cylinder are respectively the same as the centers of the two hemispheres in the geometric body; the height of the cylinder in each geometric body is the same as the center line segment of the preset area; the radius of the two hemispheres in each geometric body is the radius corresponding to the preset area.
[0016] Furthermore, the calculating of the minimum distance between center line segments of every two different preset areas includes:
[0017] The following formula is used to calculate the minimum distance between the center line segments of every two different preset areas:
[0018]
[0019]
[0020]
[0021]
[0022] f(λ 1 ,λ 2 )=|E(λ 1 )-F(λ 2 )|;
[0023] If 0<λ 1 ,λ 2 <1, then d min =f(λ 1 ,λ 2 );
[0024] If 0<λ is not satisfied 1 ,λ 2 <1, then d min =min(d A-CD ,d B-CD ,d C-AB ,d D-AB );
[0025] Among them, E(λ 1 ) is the function of the coordinates of point E, F(λ 2 ) is a function of the coordinates of point F, A and B are two specified human joint points included in the same preset area, E is a point on line segment AB, The direction determined by A and B is the vector from A to B; C and D are two specified human joint points included in the same preset area, and F is a point on the line segment CD. The direction determined by C and D is the vector from C to D; The direction determined by C and A is the vector from C to A; λ 1 ,λ 2 are all constant parameters; f(λ 1 ,λ 2 ) is E(λ 1 ) and F(λ 2 ) between the two min is the minimum distance between the center line segments of two different preset areas; d A-CD represents the distance from A to line segment CD, d B-CD represents the distance from B to line segment CD, d C-AB represents the distance from C to line segment AB, d D-AB Represents the distance from D to line segment AB.
[0026] Furthermore, the human body model in the preset state is: a human body model in a T-Pose (T-letter posture) state;
[0027] The multiple preset parts of the human body model in the preset state include: a left forearm, a right forearm, a left upper arm, a right upper arm, a left calf, a right calf, a left thigh and a right thigh.
[0028] In order to achieve the above-mentioned object, an embodiment of the present invention further provides a human model penetration detection device, comprising:
[0029] The identification acquisition module is used to obtain identifications of multiple triangles in the human body model included in the multiple preset areas corresponding to the multiple preset parts of the human body model in the preset state; wherein the skin of the human body model is formed by splicing multiple triangles; each preset part of the human body model corresponds to a preset area, and the preset area corresponding to each preset part of the human body model is an area determined based on two specified human joint points of the preset part, and the preset area includes the two specified human joint points of the preset part; the human body model includes multiple joint points;
[0030] A coordinate data acquisition module is used to obtain, for each frame of three-dimensional mesh, the coordinate data of the vertices of the multiple triangles included in each preset area of the human body model corresponding to the frame of three-dimensional mesh according to the identifiers of the multiple triangles in the human body model included in each preset area; and obtain the coordinate data of two specified human joint points included in each preset area of the human body model corresponding to the frame of three-dimensional mesh; wherein each frame of three-dimensional mesh corresponds to the human body model in the action posture of the frame, and each frame of three-dimensional mesh includes: skinning information of the human body model in the action posture of the frame;
[0031] A radius calculation module, for calculating, for each preset area, the average of the distances between the vertices of the multiple triangles included in the preset area and the coordinate data of the two specified human joint points included in the preset area from the vertices of all the triangles included in the preset area to the center line segment of the preset area as the radius corresponding to the preset area; wherein the center line segment of each preset area is: a line segment determined by the two specified human joint points included in each preset area;
[0032] A minimum distance calculation module, used for calculating the minimum distance between center line segments of every two different preset areas;
[0033] A judging module, used for judging, for each two different preset areas, whether the minimum distance between the center line segments of the two preset areas is less than the sum of the radius and the preset distance respectively corresponding to the two preset areas;
[0034] The model penetration phenomenon determination module is used to determine that the human body model corresponding to the frame three-dimensional grid in the frame action posture has a model penetration phenomenon if the minimum distance between the center line segments of two preset areas in the human body model corresponding to the frame three-dimensional grid is less than the sum of the radius and the preset distance corresponding to the two preset areas respectively.
[0035] Furthermore, the model penetration phenomenon determination module is also used to determine that the human body model corresponding to the three-dimensional grid of the frame has no model penetration phenomenon in the action posture of the frame if the minimum distance between the center line segments of each two preset areas in the human body model corresponding to the three-dimensional grid of the frame is not less than the sum of the radius and the preset distance respectively corresponding to the two preset areas.
[0036] Furthermore, each preset area is: an area included in a geometric body consisting of a cylinder and two hemispheres whose radius is the same as the radius of the bottom surface of the cylinder, calculated based on the coordinate data of two specified human joint points of the preset part corresponding to the preset area and the coordinate data of each vertex of each triangle of the preset part corresponding to the preset area; wherein the two hemispheres in each geometric body are respectively connected to the two bottom surfaces of the cylinder in the geometric body, and the centers of the two bottom surfaces of the cylinder are respectively the same as the centers of the two hemispheres in the geometric body; the height of the cylinder in each geometric body is the same as the center line segment of the preset area; the radius of the two hemispheres in each geometric body is the radius corresponding to the preset area.
[0037] Furthermore, the minimum distance calculation module specifically uses the following formula to calculate the minimum distance between the center line segments of every two different preset areas:
[0038]
[0039]
[0040]
[0041]
[0042] f(λ 1 ,λ 2 )=|E(λ 1 )-F(λ 2 )|;
[0043] If 0<λ 1 ,λ 2 <1, then d min =f(λ 1 ,λ 2 );
[0044] If 0<λ is not satisfied 1 ,λ 2 <1, then d min =min(d A-CD ,d B-CD ,d C-AB ,d D-AB );
[0045] Among them, E(λ 1 ) is the function of the coordinates of point E, F(λ 2 ) is a function of the coordinates of point F, A and B are two specified human joint points included in the same preset area, E is a point on line segment AB, The direction determined by A and B is the vector from A to B; C and D are two specified human joint points included in the same preset area, and F is a point on the line segment CD. The direction determined by C and D is the vector from C to D; The direction determined by C and A is the vector from C to A; λ 1 ,λ 2 are all constant parameters; f(λ 1 ,λ 2 ) is E(λ 1 ) and F(λ 2 ) between the two min is the minimum distance between the center line segments of two different preset areas; d A-CD represents the distance from A to line segment CD, d B-CD represents the distance from B to line segment CD, d C-AB represents the distance from C to line segment AB, d D-AB Represents the distance from D to line segment AB.
[0046] Furthermore, the human body model in the preset state is: a human body model in a T-Pose (T-letter posture) state;
[0047] The multiple preset parts of the human body model in the preset state include: a left forearm, a right forearm, a left upper arm, a right upper arm, a left calf, a right calf, a left thigh and a right thigh.
[0048] In order to achieve the above object, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus;
[0049] Memory, used to store computer programs;
[0050] The processor is used to implement any of the steps of the human body model penetration detection method described above when executing the program stored in the memory.
[0051] In order to achieve the above-mentioned purpose, an embodiment of the present invention provides a computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any of the above-mentioned steps of the human body model penetration detection method is implemented.
[0052] In order to achieve the above-mentioned purpose, an embodiment of the present invention further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the steps of the human body model penetration detection method described above.
[0053] According to the method provided by the embodiment of the present invention, for multiple preset areas corresponding to multiple preset parts of a human body model in a preset state, the identifiers of multiple triangles in the human body model included in the multiple preset areas are obtained; for each frame of three-dimensional grid, according to the identifiers of multiple triangles in the human body model included in each preset area, the coordinate data of the vertices of the multiple triangles included in each preset area in the human body model corresponding to the frame of three-dimensional grid is obtained; and the coordinate data of two specified human body joint points included in each preset area in the human body model corresponding to the frame of three-dimensional grid is obtained; for each preset area, based on the coordinate data of the vertices of the multiple triangles included in the preset area and the two specified human body joint points included in each preset area, the coordinate data of the vertices of the multiple triangles included in the preset area and the two specified human body joint points included in each preset area are obtained. Coordinate data of human joint points, calculate the average of the distances between the vertices of all triangles included in the preset area and the center line segment of the preset area as the radius corresponding to the preset area; calculate the minimum distance between the center line segments of each two different preset areas; for each two different preset areas, determine whether the minimum distance between the center line segments of the two preset areas is less than the sum of the radius and the preset distance corresponding to the two preset areas; if the minimum distance between the center line segments of the two preset areas in the human body model corresponding to the frame three-dimensional grid is less than the sum of the radius and the preset distance corresponding to the two preset areas, then determine that the human body model corresponding to the frame three-dimensional grid in the frame action posture has a model penetration phenomenon. That is, by determining the size relationship between the minimum distance between each two preset areas and the sum of the radius and the preset distance corresponding to the two preset areas; if the minimum distance between the two preset areas is less than the sum of the radius and the preset distance corresponding to the two preset areas, then it can be directly determined that the human body model corresponding to the frame three-dimensional grid in the frame action posture has a model penetration phenomenon, and there is no need to perform manual model penetration detection, which saves the labor consumption when performing model penetration detection on the human body model, and also improves the detection efficiency of model penetration detection on the human body model. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.
[0055] Figure 1 A schematic diagram of a human body model with a penetration phenomenon;
[0056] Figure 2 A flow chart of a method for detecting mold penetration of a human model provided by an embodiment of the present invention;
[0057] Figure 3 A schematic diagram of a human body model represented in the form of a three-dimensional mesh;
[0058] Figure 4 is a schematic diagram of the skeleton of the human body model;
[0059] Figure 5 A schematic diagram of a preset area in a human body model provided by an embodiment of the present invention;
[0060] Figure 6 A schematic diagram showing the minimum distance between two preset areas;
[0061] Figure 7 A structural diagram of a human model penetration detection device provided by an embodiment of the present invention;
[0062] Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0063] The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0064] Since the existing method of manually detecting whether there is mold penetration in a human body model not only consumes huge manpower and is time-consuming, but also has low detection efficiency, in order to improve the detection efficiency of mold penetration detection on a human body model, an embodiment of the present invention provides a human body model mold penetration detection method, device, electronic device and storage medium.
[0065] See also Figure 2 , Figure 2 A process for a human model penetration detection method, comprising:
[0066] Step 201 : for a plurality of preset areas corresponding to a plurality of preset parts of a human body model in a preset state, obtain identifiers of a plurality of triangles in the human body model included in the plurality of preset areas.
[0067] In an embodiment of the present invention, the human body model in a preset state is: a human body model in a T-Pose state, and the skin of the human body model is formed by splicing a plurality of triangles. Each preset part of the human body model corresponds to a preset area, and the preset area corresponding to each preset part of the human body model is an area determined based on two specified human body joints of the preset part, and the preset area includes the two specified human body joints of the preset part; the human body model includes a plurality of joints. Among them, the plurality of preset parts of the human body model in the preset state include: left forearm, right forearm, left upper arm, right upper arm, left calf, right calf, left thigh and right thigh.
[0068] For details, see Figure 3 , the human body model 300 is in the T-Pose state, and the skin of the human body model 300 is formed by splicing multiple triangles. The identification of each triangle obtained in the embodiment of the present invention can be a symbol or a number. For example, the identification of triangle ABC can be "SABC ". The human body model 300 may include 8 preset parts: the left forearm, right forearm, left upper arm, right upper arm, left calf, right calf, left thigh and left thigh of the human body model 300. Each preset part of the human body model 300 corresponds to a preset area: the left forearm corresponds to a preset area 310, the left upper arm corresponds to a preset area 320, the right forearm corresponds to a preset area 330, the right upper arm corresponds to a preset area 340, the left calf corresponds to a preset area 350, the left thigh corresponds to a preset area 360, the right calf corresponds to a preset area 370, and the right thigh corresponds to a preset area 380. And each preset part of the human body model 300 includes two designated human joint points, see Figure 3 The left forearm of the human body model 300 includes a left hand joint point 3001 and a left forearm joint point 3002, the left upper arm of the human body model 300 includes a left forearm joint point 3002 and a left shoulder virtual joint point 3003, the right forearm of the human body model 300 includes a right hand joint point 3004 and a right forearm joint point 3005, the right upper arm of the human body model 300 includes a right forearm joint point 3005 and a right shoulder virtual joint point 3006, the left calf of the human body model 300 includes a left foot joint point 3007 and a left limb joint point 3008, the left thigh of the human body model 300 includes a left limb joint point 3008 and a left upper limb virtual joint point 3009, the right calf of the human body model 300 includes a right foot joint point 3010 and a right limb joint point 3011, and the right thigh of the human body model 300 includes a right limb joint point 3011 and a right upper limb virtual joint point 3012. Each preset region of the human body model 300 includes two designated human body joint points of the preset region.
[0069] In the embodiment of the present invention, the human body model may include a plurality of human body joints. Figure 4 is a schematic diagram of the skeleton of the human body model, see Figure 4, the skeleton diagram of the human body model shows multiple human joints: 0-hips (hip joint), 1-spine_virtual (spine virtual joint), 1-leftupleg_virtual (left upper limb virtual joint), 1-rightupleg_virtual (right upper limb virtual joint), 2-spine (spine joint), 2-leftupleg (left upper limb joint), 2-rightupleg (right upper limb joint), 3-spine1 (spine joint 1), 3-leftleg (left limb joint), 3-rightleg (right limb joint), 4-spine_split (spina bifida joint), 4-leftfoot (left foot joint), 4-rightfoot (right foot joint), 5-spine2 (spine joint 2), 5-lefttoebase (left foot joint), 5-righttoebase (right foot joint), 6-neck_virtual (neck virtual joint), 6-lef ttoe_end (left toe joint point), 6-righttoe_end (right toe joint point), 6-leftshoulder_virtual (left shoulder virtual joint point), 6-rightshoulder_virtual (right shoulder virtual joint point), 7-neck (neck joint point), 7-leftshoulder (left shoulder joint point), 7-rightshoulder (right shoulder joint point), 8-head (head joint point), 8-leftshoulder_split (left shoulder split joint point), 8-rightshoulder_split (right shoulder split joint point), 9-headtop_end (head end joint point), 9-leftarm (left arm joint point), 9-rightarm (right arm joint point), 10-leftforearm (left forearm joint point), 10-rightforearm (right forearm joint point), 11-lefthand (left hand joint point), 11-righthand (right hand joint point). Among them, the designated joint points may include: left hand joint points, left forearm joint points, left shoulder virtual joint points, right hand joint points, right forearm joint points, right shoulder virtual joint points, left foot joint points, left limb joint points, left upper limb virtual joint points, right foot joint points, right limb joint points and right upper limb virtual joint points.
[0070] Step 202, for each frame of three-dimensional mesh, based on the identifiers of multiple triangles in the human body model included in each preset area, obtain the coordinate data of the vertices of the multiple triangles included in each preset area in the human body model corresponding to the frame of three-dimensional mesh; and obtain the coordinate data of two specified human joint points included in each preset area in the human body model corresponding to the frame of three-dimensional mesh.
[0071] In the embodiment of the present invention, each frame of the three-dimensional grid corresponds to a human body model in the action posture of the frame, and each frame of the three-dimensional grid includes: skinning information of the human body model in the action posture of the frame. Wherein, each frame of the three-dimensional grid includes a plurality of triangles.
[0072] See also Figure 3 , Figure 3 The human body model 300 is in a T-Pose (T-letter posture) action posture. Figure 3 The skin of the human body model 300 is formed by splicing a plurality of triangles.
[0073] For example, if Figure 3 The preset area 310 corresponding to the left forearm of the human body model 300 includes triangle ABC and triangle DEF, and if the marks of triangle ABC and triangle DEF are respectively “S ABC ” and “S DEF ". In this step, the ABC ” and “S DEF ", respectively obtain the coordinates of the three vertices of triangle ABC and the coordinates of the three vertices of triangle DEF; and, the coordinates of the left hand joint point 3001 and the left forearm joint point 3002 included in the corresponding preset area 310 can be obtained.
[0074] Step 203, for each preset area, based on the coordinate data of the vertices of multiple triangles included in the preset area and the coordinate data of two specified human joint points included in the preset area, calculate the average distance between the vertices of all triangles included in the preset area and the center line segment of the preset area as the radius corresponding to the preset area.
[0075] The center line segment of each preset area is a line segment determined by two designated human joint points included in each preset area.
[0076] In an embodiment of the present invention, each preset area may be: an area included in a geometric body consisting of a cylinder and two hemispheres whose radius is the same as the radius of the bottom surface of the cylinder, calculated based on the coordinate data of two specified human joint points of the preset part corresponding to the preset area and the coordinate data of each vertex of each triangle of the preset part corresponding to the preset area; wherein the two hemispheres in each geometric body are respectively connected to the two bottom surfaces of the cylinder in the geometric body, and the centers of the two bottom surfaces of the cylinder are respectively the same as the centers of the two hemispheres in the geometric body; the height of the cylinder in each geometric body is the same as the center line segment of the preset area; and the radius of the two hemispheres in each geometric body is the radius corresponding to the preset area.
[0077] For details, see Figure 5 , Figure 5 Take a side-section screenshot of a preset area. Figure 5 It is shown in Figure 3 The side section screenshot of the preset area 310 corresponding to the left forearm, wherein P1 and P2 are the left hand joint point and the left forearm joint point respectively, the line segment P1P2 is the center line segment of the preset area, and L P1P2 is the distance between the line segments P1P2, and r is the radius of the preset area. Specifically, the average value of the distances P1P2 between the vertices of all triangles included in the preset area and the center line segment of the preset area can be calculated based on the coordinate data of the vertices of the multiple triangles included in the preset area, as the radius r of the preset area.
[0078] Step 204: Calculate the minimum distance between the center line segments of every two different preset areas.
[0079] For an example, see Figure 6 , Figure 6 The center line segment of the preset area 601 is line segment AB, the radius of the preset area 601 is R1, the center line segment of the preset area 602 is line segment CD, the radius of the preset area 602 is R2, E is a point on line segment AB, and F is a point on line segment CD. Specifically, the minimum distance between the center line segments of the preset area 601 and the preset area 602 can be calculated using the following formula:
[0080]
[0081]
[0082] Among them, 0<λ 1 ,λ 2 <1, so that the distance of line segment EF is the smallest:
[0083]
[0084] According to the extreme value condition: You can get:
[0085]
[0086]
[0087] f(λ 1 ,λ 2 )=|E(λ 1 )-F(λ 2 )|;
[0088] If 0<λ 1 ,λ 2 <1, then d min =f(λ 1 ,λ 2 );
[0089] If 0<λ is not satisfied 1 ,λ 2 <1, then d min =min(d A-CD ,d B-CD ,d C-AB ,d D-AB );
[0090] Among them, E(λ 1 ) is the function of the coordinates of point E, F(λ 2 ) is a function of the coordinates of point F, A and B are two specified human joint points included in the same preset area, E is a point on line segment AB, The direction determined by A and B is the vector from A to B; C and D are two specified human joint points included in the same preset area, and F is a point on the line segment CD. The direction determined by C and D is the vector from C to D; The direction determined by C and A is the vector from C to A; λ 1 ,λ 2 are all constant parameters; f(λ 1 ,λ 2 ) is E(λ 1 ) and F(λ 2 ) between the two min is the minimum distance between the center line segments of two different preset areas; d A-CD represents the distance from A to line segment CD, d B-CD represents the distance from B to line segment CD, d C-AB represents the distance from C to line segment AB, d D-AB Represents the distance from D to line segment AB.
[0091] Step 205 : for every two different preset areas, determine whether the minimum distance between the center line segments of the two preset areas is less than the sum of the radius and the preset distance respectively corresponding to the two preset areas.
[0092] Step 206: If the minimum distance between the center line segments of two preset areas in the human body model corresponding to the three-dimensional grid of the frame is less than the sum of the radius and the preset distance respectively corresponding to the two preset areas, it is determined that the human body model corresponding to the three-dimensional grid of the frame in the action posture of the frame has a penetration phenomenon.
[0093] Among them, the preset distance can be set according to the actual application situation and is not specifically limited.
[0094] For example, if there are two preset areas that satisfy: d min <(r a +r b +ε), where d min is the minimum distance between the center segments of the two preset areas, r a and r b are the radii of the two preset areas respectively, and ε is the preset distance.
[0095] If the minimum distance between the center line segments of each two preset areas in the human body model corresponding to the three-dimensional grid of the frame is not less than the sum of the radius and the preset distance corresponding to the two preset areas respectively, it is determined that the human body model corresponding to the three-dimensional grid of the frame in the action posture of the frame does not have a model penetration phenomenon.
[0096] According to the method provided by the embodiment of the present invention, for multiple preset areas corresponding to multiple preset parts of a human body model in a preset state, the identifiers of multiple triangles in the human body model included in the multiple preset areas are obtained; for each frame of three-dimensional grid, according to the identifiers of multiple triangles in the human body model included in each preset area, the coordinate data of the vertices of the multiple triangles included in each preset area in the human body model corresponding to the frame of three-dimensional grid is obtained; and the coordinate data of two specified human body joint points included in each preset area in the human body model corresponding to the frame of three-dimensional grid is obtained; for each preset area, based on the coordinate data of the vertices of the multiple triangles included in the preset area and the two specified human body joint points included in each preset area, the coordinate data of the vertices of the multiple triangles included in the preset area and the two specified human body joint points included in each preset area are obtained. Coordinate data of human joint points, calculate the average of the distances between the vertices of all triangles included in the preset area and the center line segment of the preset area as the radius corresponding to the preset area; calculate the minimum distance between the center line segments of each two different preset areas; for each two different preset areas, determine whether the minimum distance between the center line segments of the two preset areas is less than the sum of the radius and the preset distance corresponding to the two preset areas; if the minimum distance between the center line segments of the two preset areas in the human body model corresponding to the frame three-dimensional grid is less than the sum of the radius and the preset distance corresponding to the two preset areas, then determine that the human body model corresponding to the frame three-dimensional grid in the frame action posture has a model penetration phenomenon. That is, by determining the size relationship between the minimum distance between each two preset areas and the sum of the radius and the preset distance corresponding to the two preset areas; if the minimum distance between the two preset areas is less than the sum of the radius and the preset distance corresponding to the two preset areas, then it can be directly determined that the human body model corresponding to the frame three-dimensional grid in the frame action posture has a model penetration phenomenon, and there is no need to perform manual model penetration detection, which saves the labor consumption when performing model penetration detection on the human body model, and also improves the detection efficiency of model penetration detection on the human body model.
[0097] In addition, by calculating the preset areas for the limbs of the human body model, the complex mold penetration problem is converted into a collision problem between the preset areas. Finally, by calculating whether the minimum distance between the center line segments of each two preset areas is less than the sum of the radius and the preset distance corresponding to the two preset areas, it is determined whether there is mold penetration, which further improves the detection efficiency of mold penetration detection on the human body model.
[0098] Based on the same inventive concept, according to the human body model penetration detection method provided by the above embodiment of the present invention, correspondingly, another embodiment of the present invention also provides a human body model penetration detection device, whose structural schematic diagram is shown in FIG. Figure 7 As shown, specifically including:
[0099] The identification acquisition module 701 is used to acquire identifications of multiple triangles in the human body model included in the multiple preset areas corresponding to multiple preset parts of the human body model in a preset state; wherein the skin of the human body model is formed by splicing multiple triangles; each preset part of the human body model corresponds to a preset area, and the preset area corresponding to each preset part of the human body model is an area determined based on two specified human body joint points of the preset part, and the preset area includes the two specified human body joint points of the preset part; the human body model includes multiple joint points;
[0100] The coordinate data acquisition module 702 is used to acquire, for each frame of three-dimensional mesh, the coordinate data of the vertices of the multiple triangles included in each preset area of the human body model corresponding to the frame of three-dimensional mesh according to the identifiers of the multiple triangles in the human body model included in each preset area; and acquire the coordinate data of two specified human joint points included in each preset area of the human body model corresponding to the frame of three-dimensional mesh; wherein each frame of three-dimensional mesh corresponds to the human body model in the action posture of the frame, and each frame of three-dimensional mesh includes: the skinning information of the human body model in the action posture of the frame;
[0101] The radius calculation module 703 is used to calculate, for each preset area, based on the coordinate data of the vertices of the multiple triangles included in the preset area and the coordinate data of the two specified human joint points included in each preset area, the average value of the distances between the vertices of all triangles included in the preset area and the center line segment of the preset area as the radius corresponding to the preset area; wherein the center line segment of each preset area is: the line segment determined by the two specified human joint points included in each preset area;
[0102] A minimum distance calculation module 704 is used to calculate the minimum distance between the center line segments of every two different preset areas;
[0103] A judging module 705 is used to judge, for each two different preset areas, whether the minimum distance between the center line segments of the two preset areas is less than the sum of the radius and the preset distance respectively corresponding to the two preset areas;
[0104] The model penetration phenomenon determination module 706 is used to determine that the human body model corresponding to the three-dimensional grid of the frame has a model penetration phenomenon in the action posture of the frame if the minimum distance between the center line segments of two preset areas in the human body model corresponding to the three-dimensional grid of the frame is less than the sum of the radius and the preset distance corresponding to the two preset areas respectively.
[0105] It can be seen that, by using the device provided by the embodiment of the present invention, for multiple preset areas corresponding to multiple preset parts of the human body model in a preset state, the identifiers of multiple triangles in the human body model included in the multiple preset areas are obtained; for each frame of three-dimensional grid, according to the identifiers of multiple triangles in the human body model included in each preset area, the coordinate data of the vertices of the multiple triangles included in each preset area in the human body model corresponding to the frame of three-dimensional grid is obtained; and the coordinate data of two specified human joint points included in each preset area in the human body model corresponding to the frame of three-dimensional grid is obtained; for each preset area, based on the coordinate data of the vertices of the multiple triangles included in the preset area and the two specified human joint points included in the preset area, the coordinate data of the vertices of the multiple triangles included in the preset area is obtained. The coordinate data of the human joint points are determined, and the average value of the distances between the vertices of all triangles included in the preset area and the center line segment of the preset area is calculated as the radius corresponding to the preset area; the minimum distance between the center line segments of each two different preset areas is calculated; for each two different preset areas, it is determined whether the minimum distance between the center line segments of the two preset areas is less than the sum of the radius and the preset distance corresponding to the two preset areas respectively; if the minimum distance between the center line segments of the two preset areas in the human body model corresponding to the frame three-dimensional grid is less than the sum of the radius and the preset distance corresponding to the two preset areas respectively, it is determined that the human body model corresponding to the frame three-dimensional grid in the frame action posture has a model penetration phenomenon. That is, by judging the size relationship between the minimum distance between each two preset areas and the sum of the radius and the preset distance corresponding to the two preset areas respectively; if the minimum distance between the two preset areas is less than the sum of the radius and the preset distance corresponding to the two preset areas respectively, it can be directly determined that the human body model corresponding to the frame three-dimensional grid in the frame action posture has a model penetration phenomenon, and there is no need to perform manual model penetration detection, which saves the labor consumption when performing model penetration detection on the human body model, and also improves the detection efficiency of model penetration detection on the human body model.
[0106] Furthermore, the model penetration phenomenon determination module 706 is also used to determine that the human body model corresponding to the three-dimensional grid of the frame has no model penetration phenomenon in the action posture of the frame if the minimum distance between the center line segments of each two preset areas in the human body model corresponding to the three-dimensional grid of the frame is not less than the sum of the radius and the preset distance respectively corresponding to the two preset areas.
[0107] Furthermore, each preset area is: an area included in a geometric body consisting of a cylinder and two hemispheres whose radius is the same as the radius of the bottom surface of the cylinder, calculated based on the coordinate data of two specified human joint points of the preset part corresponding to the preset area and the coordinate data of each vertex of each triangle of the preset part corresponding to the preset area; wherein the two hemispheres in each geometric body are respectively connected to the two bottom surfaces of the cylinder in the geometric body, and the centers of the two bottom surfaces of the cylinder are respectively the same as the centers of the two hemispheres in the geometric body; the height of the cylinder in each geometric body is the same as the center line segment of the preset area; the radius of the two hemispheres in each geometric body is the radius corresponding to the preset area.
[0108] Furthermore, the minimum distance calculation module 704 specifically uses the following formula to calculate the minimum distance between the center line segments of every two different preset areas:
[0109]
[0110]
[0111]
[0112]
[0113] f(λ 1 ,λ 2 )=|E(λ 1 )-F(λ 2 )|;
[0114] If 0<λ 1 ,λ 2 <1, then d min =f(λ 1 ,λ 2 );
[0115] If 0<λ is not satisfied 1 ,λ 2 <1, then d min =min(d A-CD ,d B-CD ,d C-AB ,d D-AB );
[0116] Among them, E(λ 1 ) is the function of the coordinates of point E, F(λ 2 ) is a function of the coordinates of point F, A and B are two specified human joint points included in the same preset area, E is a point on line segment AB, The direction determined by A and B is the vector from A to B; C and D are two specified human joint points included in the same preset area, and F is a point on the line segment CD. The direction determined by C and D is the vector from C to D; The direction determined by C and A is the vector from C to A; λ 1 ,λ 2 are all constant parameters; f(λ 1 ,λ 2 ) is E(λ 1 ) and F(λ 2 ) between the two min is the minimum distance between the center line segments of two different preset areas; d A-CD represents the distance from A to line segment CD, d B-CD represents the distance from B to line segment CD, d C-AB represents the distance from C to line segment AB, d D-AB Represents the distance from D to line segment AB.
[0117] Furthermore, the human body model in the preset state is: a human body model in a T-Pose (T-letter posture) state;
[0118] The multiple preset parts of the human body model in the preset state include: a left forearm, a right forearm, a left upper arm, a right upper arm, a left calf, a right calf, a left thigh and a left thigh.
[0119] It can be seen that, by using the device provided by the embodiment of the present invention, by judging the size relationship between the minimum distance between each two preset areas and the sum of the radius and the preset distance corresponding to the two preset areas; if there is a minimum distance between two preset areas that is less than the sum of the radius and the preset distance corresponding to the two preset areas, it can be directly determined that the human body model corresponding to the three-dimensional grid of the frame under the action posture of the frame has a penetration phenomenon, and there is no need to perform manual penetration detection, which saves the labor consumption when performing penetration detection on the human body model, and also improves the detection efficiency of penetration detection on the human body model. In addition, by calculating the preset areas for the limbs of the human body model, the complex penetration problem is converted into a collision problem between the preset areas, and finally by calculating whether the minimum distance between the center line segments of each two preset areas is less than the sum of the radius and the preset distance corresponding to the two preset areas, it is determined whether there is a penetration, which further improves the detection efficiency of penetration detection on the human body model.
[0120] The embodiment of the present invention further provides an electronic device, such as Figure 8 As shown, it includes a processor 801, a communication interface 802, a memory 803 and a communication bus 804, wherein the processor 801, the communication interface 802, and the memory 803 communicate with each other through the communication bus 804.
[0121] Memory 803, used for storing computer programs;
[0122] The processor 801 is used to execute the program stored in the memory 803, and implements the following steps:
[0123] For multiple preset areas corresponding to multiple preset parts of a human body model in a preset state, the identifiers of multiple triangles in the human body model included in the multiple preset areas are obtained; wherein the skin of the human body model is formed by splicing multiple triangles; each preset part of the human body model corresponds to a preset area, and the preset area corresponding to each preset part of the human body model is an area determined based on two specified human body joint points of the preset part, and the preset area includes the two specified human body joint points of the preset part; the human body model includes multiple joint points;
[0124] For each frame of three-dimensional mesh, according to the identifiers of multiple triangles in the human body model included in each preset area, the coordinate data of the vertices of the multiple triangles included in each preset area in the human body model corresponding to the frame of three-dimensional mesh is obtained; and the coordinate data of two specified human body joint points included in each preset area in the human body model corresponding to the frame of three-dimensional mesh is obtained; wherein each frame of three-dimensional mesh corresponds to the human body model in the action posture of the frame, and each frame of three-dimensional mesh includes: the skinning information of the human body model in the action posture of the frame;
[0125] For each preset area, based on the coordinate data of the vertices of the multiple triangles included in the preset area and the coordinate data of the two specified human joint points included in the preset area, the average of the distances between the vertices of all the triangles included in the preset area and the center line segment of the preset area is calculated as the radius corresponding to the preset area; wherein the center line segment of each preset area is: a line segment determined by the two specified human joint points included in each preset area;
[0126] Calculate the minimum distance between the center line segments of every two different preset areas;
[0127] For each two different preset areas, determine whether the minimum distance between the center line segments of the two preset areas is less than the sum of the radius and the preset distance respectively corresponding to the two preset areas;
[0128] If the minimum distance between the center line segments of two preset areas in the human body model corresponding to the three-dimensional grid of the frame is less than the sum of the radius and the preset distance corresponding to the two preset areas respectively, it is determined that the human body model corresponding to the three-dimensional grid in the action posture of the frame has a model penetration phenomenon.
[0129] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0130] The communication interface is used for communication between the above terminal and other devices.
[0131] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0132] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0133] In another embodiment provided by the present invention, a computer-readable storage medium is further provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the human body model penetration detection method described in any of the above embodiments is implemented.
[0134] In another embodiment provided by the present invention, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the human body model penetration detection method described in any one of the above embodiments.
[0135] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0136] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0137] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, electronic device and storage medium, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0138] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A method for detecting human body model penetration, characterized in that: include: For multiple preset areas corresponding to multiple preset parts of a human body model in a preset state, the identifiers of multiple triangles in the human body model included in the multiple preset areas are obtained; wherein the skin of the human body model is formed by splicing multiple triangles; each preset part of the human body model corresponds to a preset area, and the preset area corresponding to each preset part of the human body model is an area determined based on two specified human body joint points of the preset part, and the preset area includes the two specified human body joint points of the preset part; the human body model includes multiple joint points; For each frame of three-dimensional mesh, according to the identifiers of multiple triangles in the human body model included in each preset area, the coordinate data of the vertices of the multiple triangles included in each preset area in the human body model corresponding to the frame of three-dimensional mesh is obtained; and the coordinate data of two specified human body joint points included in each preset area in the human body model corresponding to the frame of three-dimensional mesh is obtained; wherein each frame of three-dimensional mesh corresponds to the human body model in the action posture of the frame, and each frame of three-dimensional mesh includes: the skinning information of the human body model in the action posture of the frame; For each preset area, based on the coordinate data of the vertices of the multiple triangles included in the preset area and the coordinate data of the two specified human joint points included in the preset area, the average of the distances between the vertices of all the triangles included in the preset area and the center line segment of the preset area is calculated as the radius corresponding to the preset area; wherein the center line segment of each preset area is: a line segment determined by the two specified human joint points included in each preset area; Calculate the minimum distance between the center line segments of every two different preset areas; For each two different preset areas, determine whether the minimum distance between the center line segments of the two preset areas is less than the sum of the radius and the preset distance respectively corresponding to the two preset areas; If the minimum distance between the center line segments of two preset areas in the human body model corresponding to the three-dimensional grid of the frame is less than the sum of the radius and the preset distance corresponding to the two preset areas respectively, it is determined that the human body model corresponding to the three-dimensional grid in the action posture of the frame has a model penetration phenomenon.
2. The method according to claim 1, characterized in that: After determining, for each two different preset areas, whether the minimum distance between the center line segments of the two preset areas is less than the sum of the radius and the preset distance respectively corresponding to the two preset areas, the method further includes: If the minimum distance between the center line segments of each two preset areas in the human body model corresponding to the three-dimensional grid of the frame is not less than the sum of the radius and the preset distance corresponding to the two preset areas respectively, it is determined that the human body model corresponding to the three-dimensional grid of the frame in the action posture of the frame does not have a model penetration phenomenon.
3. The method according to claim 1, characterized in that Each preset area is: an area included in a geometric body consisting of a cylinder and two hemispheres with a radius the same as the radius of the bottom surface of the cylinder, calculated based on the coordinate data of two specified human joint points of the preset part corresponding to the preset area and the coordinate data of each vertex of each triangle of the preset part corresponding to the preset area; wherein the two hemispheres in each geometric body are respectively connected to the two bottom surfaces of the cylinder in the geometric body, and the centers of the two bottom surfaces of the cylinder are respectively the same as the centers of the two hemispheres in the geometric body; the height of the cylinder in each geometric body is the same as the center line segment of the preset area; the radius of the two hemispheres in each geometric body is the radius corresponding to the preset area.
4. The method according to claim 1, characterized in that: The calculating the minimum distance between center line segments of every two different preset areas comprises: The following formula is used to calculate the minimum distance between the center line segments of every two different preset areas: f(λ1,λ2)=|E(λ1)-F(λ2)|; If \(0 < \lambda_1,\lambda_2 < 1\), then \(d\) min \(= f(\lambda_1,\lambda_2)\); If 0<λ1,λ2<1 is not satisfied, then d min =min(d A-CD ,d B-CD ,d C-AB ,d D-AB ); Wherein, E(λ1) is a function of the coordinates of point E, F(λ2) is a function of the coordinates of point F, A and B are two specified human joint points included in the same preset area, E is a point on line segment AB, The direction determined by A and B is the vector from A to B; C and D are two specified human joint points included in the same preset area, and F is a point on the line segment CD. The direction determined by C and D is the vector from C to D; The direction determined by C and A is the vector from C to A; λ1, λ2 are constant parameters; f(λ1, λ2) is the distance between E(λ1) and F(λ2); dmin is the minimum distance between the center line segments of two different preset areas; d A-CD represents the distance from A to line segment CD, d B-CD represents the distance from B to line segment CD, d C-AB represents the distance from C to line segment AB, d D-AB Represents the distance from D to line segment AB.
5. The method according to claim 1, characterized in that The human body model in the preset state is: a human body model in T-Pose, i.e., a T-pose state; The multiple preset parts of the human body model in the preset state include: a left forearm, a right forearm, a left upper arm, a right upper arm, a left calf, a right calf, a left thigh and a right thigh.
6. A human body model penetration detection device, characterized in that: include: The identification acquisition module is used to obtain identifications of multiple triangles in the human body model included in the multiple preset areas corresponding to the multiple preset parts of the human body model in the preset state; wherein the skin of the human body model is formed by splicing multiple triangles; each preset part of the human body model corresponds to a preset area, and the preset area corresponding to each preset part of the human body model is an area determined based on two specified human joint points of the preset part, and the preset area includes the two specified human joint points of the preset part; the human body model includes multiple joint points; A coordinate data acquisition module is used to obtain, for each frame of three-dimensional mesh, the coordinate data of the vertices of the multiple triangles included in each preset area of the human body model corresponding to the frame of three-dimensional mesh according to the identifiers of the multiple triangles in the human body model included in each preset area; and obtain the coordinate data of two specified human joint points included in each preset area of the human body model corresponding to the frame of three-dimensional mesh; wherein each frame of three-dimensional mesh corresponds to the human body model in the action posture of the frame, and each frame of three-dimensional mesh includes: skinning information of the human body model in the action posture of the frame; A radius calculation module, for calculating, for each preset area, the average of the distances between the vertices of the multiple triangles included in the preset area and the coordinate data of the two specified human joint points included in the preset area from the vertices of all the triangles included in the preset area to the center line segment of the preset area as the radius corresponding to the preset area; wherein the center line segment of each preset area is: a line segment determined by the two specified human joint points included in each preset area; A minimum distance calculation module, used for calculating the minimum distance between center line segments of every two different preset areas; A judging module, used for judging, for each two different preset areas, whether the minimum distance between the center line segments of the two preset areas is less than the sum of the radius and the preset distance respectively corresponding to the two preset areas; The model penetration phenomenon determination module is used to determine that the human body model corresponding to the frame three-dimensional grid in the frame action posture has a model penetration phenomenon if the minimum distance between the center line segments of two preset areas in the human body model corresponding to the frame three-dimensional grid is less than the sum of the radius and the preset distance corresponding to the two preset areas respectively.
7. The device according to claim 6, characterized in that The model penetration phenomenon determination module is also used to determine that the human body model corresponding to the frame three-dimensional grid in the frame action posture does not have a model penetration phenomenon if the minimum distance between the center line segments of each two preset areas in the human body model corresponding to the frame three-dimensional grid is not less than the sum of the radius and the preset distance respectively corresponding to the two preset areas.
8. The device according to claim 6, characterized in that Each preset area is: an area included in a geometric body consisting of a cylinder and two hemispheres with a radius the same as the radius of the bottom surface of the cylinder, calculated based on the coordinate data of two specified human joint points of the preset part corresponding to the preset area and the coordinate data of each vertex of each triangle of the preset part corresponding to the preset area; wherein the two hemispheres in each geometric body are respectively connected to the two bottom surfaces of the cylinder in the geometric body, and the centers of the two bottom surfaces of the cylinder are respectively the same as the centers of the two hemispheres in the geometric body; the height of the cylinder in each geometric body is the same as the center line segment of the preset area; the radius of the two hemispheres in each geometric body is the radius corresponding to the preset area.
9. The device according to claim 6, characterized in that The minimum distance calculation module specifically uses the following formula to calculate the minimum distance between the center line segments of every two different preset areas: f(λ1,λ2)=|E(λ1)-F(λ2)|; If \(0\lt\lambda_1,\lambda_2\lt1\), then \(d\) min \(= f(\lambda_1,\lambda_2)\); If 0<λ1,λ2<1 is not satisfied, then d min =min(d A-CD ,d B-CD ,d C-AB ,d D-AB ); Wherein, E(λ1) is a function of the coordinates of point E, F(λ2) is a function of the coordinates of point F, A and B are two specified human joint points included in the same preset area, E is a point on line segment AB, The direction determined by A and B is the vector from A to B; C and D are two specified human joint points included in the same preset area, and F is a point on the line segment CD. The direction determined by C and D is the vector from C to D; The direction determined by C and A is the vector from C to A; λ1, λ2 are constant parameters; f(λ1, λ2) is the distance between E(λ1) and F(λ2); dmin is the minimum distance between the center line segments of two different preset areas; d A-CD represents the distance from A to line segment CD, d B-CD represents the distance from B to line segment CD, d C-AB represents the distance from C to line segment AB, d D-AB Represents the distance from D to line segment AB.
10. The device according to claim 6, characterized in that The human body model in the preset state is: a human body model in T-Pose, i.e., a T-pose state; The multiple preset parts of the human body model in the preset state include: a left forearm, a right forearm, a left upper arm, a right upper arm, a left calf, a right calf, a left thigh and a right thigh.
11. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 5 when executing a program stored in a memory.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Method and device for generating human body model, computer equipment and storage medium
CN111402360A
Human body model creation method and device, electronic equipment and storage medium
CN111767866A
Method and / or system for reconstructing from images a personalized 3D human body model and thereof
US20200126295A1
