The content of the invention
The technical problem to be solved in the present invention is:Prior art is difficult to obtain accurate human body in the case where human body wears the clothes pattern
The problem that the net models of 3D are fitted in order to 3D, proposes a kind of method for setting up the net models of human body 3D and its answering in 3D fittings
With.
The present invention proposes a kind of method for setting up the net models of human body 3D, comprises the following steps:
S1:Set up and contain height, body weight, the net model databases of human body 3D of gender information;
S2:Depth image of the collection current human under clothing situation;
S3:Obtain height, body weight and the gender information of current human;
S4:From the net model databases of human body 3D extract and sex identical close with current human's height and body weight to
A few net model of human body 3D is used as the net model of sample;
S5:The net model of current human is obtained according to the net model of sample.
Preferably, the net models of human body 3D are comprising height, body weight, the net model of the 3D point cloud of gender information in the step S1
Or the one kind in the net model of 3D grids.
Preferably, the depth image in the step S2 refers to that the local depth image of current human or human body are global
Depth image.
Preferably, the net model for obtaining current human according to the net model of sample in the step S5 is referred to:When the sample
In this net model during the net model of only one human body 3D, using the net models of human body 3D as the net models of the 3D of current human.
Preferably, the net model for obtaining current human according to the net model of sample in the step S5 is referred to:When the sample
When the net models of human body 3D in this net model have two or more, using the averaging model of the net model of the sample as current
The net model of human body, or the accurate net models of human body 3D can be obtained by the algorithm of machine learning.
Preferably, it is when the quantity of the net models of human body 3D in the net model of the sample is 2-10, the sample is net
The averaging model of model as current human net model.
Preferably, when the quantity of the net models of human body 3D in the net model of the sample is more than 10, can be by machine
The algorithm of study obtains the accurate net models of human body 3D, and specific step is:
S51:One in the net model of sample is chosen as the net model of standard;
S52:Other models in the net model of sample obtain deformation relationship through machine learning;
S53:With current human's depth image as foundation, the net model of standard is obtained according to deformation relationship after deformation
The net models of 3D of current human.
Preferably, the deformation relationship in the step S52 includes the deformation relationship determined by posture and/or is determined by build
Deformation relationship.
Preferably, the net model of standard is obtained into the net of current human according to deformation relationship after deformation in the step S53
Model, specifically comprises the following steps:
S531:Set up the energy function for the net model of criterion and current human's model depth image uniformity;
S532:Non-rigid deformation is carried out to the net model of the standard under the constraint of the energy function;
S533:Using through the net model of the standard after non-rigid deformation as the net models of the 3D of current human.
Based on the above-mentioned method for setting up the net models of human body 3D, the present invention also propose it is a kind of set up the net models of human body 3D be
System, including memory, for depositing program;Processor, runs described program, and the net models of human body 3D are set up for control is described
System perform the above-mentioned method for setting up the net models of human body 3D.
The present invention proposes a kind of computer-readable recording medium comprising computer program again, and the computer program can be grasped
Make to make computer perform the above-mentioned method for setting up the net models of human body 3D.
Based on the above-mentioned method for setting up the net models of human body 3D, the present invention also proposes a kind of 3D fitting methods, including following step
Suddenly:
T1:The human body net models of 3D are created according to the above-mentioned method for setting up the net models of human body 3D;
T2:Create clothing model;
T3:Clothes effect will be shown after clothing model and the net model synthesis of human body 3D.
Based on the above-mentioned method for setting up the net models of human body 3D, the present invention also proposes a kind of 3D dressing systems, including memory,
For depositing program;Processor, runs described program, for controlling the 3D dressing systems to perform above-mentioned 3D fitting methods.
The present invention proposes a kind of computer-readable recording medium comprising computer program again, and the computer program can be grasped
Make to make computer perform above-mentioned 3D fitting methods.
Compared with prior art, beneficial effects of the present invention are:The invention provides a kind of human body 3D net models set up
Method, by setting up the net model databases of human body 3D, and considers the influence of height, body weight and sex, targetedly carries
This net model is sampled, the influence of clothes and the shadow of the local feature brought by height, body weight and sex etc. can be simultaneously removed
Ring, the net model of human body can be exactly obtained merely with depth image of the human body under clothing situation.
In addition, the creation method based on the above-mentioned net models of human body 3D, of the invention also to propose a kind of 3D fitting methods and 3D examinations
Clothing system, no matter human body wears loose clothing or compact clothing, using 3D fitting methods of the invention or system, can be real
When and 360 ° show the effect worn the clothes.
Specific embodiment
The premise of parametric modeling method is to measure the accurate model of human body, however as people to the note of individual privacy
Weight, it is desirable to which user measures the selection of simultaneously non-optimal under nearly nude state.Therefore in the case where people wear the clothes situation, by wearing
Clothing model carries out clothing and calculates, and obtains the accurate net models of human body 3D, further carries out 3D fittings and would is that one is preferably selected
Select.With reference to specific embodiment and compare accompanying drawing the present invention is described in further details.
1st, the method for setting up the net models of human body 3D
The method for setting up the net models of human body 3D, as shown in figure 1, including following steps:S1:Set up the net models of human body 3D
Database;S2:Depth image of the collection current human under clothing situation;S3:Obtain height, body weight and the sex of current human
Information;S4:The net model of sample is chosen from the net model databases of human body 3D;S5:Obtain current human's according to the net model of sample
Net model.Wherein, set up the net model databases of human body 3D in step S1, but including obtain human body 3D point cloud or the net model of grid,
The steps such as height measurement, measured body weight and sex acquisition;Height, body weight and the sex letter of current human are obtained in step S3
Breath, including height measurement, measured body weight and sex such as obtain at the step;Chosen from the net model databases of human body 3D in step S4
The net model of sample, refers to choose that height, body weight be close and sex identical from the net model databases of human body 3D set up
Model is used as the net model of sample.Above-mentioned steps will be described in detail below.
S1:Set up the net model databases of human body 3D
It is the premise for obtaining human parameters model to set up human body 3D model databases, and the species of model also can in database
Have influence on the quality of final argument model.
The quantity of net model is as more as possible in model database, data will as far as possible comprehensively, not only comprising Human Height,
Body weight, gender information, the also human body model data comprising same human body under different gestures, multiple different human bodies are in close posture
Under human body model data, multiple heights, body weight be close and sex identical different human body model data, is respectively intended to react people
Difference of the body under different gestures, difference of difference and different human body of the different human body on build in local detail feature
It is different.
Set up the net model databases of human body 3D, each net model to not obtain under clothing or tight situation, institute
Say not clothing refer to the situation for only wearing underwear.The foundation of database is to calculate preparation in order to follow-up model of wearing the clothes carries out clothing
's.
In this embodiment, net models of 3D in database except the net model of 3D point cloud or grid of itself it
Outward, also including height, body weight and gender information.Thus, setting up net model database mainly includes the net model measurements of human body 3D, body
High measurement, measured body weight and the several aspects of gender identity.
The net model measurement methods of human body 3D
The method measured currently used for 3D is roughly divided into the method based on laser scanner and based on depth camera.Laser
The high precision of scanner, but involve great expense, the speed of scanning is also relatively slow, is mainly used in surveying the 3D of some small-sized rigid objects
Amount;Method based on depth camera is human body measurement method conventional at present, preferential in this specific embodiment to choose based on deep
The method for spending camera, further chooses and is based on the trigon depth camera of structure light, for the survey of the net models of human body 3D
Amount.
In other specific embodiments can using being based on laser scanner, or using based on time flight method or
The depth camera of Binocular Vision Principle carrys out the measurement for the net models of human body 3D.
Based on the trigon depth camera of structure light using laser-projector to projecting encoded normal structure in space
Light pattern, the difference of target depth is modulated normal structure light pattern in space, is obtained by image correlation scheduling algorithm
Structure light image and the difference of normal structure light pattern after modulation, the difference and target depth are set up according to structure light trigonometry
Between relation can solve the depth image of whole object space.
Usually, it is difficult to whole human body informations are obtained by piece image, it is necessary to obtain the depth at each position of human body
Degree image, then overall human body 3D point cloud data are obtained after being merged by registration algorithm.The 3D points obtained by depth camera
Cloud data typically can not be directly as human body model data, in addition it is also necessary to the step of being pre-processed by some.Usually, including figure
As segmentation, denoising, gridding, set up the steps such as corresponding relation.
Image segmentation.It is general in the depth image that thus depth camera is obtained also to be carried on the back including other in addition to human body parts
Scape composition, the step of being necessitated using image segmentation algorithm removal background.Due to the uniqueness of depth image data, i.e., its is each
A kind of depth distance of the object that pixel value is represented, simple image segmentation algorithm --- threshold method just can effectively remove the back of the body
Scape.Specifically, i.e., the threshold value of human body and background can be reasonably differentiated by setting, the pixel value that will belong to background parts is returned
Zero (or taking maximum), reservation belongs to the pixel value of human body.
Image denoising.Because the 3D point cloud data for obtaining are inevitable that noise (i.e. outlier) is present, while by
Blocking between human body occurs hole, and the flatness of cloud data is also poor in addition.Therefore, the purpose of image denoising
On the one hand outlier is removed, the treatment of smooth and holes filling is on the other hand carried out to cloud data.
Gridding.In specific application, such as deformation transfer, cartoon making of model etc., only for the treatment of a cloud
It is complex, thus correlation between points do not reflected in 3D point cloud.And 3D network models are then retaining
Topological relation between a cloud is increased again while point cloud, and particularly in deformation process, 3D network models have larger excellent
Gesture.Therefore, it is necessary to 3D point cloud model meshes are melted into 3D grid models.The form of grid can be triangle, polygon etc.,
Conventional is triangle grid model.
Set up corresponding relation.The build and posture of different people are all otherwise varied, therefore the 3D point cloud obtained by depth camera
Also had any different on data bulk, bigger difficulty is had in the treatment below.It is necessary when database is set up just to all
Manikin set up corresponding relation.Specifically, width quality 3D point cloud data higher are first chosen as reference.For current
The net models of human body 3D, using rigid registration or non-rigid registration algorithm, set up correspondence pass between points therebetween
System, and the corresponding relation is also served as a part for the net models of current human 3D.
Body weight is measured
The body weight of each human body is measured using doctor's type scale, obtains body weight.
Height is measured
In this embodiment, height measurement uses accurate way.3D human body data clouds are entered first
Row skeletal extraction, or by 3D human body segmentations into multiple semantic components (head, upper body, leg), then by the length phase of various pieces
Plus after obtain the height of human body.
In other specific embodiments, it is possible to use traditional dimensional measurement mode carries out height measurement, it is also possible to straight
Connect using 3D human bodies point cloud or grid data to measure height.It should be noted that when human body is in different gestures, it is impossible to one
In general Stature estimation is carried out using the peak in point cloud or grid data and the difference of minimum point.
Sex is obtained
In this embodiment, sex is obtained and uses a kind of method of automatic identification.I.e. using the coloured silk of manikin
Color image, extracts the coloured image of face, is inputted in housebroken gender sorter and is judged.According to grader
Species, processing mode is also had any different, and usually the coloured image first to face carries out principal component analysis (PCA), can be lifted
Recognition efficiency.
In other specific embodiments, under artificial auxiliary situation, artificial setting can be carried out.
On the one hand the net models of human body 3D will will cover height as much as possible, body weight as far as possible comprehensively in model database
And the net model of human body of sex;Another aspect height, body weight are close, and sex identical human body will also have enough human body 3D
Net model data.The former purpose is that can more comprehensively reflect difference of the human body on different gestures, build, the mesh of the latter
Be that can more accurately reflect difference of the human body in local detail feature.
S2:Depth image of the collection current human under clothing situation
Usually, when 3D fittings are carried out to current human, it is necessary first to obtain its net model, there is two hypothesis herein
Premise:One be current human not in the net model databases of 3D, otherwise can directly extract the net model;Two is to work as
Preceding human body usually clothing in the case of fitted, that is to say, that by depth camera obtain the corresponding people of depth image
Body Model includes the influence of clothes, and model model neter than human body 3D is big, is then obtained only according to model of wearing the clothes in the present invention
Model.
Current human collects depth image under situation of wearing the clothes by depth camera, is obtained only after image segmentation and denoising
Depth image containing human body.Here depth image can be the depth image of body local or the overall situation, for global depth
Degree image is often to be merged to form after registration by multi-amplitude deepness image.
S3:Obtain height, body weight and the gender information of current human
The body weight of human body, sex and height information can be obtained using foregoing method.
S4:The net model of sample is chosen from the net model databases of human body 3D
After the depth image and relevant information for obtaining current human, then can be from the net pattern numbers of human body 3D set up
According in storehouse choose height, body weight is close and sex identical model is used as the net model of sample.The quantity of the net model of sample is at least
It is 1.When sample size is for multiple, then can well reflect the local feature difference of the height, body weight, sex population,
The more accurate net models of human body 3D can be obtained in follow-up treatment.S5:The net of current human is obtained according to the net model of sample
Model
Quantity according to the net model of sample is different, and the acquisition modes of the net models of current human 3D are also had any different.
(1) when the net model of sample only has one, can directly using the net model as the net models of the 3D of current human.By
It is consistent in height, body weight, sex, it is this approximately to be received in the case of only one sample net model.
(2) when the net model negligible amounts of sample, when being 2-10, the average value of all net models can be taken as working as forefathers
The net models of 3D of body.The processing mode of this equalization, although the actual physical characteristic of current human can not be accurately reflected, but
For compared to the first situation, degree of approximation is higher.
(3) when the net model quantity of sample is more, when being more than 10, then can be obtained accurately by means of machine learning algorithm
The net models of human body 3D.Specific algorithm flow is as shown in Fig. 2 comprise the following steps:
S51:One in the net model of sample is chosen as the net model of standard, general selected point cloud or the good people of mesh quality
The net models of body 3D are used as the net model of standard;
S52:Other net models in the net model of sample obtain deformation relationship through machine learning.Here deformation relationship
The deformation relationship determined including the deformation relationship determined by posture and by build.Generally, the change for being determined by posture
Shape relation, is that, for other all net models in the net model of sample, can allow the net model of standard according to other net models
Pose parameter through the deformation relationship calculate after obtain the net model consistent with other net models.For the deformation determined by build
Relation, is that, for other all net models in the net model of sample, can allow the net model of standard according to other net models
Shape parameter obtains the net model consistent with other net models after being calculated through the deformation relationship.The target of machine learning is to pass through
All net model in the net model of sample is learnt, gesture distortion relation and build deformation relationship is obtained.
S53:With current human's depth image as foundation, the net model of standard is obtained according to deformation relationship after deformation
The net model of current human.Specifically, as shown in figure 3, comprising the following steps:
S531:Set up the energy function for the net model of criterion and current human's model depth image uniformity.Energy
Flow function generally comprises similarity function, the smoothness function of model and the local feature function represented with distance.
S532:Non-rigid deformation is carried out to the net model of the standard under the constraint of the energy function.It is real in this step
It is setting pose parameter, the initial value of shape parameter, by the change obtained in S52 steps under the constraint of energy function in matter
Shape relation is iterated deformation, and when energy function reaches default optimum value (typically taking minimum value) i.e., deformation terminates.Here
Deformed finger be non-rigid deformation.
S533:Using through the net model of the standard after non-rigid deformation as current human net model.By the mark after deformation
Accurate net model can extremely accurate partially or fully depth image is consistent with current human, thus can be as current human
Net model.
2nd, the system for setting up the net models of human body 3D
In this embodiment, the system for setting up the net models of human body 3D, including memory, for depositing program;Place
Reason device, runs described program, and for controlling, the system execution for setting up the net models of human body 3D is above-mentioned to set up the net moulds of human body 3D
The method of type.
In other specific embodiments, the system for setting up the net models of human body 3D can also be one kind comprising computer program
Computer-readable recording medium, the computer program is operable to make computer to perform the above-mentioned net models of human body 3D of setting up
Method.
3rd, application of the net models of human body 3D in 3D fittings
3D fitting methods, as shown in figure 4, comprising the following steps:T1:Create the human body net models of 3D;T2:Create clothing mould
Type;T3:Clothes effect will be shown after clothing model and the net model synthesis of human body 3D.Usually, first to standard stance
Manikin is fitted, and this step can regard static fitting as;Secondly the real-time fitting when actual human body postural change,
Dynamic fitting can be regarded as.Wherein dynamic fitting is actually static fitting extension in time.It is thus next main
Illustrate static fitting.
The clothing simulation model of current comparative maturity is mass spring model, is needed clothing after setting up clothing simulation model
Thing is registered with the net models of human body 3D.It is generally acknowledged that after the peak at the clothing back side and human body neck center, accordingly can be with
Realize the preliminary registration of clothing and manikin;Then realize that the part of various pieces is matched somebody with somebody according to the current framework information of human body
It is accurate.After Registration, calculating, laundry hits detection of the power of particle etc. can also be carried out, it is more real to simulate
Clothing display effect.
During follow-up real-time shows, as long as the framework information by identifying human body, then according to the skeleton
Information carries out local registration and can realize real-time 3D fittings.
3rd, 3D dressing systems
In this embodiment, 3D dressing systems, including memory, for depositing program;Processor, operation is described
Program, for controlling the 3D dressing systems to perform above-mentioned 3D fitting methods.
In other specific embodiments, 3D dressing systems can also be a kind of computer-readable comprising computer program
Storage medium, the computer program is operable to make computer perform above-mentioned 3D fitting methods.
This specific embodiment provides a kind of creation method of the net models of human body 3D based on depth camera, passes through first
The net model databases of human body 3D containing height, body weight and gender information are set up, then collection current human is under clothing situation
Depth image, and obtain height, body weight and the gender information of current human, then extracted from the net model databases of human body 3D with
Current human's height, body weight are close, the net models of human body 3D of sex identical at least one as the net model of sample, finally further according to
The net model of sample obtains the net models of 3D of current human.This specific embodiment by setting up the net model databases of human body 3D, and
And the influence of consideration height, body weight and sex, the net model of sample is targetedly extracted, can simultaneously remove the influence of clothes
And the influence of the local feature brought by height, body weight and sex etc., depth that can be merely with human body under clothing situation
Image obtains the net models of 3D of human body exactly.
In addition, the creation method based on the above-mentioned net models of human body 3D, this specific embodiment also proposes a kind of 3D fitting sides
Method and 3D dressing systems, no matter human body wears loose clothing or compact clothing, uses the 3D fitting sides of this specific embodiment
Method or system, can in real time and 360 ° show the effect worn the clothes.
Above content is to combine specific preferred embodiment further description made for the present invention, it is impossible to assert
Specific implementation of the invention is confined to these explanations.For those skilled in the art, do not taking off
On the premise of present inventive concept, some equivalent substitutes or obvious modification can also be made, and performance or purposes are identical, all should
When being considered as belonging to protection scope of the present invention.