CN112446960A - Three-dimensional human body model deformation method and device, electronic equipment and storage medium - Google Patents

Three-dimensional human body model deformation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112446960A
CN112446960A CN202011461935.1A CN202011461935A CN112446960A CN 112446960 A CN112446960 A CN 112446960A CN 202011461935 A CN202011461935 A CN 202011461935A CN 112446960 A CN112446960 A CN 112446960A
Authority
CN
China
Prior art keywords
human body
parameter
dimensional
deformation
body parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011461935.1A
Other languages
Chinese (zh)
Other versions
CN112446960B (en
Inventor
徐艳霞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sheng Vision Technology Co ltd
Original Assignee
Beijing Sheng Vision Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sheng Vision Technology Co ltd filed Critical Beijing Sheng Vision Technology Co ltd
Priority to CN202011461935.1A priority Critical patent/CN112446960B/en
Publication of CN112446960A publication Critical patent/CN112446960A/en
Application granted granted Critical
Publication of CN112446960B publication Critical patent/CN112446960B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T90/00Enabling technologies or technologies with a potential or indirect contribution to GHG emissions mitigation

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Graphics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application provides a three-dimensional human body model deformation method, a three-dimensional human body model deformation device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring a target value of a first human body parameter and a first deformation parameter of the current three-dimensional human body model; measuring a first human body parameter of the current three-dimensional human body model to obtain a measured value of the first human body parameter; judging whether the measured value of the first human body parameter is consistent with the target value of the first human body parameter; if not, based on a preset formula, determining a new first deformation parameter according to the target value of the first human body parameter, the measured value of the first human body parameter and the current first deformation parameter of the three-dimensional human body model, and deforming the three-dimensional human body model according to the new first deformation parameter until the measured value of the first human body parameter based on the deformed three-dimensional human body model is consistent with the target value of the first human body parameter, so as to improve the deformation accuracy of the three-dimensional human body model.

Description

Three-dimensional human body model deformation method and device, electronic equipment and storage medium
Technical Field
The application relates to the technical field of computer vision, in particular to a three-dimensional human body model deformation method, a three-dimensional human body model deformation device, electronic equipment and a storage medium.
Background
With the continuous development of computer technology, a user can select clothes to be tried on only on intelligent terminals such as a mobile phone, a tablet and a computer through a virtual fitting room without personally going to an off-line shop, and the intelligent terminal can display the fitting effect of the selected clothes on the three-dimensional human body model. However, different users have different body types, and the same piece of clothes can have completely different effects when worn on users with different body types. The existing virtual fitting room can only provide limited three-dimensional human body models with a plurality of body types for users to choose to try on, and the problem that fitting requirements of users with different body types cannot be met is caused.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an apparatus for deforming a three-dimensional human body model, an electronic device, and a storage medium, so as to solve the problem that fitting requirements of users with different body types cannot be met.
In a first aspect, an embodiment of the present invention provides a three-dimensional human body model deformation method, including: acquiring a target value of a first human body parameter and a first deformation parameter of the current three-dimensional human body model; measuring a first human body parameter of the current three-dimensional human body model to obtain a measured value of the first human body parameter; judging whether the measured value of the first human body parameter is consistent with the target value of the first human body parameter; if not, based on a preset formula, determining a new first deformation parameter according to the target value of the first human body parameter, the measured value of the first human body parameter and the current first deformation parameter of the three-dimensional human body model, and deforming the three-dimensional human body model according to the new first deformation parameter until the measured value of the first human body parameter based on the deformed three-dimensional human body model is consistent with the target value of the first human body parameter.
When the three-dimensional human body model is deformed, whether the measured value of the first human body parameter is consistent with the target value of the first human body parameter or not is continuously judged, and then the first deformation parameter is continuously adjusted, so that the finally deformed three-dimensional human body model is consistent with the body type of a user, and the accuracy of deformation of the three-dimensional human body model is improved.
In an optional embodiment, the step of measuring a first human body parameter of the current three-dimensional human body model to obtain a measured value of the first human body parameter includes: marking measurement lines of the first human body parameter on the three-dimensional human body model, wherein the measurement lines are intersected with the grid lines to form a plurality of intersection points; determining coordinates of a plurality of the intersection points according to the grid vertexes; and calculating the length of the measuring line according to the coordinates of a plurality of intersection points.
By marking out the measuring line and calculating the length of the measuring line, the measured value of the first human body parameter can be accurately obtained.
In an optional embodiment, after the determining, based on a preset formula, a new first deformation parameter according to the target value of the first human body parameter, the measured value of the first human body parameter, and the current first deformation parameter of the three-dimensional human body model, and deforming the three-dimensional human body model according to the new first deformation parameter until the measured value of the first human body parameter based on the deformed three-dimensional human body model is consistent with the target value of the first human body parameter, the method further includes: acquiring a target value of a second human body parameter and a second deformation parameter of the current three-dimensional human body model; measuring a second human body parameter of the current three-dimensional human body model to obtain a measured value of the second human body parameter; judging whether the measured value of the second human body parameter is consistent with the target value of the second human body parameter; if not, determining a new second deformation parameter according to the target value of the second human body parameter, the measured value of the second human body parameter and the current second human body parameter of the three-dimensional human body model based on a preset formula, and deforming the three-dimensional human body model according to the new second deformation parameter until the measured value of the second human body parameter based on the deformed three-dimensional human body model is consistent with the target value of the second human body parameter.
In an alternative embodiment, before said obtaining the target value of the second body parameter and the second deformation parameter of the current three-dimensional body model, the method further comprises: and calculating the maximum value and the minimum value of the target value of the second human body parameter under the condition of the target value of the first human body parameter according to a preset fitting equation and the target value of the first human body parameter.
And calculating the maximum value and the minimum value of the target value of the second human body parameter under the condition of the target value of the first human body parameter through a preset fitting equation and the target value of the first human body parameter. And limiting the target value of the second human body parameter to prevent the abnormal body type.
In an alternative embodiment, the method further comprises: the method comprises the steps of constructing a preset human body parameter table, wherein human body parameters are arranged according to a preset sequence in the preset human body parameter table, the first human body parameter and the second human body parameter are selected from the preset human body parameter table, and the position of the first human body parameter in the preset human body parameter table is in front of the position of the second human body parameter in the preset human body parameter table.
By constructing the preset human body parameter table, when the three-dimensional human body model is deformed, the deformation is sequentially carried out according to the sequence of the preset human body parameter table, so that the accuracy of the deformation of the three-dimensional human body model is improved, and the mutual influence among the human body parameters is reduced.
In an alternative embodiment, before the obtaining the target value of the first human body parameter and the deformation parameter of the current three-dimensional human body model, the method further comprises: and establishing the three-dimensional human body model according to the preset values of the human body parameters.
The three-dimensional human body model is built according to the preset values of the human body parameters, so that the built three-dimensional human body model is close to the body shapes of most users, smooth transition can be performed to two ends when the three-dimensional human body model is deformed, the deformation time is shortened, and the user experience is improved.
In an alternative embodiment, the determining, based on a preset formula, a new first deformation parameter according to the target value of the first human body parameter, the measured value of the first human body parameter, and the first deformation parameter of the current three-dimensional human body model includes:
calculating a new first deformation parameter based on newDNA ═ (1+ (target-current)/target) × current dna;
wherein current DNA represents a first deformation parameter of the three-dimensional human body model, target represents a target value of the first human body parameter, current represents a measured value of the first human body parameter, and newDNA represents a new first deformation parameter.
In a second aspect, an embodiment of the present invention provides a three-dimensional human body model deformation apparatus, including: the acquisition module is used for acquiring a target value of a first human body parameter and a first deformation parameter of the current three-dimensional human body model; the measurement module is used for measuring a first human body parameter of the current three-dimensional human body model to obtain a measurement value of the first human body parameter; the judging module is used for judging whether the measured value of the first human body parameter is consistent with the target value of the first human body parameter; and the deformation module is used for determining a new first deformation parameter according to the target value of the first human body parameter, the measured value of the first human body parameter and the current first deformation parameter of the three-dimensional human body model based on a preset formula when the judgment module judges that the measured value of the first human body parameter is not consistent with the target value of the first human body parameter, and deforming the three-dimensional human body model according to the new first deformation parameter until the measured value of the first human body parameter based on the deformed three-dimensional human body model is consistent with the target value of the first human body parameter.
In an alternative embodiment, a plurality of grid vertices are arranged on the three-dimensional human body model, the grid vertices are connected to form a plurality of grid lines, the measurement module is configured to mark measurement lines of the first human body parameter on the three-dimensional human body model, and the measurement lines intersect with the grid lines to form a plurality of intersection points; determining coordinates of a plurality of the intersection points according to the grid vertexes; and calculating the length of the measuring line according to the coordinates of a plurality of intersection points.
In an optional embodiment, the obtaining module is configured to obtain a target value of a second human body parameter and a second deformation parameter of the current three-dimensional human body model; the measurement module is used for measuring a second human body parameter of the current three-dimensional human body model to obtain a measurement value of the second human body parameter; the judging module is used for judging whether the measured value of the second human body parameter is consistent with the target value of the second human body parameter; and the deformation module is used for determining a new second deformation parameter according to the target value of the second human body parameter, the measured value of the second human body parameter and a current second deformation parameter of the three-dimensional human body model based on a preset formula when the judgment module judges that the measured value of the second human body parameter is not consistent with the target value of the second human body parameter, and deforming the three-dimensional human body model according to the new second deformation parameter until the measured value of the second human body parameter based on the deformed three-dimensional human body model is consistent with the target value of the second human body parameter.
In an alternative embodiment, the apparatus further includes a calculation module, configured to calculate, according to a preset fitting equation and the target value of the first human body parameter, a maximum value and a minimum value of the target value of the second human body parameter in case of the target value of the first human body parameter.
In an optional embodiment, the apparatus further includes a construction module, configured to construct a preset body parameter table, where the body parameters are arranged according to a preset sequence, the first body parameter and the second body parameter are selected from the preset body parameter table, and a position of the first body parameter in the preset body parameter table is in front of a position of the second body parameter in the preset body parameter table.
In an optional embodiment, the apparatus further includes an establishing module, configured to establish the three-dimensional human body model according to a preset value of a human body parameter.
In an alternative embodiment, the deformation module is configured to calculate a new first deformation parameter based on newDNA ═ 1+ (target-current)/target) × current dna; wherein current DNA represents a first deformation parameter of the three-dimensional human body model, target represents a target value of the first human body parameter, current represents a measured value of the first human body parameter, and newDNA represents a new first deformation parameter.
In a third aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, where the memory stores computer program instructions, and the computer program instructions, when read and executed by the processor, perform the steps of the method according to any one of the foregoing embodiments.
In a fourth aspect, an embodiment of the present invention provides a storage medium, on which computer program instructions are stored, and when the computer program instructions are read and executed by a computer, the method steps according to any one of the foregoing embodiments are executed.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
FIG. 1 is a flowchart of a method for deforming a three-dimensional human body model according to an embodiment of the present application;
FIG. 2 is a schematic diagram of grid vertices, grid lines, and intersection points provided by an embodiment of the present application;
FIG. 3 is a block diagram of a three-dimensional human body model transformation apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Icon: 300-a three-dimensional mannequin deformation device; 301-an obtaining module; 302-a measurement module; 303-a judgment module; 304-a deformation module; 305-a calculation module; 306-a building block; 307-a building module; 400-an electronic device; 401-a processor; 402-memory.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
With the continuous development of computer technology, a user can select clothes to be tried on only on intelligent terminals such as a mobile phone, a tablet and a computer through a virtual fitting room without personally going to an off-line shop, and the intelligent terminal can display the fitting effect of the selected clothes on the three-dimensional human body model. However, different users have different body types, and the same piece of clothes can have completely different effects when worn on users with different body types. The existing virtual fitting room can only provide limited three-dimensional human body models with a plurality of body types for users to choose to try on, and the problem that fitting requirements of users with different body types cannot be met is caused.
Based on this, embodiments of the present invention provide a method, an apparatus, an electronic device, and a computer-readable storage medium for deforming a three-dimensional human body model, so as to solve the above problems.
When virtual fitting is carried out, clothes selected by a user can be displayed on the three-dimensional human body model, so that the user can watch fitting effects. In order to meet the fitting requirements of users with different body types, body type data of the users can be acquired before fitting, wherein the body type data includes but is not limited to height, arm length, shoulder width, chest circumference, arm circumference, leg length and the like. And accurately deforming the three-dimensional human body model according to the body type data to ensure that the deformed three-dimensional human body model is consistent with the body type of the user, and displaying the clothes selected by the user to be tried on the three-dimensional human body model, thereby meeting the clothes fitting requirements of users with different body types.
The following will describe a three-dimensional human body model deformation method provided by the embodiment of the invention:
referring to fig. 1, fig. 1 is a flowchart of a three-dimensional human body model deformation method according to an embodiment of the present application, where the three-dimensional human body model deformation method may include the following steps:
step S101: and acquiring a target value of the first human body parameter and a first deformation parameter of the current three-dimensional human body model.
Step S102: and measuring a first human body parameter of the current three-dimensional human body model to obtain a measured value of the first human body parameter.
Step S103: judging whether the measured value of the first human body parameter is consistent with the target value of the first human body parameter; if not, determining a new first deformation parameter according to the target value of the first human body parameter, the measured value of the first human body parameter and the first deformation parameter of the current three-dimensional human body model based on a preset formula, and deforming the three-dimensional human body model according to the new first deformation parameter until the measured value of the first human body parameter based on the deformed three-dimensional human body model is consistent with the target value of the first human body parameter.
The above-described flow will be described in detail with reference to examples.
Step S101: and acquiring a target value of the first human body parameter and a first deformation parameter of the current three-dimensional human body model.
In the embodiment of the application, in order to deform the three-dimensional human body model, the human body parameters of the user need to be acquired. The human body parameters may include: height, arm circumference, arm length, shoulder width, chest circumference, abdomen, waist circumference, leg interval, hip circumference, thigh circumference, shank circumference, and leg length. The application is not limited to this, and the human body parameters may further include neck circumference, wrist circumference, etc. according to the type of the garment to be tried on.
It should be noted that, there are various ways to obtain the target value of the user's own body parameter, for example, the user manually inputs the own body parameter values, for example, the height is 180cm, the shoulder width is 80cm, etc.; or adopt intelligent tape measure to gather corresponding human parameter value, directly input the human parameter of gathering into the system, this application is not restricted to this.
The target value of the first human body parameter may be any one of the above-mentioned target values of the human body parameters.
The deformation parameters are control parameters of the three-dimensional human body model during deformation, and the human body parameter values of the three-dimensional human body model are changed by changing the deformation parameters. It can be understood that the human body parameters correspond to the deformation parameters one to one. When the human body parameter is the height, the human body parameter corresponds to a deformation parameter for changing the height; when the human body parameter is the shoulder width, the human body parameter corresponds to a deformation parameter for changing the shoulder width. The first deformation parameter corresponds to a first human body parameter.
For example, taking the adjustment of the shoulder width as an example, changing the shoulder width of the three-dimensional human body model requires simultaneously driving two bones of the left shoulder and the right shoulder of the three-dimensional human body model to move in the z-axis direction for translation. The adjustment range is mapped to a value of 0 to 1, which is the first deformation parameter. The shoulder width is adjusted by the following formula:
ShoulderPosZ=(DNAshoulder-0.5)×factor
wherein;
ShoulderPosZ is the displacement of the bone in the Z-axis direction.
DNAshoulder is the first deformation parameter.
factor is the amplification factor.
And adjusting the shoulder width of the three-dimensional human body model by adjusting the first deformation parameter. It should be noted that the amplification factor is a constant value when the three-dimensional human body model is deformed, and is determined according to the range in which the actual shoulder width can be adjusted. When the magnification factor is large, the shoulder width can be adjusted in a wide range, and when the magnification factor is small, the shoulder width can be adjusted in a narrow range.
Optionally, before step S101, the method further includes: and establishing a three-dimensional human body model according to the preset values of the human body parameters.
In the embodiment of the application, before the three-dimensional human body model is deformed, a three-dimensional human body model needs to be created. When the three-dimensional human body model is created, the minimum limit and the maximum limit of each human body parameter of a normal person can be considered, the minimum limit and the maximum limit are taken as intervals, the average value of the minimum limit and the maximum limit is taken as the preset value of the human body parameter in the intervals, and the three-dimensional human body model is created.
For example, first consider the height and maximum limit of fat and thin of a normal person, taking the values of the most fat, highest, thinnest, and shortest person's physical values as the interval, and taking the average value in the interval to create the three-dimensional human model, thereby enabling smooth transition to both ends (fatest, highest, thinnest, and shortest) when performing deformation of the three-dimensional human model.
The three-dimensional human body model is built according to the preset values of the human body parameters, so that the built three-dimensional human body model is close to the body shapes of most users, smooth transition can be performed to two ends when the three-dimensional human body model is deformed, the deformation time is shortened, and the user experience is improved.
Step S102: and measuring a first human body parameter of the current three-dimensional human body model to obtain a measured value of the first human body parameter.
In the embodiment of the present application, after obtaining the target value of the first human body parameter, the first human body parameter of the current three-dimensional human body model needs to be measured to determine the measured value of the first human body parameter of the current three-dimensional human body model (i.e. the actual value of the first human body parameter).
Alternatively, the measured value of the first human body parameter may be obtained by:
marking a measuring line of a first human body parameter on a three-dimensional human body model, wherein the measuring line is intersected with a grid line to form a plurality of intersection points;
secondly, determining coordinates of a plurality of intersection points according to the grid vertex;
and thirdly, calculating the length of the measuring line according to the coordinates of the plurality of intersection points.
In the embodiment of the application, a plurality of grid vertexes are arranged on the three-dimensional human body model, and the grid vertexes are mutually connected to form a plurality of grid lines. Wherein the coordinates of the vertices of the respective mesh have been determined when creating the three-dimensional phantom.
In order to measure the dimensions of the relevant body part (i.e. the first body parameter) on the three-dimensional manikin, a measurement line corresponding to the first body parameter needs to be marked on the three-dimensional manikin.
It will be appreciated that if the measurement line happens to consist of a plurality of network vertices, the length of the measurement line (i.e. the measured value of the first human body parameter) can be obtained by calculating the distance between the respective network vertices according to the coordinates of the network vertices.
However, due to the ragged vertices of the mesh of the three-dimensional human body model, the measurement lines may not be completely composed of mesh vertices. At this time, the measurement line intersects with the grid line to form a plurality of intersection points, and it is necessary to determine coordinates of the plurality of intersection points according to coordinates of grid vertices, and further calculate lengths of the measurement line according to the coordinates of the plurality of intersection points.
Referring to fig. 2, fig. 2 is a schematic diagram of a mesh vertex, a mesh line and an intersection point according to an embodiment of the present application. As shown in FIG. 2, point A, B, C, D, E, F represents the network vertices of the three-dimensional phantom, and the measurement lines intersect the grid lines to form point G, J, K, L, H, which is five points.
Wherein, the coordinates of the G point can be expressed as:
G=A+AB×KG,KG=AG/AB
wherein G represents the coordinate of the G point, A represents the coordinate of the A point, AB is the vector of the line segment AB, KGIs the ratio of the length of the line segment AG to the length of the line segment AB.
It should be noted that, when marking the measurement line, the position of the G point is determined according to the ratio of the length of the line segment AG to the length of the line segment AB, so that K is the position of the G pointGIs a known value.
By analogy, J, K, L, H coordinate values can be obtained. The length of the measuring line is the sum of the distances of the line segments GJ, JK, KL and LH.
Step S103: judging whether the measured value of the first human body parameter is consistent with the target value of the first human body parameter; if not, determining a new first deformation parameter according to the target value of the first human body parameter, the measured value of the first human body parameter and the first deformation parameter of the current three-dimensional human body model based on a preset formula, and deforming the three-dimensional human body model according to the new first deformation parameter until the measured value of the first human body parameter based on the deformed three-dimensional human body model is consistent with the target value of the first human body parameter.
In the embodiment of the application, after the measured value of the first human body parameter and the target value of the first human body parameter are obtained, whether the measured value of the first human body parameter is consistent with the target value of the first human body parameter is judged. If the two values are consistent, the first parameter value of the three-dimensional human body model at the moment is consistent with the first human body parameter value of the user, and the first parameter of the three-dimensional human body model does not need to be deformed.
And if the two values are inconsistent, determining a new first deformation parameter based on a preset formula, and deforming the three-dimensional human body model according to the new first deformation parameter.
And after the deformation is carried out according to the new first deformation parameter, the operation is circulated until the measured value of the first human body parameter based on the deformed three-dimensional human body model is consistent with the target value of the first human body parameter.
Optionally, the preset formula may be:
newDNA=(1+(target-current)/target)×currentDNA
wherein current DNA represents a first deformation parameter of the three-dimensional human body model, target represents a target value of the first human body parameter, current represents a measured value of the first human body parameter, and newDNA represents a new first deformation parameter.
Based on the above formula, the specific implementation manner of step S103 is as follows:
a new first deformation parameter (newDNA) is estimated from the target value (target) of the first human body parameter and the measured value (current) of the first human body parameter, and then the three-dimensional human body model is deformed based on the new first deformation parameter (newDNA). The specific modification mode has been described above when the first modification parameter is introduced, and the same or similar parts may be referred to each other, and are not described herein again for brevity of the description.
After the deformation is performed according to the new first deformation parameter (newDNA) (it can be understood that newDNA becomes currentDNA at this time), the first human body parameter of the current three-dimensional human body model needs to be measured again to obtain the measurement value (current) of the deformed first human body parameter (it can be understood that the measurement value at this time is a new measurement value after the deformation). The measured value is then compared with a target value (target) of the first human body parameter to determine whether the measured value matches the target value. If the target value (target) of the current first human body parameter is inconsistent with the measured value (current) of the first human body parameter, a new first deformation parameter (newDNA) is calculated, and deformation is carried out. And circulating the steps until the measured value of the first human body parameter based on the deformed three-dimensional human body model is consistent with the target value of the first human body parameter, and finishing the deformation of the three-dimensional human body model.
When the three-dimensional human body model is deformed, whether the measured value of the first human body parameter is consistent with the target value of the first human body parameter or not is continuously judged, and then the first deformation parameter is continuously adjusted, so that the finally deformed three-dimensional human body model is consistent with the body type of a user, and the accuracy of deformation of the three-dimensional human body model is improved.
It can be understood that, in the process of three-dimensional human body model deformation, after obtaining each human body parameter, each human body parameter is deformed respectively, and when each human body parameter value conforms to the target value of the human body parameter, the deformation is considered to be completed. For example, the height is changed, the arm circumference is changed, the arm length is changed, and the leg length is changed.
Therefore, after the first human body parameter is transformed, the second human body parameter needs to be transformed. The method further comprises the following steps:
the method comprises the following steps of firstly, obtaining a target value of a second human body parameter and a second deformation parameter of a current three-dimensional human body model;
secondly, measuring a second human body parameter of the current three-dimensional human body model to obtain a measured value of the second human body parameter;
thirdly, judging whether the measured value of the second human body parameter is consistent with the target value of the second human body parameter;
and fourthly, if not, determining a new second deformation parameter according to the target value of the second human body parameter, the measured value of the second human body parameter and the second deformation parameter of the current three-dimensional human body model based on a preset formula, and deforming the three-dimensional human body model according to the new second deformation parameter until the measured value of the second human body parameter based on the deformed three-dimensional human body model is consistent with the target value of the second human body parameter.
It can be understood that the method for deforming the second human body parameter is the same as the method for deforming the first human body parameter, and the same or similar places can be referred to each other, so that the description is not repeated herein for brevity.
Optionally, before obtaining the target value of the second human body parameter and the second deformation parameter of the current three-dimensional human body model, the method further includes:
and calculating the maximum value and the minimum value of the target value of the second human body parameter under the condition of the target value of the first human body parameter according to a preset fitting equation and the target value of the first human body parameter.
In the embodiment of the application, after the first human body parameter is deformed and before the three-dimensional human body model is subsequently deformed, in order to prevent the abnormal body type, the maximum value and the minimum value of the target value of the second human body parameter under the condition of the target value of the first human body parameter can be calculated through a preset fitting equation and the target value of the first human body parameter. Thereby defining a target value for the second body parameter.
For example, the first body parameter is chest circumference and the second body parameter is waist circumference. After the deformation is completed according to the target value of the first human body parameter, the range of the waist circumference is limited through the following curve fitting equation:
Yl=-0.001487x2+0.5998x+23.71
Yh=0.002106x2+0.5371x+29.79
wherein:
Ylminimum waist circumference, YhIs the maximum waist circumference and x is the chest circumference value.
When the chest circumference is 61, 83, 95 and 126, the minimum value of the waist circumference is 56, 58, 72 and 75 respectively, and the maximum value is 72, 82, 106 and 130 respectively. In the actual use process, after the user inputs the chest circumference, if the input waist circumference value is not in the constrained range, the waist circumference value is considered as the malformed waist circumference value, an error-reporting prompt can be sent to the user, and the deformed three-dimensional human body model is prevented from being in the malformed shape.
Further, the three-dimensional human body model is constructed by each bone, and the deformation is performed on the three-dimensional human body model, namely the deformation is performed on the position and the size of each bone. The same bone may affect multiple body parameters simultaneously. In order to improve the accuracy of the deformation of the three-dimensional human body model and reduce the mutual influence among the deformation of various human body parameters, the method further comprises the following steps:
and constructing a preset human body parameter table, wherein the human body parameters are arranged according to a preset sequence, the first human body parameter and the second human body parameter are selected from the preset human body parameter table, and the position of the first human body parameter in the preset human body parameter table is in front of the position of the second human body parameter in the preset human body parameter table.
In the embodiment of the present application, the arrangement order of the human body parameters in the preset human body parameter table may be: height, arm circumference, arm length, shoulder width, chest circumference, abdomen, waist circumference, leg interval, hip circumference, thigh circumference, shank circumference, and leg length. When the three-dimensional human body model is deformed, the deformation can be sequentially carried out according to the sequence, namely the position of the first human body parameter in the preset human body parameter table is in front of the position of the second human body parameter in the preset human body parameter table.
By constructing the preset human body parameter table, when the three-dimensional human body model is deformed, the deformation is sequentially carried out according to the sequence of the preset human body parameter table, so that the accuracy of the deformation of the three-dimensional human body model is improved, and the mutual influence among the human body parameters is reduced.
Based on the same inventive concept, the embodiment of the application provides a three-dimensional human body model deformation device. Referring to fig. 3, fig. 3 is a block diagram of a three-dimensional human body model transformation apparatus according to an embodiment of the present invention, the three-dimensional human body model transformation apparatus 300 includes:
an obtaining module 301, configured to obtain a target value of a first human body parameter and a first deformation parameter of the current three-dimensional human body model;
a measuring module 302, configured to measure a first human body parameter of the current three-dimensional human body model, so as to obtain a measured value of the first human body parameter;
a determining module 303, configured to determine whether the measured value of the first human body parameter is consistent with the target value of the first human body parameter;
a deformation module 304, configured to, when the determining module determines that the measured value of the first human body parameter is inconsistent with the target value of the first human body parameter, determine a new first deformation parameter according to the target value of the first human body parameter, the measured value of the first human body parameter, and the current first deformation parameter of the three-dimensional human body model based on a preset formula, and deform the three-dimensional human body model according to the new first deformation parameter until the measured value of the first human body parameter based on the deformed three-dimensional human body model is consistent with the target value of the first human body parameter.
In an alternative embodiment, a plurality of mesh vertices are disposed on the three-dimensional human body model, the mesh vertices are connected to form a plurality of mesh lines, and the measuring module 302 is configured to mark a measuring line of the first human body parameter on the three-dimensional human body model, where the measuring line intersects with the mesh lines to form a plurality of intersection points; determining coordinates of a plurality of the intersection points according to the grid vertexes; and calculating the length of the measuring line according to the coordinates of a plurality of intersection points.
In an optional embodiment, the obtaining module 301 is configured to obtain a target value of a second human body parameter and a second deformation parameter of the current three-dimensional human body model; the measuring module 302 is configured to measure a second human body parameter of the current three-dimensional human body model, so as to obtain a measured value of the second human body parameter; the judging module 303 is configured to judge whether the measured value of the second human body parameter is consistent with the target value of the second human body parameter; the deformation module 304 is configured to, when the determining module determines that the measured value of the second human body parameter is not consistent with the target value of the second human body parameter, determine a new second deformation parameter according to the target value of the second human body parameter, the measured value of the second human body parameter, and the current second deformation parameter of the three-dimensional human body model based on a preset formula, and deform the three-dimensional human body model according to the new second deformation parameter until the measured value of the second human body parameter based on the deformed three-dimensional human body model is consistent with the target value of the second human body parameter.
In an alternative embodiment, the apparatus further comprises a calculating module 305 for calculating a maximum value and a minimum value of the target value of the second human body parameter in case of the target value of the first human body parameter according to a preset fitting equation and the target value of the first human body parameter.
In an optional embodiment, the apparatus further includes a constructing module 306, configured to construct a preset human body parameter table, where the human body parameters are arranged according to a preset sequence, the first human body parameter and the second human body parameter are selected from the preset human body parameter table, and a position of the first human body parameter in the preset human body parameter table is in front of a position of the second human body parameter in the preset human body parameter table.
In an optional embodiment, the apparatus further comprises an establishing module 307, configured to establish the three-dimensional human body model according to preset values of human body parameters.
In an alternative embodiment, the deformation module 304 is configured to calculate a new first deformation parameter based on newDNA ═ 1+ (target-current)/target) × current dna; wherein current DNA represents a first deformation parameter of the three-dimensional human body model, target represents a target value of the first human body parameter, current represents a measured value of the first human body parameter, and newDNA represents a new first deformation parameter.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure, where the electronic device 400 may be a Personal Computer (PC), a tablet PC, a smart phone, a Personal Digital Assistant (PDA), or the like.
The electronic device 400 may include: a processor 401, a memory 402 and a communication bus for enabling connection communication of these components.
The Memory 402 is used for storing various data such as a computer program instruction corresponding to the three-dimensional human body model deformation method provided in the embodiment of the present application, where the Memory 402 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like.
The processor 401 is configured to read and execute the computer program instructions stored in the memory, and execute the steps of the human body model deformation method provided by the embodiment of the present application.
The processor 401 may be an integrated circuit chip having signal processing capability. The Processor 401 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In addition, a storage medium is provided in an embodiment of the present application, and a computer program is stored in the storage medium, and when the computer program runs on a computer, the computer is caused to execute the method provided in any embodiment of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
It should be noted that the functions, if implemented in the form of software functional modules and sold or used as independent products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A method of deforming a three-dimensional body model, comprising:
acquiring a target value of a first human body parameter and a first deformation parameter of the current three-dimensional human body model;
measuring a first human body parameter of the current three-dimensional human body model to obtain a measured value of the first human body parameter;
judging whether the measured value of the first human body parameter is consistent with the target value of the first human body parameter;
if not, based on a preset formula, determining a new first deformation parameter according to the target value of the first human body parameter, the measured value of the first human body parameter and the current first deformation parameter of the three-dimensional human body model, and deforming the three-dimensional human body model according to the new first deformation parameter until the measured value of the first human body parameter based on the deformed three-dimensional human body model is consistent with the target value of the first human body parameter.
2. The method of claim 1, wherein the three-dimensional body model has a plurality of mesh vertices, the mesh vertices are connected to form a plurality of mesh lines, and the measuring a first body parameter of the current three-dimensional body model to obtain a measurement value of the first body parameter comprises:
marking measurement lines of the first human body parameter on the three-dimensional human body model, wherein the measurement lines are intersected with the grid lines to form a plurality of intersection points;
determining coordinates of a plurality of the intersection points according to the grid vertexes;
and calculating the length of the measuring line according to the coordinates of a plurality of intersection points.
3. The method according to claim 1, wherein after determining a new first deformation parameter according to the target value of the first human body parameter, the measured value of the first human body parameter and the current first deformation parameter of the three-dimensional human body model based on the preset formula, and deforming the three-dimensional human body model according to the new first deformation parameter until the measured value of the first human body parameter based on the deformed three-dimensional human body model is consistent with the target value of the first human body parameter, the method further comprises:
acquiring a target value of a second human body parameter and a second deformation parameter of the current three-dimensional human body model;
measuring a second human body parameter of the current three-dimensional human body model to obtain a measured value of the second human body parameter;
judging whether the measured value of the second human body parameter is consistent with the target value of the second human body parameter;
if not, determining a new second deformation parameter according to the target value of the second human body parameter, the measured value of the second human body parameter and the current second deformation parameter of the three-dimensional human body model based on a preset formula, and deforming the three-dimensional human body model according to the new second deformation parameter until the measured value of the second human body parameter based on the deformed three-dimensional human body model is consistent with the target value of the second human body parameter.
4. The method according to claim 3, wherein prior to said obtaining the target values of the second body parameters and the second deformation parameters of the current three-dimensional body model, the method further comprises: and calculating the maximum value and the minimum value of the target value of the second human body parameter under the condition of the target value of the first human body parameter according to a preset fitting equation and the target value of the first human body parameter.
5. The method of claim 3, further comprising:
the method comprises the steps of constructing a preset human body parameter table, wherein human body parameters are arranged according to a preset sequence in the preset human body parameter table, the first human body parameter and the second human body parameter are selected from the preset human body parameter table, and the position of the first human body parameter in the preset human body parameter table is in front of the position of the second human body parameter in the preset human body parameter table.
6. The method of claim 1, wherein prior to obtaining the target value of the first human body parameter and the current deformation parameter of the three-dimensional human body model, the method further comprises:
and establishing the three-dimensional human body model according to the preset values of the human body parameters.
7. The method according to claim 1, wherein the determining a new first deformation parameter according to the target value of the first human body parameter, the measured value of the first human body parameter and the first deformation parameter of the current three-dimensional human body model based on a preset formula comprises:
calculating a new first deformation parameter based on newDNA ═ (1+ (target-current)/target) × current dna;
wherein current DNA represents a first deformation parameter of the three-dimensional human body model, target represents a target value of the first human body parameter, current represents a measured value of the first human body parameter, and newDNA represents a new first deformation parameter.
8. A three-dimensional mannequin deformation apparatus, the apparatus comprising:
the acquisition module is used for acquiring a target value of a first human body parameter and a first deformation parameter of the current three-dimensional human body model;
the measurement module is used for measuring a first human body parameter of the current three-dimensional human body model to obtain a measurement value of the first human body parameter;
the judging module is used for judging whether the measured value of the first human body parameter is consistent with the target value of the first human body parameter;
and the deformation module is used for determining a new first deformation parameter according to the target value of the first human body parameter, the measured value of the first human body parameter and the current first deformation parameter of the three-dimensional human body model based on a preset formula when the judgment module judges that the measured value of the first human body parameter is not consistent with the target value of the first human body parameter, and deforming the three-dimensional human body model according to the new first deformation parameter until the measured value of the first human body parameter based on the deformed three-dimensional human body model is consistent with the target value of the first human body parameter.
9. An electronic device comprising a memory and a processor, the memory having stored therein computer program instructions which, when read and executed by the processor, perform the steps of the method of any one of claims 1-7.
10. A storage medium having stored thereon computer program instructions which, when read and executed by a computer, perform the steps of the method according to any one of claims 1-7.
CN202011461935.1A 2020-12-09 2020-12-09 Three-dimensional human model deformation method, three-dimensional human model deformation device, electronic equipment and storage medium Active CN112446960B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011461935.1A CN112446960B (en) 2020-12-09 2020-12-09 Three-dimensional human model deformation method, three-dimensional human model deformation device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011461935.1A CN112446960B (en) 2020-12-09 2020-12-09 Three-dimensional human model deformation method, three-dimensional human model deformation device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112446960A true CN112446960A (en) 2021-03-05
CN112446960B CN112446960B (en) 2023-07-14

