CN114140515B - Three-dimensional human body dimension measuring method, system and computer readable storage medium - Google Patents

Three-dimensional human body dimension measuring method, system and computer readable storage medium Download PDF

Info

Publication number
CN114140515B
CN114140515B CN202111473622.2A CN202111473622A CN114140515B CN 114140515 B CN114140515 B CN 114140515B CN 202111473622 A CN202111473622 A CN 202111473622A CN 114140515 B CN114140515 B CN 114140515B
Authority
CN
China
Prior art keywords
dimensional model
dimensional
preprocessed
standard
model
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.)
Active
Application number
CN202111473622.2A
Other languages
Chinese (zh)
Other versions
CN114140515A (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.)
Xtop 3d Technology Shenzhen Co ltd
Original Assignee
Xtop 3d Technology Shenzhen Co ltd
Filing date
Publication date
Application filed by Xtop 3d Technology Shenzhen Co ltd filed Critical Xtop 3d Technology Shenzhen Co ltd
Priority to CN202111473622.2A priority Critical patent/CN114140515B/en
Publication of CN114140515A publication Critical patent/CN114140515A/en
Application granted granted Critical
Publication of CN114140515B publication Critical patent/CN114140515B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a three-dimensional human body dimension measuring method, a system and a computer readable storage medium, wherein the method comprises the following steps: acquiring an original three-dimensional model of a human body to be detected; preprocessing an original three-dimensional model to obtain a preprocessed three-dimensional model; extracting coordinates of skeleton points of the preprocessed three-dimensional model; calculating deformation parameters of the multi-person linear bone skin model SMPL according to the coordinates of the bone points and the preprocessed three-dimensional model, and obtaining a standard three-dimensional model of the preprocessed three-dimensional model after SMPL deformation according to the deformation parameters; and carrying out non-rigid registration on the standard three-dimensional model subjected to the SMPL deformation according to the preprocessed three-dimensional model to obtain a corrected standard three-dimensional model, wherein the corrected standard three-dimensional model is used for three-dimensional human body dimension measurement. The three-dimensional model is restored more truly, so that a more accurate human body size result is obtained; the measuring mode and the measuring closing position can be defined in advance, and the flexibility and the usability are great.

Description

Three-dimensional human body dimension measuring method, system and computer readable storage medium
Technical Field
The present invention relates to the field of three-dimensional human body measurement technology, and in particular, to a three-dimensional human body dimension measurement method, system and computer readable storage medium.
Background
The non-contact three-dimensional anthropometric technique is widely applied to industries such as clothing, entertainment and the like, and the existing three-dimensional anthropometric method mainly comprises the following aspects:
(1) The scheme of key points is used, the key points such as belly navel points, left and right shoulder points, armpit points and the like are directly calculated on the three-dimensional model according to the shape characteristics of the human body, and then the human body size is extracted through the key points. The acquisition of certain points is obtained through empirical values, the difference of different human bodies is too large, larger errors are easy to occur during calculation, and the extraction of key points is influenced by the quality of a model (such as noise, holes, adhesion and the like of the model).
(2) The method comprises the steps of firstly obtaining a two-dimensional image of a human body, dividing a picture to remove a background area to obtain a human body outline, then calculating key points of the human body on the two-dimensional image, estimating the body type according to the key points and the human body outline information, and obtaining the three-dimensional size of the human body by using different calculation formulas for the determined body type. The existing two-dimensional image processing algorithm is high in maturity and easy to implement, but because the scheme only uses two-dimensional information, the accuracy of size extraction is poor, and the industry with high accuracy requirements cannot be met.
(3) According to the three-dimensional anthropometric algorithm based on the parameterized template, morphological parameters and attitude parameters in a Multi-person linear bone skin model (SMPL (Multi-Person LinearModel) template are solved according to a anthropometric model, a standard model similar to an original model is fitted, a key point scheme is used for extracting the human body size after the standard model is obtained, the human body size is calculated through the fitted template, the stability is higher, but model details are lost due to template transformation, and accordingly the size extraction precision is affected.
In some industry applications (especially clothes, underwear, etc.) the accuracy and stability requirements for human body measurement are very high, the stability of the existing human body measurement method based on key points is greatly affected by the quality of the model, while the template-based human body measurement algorithm method is easily affected by the template, and the original details of the model are ignored, which can seriously affect the measurement accuracy of certain parts.
In the prior art, a three-dimensional human body dimension measuring method with high measuring precision is lacking.
The foregoing background is only for the purpose of facilitating an understanding of the principles and concepts of the application and is not necessarily in the prior art to the present application and is not intended to be used as an admission that such background is not entitled to antedate such novelty and creativity by virtue of prior application or that it is already disclosed at the date of filing of this application.
Disclosure of Invention
The invention provides a three-dimensional human body dimension measuring method, a three-dimensional human body dimension measuring system and a computer readable storage medium.
In order to solve the problems, the technical scheme adopted by the invention is as follows:
A three-dimensional body dimension measurement method comprising the steps of: s1: acquiring an original three-dimensional model of a human body to be detected; s2: preprocessing the original three-dimensional model to obtain a preprocessed three-dimensional model; s3: extracting coordinates of skeleton points of the preprocessed three-dimensional model; s4: calculating deformation parameters of a multi-person linear bone Skin Model (SMPL) according to the coordinates of the bone points and the preprocessed three-dimensional model, and obtaining a standard three-dimensional model of the preprocessed three-dimensional model after SMPL deformation according to the deformation parameters; s5: and carrying out non-rigid registration on the standard three-dimensional model subjected to the SMPL deformation according to the preprocessed three-dimensional model to obtain a corrected standard three-dimensional model, wherein the corrected standard three-dimensional model is used for three-dimensional human body dimension measurement.
Preferably, extracting coordinates of three-dimensional bone points of the preprocessed three-dimensional model comprises the steps of: s21: respectively projecting the front and back sides of the preprocessed three-dimensional model to obtain two-dimensional images; s22: and respectively extracting 24 skeleton points on the two-dimensional image by using an active shape model algorithm, and mapping the 24 skeleton points back to the preprocessed three-dimensional model, wherein each skeleton point corresponds to two space points, and the mean coordinates of the space points are used as the coordinates of the final skeleton points.
Preferably, the method for respectively projecting the front and back surfaces of the preprocessed three-dimensional model to obtain two-dimensional images includes: s211: correcting the preprocessed three-dimensional model by using a principal component analysis algorithm; s212: setting virtual cameras in front of and behind the preprocessed three-dimensional model respectively to project the preprocessed three-dimensional model into a two-dimensional space, and simultaneously obtaining vertex mapping of the preprocessed three-dimensional model to obtain the two-dimensional image.
Preferably, the internal parameters of the virtual camera are calculated according to the following formula:
cx=0.5*W
cy=0.5*H
Wherein cx and cy are principal point coordinates, fx and fy are focal lengths of the virtual camera, W, H are width and height of an image shot by the virtual camera, and X, Y is width and height of an irradiation range of the virtual camera;
determining a coordinate position (u, v) of a vertex of the preprocessed three-dimensional model in the two-dimensional image according to internal parameters of the virtual camera:
Preferably, calculating the SMPL deformation parameters from the coordinates of the skeletal points and the preprocessed three-dimensional model comprises the steps of: s41: acquiring 1 point, 2 points of left and right hand tips and 2 points of left and right feet of a human body head top position through coordinates of the skeleton points, taking gesture parameters of a gesture of stretching both feet and shoulders and standing vertically in an SMPL standard model as a basis, designing an energy function E1, and solving a posture parameter of an SMPL deformation parameter according to the energy function E1; the energy function E1 is as follows:
E1=Min(w1*||Head_t-Head||+w2*(||Hand_t_l-Hand_l||+||Hand_t_r-Hand_r||)+w3*(||Foot_t_l-Foot_l||+||Foot_t_r-Foot_r||)+w4*Shape_Prior(betas))
S42: acquiring 1 point at the top of the head, 2 points at the tips of the left and right hands and 2 points at the feet of the human body through coordinates of the skeleton points, taking gesture parameters of the gesture of the feet and the shoulders in the SMPL standard model, which are wide and the hands are extended and stand vertically as a basis, designing an energy function E2, and optimizing the gesture parameters according to the energy function E2 to obtain gesture parameters of the standard model; the energy function E2 is as follows:
E2=Min(w1*||Head_t-Head||+w2*(||Hand_t_l-Hand_l||+||Hand_t_r-Hand_r||)+w3*(||Foot_t_l-Foot_l||+||Foot_t_r-Foot_r||)+w4*Pose_Prior(poses))
Wherein shape_principles (bits) are Shape Prior distributions corresponding to body Shape parameters, pose _principles (pins) are Shape Prior distributions corresponding to posture parameters, head_t, hand_t_l, hand_t_r, foot_t_l, foot_t_r are coordinates of a Head top, a left Hand, a right Hand, a left Foot and a right Foot in the SMPL standard model respectively, head, hand_l, hand_r, foot_l and foot_r are coordinates of a Head top, a left Hand, a right Hand, a left Foot and a right Foot of a human body respectively, and w1, w2, w3 and w4 are weight parameters respectively.
Preferably, performing non-rigid registration on the standard three-dimensional model after the SMPL deformation according to the preprocessed three-dimensional model, and obtaining a corrected standard three-dimensional model includes: s51: the coordinates of the skeleton points of the preprocessed three-dimensional model and the coordinates of the skeleton points of the standard three-dimensional model after SMPL deformation are calculated by using a least square method to obtain a rotation matrix R and a translation matrix T, and the standard three-dimensional model after SMPL deformation is preliminarily aligned with the preprocessed three-dimensional model in a rotation and translation way; s52: and stretching the standard three-dimensional model subjected to the SMPL deformation by using a non-rigid iterative closest point algorithm, and matching the standard three-dimensional model with the preprocessed three-dimensional model to obtain the corrected standard three-dimensional model.
Preferably, obtaining the original three-dimensional model of the human body to be measured includes: acquiring an original three-dimensional model of a human body to be detected in a posture that the feet and the shoulders are the same in width, and the hands are extended and vertically stand; the original three-dimensional model includes vertex information and patch information.
Preferably, the method further comprises: s6: and predefining a size extraction rule, and performing size extraction on the corrected standard three-dimensional model by using the size extraction rule to obtain size information.
The invention also provides a three-dimensional human body dimension measuring system, comprising: a first unit: the method comprises the steps of obtaining an original three-dimensional model of a human body to be detected; a second unit: the method comprises the steps of preprocessing an original three-dimensional model to obtain a preprocessed three-dimensional model; a third unit: extracting coordinates of skeleton points of the preprocessed three-dimensional model; a fourth unit: the method comprises the steps of calculating deformation parameters of a multi-person linear bone Skin Model (SMPL) according to coordinates of bone points and the preprocessed three-dimensional model, and obtaining a standard three-dimensional model of the preprocessed three-dimensional model after SMPL deformation according to the deformation parameters; a fifth unit: and performing non-rigid registration on the standard three-dimensional model subjected to the SMPL deformation according to the preprocessed three-dimensional model to obtain a corrected standard three-dimensional model, wherein the corrected standard three-dimensional model is used for three-dimensional human body dimension measurement.
The present invention provides a computer readable storage medium storing a computer program which when executed by a processor performs the steps of any of the methods described above.
The beneficial effects of the invention are as follows: providing a three-dimensional human body dimension measuring method, a system and a computer readable storage medium, wherein the problems of detail reduction difference of a standard template are overcome by firstly extracting skeleton points in a preprocessed three-dimensional model and calculating SMPL deformation parameters according to the skeleton points; furthermore, a non-rigid registration algorithm is used for registering the standard model like the original model, the detailed information of the template is improved under the condition that the vertex and the number of the face sheets of the standard model are not changed, and the three-dimensional model is restored more truly, so that a more accurate human body size result is obtained.
Furthermore, the method can finish full-automatic three-dimensional model measurement, and simultaneously carries out standard model calculation and detail registration from the whole, thereby solving the problem that other algorithms are easy to be interfered by factors such as model noise, hole, dressing and the like.
Drawings
Fig. 1 is a schematic diagram of a first three-dimensional body dimension measuring method according to an embodiment of the present invention.
Fig. 2 is a schematic diagram of a method for extracting coordinates of three-dimensional bone points of a preprocessed three-dimensional model by using a bone extraction algorithm according to an embodiment of the present invention.
Fig. 3 is a schematic diagram of a method for respectively projecting the front and back surfaces of a preprocessed three-dimensional model to obtain two-dimensional images in an embodiment of the present invention.
Fig. 4 is a two-dimensional image of an orthographic projection of a three-dimensional model of a human body in an embodiment of the invention.
Fig. 5 is a two-dimensional image of a back projection of a three-dimensional model of a human body in an embodiment of the invention.
FIG. 6 is a schematic diagram of a method for calculating SMPL deformation parameters based on coordinates of skeletal points and a preprocessed three-dimensional model in accordance with an embodiment of the present invention.
FIG. 7 is a schematic diagram of a method for obtaining a modified standard three-dimensional model in an embodiment of the invention.
Fig. 8 is a schematic diagram of a three-dimensional model of a human body in an embodiment of the present invention.
FIG. 9 is a schematic diagram of a standard three-dimensional model after SMPL deformation in an embodiment of the present invention.
FIG. 10 is a schematic representation of a standard three-dimensional model after modification in an embodiment of the present invention.
Fig. 11 is a schematic diagram of a second three-dimensional body dimension measuring method according to an embodiment of the present invention.
Fig. 12 is a schematic diagram of a three-dimensional body dimension measuring system in accordance with an embodiment of the present invention.
Detailed Description
In order to make the technical problems, technical schemes and beneficial effects to be solved by the embodiments of the present invention more clear, the present invention is further described in detail below with reference to the accompanying drawings and the embodiments. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
It will be understood that when an element is referred to as being "mounted" or "disposed" on another element, it can be directly on the other element or be indirectly on the other element. When an element is referred to as being "connected to" another element, it can be directly connected to the other element or be indirectly connected to the other element. In addition, the connection may be for both the fixing action and the circuit communication action.
It is to be understood that the terms "length," "width," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," and the like are merely for convenience in describing embodiments of the invention and to simplify the description, and do not denote or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus are not to be construed as limiting the invention.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the embodiments of the present invention, the meaning of "plurality" is two or more, unless explicitly defined otherwise.
As shown in fig. 1, the present invention provides a three-dimensional human body dimension measuring method, comprising the steps of:
s1: acquiring an original three-dimensional model of a human body to be detected;
s2: preprocessing the original three-dimensional model to obtain a preprocessed three-dimensional model;
s3: extracting coordinates of skeleton points of the preprocessed three-dimensional model;
S4: calculating deformation parameters of a multi-person linear bone Skin Model (SMPL) according to the coordinates of the bone points and the preprocessed three-dimensional model, and obtaining a standard three-dimensional model of the preprocessed three-dimensional model after SMPL deformation according to the deformation parameters;
S5: and carrying out non-rigid registration on the standard three-dimensional model subjected to the SMPL deformation according to the preprocessed three-dimensional model to obtain a corrected standard three-dimensional model, wherein the corrected standard three-dimensional model is used for three-dimensional human body dimension measurement.
According to the method, bone points in the preprocessed three-dimensional model are firstly extracted, SMPL deformation parameters are calculated according to the bone points, and the problem of poor detail restoration of a standard template is solved; furthermore, a non-rigid registration algorithm is used for registering the standard model like the original model, the detailed information of the template is improved under the condition that the vertex and the number of the face sheets of the standard model are not changed, and the three-dimensional model is restored more truly, so that a more accurate human body size result is obtained.
Furthermore, the method can finish full-automatic three-dimensional model measurement, and simultaneously carries out standard model calculation and detail registration from the whole, thereby solving the problem that other algorithms are easy to be interfered by factors such as model noise, hole breaking, dressing and the like.
In one embodiment of the present invention, the human body scanning devices currently on the market are various, and the original three-dimensional model of the human body can be extracted by using a handheld scanner, an industrial scanning device, a consumer-level RGB-D camera, etc., and the original three-dimensional model generally comprises vertex information and patch information. The method of the invention supports measuring models acquired by various devices. Human body retention of the original three-dimensional model is required: standing, the arms straighten and form a certain angle with the body, and the two legs are separated and have the same width as the shoulders.
After the three-dimensional model of the human body scanning is obtained, the three-dimensional model is analyzed, and then stable and accurate human body size information is extracted. Because the data difference of the three-dimensional models scanned by each hardware is larger, for example, the number of the result points of the industrial scanning is more than 10 times larger than the number of the points of the consumer-grade RGB-D camera, the three-dimensional models are required to be preprocessed at the moment, the three-dimensional models scanned by different types of equipment are unified, and the processed contents comprise: removing isolated points from the point cloud, extracting a point cloud connected domain and the like, wherein the operations are used for removing noise in the three-dimensional model; further comprises: and performing point cloud re-meshing operation to re-mesh the point cloud with a fixed size, so as to ensure the uniformity of the size of the three-dimensional model.
In the invention, an ASM (ACTIVE SHAPE Model) algorithm is used, namely an active shape Model algorithm is used for extracting human skeleton points in a three-dimensional Model, the human skeleton extraction algorithm based on the three-dimensional Model at present is less, the human Model posture calculated by the invention is relatively fixed (standing posture, arms are straightened to have a certain angle with the body, two legs are separated to have the same width with shoulders), and the human body posture is approximately the same, so that the ASM is used for extracting the skeleton, and the robustness is higher.
At present, three-dimensional human body model data are fewer, manual labeling is difficult, a large amount of training data is not needed by an ASM algorithm, and the requirement of extracting bone points can be met by training only 10 three-dimensional human body data, but because ASM only can process two-dimensional images, the three-dimensional model is firstly required to be mapped onto the two-dimensional images.
In one embodiment of the invention, the ASM model is trained first, the bone point positions of the 10 three-dimensional human body data are known during training, the average value of each key point is calculated first to obtain a group of average bone points, the group of average bone points are used as initial bone points, then the bone point positions are corrected through iteration, and finally the three-dimensional bone point coordinates of the human body are obtained.
In one embodiment of the invention, the three-dimensional model is projected from both the front and back of the model, and the final bone points integrate the bone points of the two-dimensional images.
As shown in fig. 2, extracting coordinates of three-dimensional bone points of the preprocessed three-dimensional model includes the steps of:
S21: respectively projecting the front and back sides of the preprocessed three-dimensional model to obtain two-dimensional images;
S22: and respectively extracting 24 skeleton points on the two-dimensional image by using an active shape model algorithm, and mapping the 24 skeleton points back to the preprocessed three-dimensional model, wherein each skeleton point corresponds to two space points, and the mean coordinates of the space points are used as the coordinates of the final skeleton points.
It will be appreciated that the value of each pixel in the two-dimensional image is the absolute value of the Z-coordinate of the vertex of the corresponding preprocessed three-dimensional model in the spatial coordinates.
As shown in fig. 3, the method for respectively projecting the front and back surfaces of the preprocessed three-dimensional model to obtain two-dimensional images includes:
s211: correcting the preprocessed three-dimensional model by using a principal component analysis algorithm;
s212: setting virtual cameras in front of and behind the preprocessed three-dimensional model respectively to project the preprocessed three-dimensional model into a two-dimensional space, and simultaneously obtaining vertex mapping of the preprocessed three-dimensional model to obtain the two-dimensional image.
In a specific embodiment of the present invention, the center point of the three-dimensional model is used as the origin O (0, 0), then the virtual camera is set to project the three-dimensional model into the two-dimensional space, and two virtual cameras are respectively set in front of and behind the three-dimensional model, so that the front and back of the human body can be projected on two-dimensional images.
As shown in fig. 4 and 5, the front and rear projected two-dimensional images of the three-dimensional model of the human body.
The coordinates O f (0, -1000) of the front virtual camera are in millimeter, the virtual camera needs to contain a human body, so that the irradiation range of the virtual camera in space with depth d=1000 millimeter is X e (-750, 750), Y e (-1000, 1000), and finally a front picture with width (W) 480 and height (H) 640 is generated, so that the internal reference of the front virtual camera can be calculated according to the following formula, the coordinates of the back virtual camera of the model are O f (0,0,1000), and the internal reference is unchanged. The internal parameters are calculated according to the following formula:
cx=0.5*W
cy=0.5*H
Where cx and cy are principal point coordinates, fx and fy are focal lengths of the virtual camera, W, H are widths and heights of images captured by the virtual camera, and X, Y is a width and height of an irradiation range of the virtual camera, respectively.
Determining coordinate positions (u, v) of vertexes of the preprocessed three-dimensional model in the two-dimensional image according to internal parameters of the virtual camera:
x, Y and Z are the vertexes on the processed three-dimensional model, u and v are the coordinates of the vertexes on the two-dimensional image, and the value of the coordinates is the absolute value of Z.
After the virtual camera and the internal reference are provided, the vertexes of the model can be mapped onto the two-dimensional image, and when a plurality of vertexes are unified under the same pixel on the two-dimensional image during mapping, the front camera takes the point with the small depth value, and the back camera takes the point with the maximum depth value. After a two-dimensional image is obtained, 24 skeleton points on the image are extracted by using an ASM algorithm, and finally the 24 skeleton points calculated on the front and back images are mapped back to a three-dimensional coordinate space, wherein each skeleton is provided with a front space point and a rear space point, the point which is positioned at the middle position on the connecting line of the two space points is used as a final skeleton point, and the formula is as follows:
P=0.5*(Pb+Pf)
Wherein P b、Pf is the coordinates of two spatial points, respectively.
After the coordinates of the human skeleton points are obtained, calculating human body key information by combining the skeleton points, solving the posture parameters betas and the posture parameters poses of the standard model human linear skeleton skin model SMPL (Multi-PersonLinearModel) according to the key information, and finally obtaining a standard three-dimensional model of the original three-dimensional model after the SMPL deformation according to the deformation parameters; the model contains a fixed number of vertices and patches.
As shown in fig. 6, calculating the SMPL deformation parameters from the coordinates of the skeletal points and the preprocessed three-dimensional model includes the steps of:
S41: acquiring 1 point, 2 points of left and right hand tips and 2 points of left and right feet of a human body head top position through coordinates of the skeleton points, taking gesture parameters of a gesture of which the width is equal to that of a shoulder and the hands stretch out and stand vertically in an SMPL standard model as a basis, designing an energy function E1, and solving a posture parameter of an SMPL deformation parameter according to the energy function E1;
The energy function E1 is as follows:
E1=Min(w1*||Head_t-Head||+w2*(||Hand_t_l-Hand_l||+||Hand_t_r-Hand_r||)+w3*(||Foot_t_l-Foot_l||+||Foot_t_r-Foot_r||)+w4*Shape_Prior(betas))
S42: acquiring 1 point at the top of the head, 2 points at the tips of the left and right hands and 2 points at the feet of the human body through coordinates of the skeleton points, taking gesture parameters of the gesture of the feet and the shoulders in the SMPL standard model, which are wide and the hands are extended and stand vertically as a basis, designing an energy function E2, and optimizing the gesture parameters according to the energy function E2 to obtain gesture parameters of the standard model;
the energy function E2 is as follows:
E2=Min(w1*||Head_t-Head||+w2*(||Hand_t_l-Hand_l||+||Hand_t_r-Hand_r||)+w3*(||Foot_t_l-Foot_l||+||Foot_t_r-Foot_r||)+w4*Pose_Prior(poses))
Wherein shape_principles (bits) are Shape Prior distributions corresponding to body Shape parameters, pose _principles (pins) are Shape Prior distributions corresponding to posture parameters, head_t, hand_t_l, hand_t_r, foot_t_l, foot_t_r are coordinates of a Head top, a left Hand, a right Hand, a left Foot and a right Foot in the SMPL standard model respectively, head, hand_l, hand_r, foot_l and foot_r are coordinates of a Head top, a left Hand, a right Hand, a left Foot and a right Foot of a human body respectively, and w1, w2, w3 and w4 are weight parameters respectively.
The standard three-dimensional model obtained at this time contains fixed vertex number and surface patch number, and can be conveniently measured, but in order to obtain more accurate measurement results, the standard three-dimensional model needs to be subjected to detail correction, and the correction method is as follows: and (3) using non-rigid registration, carrying out local deformation on the standard model by taking the original model as a reference, and enabling the surface details of the deformed standard model and the deformed standard model to be consistent.
As shown in fig. 7, performing non-rigid registration on the standard three-dimensional model after SMPL deformation according to the preprocessed three-dimensional model, to obtain a corrected standard three-dimensional model includes:
S51: the coordinates of the skeleton points of the preprocessed three-dimensional model and the coordinates of the skeleton points of the standard three-dimensional model after SMPL deformation are calculated by using a least square method to obtain a rotation matrix R and a translation matrix T, and the standard three-dimensional model after SMPL deformation is preliminarily aligned with the preprocessed three-dimensional model in a rotation and translation way;
s52: and stretching the standard three-dimensional model subjected to the SMPL deformation by using a non-rigid iterative closest point algorithm, and matching the standard three-dimensional model with the preprocessed three-dimensional model to obtain the corrected standard three-dimensional model.
As shown in fig. 8 to 10, schematic diagrams of the three-dimensional model of the human body, the standard three-dimensional model after SMPL deformation, and the modified standard three-dimensional model are shown, respectively.
In one embodiment of the present invention, the measurement is finally performed on the corrected standard model, and since the model at this time is a standard model and includes a fixed number of vertices (6890) and number of patches (13776), measurement key points and size extraction rules can be defined in advance, for example, the total length of a curve after the measurement is performed on 102 vertices such as 1705 th, 4290 th, etc. in space by performing B-spline (B-spline Curves) curve fitting, and the BP distance is defined as the distance between the spatial point of u=0.2, v=0.6 on the 6678 th patch and the spatial point of u=0.54, v=0.07 on the 11894 th patch.
As shown in fig. 11, the method of the present invention further includes:
s6: and predefining a size extraction rule, and performing size extraction on the corrected standard three-dimensional model by using the size extraction rule to obtain size information.
In one embodiment of the present invention, size extraction rules are first defined, and the present example contemplates a measurement site definition interactive tool to facilitate measurement rule definition. The size extraction rule is as follows, and the model used for setting in the software is an A1POSE model of the SMPL standard model:
(1) Key points are selected: chest points, armpit points, crotch bottom points, etc. The software automatically records the patch ID and vertex ID by displaying the mannequin, manually selecting the location of the relevant point on the model using a mouse.
(2) Straight line measurement: BB point, arm length, leg length and the like, selecting the key points selected in the first step, automatically storing the related key points by software, and calculating the size in a linear mode during calculation.
(3) Curve measurement: such as shoulder width, back length, etc., the sum of the distances of all points on a curve is calculated. The points above the curve (minimum 5) are marked on the model manually by using a mouse, the software automatically obtains curve information by using a B-spline fitting algorithm, and the curve information and the points on the curve in the model are stored.
(4) Circumference measurement: such as waistline, chest circumference, hip circumference, arm circumference, etc. And displaying the model through an interface, manually clicking a screen on the model by using a mouse, selecting a measuring part and a corresponding plane inclination angle, automatically fitting a closed measuring curve through the interface, and storing curve parameters and corresponding measuring points.
The definition process and the measurement process are separated, and the measurement can be performed after one definition, and if (1) has no change, the definition is not needed again. And directly loading a measurement rule file during measurement, and directly calculating the corresponding human body size according to the defined measurement type.
The method can be applied to the clothing customization industry, and after a customer scans a whole body model in a store, the method extracts size information, and clothing manufacturers customize clothing suitable for the user according to the size. Compared with the prior art, the method has better measurement results for obese people (because the model of the obese people is seriously adhered in the armpits); and the measurement can be carried out on the customers wearing clothes and skirts, and the existing algorithm needs the customers to wear tights or bare bodies to carry out model acquisition.
As shown in fig. 12, a three-dimensional body size measuring system, comprising:
A first unit: the method comprises the steps of obtaining an original three-dimensional model of a human body to be detected;
a second unit: the method comprises the steps of preprocessing an original three-dimensional model to obtain a preprocessed three-dimensional model;
A third unit: extracting coordinates of skeleton points of the preprocessed three-dimensional model;
A fourth unit: the method comprises the steps of calculating deformation parameters of a multi-person linear bone Skin Model (SMPL) according to coordinates of bone points and the preprocessed three-dimensional model, and obtaining a standard three-dimensional model of the preprocessed three-dimensional model after SMPL deformation according to the deformation parameters;
A fifth unit: and performing non-rigid registration on the standard three-dimensional model subjected to the SMPL deformation according to the preprocessed three-dimensional model to obtain a corrected standard three-dimensional model, wherein the corrected standard three-dimensional model is used for three-dimensional human body dimension measurement.
The embodiment of the application also provides a control device, which comprises a processor and a storage medium for storing a computer program; wherein the processor is adapted to perform at least the method as described above when executing said computer program.
The embodiments of the present application also provide a storage medium storing a computer program which, when executed, performs at least the method as described above.
The embodiments of the present application also provide a processor executing a computer program, at least performing the method as described above.
The storage medium may be implemented by any type of volatile or non-volatile storage device, or combination thereof. The nonvolatile Memory may be a Read Only Memory (ROM), a programmable Read Only Memory (PROM, programmable Read-Only Memory), an erasable programmable Read Only Memory (EPROM, erasableProgrammable Read-Only Memory), an electrically erasable programmable Read Only Memory (EEPROM, electricallyErasable Programmable Read-Only Memory), a magnetic random access Memory (FRAM, ferromagneticRandomAccess Memory), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical disk, or a compact disk Read Only Memory (CD-ROM, compact Disc Read-Only Memory); the magnetic surface memory may be a disk memory or a tape memory. The volatile Memory may be a random access Memory (RAM, randomAccess Memory) that acts as an external cache. By way of example, and not limitation, many forms of RAM are available, such as static random access memory (SRAM, static RandomAccess Memory), synchronous static random access memory (SSRAM, synchronousStatic RandomAccess Memory), dynamic random access memory (DRAM, dynamic RandomAccess Memory), synchronous dynamic random access memory (SDRAM, synchronous Dynamic RandomAccess Memory), double data rate synchronous dynamic random access memory (ddr SDRAM, double Data Rate Synchronous Dynamic RandomAccess Memory), enhanced synchronous dynamic random access memory (ESDRAM, enhanced Synchronous Dynamic RandomAccess Memory), synchronous link dynamic random access memory (SLDRAM, syncLink Dynamic RandomAccess Memory), direct memory bus random access memory (DRRAM, direct Rambus RandomAccess Memory). The storage media described in embodiments of the present invention are intended to comprise, without being limited to, these and any other suitable types of memory.
In the several embodiments provided by the present application, it should be understood that the disclosed systems and methods may be implemented in other ways. The above described device embodiments are only illustrative, e.g. the division of the units is only one logical function division, and there may be other divisions in practice, such as: multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. In addition, the various components shown or discussed may be coupled or directly coupled or communicatively coupled to each other via some interface, whether indirectly coupled or communicatively coupled to devices or units, whether electrically, mechanically, or otherwise.
The units described as separate units may or may not be physically separate, and units 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 may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present invention may be integrated in one processing unit, or each unit may be separately used as one unit, or two or more units may be integrated in one unit; the integrated units may be implemented in hardware or in hardware plus software functional units.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the above method embodiments may be implemented by hardware associated with program instructions, where the foregoing program may be stored in a computer readable storage medium, and when executed, the program performs steps including the above method embodiments; and the aforementioned storage medium includes: various media capable of storing program codes, such as a mobile storage device, a Read-Only Memory (ROM), a random access Memory (RAM, randomAccess Memory), a magnetic disk, or an optical disk.
Or the above-described integrated units of the invention may be stored in a computer-readable storage medium if implemented in the form of software functional modules and sold or used as separate products. Based on such understanding, the technical solutions of the embodiments of the present invention may be embodied in essence or a part contributing to the prior art in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, ROM, RAM, magnetic or optical disk, or other medium capable of storing program code.
The methods disclosed in the method embodiments provided by the application can be arbitrarily combined under the condition of no conflict to obtain a new method embodiment.
The features disclosed in the several product embodiments provided by the application can be combined arbitrarily under the condition of no conflict to obtain new product embodiments.
The features disclosed in the embodiments of the method or the apparatus provided by the application can be arbitrarily combined without conflict to obtain new embodiments of the method or the apparatus.
The foregoing is a further detailed description of the invention in connection with the preferred embodiments, and it is not intended that the invention be limited to the specific embodiments described. It will be apparent to those skilled in the art that several equivalent substitutions and obvious modifications can be made without departing from the spirit of the invention, and the same should be considered to be within the scope of the invention.

Claims (10)

1. A three-dimensional body dimension measuring method, comprising the steps of:
s1: acquiring an original three-dimensional model of a human body to be detected;
s2: preprocessing the original three-dimensional model to obtain a preprocessed three-dimensional model;
s3: extracting coordinates of skeleton points of the preprocessed three-dimensional model;
S4: calculating deformation parameters of a multi-person linear bone Skin Model (SMPL) according to the coordinates of the bone points and the preprocessed three-dimensional model, and obtaining a standard three-dimensional model of the preprocessed three-dimensional model after SMPL deformation according to the deformation parameters;
S5: and carrying out non-rigid registration on the standard three-dimensional model subjected to the SMPL deformation according to the preprocessed three-dimensional model to obtain a corrected standard three-dimensional model, wherein the corrected standard three-dimensional model is used for three-dimensional human body dimension measurement.
2. The three-dimensional body size measurement method according to claim 1, wherein extracting coordinates of three-dimensional skeletal points of the preprocessed three-dimensional model comprises the steps of:
S21: respectively projecting the front and back sides of the preprocessed three-dimensional model to obtain two-dimensional images;
S22: and respectively extracting 24 skeleton points on the two-dimensional image by using an active shape model algorithm, and mapping the 24 skeleton points back to the preprocessed three-dimensional model, wherein each skeleton point corresponds to two space points, and the mean coordinates of the space points are used as the coordinates of the final skeleton points.
3. The three-dimensional body size measuring method according to claim 2, wherein the method of projecting the front and rear surfaces of the preprocessed three-dimensional model to obtain two-dimensional images comprises:
s211: correcting the preprocessed three-dimensional model by using a principal component analysis algorithm;
s212: setting virtual cameras in front of and behind the preprocessed three-dimensional model respectively to project the preprocessed three-dimensional model into a two-dimensional space, and simultaneously obtaining vertex mapping of the preprocessed three-dimensional model to obtain the two-dimensional image.
4. A three-dimensional body size measuring method according to claim 3, wherein the internal parameters of the virtual camera are calculated according to the following formula:
cx=0.5*W
cy=0.5*H
Wherein cx and cy are principal point coordinates, fx and fy are focal lengths of the virtual camera, W, H are width and height of an image shot by the virtual camera, and X, Y is width and height of an irradiation range of the virtual camera;
determining a coordinate position (u, v) of a vertex of the preprocessed three-dimensional model in the two-dimensional image according to internal parameters of the virtual camera:
5. The three-dimensional body size measurement method according to claim 4, wherein calculating the SMPL deformation parameters from the coordinates of the skeletal points and the preprocessed three-dimensional model comprises the steps of:
S41: acquiring 1 point, 2 points of left and right hand tips and 2 points of left and right feet of a human body head top position through coordinates of the skeleton points, taking gesture parameters of a gesture of which the width is equal to that of a shoulder and the hands stretch out and stand vertically in an SMPL standard model as a basis, designing an energy function E1, and solving a posture parameter of an SMPL deformation parameter according to the energy function E1;
The energy function E1 is as follows:
E1=Min(w1*||Head_t-Head||+w2*(||Hand_t_l-Hand_l||+||Hand_t_r-Hand_r||)+w3*(||Foot_t_l-Foot_l||+||Foot_t_r-Foot_r||)+w4*Shape_Prior(betas))
S42: acquiring 1 point at the top of the head, 2 points at the tips of the left and right hands and 2 points at the feet of the human body through coordinates of the skeleton points, taking gesture parameters of the gesture of the feet and the shoulders in the SMPL standard model, which are wide and the hands are extended and stand vertically as a basis, designing an energy function E2, and optimizing the gesture parameters according to the energy function E2 to obtain gesture parameters of the standard model;
the energy function E2 is as follows:
E2=Min(w1*||Head_t-Head||+w2*(||Hand_t_l-Hand_l||+||Hand_t_r-Hand_r||)+w3*(||Foot_t_l-Foot_l||+||Foot_t_r-Foot_r||)+w4*Pose_Prior(poses))
Wherein shape_principles (bits) are Shape Prior distributions corresponding to body Shape parameters, pose _principles (pins) are Shape Prior distributions corresponding to posture parameters, head_t, hand_t_l, hand_t_r, foot_t_l, foot_t_r are coordinates of a Head top, a left Hand, a right Hand, a left Foot and a right Foot in the SMPL standard model respectively, head, hand_l, hand_r, foot_l and foot_r are coordinates of a Head top, a left Hand, a right Hand, a left Foot and a right Foot of a human body respectively, and w1, w2, w3 and w4 are weight parameters respectively.
6. The three-dimensional body size measurement method of claim 5, wherein non-rigid registration of the standard three-dimensional model after SMPL deformation based on the preprocessed three-dimensional model, the obtaining a modified standard three-dimensional model comprises:
S51: the coordinates of the skeleton points of the preprocessed three-dimensional model and the coordinates of the skeleton points of the standard three-dimensional model after SMPL deformation are calculated by using a least square method to obtain a rotation matrix R and a translation matrix T, and the standard three-dimensional model after SMPL deformation is preliminarily aligned with the preprocessed three-dimensional model in a rotation and translation way;
s52: and stretching the standard three-dimensional model subjected to the SMPL deformation by using a non-rigid iterative closest point algorithm, and matching the standard three-dimensional model with the preprocessed three-dimensional model to obtain the corrected standard three-dimensional model.
7. The three-dimensional body size measurement method according to claim 6, wherein obtaining an original three-dimensional model of the body to be measured comprises:
Acquiring an original three-dimensional model of a human body to be detected in a posture that the feet and the shoulders are the same in width, and the hands are extended and vertically stand;
The original three-dimensional model includes vertex information and patch information.
8. The three-dimensional body size measurement method according to any one of claims 1 to 7, further comprising:
s6: and predefining a size extraction rule, and performing size extraction on the corrected standard three-dimensional model by using the size extraction rule to obtain size information.
9. A three-dimensional body dimension measurement system, comprising:
A first unit: the method comprises the steps of obtaining an original three-dimensional model of a human body to be detected;
a second unit: the method comprises the steps of preprocessing an original three-dimensional model to obtain a preprocessed three-dimensional model;
A third unit: extracting coordinates of skeleton points of the preprocessed three-dimensional model;
A fourth unit: the method comprises the steps of calculating deformation parameters of a multi-person linear bone Skin Model (SMPL) according to coordinates of bone points and the preprocessed three-dimensional model, and obtaining a standard three-dimensional model of the preprocessed three-dimensional model after SMPL deformation according to the deformation parameters;
A fifth unit: and performing non-rigid registration on the standard three-dimensional model subjected to the SMPL deformation according to the preprocessed three-dimensional model to obtain a corrected standard three-dimensional model, wherein the corrected standard three-dimensional model is used for three-dimensional human body dimension measurement.
10. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method according to any of claims 1-8.
CN202111473622.2A 2021-11-29 Three-dimensional human body dimension measuring method, system and computer readable storage medium Active CN114140515B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111473622.2A CN114140515B (en) 2021-11-29 Three-dimensional human body dimension measuring method, system and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111473622.2A CN114140515B (en) 2021-11-29 Three-dimensional human body dimension measuring method, system and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN114140515A CN114140515A (en) 2022-03-04
CN114140515B true CN114140515B (en) 2024-07-16

Family

ID=

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112652057A (en) * 2020-12-30 2021-04-13 北京百度网讯科技有限公司 Method, device, equipment and storage medium for generating human body three-dimensional model
CN112837362A (en) * 2021-01-28 2021-05-25 清华大学深圳国际研究生院 Three-dimensional human body posture estimation method for obtaining space positioning and computer readable storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112652057A (en) * 2020-12-30 2021-04-13 北京百度网讯科技有限公司 Method, device, equipment and storage medium for generating human body three-dimensional model
CN112837362A (en) * 2021-01-28 2021-05-25 清华大学深圳国际研究生院 Three-dimensional human body posture estimation method for obtaining space positioning and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN109949899B (en) Image three-dimensional measurement method, electronic device, storage medium, and program product
CN107111833B (en) Fast 3D model adaptation and anthropometry
Pishchulin et al. Building statistical shape spaces for 3d human modeling
CN106780619B (en) Human body size measuring method based on Kinect depth camera
Corazza et al. A markerless motion capture system to study musculoskeletal biomechanics: visual hull and simulated annealing approach
CN108475439B (en) Three-dimensional model generation system, three-dimensional model generation method, and recording medium
CN107507216B (en) Method and device for replacing local area in image and storage medium
CN107564080B (en) Face image replacement system
CN110503681B (en) Human body model automatic creation method and three-dimensional fitting system
BR112014029372B1 (en) BODY MEASUREMENT
CN105608737B (en) A kind of human foot three-dimensional rebuilding method based on machine learning
Chi et al. Body scanning of dynamic posture
CN102663820A (en) Three-dimensional head model reconstruction method
CN109584327B (en) Face aging simulation method, device and equipment
CN107016721A (en) The modeling method of human 3d model
CN110189408B (en) System and method for obtaining human body appearance data according to human body photos
CN106952335A (en) Set up the method and its system in manikin storehouse
CN113555083B (en) Massage track generation method
Kasap et al. Skeleton-aware size variations in digital mannequins
Buxton et al. Reconstruction and interpretation of 3D whole body surface images
CN114283188A (en) Positioning and registering method for orthopedic surgery robot
CN106933976B (en) Method for establishing human body 3D net model and application thereof in 3D fitting
US11461914B2 (en) Measuring surface distances on human bodies
CN116966086A (en) Human back acupoints calibrating method and system based on real-time image optimization
CN114140515B (en) Three-dimensional human body dimension measuring method, system and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20221121

Address after: 518000 13 / F, joint headquarters building, high tech Zone, 63 Gaoxin South 10th Road, Binhai community, Yuehai street, Nanshan District, Shenzhen City, Guangdong Province

Applicant after: XTOP 3D TECHNOLOGY (SHENZHEN) Co.,Ltd.

Address before: 710000 room 1101, building C2, yunhuigu (phase II project of Xi'an software new town R & D base), 156 Tiangu 8th Road, software new town, Xi'an high tech Zone, Xi'an, Shaanxi Province

Applicant before: Xi'an aobi Tuojiang Technology Co.,Ltd.

GR01 Patent grant