CN114140515A - 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 PDFInfo
- Publication number
- CN114140515A CN114140515A CN202111473622.2A CN202111473622A CN114140515A CN 114140515 A CN114140515 A CN 114140515A CN 202111473622 A CN202111473622 A CN 202111473622A CN 114140515 A CN114140515 A CN 114140515A
- Authority
- CN
- China
- Prior art keywords
- dimensional model
- dimensional
- preprocessed
- human body
- standard
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 62
- 238000007781 pre-processing Methods 0.000 claims abstract description 13
- 230000036544 posture Effects 0.000 claims description 32
- 238000005259 measurement Methods 0.000 claims description 31
- 230000005477 standard model Effects 0.000 claims description 27
- 238000004422 calculation algorithm Methods 0.000 claims description 24
- 238000012545 processing Methods 0.000 claims description 24
- 238000000605 extraction Methods 0.000 claims description 14
- 210000000988 bone and bone Anatomy 0.000 claims description 13
- 238000004590 computer program Methods 0.000 claims description 6
- 238000013507 mapping Methods 0.000 claims description 6
- 239000011159 matrix material Substances 0.000 claims description 6
- 238000013519 translation Methods 0.000 claims description 6
- 238000000513 principal component analysis Methods 0.000 claims description 3
- 238000012360 testing method Methods 0.000 claims 1
- 230000006870 function Effects 0.000 description 15
- 238000010586 diagram Methods 0.000 description 10
- 230000001360 synchronised effect Effects 0.000 description 8
- 238000004364 calculation method Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000012549 training Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000000691 measurement method Methods 0.000 description 2
- 238000012821 model calculation Methods 0.000 description 2
- 230000009467 reduction Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 230000001815 facial effect Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000002372 labelling Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000002715 modification method Methods 0.000 description 1
- 230000000877 morphologic effect Effects 0.000 description 1
- 238000004321 preservation Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
- G06T7/62—Analysis of geometric attributes of area, perimeter, diameter or volume
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/213—Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
- G06F18/2135—Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods based on approximation criteria, e.g. principal component analysis
-
- G06T3/06—
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/30—Determination of transform parameters for the alignment of images, i.e. image registration
- G06T7/33—Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods
- G06T7/344—Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods involving models
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
- G06T7/73—Determining position or orientation of objects or cameras using feature-based methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30196—Human being; Person
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 a multi-person linear skeleton Skin Model (SMPL) according to the coordinates of the skeleton 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 performing non-rigid registration on the standard three-dimensional model after 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 measuring the three-dimensional human body size. 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 position can be defined in advance, and the method has great flexibility and usability.
Description
Technical Field
The invention relates to the technical field of three-dimensional human body measurement, in particular to a three-dimensional human body dimension measuring method, a three-dimensional human body dimension measuring system and a computer readable storage medium.
Background
The non-contact three-dimensional human body measuring technology is widely applied to industries such as clothes, entertainment and the like, and the existing three-dimensional human body measuring method mainly comprises the following aspects:
(1) the scheme of using key points directly calculates key points such as navel points, left and right shoulder points, armpit points and the like on a three-dimensional model according to the shape characteristics of a human body, and then extracts the size of the human body through the key points. Some points are obtained through empirical values, the difference of different human bodies is too large, large errors are easy to occur in calculation, and key point extraction is affected by model quality (such as noise, cavities, adhesion and other problems of the model).
(2) The scheme comprises the steps of firstly obtaining a two-dimensional image of a human body, segmenting the image 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 of the human body 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. At present, a two-dimensional image processing algorithm is high in maturity and easy to implement, but the scheme only uses two-dimensional information, so that the size extraction precision is poor, and the industry with high precision requirements cannot be met.
(3) A three-dimensional human body measurement algorithm based on a parameterized template is characterized in that a standard model similar to an original model is fitted according to morphological parameters and posture parameters in a Multi-Person linear skeleton Skin Model (SMPL) template solved by a human body model, and the human body size is extracted by using a key point scheme after the standard model is obtained.
In some industrial applications (particularly clothing, underwear and the like), the requirements on the accuracy and stability of human body measurement are high, the stability of the existing human body measurement method based on key points is greatly influenced by the quality of a model, and the human body measurement algorithm method based on the template is easily influenced by the template and ignores the original details of the model, so that the measurement accuracy of some parts can be seriously influenced.
The prior art lacks a three-dimensional human body size measuring method with high measuring precision.
The above background disclosure is only for the purpose of assisting understanding of the concept and technical solution of the present invention and does not necessarily belong to the prior art of the present patent application, and should not be used for evaluating the novelty and inventive step of the present application in the case that there is no clear evidence that the above content is disclosed at the filing date of the present patent 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 for solving the existing problems.
In order to solve the above problems, the technical solution adopted by the present invention is as follows:
a three-dimensional human body size measuring method comprises the following steps: 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 skeleton Skin Model (SMPL) according to the coordinates of the skeleton 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 performing non-rigid registration on the standard three-dimensional model after 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 size measurement.
Preferably, extracting the coordinates of the three-dimensional bone points of the preprocessed three-dimensional model comprises the following steps: s21: respectively projecting the front side and the back side of the preprocessed three-dimensional model to obtain two-dimensional images; s22: respectively extracting 24 skeleton points on the two-dimensional image by using an active shape model algorithm, mapping the 24 skeleton points back to the preprocessed three-dimensional model, wherein each skeleton point corresponds to two space points, and taking the mean value coordinate of the space points as the coordinate of the final skeleton point.
Preferably, the method for projecting the front and back of the preprocessed three-dimensional model respectively to obtain two-dimensional images includes: s211: correcting the preprocessed three-dimensional model by using a principal component analysis algorithm; s212: and respectively arranging virtual cameras right in front of and right behind the preprocessed three-dimensional model to project the preprocessed three-dimensional model into a two-dimensional space, and simultaneously obtaining the vertex mapping of the preprocessed three-dimensional model to obtain the two-dimensional image.
Preferably, the internal parameters of the virtual camera are obtained according to the following formula:
cx=0.5*W
cy=0.5*H
wherein cx and cy are main point coordinates, fx and fy are focal lengths of the virtual camera, W, H are the width and height of an image shot by the virtual camera respectively, and X, Y is the width and height of an irradiation range of the virtual camera respectively;
determining a coordinate position (u, v) of a vertex of the preprocessed three-dimensional model in the two-dimensional image according to the internal parameters of the virtual camera:
preferably, the step of calculating the SMPL deformation parameters from the coordinates of the bone points and the preprocessed three-dimensional model comprises the steps of: s41: acquiring 1 point of the head top position, 2 points of the left hand tip and the right hand tip and 2 points of the left foot and the right foot of a human body through the coordinates of the skeleton points, taking posture parameters of postures of the feet and shoulders with the same width, the extended hands and the vertical standing in the SMPL standard model as the basis, designing an energy function E1, and solving posture parameters of SMPL deformation parameters according to the energy function E1; the energy function E1 is shown below:
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 of the head top position, 2 points of the left hand tip and the right hand tip and 2 points of the left foot and the right foot of a human body through the coordinates of the skeleton points, designing an energy function E2 on the basis of posture parameters of postures that the two feet and the shoulders are as wide as each other, the two hands are extended and the human body stands vertically in the SMPL standard model, and optimizing the posture parameters according to the energy function E2 to obtain the posture parameters of the standard model; the energy function E2 is shown below:
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))
shape _ prior (beta) is a Shape prior distribution corresponding to body type parameters, Pose _ prior (spots) is a Shape prior distribution corresponding to posture parameters, Head _ t, Hand _ t _ l, Hand _ t _ r, Foot _ t _ l and Foot _ t _ r are coordinates of the Head, the left Hand, the right Hand, the left Foot and the right Foot in the SMPL standard model respectively, Head, Hand _ l, Hand _ r, Foot _ l and Foot _ r are coordinates of the Head, the left Hand, the right Hand, the left Foot and the right Foot of a human body respectively, and w1, w2, w3 and w4 are weight parameters respectively.
Preferably, the non-rigid registration of the standard three-dimensional model after the SMPL deformation is performed according to the preprocessed three-dimensional model, and obtaining a modified standard three-dimensional model includes: s51: calculating a rotation matrix R and a translation matrix T by using a least square method according to 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, and performing rotation and translation on the standard three-dimensional model after SMPL deformation to be initially aligned with the preprocessed three-dimensional model; s52: and stretching the standard three-dimensional model after SMPL deformation by using a non-rigid iterative closest point algorithm, and matching the stretched standard three-dimensional model with the preprocessed three-dimensional model to obtain the corrected standard three-dimensional model.
Preferably, the obtaining of 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 width of both feet and shoulders is the same, the both hands are extended and the human body stands vertically; the original three-dimensional model includes vertex information and tile information.
Preferably, the method further comprises the following steps: s6: and predefining a size extraction rule, and extracting the size of the corrected standard three-dimensional model by using the size extraction rule to obtain size information.
The present 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 system comprises a three-dimensional model acquisition module, a three-dimensional model generation module, a three-dimensional model storage module and a three-dimensional model preprocessing module, wherein the three-dimensional model acquisition module is used for acquiring an original three-dimensional model; a third unit: extracting coordinates of bone points of the preprocessed three-dimensional model; a fourth unit: the system comprises a framework point processing module, a preprocessing module, a three-dimensional model processing module and a processing module, wherein the framework point processing module is used for processing a skeleton point of a human body, and the preprocessing module is used for processing a three-dimensional model of the human body; a fifth unit: and the SMPL processing module is used for carrying out non-rigid registration on the standard three-dimensional model after 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 size measurement.
The invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the method as set forth in any of the above.
The invention has the beneficial effects that: the method comprises the steps of firstly extracting skeleton points in a preprocessed three-dimensional model, and calculating SMPL deformation parameters according to the skeleton points, so that the problem of poor detail reduction of a standard template is solved; furthermore, a non-rigid registration algorithm is used for registering the standard model like the original model, so that the detail information of the template is improved under the condition of not changing the vertex and the number of the faces of the standard model, and the three-dimensional model is restored more truly, thereby obtaining a more accurate human body size result.
Furthermore, the method of the invention can complete the full-automatic three-dimensional model measurement, and simultaneously carry out standard model calculation and detail registration from the whole situation, thereby overcoming the problem that other algorithms are easily interfered by model noise, hole breaking, dressing and other factors.
Drawings
Fig. 1 is a schematic diagram of a first three-dimensional human body dimension measuring method in 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 in the embodiment of the present invention.
Fig. 3 is a schematic diagram of a method for obtaining two-dimensional images by respectively projecting the front and back of the preprocessed three-dimensional model in the embodiment of the present invention.
FIG. 4 is a two-dimensional image of a frontal 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 bone points and a preprocessed three-dimensional model in an embodiment of the invention.
FIG. 7 is a schematic diagram of a method for obtaining a modified standard three-dimensional model according to an embodiment of the present invention.
FIG. 8 is a schematic representation of a three-dimensional model of a human body in an embodiment of the invention.
FIG. 9 is a diagram of a standard three-dimensional model after SMPL deformation in an embodiment of the present invention.
FIG. 10 is a schematic diagram of a modified standard three-dimensional model in an embodiment of the invention.
Fig. 11 is a schematic diagram of a second three-dimensional human body dimension measuring method in the embodiment of the invention.
Fig. 12 is a schematic diagram of a three-dimensional body dimension measuring system in an embodiment of the invention.
Detailed Description
In order to make the technical problems, technical solutions and advantageous effects to be solved by the embodiments of the present invention more clearly apparent, 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 merely illustrative of the invention and are not intended to limit the invention.
It will be understood that when an element is referred to as being "secured to" 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 either a fixing function or a circuit connection function.
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 used in an orientation or positional relationship indicated in the drawings for convenience in describing the embodiments of the present invention and to simplify the description, and are not intended to indicate or imply that the referenced device or element must have a particular orientation, be constructed in a particular orientation, and be in any way limiting of the present invention.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the embodiments of the present invention, "a plurality" means two or more unless specifically limited 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 skeleton Skin Model (SMPL) according to the coordinates of the skeleton 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 performing non-rigid registration on the standard three-dimensional model after 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 size measurement.
The method of the invention overcomes the problem of poor detail reduction of a standard template 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, so that the detail information of the template is improved under the condition of not changing the vertex and the number of the faces of the standard model, and the three-dimensional model is restored more truly, thereby obtaining a more accurate human body size result.
Furthermore, the method of the invention can complete the full-automatic three-dimensional model measurement and measurement, and simultaneously carry out standard model calculation and detail registration from the whole situation, thereby overcoming the problem that other algorithms are easily interfered by model noise, holes, dressing and other factors.
In an embodiment of the present invention, human body scanning devices on the market are diversified, and an original three-dimensional model of a human body, which generally includes vertex information and facial information, can be extracted using a handheld scanner, an industrial scanning device, a consumer RGB-D camera, and the like. The method of the invention supports measurement of models acquired by a variety of devices. Human preservation of the original three-dimensional model is required: standing, with the arms extended at a certain angle to the body and the legs spread apart to be as wide as the shoulders.
After the three-dimensional model scanned by the human body 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 large, if the number of the industrial scanning result points is more than 10 times larger than that of the consumption-level RGB-D camera, the three-dimensional models need to be preprocessed, the three-dimensional models scanned by different types of equipment are unified, and the processing content comprises the following steps: 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 comprising: and performing point cloud re-meshing operation on the point cloud again in a fixed size so as to ensure that the size of the three-dimensional model is uniform.
In the invention, an ASM (active Shape model) algorithm, namely an active Shape model algorithm, is used for extracting human skeleton points in the three-dimensional model, the human skeleton extraction algorithm based on the three-dimensional model is less at present, the posture of the human model calculated by the invention is relatively fixed (standing posture, arm extension and body have a certain angle, two legs are separated and are as wide as shoulders), and the human posture is approximately the same, so that the skeleton extraction by using the ASM has higher robustness.
At present, three-dimensional human body model data are few, manual labeling is difficult, an ASM algorithm does not need a large amount of training data, the requirement of extracting skeleton points can be met only by using 10 three-dimensional human body data for training, but the ASM can only process two-dimensional images, so that the three-dimensional model is firstly mapped to the two-dimensional images.
In an embodiment of the invention, an ASM model is trained, the positions of the skeleton points of the 10 three-dimensional human body data are known during training, an average value of each key point is calculated to obtain a group of average skeleton points, the group of average skeleton points are used as initial skeleton points, then the positions of the skeleton points are corrected through iteration, and finally the coordinates of the three-dimensional skeleton points of the human body are obtained.
In one embodiment of the invention, the three-dimensional model is projected from both the front and back directions of the three-dimensional model, and the final bone points are synthesized from the bone points of the two-dimensional images.
As shown in fig. 2, the step of extracting the coordinates of the three-dimensional bone points of the preprocessed three-dimensional model includes the following steps:
s21: respectively projecting the front side and the back side of the preprocessed three-dimensional model to obtain two-dimensional images;
s22: respectively extracting 24 skeleton points on the two-dimensional image by using an active shape model algorithm, mapping the 24 skeleton points back to the preprocessed three-dimensional model, wherein each skeleton point corresponds to two space points, and taking the mean value coordinate of the space points as the coordinate of the final skeleton point.
It can be understood that the value of each pixel point 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 space coordinate.
As shown in fig. 3, the method for projecting the front and back of the preprocessed three-dimensional model respectively to obtain two-dimensional images includes:
s211: correcting the preprocessed three-dimensional model by using a principal component analysis algorithm;
s212: and respectively arranging virtual cameras right in front of and right behind the preprocessed three-dimensional model to project the preprocessed three-dimensional model into a two-dimensional space, and simultaneously obtaining the 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 coordinate origin O (0,0,0), then the virtual cameras are arranged to project the three-dimensional model into the two-dimensional space, and two virtual cameras are arranged right in front of and right 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, two-dimensional images of the front and back projections of the three-dimensional model of the human body.
Front virtual camera coordinates Of(0,0, -1000), the unit is millimeter, the virtual camera needs to contain human body, therefore the irradiation range of the virtual camera is X belongs to (-750, 750), Y belongs to (-1000, 1000) when the depth d of the virtual camera in space is 1000 millimeter, finally generating the front picture with width (W)480 and height (H)640, so the internal parameter of the front virtual camera can be calculated according to the following formula, the coordinate of the model back virtual camera is Of(0, 1000), the internal reference is unchanged. The intrinsic parameters are obtained according to the following formula:
cx=0.5*W
cy=0.5*H
where cx and cy are the coordinates of the principal point, fx and fy are the focal lengths of the virtual cameras, W, H are the widths and heights of the images captured by the virtual cameras, and X, Y are the widths and heights of the irradiation ranges of the virtual cameras.
Determining the coordinate position (u, v) of the vertex of the preprocessed three-dimensional model in the two-dimensional image according to the internal parameters of the virtual camera:
x, Y and Z are vertexes of the processed three-dimensional model, u and v are coordinates of the vertexes on the two-dimensional image, and the coordinate value is the absolute value of Z.
When a plurality of vertexes are arranged under the same pixel on the two-dimensional image in a unified mode, the front camera takes a point with a small depth value, and the back camera takes a point with a maximum depth value. After a two-dimensional image is obtained, 24 skeleton points on the image are extracted by respectively using an ASM algorithm, finally, the 24 skeleton points calculated on the front and back images are respectively mapped to a three-dimensional coordinate space, each skeleton has a front space point and a rear space point, and a point in the middle position on a connecting line of the two space points is taken as a final skeleton point, wherein the formula is as follows:
P=0.5*(Pb+Pf)
wherein, Pb、PfRespectively the coordinates of two spatial points.
After obtaining coordinates of human skeleton points, calculating human body key information by combining the skeleton points, solving a posture parameter beta and a posture parameter pos of a standard model human linear skeleton Skin Model (SMPL) according to the key information, and finally obtaining a standard three-dimensional model of the original three-dimensional model after SMPL deformation according to a deformation parameter; the model contains a fixed number of vertices and a number of facets.
As shown in fig. 6, calculating SMPL deformation parameters from the coordinates of the bone points and the preprocessed three-dimensional model includes the following steps:
s41: acquiring 1 point of the head top position, 2 points of the left hand tip and the right hand tip and 2 points of the left foot and the right foot of a human body through the coordinates of the skeleton points, designing an energy function E1 on the basis of posture parameters of postures of the feet and the shoulders in the SMPL standard model, stretching the hands and standing vertically, and solving posture parameters of SMPL deformation parameters according to the energy function E1;
the energy function E1 is shown below:
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 of the head top position, 2 points of the left hand tip and the right hand tip and 2 points of the left foot and the right foot of a human body through the coordinates of the skeleton points, designing an energy function E2 on the basis of posture parameters of postures that the two feet and the shoulders are as wide as each other, the two hands are extended and the human body stands vertically in the SMPL standard model, and optimizing the posture parameters according to the energy function E2 to obtain the posture parameters of the standard model;
the energy function E2 is shown below:
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))
shape _ prior (beta) is a Shape prior distribution corresponding to body type parameters, Pose _ prior (spots) is a Shape prior distribution corresponding to posture parameters, Head _ t, Hand _ t _ l, Hand _ t _ r, Foot _ t _ l and Foot _ t _ r are coordinates of the Head, the left Hand, the right Hand, the left Foot and the right Foot in the SMPL standard model respectively, Head, Hand _ l, Hand _ r, Foot _ l and Foot _ r are coordinates of the Head, the left Hand, the right Hand, the left Foot and the 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 includes a fixed number of vertices and a fixed number of facets, and can be conveniently measured, but in order to obtain a more accurate measurement result, the standard three-dimensional model needs to be modified in detail, and the modification method includes: and (3) using non-rigid registration, locally deforming the standard model by taking the original model as a reference, and enabling the surface details of the 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 modified standard three-dimensional model includes:
s51: calculating a rotation matrix R and a translation matrix T by using a least square method according to 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, and performing rotation and translation on the standard three-dimensional model after SMPL deformation to be initially aligned with the preprocessed three-dimensional model;
s52: and stretching the standard three-dimensional model after SMPL deformation by using a non-rigid iterative closest point algorithm, and matching the stretched 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, the three-dimensional model of the human body, the standard three-dimensional model after SMPL deformation, and the corrected standard three-dimensional model are respectively schematic diagrams.
In an 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 a number of patches (13776), it is possible to define measurement key points and a size extraction rule in advance, for example, to define the total length of a curve after B-spline (B-spline Curves) curve fitting is performed on 102 vertices such as 1705 th and 4290 th vertices in space, and to define a BP distance as a distance between a spatial point on the 6678 th patch where u is 0.2 and v is 0.6 and a spatial point on the 11894 th patch where u is 0.54 and v is 0.07, the present invention also includes a measurement template definition function, and can define a measurement site and a measurement method.
As shown in fig. 11, the method of the present invention further comprises:
s6: and predefining a size extraction rule, and extracting the size of the corrected standard three-dimensional model by using the size extraction rule to obtain size information.
In an embodiment of the invention, a size extraction rule is first defined, and in this example, a measurement location definition interaction tool is designed to help define the measurement rule. 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) selecting key points: chest point, axillary point, crotch point, etc. The software automatically records patch IDs and vertex IDs by displaying the human body model, manually selecting the positions of relevant points 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 by using a straight line mode during calculation.
(3) And (3) curve measurement: such as shoulder width, back length, etc., the sum of the distances of all points on a curve is calculated. Manually using a mouse to mark points (a minimum of 5) on the curve on the model, the software automatically uses a B-spline fitting algorithm to obtain curve information, and saves the curve information and the points on the curve in the model.
(4) And (3) measuring the circumference: such as waist, chest, hip, arm, 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 above definition process and the measurement process are separated, and the measurement can be performed after one definition, and if (1) is not changed, the definition is not needed again. And during measurement, a measurement rule file is directly loaded, and the corresponding human body size is directly calculated according to the defined measurement type.
The method can be applied to the clothing customization industry, after a customer scans a whole body model in a store, the size information is extracted by the method, and clothing manufacturers customize clothes suitable for the user according to the size. Compared with the existing method, the method has better measurement results for obese people (because the adhesion of the obese people model under the oxter crotch is more serious); and the measurement can be carried out on the customers wearing clothes and skirts, and the existing algorithm needs the customers to tightly wear the clothes or naked bodies for model acquisition.
As shown in fig. 12, 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 system comprises a three-dimensional model acquisition module, a three-dimensional model generation module, a three-dimensional model storage module and a three-dimensional model preprocessing module, wherein the three-dimensional model acquisition module is used for acquiring an original three-dimensional model;
a third unit: extracting coordinates of bone points of the preprocessed three-dimensional model;
a fourth unit: the system comprises a framework point processing module, a preprocessing module, a three-dimensional model processing module and a processing module, wherein the framework point processing module is used for processing a skeleton point of a human body, and the preprocessing module is used for processing a three-dimensional model of the human body;
a fifth unit: and the SMPL processing module is used for carrying out non-rigid registration on the standard three-dimensional model after 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 size measurement.
An embodiment of the present application further provides a control apparatus, including a processor and a storage medium for storing a computer program; wherein a processor is adapted to perform at least the method as described above when executing the computer program.
Embodiments of the present application also provide a storage medium for storing a computer program, which when executed performs at least the method described above.
Embodiments of the present application further provide a processor, where the processor executes a computer program to perform at least the method 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), an erasable Programmable Read-Only Memory (EPROM), an electrically erasable Programmable Read-Only Memory (EEPROM), a magnetic random access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical Disc, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. The volatile Memory may be a Random Access Memory (RAM) which serves as an external cache. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic random access Memory (DDRSDRAM, Double Data Rate Synchronous random access Memory), Enhanced Synchronous Dynamic random access Memory (ESDRAM, Enhanced Synchronous Dynamic random access Memory), Synchronous link Dynamic random access Memory (SLDRAM, Synchronous Dynamic random access Memory), Direct Memory bus (DRmb random access Memory). The storage media described in connection with the embodiments of the invention are intended to comprise, without being limited to, these and any other suitable types of memory.
In the several embodiments provided in the present application, it should be understood that the disclosed system and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, 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.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media capable of storing program codes, such as a removable Memory device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, and an optical disk.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several 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 methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
The methods disclosed in the several method embodiments provided in the present application may be combined arbitrarily without conflict to obtain new method embodiments.
Features disclosed in several of the product embodiments provided in the present application may be combined in any combination to yield new product embodiments without conflict.
The features disclosed in the several method or apparatus embodiments provided in the present application may be combined arbitrarily, without conflict, to arrive at new method embodiments or apparatus embodiments.
The foregoing is a more detailed description of the invention in connection with specific preferred embodiments and it is not intended that the invention be limited to these specific details. For those skilled in the art to which the invention pertains, several equivalent substitutions or obvious modifications can be made without departing from the spirit of the invention, and all the properties or uses are considered to be within the scope of the invention.
Claims (10)
1. A three-dimensional human body size measuring method is characterized by comprising the following steps:
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 skeleton Skin Model (SMPL) according to the coordinates of the skeleton 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 performing non-rigid registration on the standard three-dimensional model after 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 size measurement.
2. The three-dimensional human body dimension measuring method of claim 1, wherein extracting coordinates of three-dimensional bone points of the preprocessed three-dimensional model comprises the steps of:
s21: respectively projecting the front side and the back side of the preprocessed three-dimensional model to obtain two-dimensional images;
s22: respectively extracting 24 skeleton points on the two-dimensional image by using an active shape model algorithm, mapping the 24 skeleton points back to the preprocessed three-dimensional model, wherein each skeleton point corresponds to two space points, and taking the mean value coordinate of the space points as the coordinate of the final skeleton point.
3. The method of claim 2, wherein the step of projecting the front and back 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: and respectively arranging virtual cameras right in front of and right behind the preprocessed three-dimensional model to project the preprocessed three-dimensional model into a two-dimensional space, and simultaneously obtaining the vertex mapping of the preprocessed three-dimensional model to obtain the two-dimensional image.
4. The three-dimensional human body dimension measuring method of claim 3, wherein the internal parameters of the virtual camera are obtained according to the following formula:
cx=0.5*W
cy=0.5*H
wherein cx and cy are main point coordinates, fx and fy are focal lengths of the virtual camera, W, H are the width and height of an image shot by the virtual camera respectively, and X, Y is the width and height of an irradiation range of the virtual camera respectively;
determining a coordinate position (u, v) of a vertex of the preprocessed three-dimensional model in the two-dimensional image according to the internal parameters of the virtual camera:
5. the three-dimensional human body dimension measuring method of claim 4, wherein calculating SMPL deformation parameters from the coordinates of the skeletal points and the preprocessed three-dimensional model comprises the steps of:
s41: acquiring 1 point of the head top position, 2 points of the left hand tip and the right hand tip and 2 points of the left foot and the right foot of a human body through the coordinates of the skeleton points, designing an energy function E1 on the basis of posture parameters of postures of the feet and the shoulders in the SMPL standard model, stretching the hands and standing vertically, and solving posture parameters of SMPL deformation parameters according to the energy function E1;
the energy function E1 is shown below:
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 of the head top position, 2 points of the left hand tip and the right hand tip and 2 points of the left foot and the right foot of a human body through the coordinates of the skeleton points, designing an energy function E2 on the basis of posture parameters of postures that the two feet and the shoulders are as wide as each other, the two hands are extended and the human body stands vertically in the SMPL standard model, and optimizing the posture parameters according to the energy function E2 to obtain the posture parameters of the standard model;
the energy function E2 is shown below:
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))
shape _ prior (beta) is a Shape prior distribution corresponding to body type parameters, Pose _ prior (spots) is a Shape prior distribution corresponding to posture parameters, Head _ t, Hand _ t _ l, Hand _ t _ r, Foot _ t _ l and Foot _ t _ r are coordinates of the Head, the left Hand, the right Hand, the left Foot and the right Foot in the SMPL standard model respectively, Head, Hand _ l, Hand _ r, Foot _ l and Foot _ r are coordinates of the Head, the left Hand, the right Hand, the left Foot and the right Foot of a human body respectively, and w1, w2, w3 and w4 are weight parameters respectively.
6. The method of claim 5, wherein the non-rigid registration of the SMPL deformed standard three-dimensional model based on the preprocessed three-dimensional model to obtain a modified standard three-dimensional model comprises:
s51: calculating a rotation matrix R and a translation matrix T by using a least square method according to 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, and performing rotation and translation on the standard three-dimensional model after SMPL deformation to be initially aligned with the preprocessed three-dimensional model;
s52: and stretching the standard three-dimensional model after SMPL deformation by using a non-rigid iterative closest point algorithm, and matching the stretched standard three-dimensional model with the preprocessed three-dimensional model to obtain the corrected standard three-dimensional model.
7. The method of claim 6, wherein obtaining the original three-dimensional model of the body under test comprises:
acquiring an original three-dimensional model of a human body to be detected in a posture that the width of both feet and shoulders is the same, the both hands are extended and the human body stands vertically;
the original three-dimensional model includes vertex information and tile information.
8. The three-dimensional human body dimension measuring method of any one of claims 1-7, further comprising:
s6: and predefining a size extraction rule, and extracting the size of the corrected standard three-dimensional model by using the size extraction rule to obtain size information.
9. A three-dimensional 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 system comprises a three-dimensional model acquisition module, a three-dimensional model generation module, a three-dimensional model storage module and a three-dimensional model preprocessing module, wherein the three-dimensional model acquisition module is used for acquiring an original three-dimensional model;
a third unit: extracting coordinates of bone points of the preprocessed three-dimensional model;
a fourth unit: the system comprises a framework point processing module, a preprocessing module, a three-dimensional model processing module and a processing module, wherein the framework point processing module is used for processing a skeleton point of a human body, and the preprocessing module is used for processing a three-dimensional model of the human body;
a fifth unit: and the SMPL processing module is used for carrying out non-rigid registration on the standard three-dimensional model after 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 size measurement.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111473622.2A CN114140515A (en) | 2021-11-29 | 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 CN114140515A (en) | 2021-11-29 | 2021-11-29 | Three-dimensional human body dimension measuring method, system and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114140515A true CN114140515A (en) | 2022-03-04 |
Family
ID=80383808
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111473622.2A Pending CN114140515A (en) | 2021-11-29 | 2021-11-29 | Three-dimensional human body dimension measuring method, system and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114140515A (en) |
-
2021
- 2021-11-29 CN CN202111473622.2A patent/CN114140515A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107111833B (en) | Fast 3D model adaptation and anthropometry | |
US10460517B2 (en) | Mobile device human body scanning and 3D model creation and analysis | |
CN106780619B (en) | Human body size measuring method based on Kinect depth camera | |
CN107292948B (en) | Human body modeling method and device and electronic equipment | |
Corazza et al. | A markerless motion capture system to study musculoskeletal biomechanics: visual hull and simulated annealing approach | |
Chi et al. | Body scanning of dynamic posture | |
DK2686834T3 (en) | IMPROVED VIRTUAL TEST ON SIMULATION DEVICE | |
CN108475439B (en) | Three-dimensional model generation system, three-dimensional model generation method, and recording medium | |
US10813715B1 (en) | Single image mobile device human body scanning and 3D model creation and analysis | |
US9715759B2 (en) | Reference object for three-dimensional modeling | |
CN110503681B (en) | Human body model automatic creation method and three-dimensional fitting system | |
Zhou et al. | Anthropometric body modeling based on orthogonal-view images | |
CN109064386A (en) | A kind of method for building up of 3 D stereo garment form | |
Clarkson et al. | Calculating body segment inertia parameters from a single rapid scan using the microsoft kinect | |
CN106933976B (en) | Method for establishing human body 3D net model and application thereof in 3D fitting | |
KR20150011907A (en) | Apparatus and Method for generating user's three dimensional body model based on depth information | |
KR101499699B1 (en) | Apparatus and Method for generating user's three dimensional body model based on depth information | |
EP3801201A1 (en) | Measuring surface distances on human bodies | |
CN109740458B (en) | Method and system for measuring physical characteristics based on video processing | |
CN114745985A (en) | Bra sizing optimization from 3D shape of breast | |
CN114140515A (en) | Three-dimensional human body dimension measuring method, system and computer readable storage medium | |
Seo et al. | A breast modeler based on analysis of breast scans | |
CN107901424A (en) | A kind of Image Acquisition modeling | |
Mundermann et al. | Conditions that influence the accuracy of anthropometric parameter estimation for human body segments using shape-from-silhouette | |
Lin et al. | Automatic feature extraction from front and side images |
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 | ||
TA01 | Transfer of patent application right | ||
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. |