Family

ID=74740590

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011461935.1A Active CN112446960B (en) 2020-12-09 2020-12-09 Three-dimensional human model deformation method, three-dimensional human model deformation device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112446960B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117523154A (en) * 2024-01-08 2024-02-06 天津市肿瘤医院(天津医科大学肿瘤医院) Human body three-dimensional model calibration method, system and storage medium based on sign data

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5159361A (en) * 1989-03-09 1992-10-27 Par Technology Corporation Method and apparatus for obtaining the topography of an object
WO2013120851A1 (en) * 2012-02-13 2013-08-22 Mach-3D Sàrl Method for sharing emotions through the creation of three-dimensional avatars and their interaction through a cloud-based platform
CN103714221A (en) * 2014-01-08 2014-04-09 上海明穆电子科技有限公司 Method for adjusting deformation of three-dimensional human body by using human body morphological parameters
CN103810750A (en) * 2014-01-16 2014-05-21 北京航空航天大学 Human body section ring based parametric deformation method
US20160055682A1 (en) * 2014-08-22 2016-02-25 Htc Corporation Three-dimensional modeling method and electronic apparatus thereof
CN106372344A (en) * 2016-09-05 2017-02-01 中山大学 Three-dimensional clothes transformation method based on feature size constrain and system thereof
CN106447713A (en) * 2016-08-31 2017-02-22 北京维盛视通科技有限公司 Automatic measurement method and device based on point cloud human body model

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5159361A (en) * 1989-03-09 1992-10-27 Par Technology Corporation Method and apparatus for obtaining the topography of an object
WO2013120851A1 (en) * 2012-02-13 2013-08-22 Mach-3D Sàrl Method for sharing emotions through the creation of three-dimensional avatars and their interaction through a cloud-based platform
CN103714221A (en) * 2014-01-08 2014-04-09 上海明穆电子科技有限公司 Method for adjusting deformation of three-dimensional human body by using human body morphological parameters
CN103810750A (en) * 2014-01-16 2014-05-21 北京航空航天大学 Human body section ring based parametric deformation method
US20160055682A1 (en) * 2014-08-22 2016-02-25 Htc Corporation Three-dimensional modeling method and electronic apparatus thereof
CN106447713A (en) * 2016-08-31 2017-02-22 北京维盛视通科技有限公司 Automatic measurement method and device based on point cloud human body model
CN106372344A (en) * 2016-09-05 2017-02-01 中山大学 Three-dimensional clothes transformation method based on feature size constrain and system thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SHUNTA SAITO等: "Model-based 3D human shape estimation from silhouettes for virtual fitting", THREE-DIMENSIONAL IMAGE PROCESSING, MEASUREMENT (3DIPM), AND APPLICATIONS 2014, vol. 9013, pages 1 - 11 *
陈青青;: "基于服装参数的虚拟服装试穿模拟", 莆田学院学报, no. 02, pages 54 - 58 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117523154A (en) * 2024-01-08 2024-02-06 天津市肿瘤医院(天津医科大学肿瘤医院) Human body three-dimensional model calibration method, system and storage medium based on sign data
CN117523154B (en) * 2024-01-08 2024-03-19 天津市肿瘤医院(天津医科大学肿瘤医院) Human body three-dimensional model calibration method, system and storage medium based on sign data

Also Published As

Publication number Publication date
CN112446960B (en) 2023-07-14

Similar Documents

Publication Publication Date Title
CN107480315B (en) Method and system for parametric template design
EP1160732B1 (en) Virtual shape generation through free-form deformation
Gültepe et al. Real-time virtual fitting with body measurement and motion smoothing
JP6262105B2 (en) Image processing apparatus, image processing system, image processing method, and program
WO2020203656A1 (en) Information processing device, information processing method, and program
CN108830783A (en) A kind of image processing method, device and computer storage medium
TWI790369B (en) Dimensional system
KR102236188B1 (en) A Clothes Size suggestion System Based On Size-clearance
CN112446960B (en) Three-dimensional human model deformation method, three-dimensional human model deformation device, electronic equipment and storage medium
CN106910180B (en) A kind of image quality measure method and device
CN107491613A (en) A kind of method and apparatus for drawing human clothing's prototype figure
JP2022106923A (en) Image creation apparatus, method and program, and virtual fitting system
US20220270387A1 (en) Modeling method and modeling device for human body model, electronic device, and storage medium
KR20210004824A (en) Apparatus and method for measuring body size
US11443076B2 (en) Digital customization of products
CN115156087B (en) Denture sorting assisting method and device, computer equipment and readable storage medium
CN109753489B (en) Method and device for generating body type sample database and computer readable storage medium
Petrak et al. Research of 3D body models computer adjustment based on anthropometric data determined by laser 3D scanner
CN115631322A (en) User-oriented virtual three-dimensional fitting method and system
EP3611687A1 (en) Program, recording medium, information processing method, and information processing device
CN109766464B (en) Method and device for generating body type sample database and computer readable storage medium
CN112700540A (en) Three-dimensional human body model construction method, device, equipment and readable storage medium
CN109144452A (en) A kind of naked eye 3D display system and method based on 3D MIcrosope image
CN112734936B (en) Virtual clothing wearing method, wearing proportion calculating method and device and electronic equipment
CN114373531B (en) Behavior action monitoring and correcting method, behavior action monitoring and correcting system, electronic equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant