CN109801380A - A kind of method, apparatus of virtual fitting, storage medium and computer equipment - Google Patents

A kind of method, apparatus of virtual fitting, storage medium and computer equipment Download PDF

Info

Publication number
CN109801380A
CN109801380A CN201811536334.5A CN201811536334A CN109801380A CN 109801380 A CN109801380 A CN 109801380A CN 201811536334 A CN201811536334 A CN 201811536334A CN 109801380 A CN109801380 A CN 109801380A
Authority
CN
China
Prior art keywords
model
manikin
dimensional
user
face
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
Application number
CN201811536334.5A
Other languages
Chinese (zh)
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.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Priority to CN201811536334.5A priority Critical patent/CN109801380A/en
Publication of CN109801380A publication Critical patent/CN109801380A/en
Pending legal-status Critical Current

Links

Abstract

The present invention provides a kind of method, apparatus of virtual fitting, storage medium and computer equipments, wherein, this method comprises: obtaining the initial manikin of user and the facial image of user, and the face image synthesis is generated into the three-dimensional (3 D) manikin of user to the face of the initial manikin;Three-dimensional garment model needed for obtaining user, and the three-dimensional (3 D) manikin and the three-dimensional garment model are combined, model is tried in generation on;Try model described in displaying on.The effect that this method can be worn the clothes by trying model on analog subscriber reduces the gap of buyer's show and seller's show so that user can effectively judge the upper body effect of the clothes before buying clothes;Meanwhile the face in three-dimensional (3 D) manikin is the facial image of user itself, which can more embody the face characteristic of user itself, so that final, to try model on more accurate.

Description

A kind of method, apparatus of virtual fitting, storage medium and computer equipment
Technical field
The present invention relates to threedimensional model technical field, in particular to a kind of method, apparatus of virtual fitting, storage medium and Computer equipment.
Background technique
In today that internet is constantly universal, e-commerce rapidly develops, online clothing of purchasing is that many white collars and student mention Convenience is supplied.As user it should be understood that clothing effect when, the model that user can only provide with reference to businessman fits photo or video, or Person removes the photo that buyer is uploaded under comment;But model is the beautiful and charming personage of stature mostly, is not able to satisfy the people of various figures View result, and remove comment bottom band picture time and effort consuming.
There is the appearance of some online dressing systems both at home and abroad at present, certain applications program can provide fitting for user Photo model, user can check two-dimensional clothes effect.But the clothing show of plane and inadequate accurately clothes ruler It is very little, 3D clothes effect can not be restored completely, and the fitting mode is not still consistent with the stature ratio of user.
Summary of the invention
The present invention provides method, apparatus, storage medium and the computer equipment of a kind of virtual fitting, to solve existing net The poor defect of upper fitting bandwagon effect.
A kind of method of virtual fitting provided in an embodiment of the present invention, comprising:
Obtain the initial manikin of user and the facial image of user, and by the face image synthesis to described initial The face of manikin generates the three-dimensional (3 D) manikin of user;
Three-dimensional garment model needed for obtaining user, and the three-dimensional (3 D) manikin and the three-dimensional garment model are carried out In conjunction with model is tried in generation on;
Try model described in displaying on.
In one possible implementation, described by the face image synthesis to the face of the initial manikin Include:
At least three human face characteristic points in the facial image are extracted, and any three human face characteristic points are not conllinear;And really In the flat image of the fixed initial manikin face with the one-to-one standard feature point of the human face characteristic point;
Using human face characteristic point described in any two as one group, be grouped determine two human face characteristic points between feature to Amount, and determine the feature vector between corresponding two standard features point;
According to the feature vector between every group of two human face characteristic points and the feature between corresponding two standard features point Difference between vector determines each group of image change parameter respectively, described image running parameter include scaling running parameter and Rotationally-varying parameter;
It is determined according to all image change parameters and scales equal running parameter and rotate equal running parameter, and according to the contracting It puts equal running parameter and the equal running parameter of rotation zooms in and out processing and rotation processing to the facial image, after processing Face image synthesis to the initial manikin face.
In one possible implementation, described by the face image synthesis to the face of the initial manikin Include:
The edge pixel in the facial image is obtained, the edge pixel is the pixel of the facial image outermost;
Determine that the Pixel Information of the edge pixel, the Pixel Information include rgb value and/or gray value;
It is corrected in the initial manikin according to the Pixel Information of the edge pixel and is connected with the facial image Model part colouring information.
In one possible implementation, the Pixel Information of the determination edge pixel includes:
It determines pixel set corresponding with the edge pixel, and the pixel of all pixels in the pixel set is believed Pixel Information of the average value of breath as the edge pixel;The pixel set includes the path length apart from the edge pixel Degree is less than all pixels of preset length, and the path length is using the common edge between pixel as connection relationship, two pictures Minimum hop count between element.
In one possible implementation, described that the three-dimensional (3 D) manikin and the three-dimensional garment model are tied Conjunction includes:
The three-dimensional (3 D) manikin is divided into multiple 3 D human body submodels according to preset manikin divisional plane;Root The three-dimensional garment model is divided into multiple three-dimensional garment submodels according to preset dress form divisional plane;
The three-dimensional garment submodel of the 3 D human body submodel and corresponding position is combined respectively, and will The combination result group of the submodel, which is combined into, tries model on.
In one possible implementation, described respectively by the three-dimensional of the 3 D human body submodel and corresponding position Clothes submodel, which is combined, includes:
It is connected between two 3 D human body submodels in the multiple 3 D human body submodel with connection relationship Region be arranged human body link model, the human body link model be extended based on the manikin divisional plane, mark The threedimensional model of quasi- geometry;To have two three-dimensional garment submodules of connection relationship in the multiple three-dimensional garment submodel The region setting clothes link model being connected between type, the clothes link model is to be expanded based on the dress form divisional plane Threedimensional models that exhibition obtains, standard geometrical shapes;
The clothes link model of the human body link model and corresponding position is combined, generate submodel it Between join domain combination result;The 3 D human body submodel and the three-dimensional garment submodel of corresponding position are carried out In conjunction with the combination result of non-attached area between generation submodel;By the combination result and submodule of join domain between submodel The combination result of non-attached area generates the combination result of the three-dimensional (3 D) manikin and three-dimensional garment model between type.
In one possible implementation, after trying model on described in the displaying, this method further include:
The operational order for receiving user's input, performs corresponding processing simultaneously the model of trying on according to the operational order It shows that treated and tries model on;The operational order includes amplification instruction, diminution instructs, rotation instructs, in move It is one or more.
The present invention also provides a kind of devices of virtual fitting, comprising:
Module is obtained, for obtaining the initial manikin of user and the facial image of user, and by the facial image It is blended into the face of the initial manikin, generates the three-dimensional (3 D) manikin of user;
Processing module, for three-dimensional garment model needed for obtaining user, and to the three-dimensional (3 D) manikin and described three Dimension dress form is combined, and model is tried in generation on;
Display module described tries model on for showing.
The present invention also provides a kind of computer storage medium, the computer storage medium is stored with the executable finger of computer It enables, the method that the computer executable instructions are used to execute virtual fitting described in above-mentioned any one.
The present invention also provides a kind of computer equipments, comprising:
At least one processor;And
The memory being connect at least one described processor communication;Wherein,
The memory is stored with the instruction that can be executed by least one described processor, and described instruction is by described at least one A processor executes, so that the method that at least one described processor is able to carry out virtual fitting described in above-mentioned any one.
Method, apparatus, storage medium and the computer equipment of a kind of virtual fitting provided in an embodiment of the present invention, pass through use Family provide three-dimensional (3 D) manikin can be combined and generate with preset three-dimensional garment model and tries model on, tried on by this The effect that model can be worn the clothes with analog subscriber can make user that can effectively judge the upper body of the clothes before buying clothes Effect, reduces the gap of buyer's show and seller's show, and user can also select the clothes for being suitble to oneself in online shopping mall;Meanwhile Face in three-dimensional (3 D) manikin is the facial image of user itself, which can more embody the face of user itself Feature, so that final, to try model on more accurate.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification It obtains it is clear that understand through the implementation of the invention.The objectives and other advantages of the invention can be by written explanation Specifically noted structure is achieved and obtained in book, claims and attached drawing.
Below by drawings and examples, technical scheme of the present invention will be described in further detail.
Detailed description of the invention
Attached drawing is used to provide further understanding of the present invention, and constitutes part of specification, with reality of the invention It applies example to be used to explain the present invention together, not be construed as limiting the invention.In the accompanying drawings:
Fig. 1 is the method flow diagram of virtual fitting in the embodiment of the present invention;
Fig. 2 is in the embodiment of the present invention by the method flow diagram of the face of face image synthesis to initial manikin;
Fig. 3 is the schematic diagram of facial image in the embodiment of the present invention;
Fig. 4 is the method flow diagram being combined in the embodiment of the present invention to three-dimensional (3 D) manikin and three-dimensional garment model;
Fig. 5 is the structure drawing of device of virtual fitting in the embodiment of the present invention;
Fig. 6 is in the embodiment of the present invention for realizing the structure chart of the computer equipment of virtual fit method.
Specific embodiment
Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings, it should be understood that preferred reality described herein Apply example only for the purpose of illustrating and explaining the present invention and is not intended to limit the present invention.
A kind of method of virtual fitting provided in an embodiment of the present invention, it is shown in Figure 1, including step 101-103:
Step 101: obtaining the initial manikin of user and the facial image of user, and by face image synthesis to initial The face of manikin generates the three-dimensional (3 D) manikin of user.
In the embodiment of the present invention, initial manikin is used to describe the figure of user.It is used for specifically, can preset The model, such as facial model, human trunk model, arm models, hair style etc. for describing human part, according to the selected human body of user Component combination at the user initial manikin;Meanwhile user also can adjust size (such as the bust, waistline of partial model Deng) or ratio, so that the initial manikin being combined into is more in line with user itself.Alternatively, user provides the two dimension of multi-angle Photo simulates the threedimensional model of the user according to the 2-dimentional photo of multi-angle, i.e., initial manikin.Alternatively, with scanning Mode (such as infrared scan) obtains the three-dimensional data of human body, generates corresponding initial human body according to the three-dimensional data that scanning obtains Model.In addition, user can be reserved for the initial manikin of oneself, under after the initial manikin that first time determines oneself The model pre-saved is called directly when secondary needs are using initial manikin.
Facial image is the two-dimension human face image of user.Specifically, user can provide the human face photo of oneself, it is based on people Face identification technology, the human face photo that system is provided according to user can extract facial image therein.In the embodiment of the present invention, The facial image specifically can be the image of face's face, that is, not include hair etc..Getting facial image and initial people After body Model, face image synthesis can be generated required three-dimensional (3 D) manikin to the face of the initial manikin, with So that the face feature of the three-dimensional (3 D) manikin is more consistent with user.Wherein, since facial image is two dimensional image, and human body The facial model of model is threedimensional model, therefore is synthesized again after needing to be converted to facial image three-dimensional;It can be based at this time One facial image carries out simple synthesis processing, and it is mainly special user's face can also to be acquired based on the facial image of multi-angle The three-dimensional feature, such as bridge of the nose height etc. for levying point, so that the three-dimensional (3 D) manikin finally synthesized is more accurate.
Step 102: three-dimensional garment model needed for obtaining user, and three-dimensional (3 D) manikin and three-dimensional garment model are carried out In conjunction with model is tried in generation on.
In the embodiment of the present invention, three-dimensional garment model is pre-generated model, can be provided by businessman.A kind of clothes are corresponding One three-dimensional garment model, or the three-dimensional garment model of corresponding multiple and different sizes.For example, a kind of jacket can only setting one A three-dimensional garment model obtains the various sizes of three-dimensional garment model of such jacket by zooming in and out to three-dimensional garment model; Or every kind of size of such jacket is respectively provided with a three-dimensional garment model, the three-dimensional garment model of the latter can be more accurate.Specifically , various ways can be used and determine three-dimensional garment model.For example, can use modeling software generates three-dimensional garment model, or Three-dimensional garment model is designed based on characteristics of human body's two-dimensional sample plate, or three-dimensional modeling, this reality are carried out to clothes based on depth camera Example is applied not limit this.
After getting three-dimensional garment model, which can be combined with three-dimensional (3 D) manikin, i.e., Three-dimensional garment model is covered to the surface of the three-dimensional (3 D) manikin, the two tries mould in conjunction with generate the effect that can indicate to wear the clothes Type.
Step 103: model is tried in displaying on.
In the embodiment of the present invention, by showing that this tries model on, it can be convenient user and intuitively check effect of wearing the clothes.User It can check that this tries model on by the intelligent terminal (such as smart phone, tablet computer, personal computer etc.) used in oneself.
A kind of method of virtual fitting provided in an embodiment of the present invention, by user provide three-dimensional (3 D) manikin can be with Preset three-dimensional garment model, which is combined and generates, tries model on, tries the effect that model can be worn the clothes with analog subscriber on by this Fruit can make user that can effectively judge the upper body effect of the clothes before buying clothes, reduce buyer's show and seller Elegant gap, user can also select the clothes for being suitble to oneself in online shopping mall;Meanwhile the face in three-dimensional (3 D) manikin is to use The facial image at family itself, the three-dimensional (3 D) manikin can more embody the face characteristic of user itself, so that final tries model on It is more accurate.
On the basis of the above embodiments, it is gone back in step 101 " by face image synthesis to the face of initial manikin " Including carrying out pretreated process to facial image, so that the face of facial image and the initial manikin matches, In, the preprocessing process of facial image specifically includes:
Step A1: at least three human face characteristic points in facial image are extracted, and any three human face characteristic points are not conllinear;And Determine in the flat image of initial manikin face with the one-to-one standard feature point of human face characteristic point.
In the embodiment of the present invention, facial image is pre-processed by the human face characteristic point of extraction.Due to conllinear Three human face characteristic points have the identical feature in part (i.e. the direction of feature vector), in order to improve having for selected human face characteristic point Effect property, any three characteristic points are not conllinear in selected human face characteristic point in the present embodiment, so that special with least face Sign point most effectively characterizes the feature of user's face.Specifically, the human face characteristic point can be the characteristic point of predeterminated position, such as Central point, nose, lip intermediate point, corners of the mouth of right and left eyes etc..
Meanwhile mapping to the three-dimensional feature of initial manikin face on two-dimensional surface, so as to generate initial people The flat image of body Model face, flat image image similar and two-dimensional with facial image.It can from the flat image To extract the one-to-one standard feature point of human face characteristic point with facial image;For example, including face figure in human face characteristic point Left eye central point this characteristic point as in, then correspondingly, the standard feature point also includes the left eye central point in flat image. The flat image of facial image and face is characterized by human face characteristic point and standard feature point.
Step A2: using any two human face characteristic point as one group, it is grouped the feature determined between two human face characteristic points Vector, and determine the feature vector between corresponding two standard features point.
In the embodiment of the present invention, any two human face characteristic point produces a feature vector, and this feature vector can be with Indicate the distance between two human face characteristic points and direction;Correspondingly, a spy also can be generated between two standard feature points Levy vector.Due to being one-to-one relationship, the feature vector of old friend's face characteristic point between human face characteristic point and standard feature point Feature vector with standard feature point is also one-to-one relationship.Meanwhile it can determine between all two human face characteristic points Feature vector, can also be Partial Feature vector, but the Partial Feature vector needs to contain all people's face characteristic point, For example, each human face characteristic point is required to the starting point as some feature vector.
Step A3: according to the feature vector between every group of two human face characteristic points and between corresponding two standard features point Feature vector between difference determine that each group of image change parameter, image change parameter include scaling running parameter respectively With rotationally-varying parameter.
In the embodiment of the present invention, feature vector is for indicating the distance between two characteristic points and direction, therefore two features Difference between vector refers to the distance between two feature vectors difference and direction difference, which can pass through contracting Facial image is put to eliminate, direction difference is embodied as angle difference, i.e. angle between two feature vectors, therefore passes through rotation Direction difference can be eliminated by turning facial image.Therefore, it can be determined by the difference between two feature vectors for phenogram As the scaling running parameter and rotationally-varying parameter of variation.
Step A4: it is determined according to all image change parameters and scales equal running parameter and the equal running parameter of rotation, and root Processing and rotation processing are zoomed in and out to facial image according to scaling equal running parameter and rotating equal running parameter, it will treated people Face image is blended into the face of initial manikin.
In the embodiment of the present invention, a pair of of feature vector can determine a scaling running parameter and a rotationally-varying ginseng Number can determine one according to all scaling running parameters by the difference between two all feature vectors of image of statistics Mean value scales equal running parameter;Likewise, can determine the equal running parameter of rotation according to all rotationally-varying parameters.Its In, which can be arithmetic average, be also possible to geometrical mean, harmonic-mean etc., the present embodiment does not limit this It is fixed.It can more completely be embodied between facial image and flat image by scaling equal running parameter and the equal running parameter of rotation Difference;And then facial image is zoomed in and out at processing and rotation using the equal running parameter of the scaling and rotation equal running parameter Reason avoids that facial image is excessive, mistake so that treated facial image and the flat image of initial manikin face match Small or face has the problem of tilt angle.
On the basis of the above embodiments, shown in Figure 2, " by face image synthesis to initial people in above-mentioned steps 101 The face of body Model " specifically includes:
Step 1011: obtaining the edge pixel in facial image, edge pixel is the pixel of facial image outermost.
In the embodiment of the present invention, facial image is the image of face, containing facial contour, the picture of outermost at profile Element can be used as edge pixel.Specifically, in facial image, if exist in four sides of some pixel not with other pixels When adjacent side, illustrate that at least one side of the pixel is the edge of this facial image, then the pixel can be used as edge picture Element.Shown in Figure 3, Fig. 3 indicates a kind of rough schematic of facial image, and pixel A, B1, D1, C3, D5 etc. are edge picture Element
Step 1012: determining that the Pixel Information of edge pixel, Pixel Information include rgb value and/or gray value.
In the embodiment of the present invention, the Pixel Information includes the rgb value or gray value of pixel, which can indicate The colouring information or grayscale information of the pixel, correspondence can then embody face complexion in face, i.e. the Pixel Information of pixel can Characterize the colour of skin of the user.
Optionally, step 1012 " Pixel Information for determining edge pixel " specifically includes: determination is corresponding with edge pixel Pixel set, and using the average value of the Pixel Information of all pixels in pixel set as the Pixel Information of edge pixel;It should Pixel set includes all pixels of the path length apart from edge pixel less than preset length, and path length is between pixel Common edge as the minimum hop count between connection relationship, two pixels.
Wherein, each edge pixel corresponds to a pixel set, and the pixel in the pixel set is apart from the edge pixel Closer pixel, and include the edge pixel.Specifically, the pixel set includes the path length apart from the edge pixel Degree is less than all pixels of preset length.In the embodiment of the present invention, " path length " refers to making with the common edge between pixel For connection relationship, from the edge pixel to the minimum hop count of a certain pixel.As shown in figure 3, for edge pixel A, with itself Between path length be 0;The pixel that path length between A is 1 includes pixel B 1 and B2, i.e., has with pixel A public The pixel on side;The pixel that path length between pixel A is 2 includes pixel C1, C2, C3 (i.e. in addition to pixel A and pixel Other B1 and B2 adjacent pixels);The pixel that path length between A is 3 include pixel D1, D2, D3, D4, D5 (i.e. with picture Other plain C1, C2, C3 adjacent pixels), and so on.By the Pixel Informations of all pixels in the pixel set (such as RGB Value) Pixel Information of the average value as edge pixel A, abnormal pixel can be effectively removed, such as because shooting face The pixel of the exception such as shade or acne print when image so that the Pixel Information of edge pixel be more in line with user feature or The colour of skin.
Step 1013: the mould being connected in initial manikin with facial image is corrected according to the Pixel Information of edge pixel The colouring information of type part.
In the embodiment of the present invention, believed according to the color that the edge pixel of facial image can correct the initial manikin in part Breath, can specifically correct the colouring information with the initial manikin of facial image connected component.By correcting initial human mould The colouring information of type makes in the initial manikin close to the face of the position (such as neck etc.) of facial image and user The colour of skin is close, avoids color because of initial manikin and facial image color difference is larger causes threedimensional model is false to ask Topic.
Wherein, the mode that triangle gridding can be used in the initial manikin of stereochemical structure indicates that each triangle pair answers one A grid.Optionally, above-mentioned steps 1012 be can refer to determine a set of initial manikin grid, i.e. basis and grid The colouring information of other adjacent grids determines the colouring information of the grid.
On the basis of the above embodiments, shown in Figure 4, " to three-dimensional (3 D) manikin and three-dimensional garment mould in step 102 Type is combined " include:
Step 1021: three-dimensional (3 D) manikin is divided by multiple 3 D human body submodules according to preset manikin divisional plane Type;Three-dimensional garment model is divided into multiple three-dimensional garment submodels according to preset dress form divisional plane.
Step 1022: the three-dimensional garment submodel of 3 D human body submodel and corresponding position is combined respectively, and The combination result group of submodel is combined into and tries model on.
Clothes and manikin are divided into comparatively standard of comparison in the embodiment of the present invention by the characteristic based on clothes Model (such as cylinder model etc.), at this time can according to identical segmentation rule by three-dimensional (3 D) manikin and three-dimensional garment model into Row segmentation, such as upper body (or jacket), trunk (or upper trunk and lower trunk), left arm, right arm etc. can be divided into.It will divide Each section after cutting is combined processing respectively, so as to simplify the complexity of disposed of in its entirety.
Specifically, presetting manikin divisional plane for three-dimensional (3 D) manikin, the people's body Model divisional plane can be plane, It can be curved surface, the present embodiment does not limit this;For example, manikin divisional plane etc. is arranged between arm and trunk.Together Sample, dress form divisional plane is set for three-dimensional garment model, which can be plane, or bent Face;Due to typically containing suture when dress designing, dress form divisional plane can be generated based on the suture of clothes.
Simultaneously as being to have connected regions (for example trunk and left arm have contiguous area near left shoulder between each part Domain), each part can be combined according to sequencing at this time;For example, torso portion is first combined, further according to trunk and a left side Connected regions between arm (or right arm) are again combined other parts, so that finally combining resulting model truer.
In the embodiment of the present invention, the 3 D human body submodel and three-dimensional garment submodel that position matches are combined, than As the 3 D human body submodel of trunk position and the three-dimensional garment submodel of trunk position are combined.Two kinds of three-dimensional submodels (i.e. 3 D human body submodel with corresponding three-dimensional garment submodel) can specifically be realized when combining by collision detection algorithm, touch Hitting detection algorithm includes: bounding volume hierarchy method, apart from tracing, uniformly subdivision method etc..Wherein, bounding volume hierarchy method basic thought It is bigger with volume and the simple bounding box of geometrical property approximatively describes complicated geometric object, and then tree-shaped by constructing Hierarchical structure can increasingly approach the geometrical model of object, the geometrical property until almost obtaining object, to object When carrying out collision detection, friendship first is asked to bounding box, since the friendship for asking the double ratio of bounding box to seek object is simple, can quickly be arranged Except many disjoint objects, need to only further test for intersection be carried out to the part that bounding box is overlapped if intersection.Distance with Track method algorithm calculates the distance between they by finding and tracking the closest approach between two polyhedrons, be less than when distance or When equal to zero, the two is just collided.For uniformly subdivision method by uniformly subdivision at uniform unit, each object corresponds to one Or in multiple units, intersection survey only is carried out to the geometric object for occupying same cell or adjacent cells lattice when detection is collided Examination.
On the basis of the above embodiments, step 1022 is " respectively by the three-dimensional of 3 D human body submodel and corresponding position Clothes submodel is combined " it specifically includes:
Step B1: it is connected between two 3 D human body submodels in multiple 3 D human body submodels with connection relationship Connect region setting human body link model, human body link model be extended based on manikin divisional plane, standard geometry The threedimensional model of shape;It is connected between two three-dimensional garment submodels in multiple three-dimensional garment submodels with connection relationship Connect region setting clothes link model, clothes link model be extended based on dress form divisional plane, standard geometry The threedimensional model of shape.
Step B2: the clothes link model of human body link model and corresponding position is combined, generate submodel it Between join domain combination result;The three-dimensional garment submodel of 3 D human body submodel and corresponding position is combined, it is raw At the combination result of non-attached area between submodel;It will be non-between the combination result and submodel of join domain between submodel The combination result of join domain generates the combination result of three-dimensional (3 D) manikin and three-dimensional garment model.
In the embodiment of the present invention, between three-dimensional submodel (including 3 D human body submodel and three-dimensional garment submodel) The join domain of standard geometrical shapes is arranged in coupling part, by the threedimensional model that coupling part is equivalent to standard geometrical shapes (i.e. human body link model or clothes link model), can simplify the processing of three-dimensional submodel coupling part, to improve processing Efficiency.Wherein, which is specifically as follows cylinder, elliptical cylinder-shape etc..
On the basis of the above embodiments, after model is tried in displaying on, this method further include: receive the behaviour of user's input It instructs, model is tried on to trying model on and perform corresponding processing and show that treated according to operational order;Operational order packet Include amplification instruction, diminution instructs, rotation instructs, one or more in move.
In the embodiment of the present invention, when model is tried in displaying on, user can be input operation instruction, and be contracted to model is tried on It puts, rotate, user is facilitated to check the details for trying model on.
A kind of method of virtual fitting provided in an embodiment of the present invention, by user provide three-dimensional (3 D) manikin can be with Preset three-dimensional garment model, which is combined and generates, tries model on, tries the effect that model can be worn the clothes with analog subscriber on by this Fruit can make user that can effectively judge the upper body effect of the clothes before buying clothes, reduce buyer's show and seller Elegant gap, user can also select the clothes for being suitble to oneself in online shopping mall;Meanwhile the face in three-dimensional (3 D) manikin is to use The facial image at family itself, the three-dimensional (3 D) manikin can more embody the face characteristic of user itself, so that final tries model on It is more accurate.When being combined to initial manikin and facial image, facial image is zoomed in and out at processing and rotation Reason, so that treated facial image and the flat image of initial manikin face match;By correcting initial human mould The colouring information of type makes the initial manikin close with the colour of skin of user's face, avoid color because of initial manikin with Facial image color difference is larger to lead to the false problem of threedimensional model.After threedimensional model to be divided into the model of relative standard The link model for being handled, being arranged standard geometrical shapes again can simplify the complexity of disposed of in its entirety, improve treatment effeciency.
The method flow of virtual fitting is described in detail above, this method can also be realized by corresponding device, below The structure and function of the device is discussed in detail.
A kind of device of virtual fitting provided in an embodiment of the present invention, it is shown in Figure 5, comprising:
Module 51 is obtained, for obtaining the initial manikin of user and the facial image of user, and by the face figure Face as being blended into the initial manikin, generates the three-dimensional (3 D) manikin of user;
Processing module 52, for three-dimensional garment model needed for obtaining user, and to the three-dimensional (3 D) manikin and described Three-dimensional garment model is combined, and model is tried in generation on;
Display module 53 described tries model on for showing.
On the basis of the above embodiments, the acquisition module 51 includes:
Extraction unit, for extracting at least three human face characteristic points in the facial image, and any three face characteristics Point is not conllinear;And determine in the flat image of the initial manikin face with the one-to-one standard of the human face characteristic point Characteristic point;
Feature vector determination unit, for being grouped and determining two people using human face characteristic point described in any two as one group Feature vector between face characteristic point, and determine the feature vector between corresponding two standard features point;
Parameter determination unit, for according to feature vector and corresponding two standards between every group of two human face characteristic points The difference between feature vector between characteristic point determines each group of image change parameter, described image running parameter packet respectively Include scaling running parameter and rotationally-varying parameter;
Image processing unit, for determining that scaling equal running parameter and rotation changes according to all image change parameters Parameter, and according to the equal running parameter of the scaling and the equal running parameter of rotation to the facial image zoom in and out processing and Rotation processing, by the face of treated face image synthesis to the initial manikin.
On the basis of the above embodiments, the acquisition module 51 includes:
Acquiring unit, for obtaining the edge pixel in the facial image, the edge pixel is the facial image The pixel of outermost;
Amending unit, for determining that the Pixel Information of the edge pixel, the Pixel Information include rgb value and/or ash Angle value;The mould being connected in the initial manikin with the facial image is corrected according to the Pixel Information of the edge pixel The colouring information of type part.
On the basis of the above embodiments, the amending unit is used for: determining pixel corresponding with the edge pixel Set, and using the average value of the Pixel Information of all pixels in the pixel set as the Pixel Information of the edge pixel; The pixel set includes all pixels of the path length apart from the edge pixel less than preset length, the path length For using the common edge between pixel as the minimum hop count between connection relationship, two pixels.
On the basis of the above embodiments, the processing module 52 includes:
Cutting unit, for the three-dimensional (3 D) manikin to be divided into multiple three-dimensionals according to preset manikin divisional plane Human body submodel;The three-dimensional garment model is divided into multiple three-dimensional garment submodules according to preset dress form divisional plane Type;
Combining unit, for respectively by the three-dimensional garment submodel of the 3 D human body submodel and corresponding position It is combined, and the combination result group of the submodel is combined into and tries model on.
On the basis of the above embodiments, the combining unit includes:
Subelement is connected, for two 3 D human body to have connection relationship in the multiple 3 D human body submodel The region setting human body link model being connected between model, the human body link model is based on the manikin divisional plane Threedimensional models that extension obtains, standard geometrical shapes;To have the two of connection relationship in the multiple three-dimensional garment submodel The region setting clothes link model being connected between a three-dimensional garment submodel, the clothes link model is based on the clothes Threedimensional models that die-filling type divisional plane extends, standard geometrical shapes;
In conjunction with subelement, for the clothes link model of the human body link model and corresponding position to be tied It closes, generates the combination result of join domain between submodel;By described the three of the 3 D human body submodel and corresponding position Dimension clothes submodel is combined, and generates the combination result of non-attached area between submodel;By join domain between submodel Combination result and submodel between the combination result of non-attached area generate the three-dimensional (3 D) manikin and three-dimensional garment model Combination result.
On the basis of the above embodiments, after trying model on described in showing in the display module 53, which is also wrapped It includes:
Receiving module, for receive user input operational order, according to the operational order to it is described try on model into Row, which handles accordingly and shows that treated, tries model on;The operational order includes amplification instruction, diminution instructs, rotation refers to It enables, is in move one or more.
A kind of device of virtual fitting provided in an embodiment of the present invention, by user provide three-dimensional (3 D) manikin can be with Preset three-dimensional garment model, which is combined and generates, tries model on, tries the effect that model can be worn the clothes with analog subscriber on by this Fruit can make user that can effectively judge the upper body effect of the clothes before buying clothes, reduce buyer's show and seller Elegant gap, user can also select the clothes for being suitble to oneself in online shopping mall;Meanwhile the face in three-dimensional (3 D) manikin is to use The facial image at family itself, the three-dimensional (3 D) manikin can more embody the face characteristic of user itself, so that final tries model on It is more accurate.When being combined to initial manikin and facial image, facial image is zoomed in and out at processing and rotation Reason, so that treated facial image and the flat image of initial manikin face match;By correcting initial human mould The colouring information of type makes the initial manikin close with the colour of skin of user's face, avoid color because of initial manikin with Facial image color difference is larger to lead to the false problem of threedimensional model.Threedimensional model is divided into after opposite model again into Row processing, the link model that standard geometrical shapes are arranged, can simplify the complexity of disposed of in its entirety, improve treatment effeciency.
The embodiment of the present application also provides a kind of computer storage medium, the computer storage medium is stored with computer Executable instruction, it includes the program of the method for executing above-mentioned virtual fitting, on the computer executable instructions are executable State the method in any means embodiment.
Wherein, the computer storage medium can be any usable medium that computer can access or data storage is set It is standby, including but not limited to magnetic storage (such as floppy disk, hard disk, tape, magneto-optic disk (MO) etc.), optical memory (such as CD, DVD, BD, HVD etc.) and semiconductor memory (such as ROM, EPROM, EEPROM, nonvolatile memory (NAND FLASH), solid state hard disk (SSD)) etc..
Fig. 6 shows a kind of structural block diagram of computer equipment of another embodiment of the invention.The computer is set Standby 1100 can be the host server for having computing capability, personal computer PC or portable portable computer or Terminal etc..The specific embodiment of the invention does not limit the specific implementation of computer equipment.
The computer equipment 1100 includes at least one processor (processor) 1110, communication interface (Communications Interface) 1120, memory (memory array) 1130 and bus 1140.Wherein, processor 1110, communication interface 1120 and memory 1130 complete mutual communication by bus 1140.
Communication interface 1120 with network element for communicating, and wherein network element includes such as Virtual Machine Manager center, shared storage.
Processor 1110 is for executing program.Processor 1110 may be a central processor CPU or dedicated collection At circuit ASIC (Application Specific Integrated Circuit), or it is arranged to implement the present invention One or more integrated circuits of embodiment.
Memory 1130 is for executable instruction.Memory 1130 may include high speed RAM memory, it is also possible to also wrap Include nonvolatile memory (non-volatile memory), for example, at least a magnetic disk storage.Memory 1130 can also be with It is memory array.Memory 1130 is also possible to by piecemeal, and described piece can be combined into virtual volume by certain rule.Storage The instruction that device 1130 stores can be executed by processor 1110, so that processor 1110 is able to carry out in above-mentioned any means embodiment Method.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to include these modifications and variations.

Claims (10)

1. a kind of method of virtual fitting characterized by comprising
The initial manikin of user and the facial image of user are obtained, and by the face image synthesis to the initial human body The face of model generates the three-dimensional (3 D) manikin of user;
Three-dimensional garment model needed for obtaining user, and the three-dimensional (3 D) manikin and the three-dimensional garment model are tied It closes, model is tried in generation on;
Try model described in displaying on.
2. the method according to claim 1, wherein described by the face image synthesis to the initial human body The face of model includes:
At least three human face characteristic points in the facial image are extracted, and any three human face characteristic points are not conllinear;And determine institute State in the flat image of initial manikin face with the one-to-one standard feature point of the human face characteristic point;
Using human face characteristic point described in any two as one group, it is grouped the feature vector determined between two human face characteristic points, and Determine the feature vector between corresponding two standard features point;
According to the feature vector between every group of two human face characteristic points and the feature vector between corresponding two standard features point Between difference determine that each group of image change parameter, described image running parameter include scaling running parameter and rotation respectively Running parameter;
It is determined according to all image change parameters and scales equal running parameter and rotate equal running parameter, and is equal according to the scaling Running parameter and the equal running parameter of the rotation zoom in and out processing and rotation processing to the facial image, will treated people Face image is blended into the face of the initial manikin.
3. the method according to claim 1, wherein described by the face image synthesis to the initial human body The face of model includes:
The edge pixel in the facial image is obtained, the edge pixel is the pixel of the facial image outermost;
Determine that the Pixel Information of the edge pixel, the Pixel Information include rgb value and/or gray value;
The mould being connected in the initial manikin with the facial image is corrected according to the Pixel Information of the edge pixel The colouring information of type part.
4. according to the method described in claim 3, it is characterized in that, the Pixel Information of the determination edge pixel includes:
Determine corresponding with edge pixel pixel set, and by the Pixel Information of all pixels in the pixel set Pixel Information of the average value as the edge pixel;The pixel set includes that the path length apart from the edge pixel is small In all pixels of preset length, the path length be using the common edge between pixel as connection relationship, two pixels it Between minimum hop count.
5. the method according to claim 1, wherein described to the three-dimensional (3 D) manikin and the three-dimensional garment Model, which is combined, includes:
The three-dimensional (3 D) manikin is divided into multiple 3 D human body submodels according to preset manikin divisional plane;According to pre- If dress form divisional plane the three-dimensional garment model is divided into multiple three-dimensional garment submodels;
The three-dimensional garment submodel of the 3 D human body submodel and corresponding position is combined respectively, and will be described The combination result group of submodel, which is combined into, tries model on.
6. according to the method described in claim 5, it is characterized in that, described respectively by the 3 D human body submodel and corresponding positions The three-dimensional garment submodel at the place of setting, which is combined, includes:
The area being connected between two 3 D human body submodels in the multiple 3 D human body submodel with connection relationship Domain be arranged human body link model, the human body link model be extended based on the manikin divisional plane, standard it is several The threedimensional model of what shape;For in the multiple three-dimensional garment submodel with connection relationship two three-dimensional garment submodels it Between be connected region setting clothes link model, the clothes link model be extended based on the dress form divisional plane Threedimensional models arrive, standard geometrical shapes;
The clothes link model of the human body link model and corresponding position is combined, generates and connects between submodel Connect the combination result in region;The three-dimensional garment submodel of the 3 D human body submodel and corresponding position is tied It closes, generates the combination result of non-attached area between submodel;By the combination result and submodel of join domain between submodel Between the combination result of non-attached area generate the combination result of the three-dimensional (3 D) manikin and three-dimensional garment model.
7. the method according to claim 1, wherein after trying model described in the displaying on, further includes:
The operational order for receiving user's input is performed corresponding processing and is shown to the model of trying on according to the operational order Treated tries model on;The operational order includes amplification instruction, reduces instruction, rotates one instructed, in move Or it is multinomial.
8. a kind of device of virtual fitting characterized by comprising
Module is obtained, for obtaining the initial manikin of user and the facial image of user, and by the face image synthesis To the face of the initial manikin, the three-dimensional (3 D) manikin of user is generated;
Processing module, for three-dimensional garment model needed for obtaining user, and to the three-dimensional (3 D) manikin and the three-dimensional clothes Die-filling type is combined, and model is tried in generation on;
Display module described tries model on for showing.
9. a kind of computer storage medium, which is characterized in that the computer storage medium is stored with computer executable instructions, The computer executable instructions require method described in 1-7 any one for perform claim.
10. a kind of computer equipment, comprising:
At least one processor;And
The memory being connect at least one described processor communication;Wherein,
The memory is stored with the instruction that can be executed by least one described processor, and described instruction is by described at least one It manages device to execute, so that at least one described processor is able to carry out method described in claim 1-7 any one.
CN201811536334.5A 2018-12-14 2018-12-14 A kind of method, apparatus of virtual fitting, storage medium and computer equipment Pending CN109801380A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811536334.5A CN109801380A (en) 2018-12-14 2018-12-14 A kind of method, apparatus of virtual fitting, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811536334.5A CN109801380A (en) 2018-12-14 2018-12-14 A kind of method, apparatus of virtual fitting, storage medium and computer equipment

Publications (1)

Publication Number Publication Date
CN109801380A true CN109801380A (en) 2019-05-24

Family

ID=66556770

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811536334.5A Pending CN109801380A (en) 2018-12-14 2018-12-14 A kind of method, apparatus of virtual fitting, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN109801380A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110335347A (en) * 2019-07-05 2019-10-15 广东溢达纺织有限公司 Pattern tissue generation method, device, computer equipment and storage medium
CN111047553A (en) * 2019-11-07 2020-04-21 电子科技大学 Characteristic point positioning method for non-contact human body parameter measurement
CN111787242A (en) * 2019-07-17 2020-10-16 北京京东尚科信息技术有限公司 Method and apparatus for virtual fitting
CN112686733A (en) * 2021-01-06 2021-04-20 成都高乔科技有限公司 E-commerce product simulation system based on big data
CN112819932A (en) * 2021-02-24 2021-05-18 上海莉莉丝网络科技有限公司 Method and system for manufacturing three-dimensional digital content and computer readable storage medium
CN113204663A (en) * 2021-04-23 2021-08-03 广州未来一手网络科技有限公司 Information processing method and device for clothing matching
CN113344672A (en) * 2021-06-25 2021-09-03 钟明国 3D virtual fitting method and system for shopping webpage browsing interface
CN113822986A (en) * 2021-09-13 2021-12-21 温州医科大学 Virtual clothes changing method and system based on improved GRNet network
CN115311060A (en) * 2022-09-21 2022-11-08 武汉盛爱源科技有限公司 Intelligent product recommendation method and device based on 3D scene modeling
CN115631322A (en) * 2022-10-26 2023-01-20 钰深(北京)科技有限公司 User-oriented virtual three-dimensional fitting method and system
CN116757772A (en) * 2023-06-07 2023-09-15 广州星巢网络科技有限公司 Intelligent management system for renting and retail of clothes
CN116797723A (en) * 2023-05-09 2023-09-22 阿里巴巴达摩院(杭州)科技有限公司 Three-dimensional modeling method for clothing, three-dimensional changing method and corresponding device

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110335347A (en) * 2019-07-05 2019-10-15 广东溢达纺织有限公司 Pattern tissue generation method, device, computer equipment and storage medium
CN111787242A (en) * 2019-07-17 2020-10-16 北京京东尚科信息技术有限公司 Method and apparatus for virtual fitting
US11935167B2 (en) 2019-07-17 2024-03-19 Reling Jingdong Shangke Information Technology Co., Ltd. Method and apparatus for virtual fitting
CN111787242B (en) * 2019-07-17 2021-12-07 北京京东尚科信息技术有限公司 Method and apparatus for virtual fitting
CN111047553A (en) * 2019-11-07 2020-04-21 电子科技大学 Characteristic point positioning method for non-contact human body parameter measurement
CN111047553B (en) * 2019-11-07 2023-04-07 电子科技大学 Characteristic point positioning method for non-contact human body parameter measurement
CN112686733B (en) * 2021-01-06 2022-10-04 中软数智信息技术(武汉)有限公司 E-commerce product simulation system based on big data
CN112686733A (en) * 2021-01-06 2021-04-20 成都高乔科技有限公司 E-commerce product simulation system based on big data
CN112819932A (en) * 2021-02-24 2021-05-18 上海莉莉丝网络科技有限公司 Method and system for manufacturing three-dimensional digital content and computer readable storage medium
CN113204663A (en) * 2021-04-23 2021-08-03 广州未来一手网络科技有限公司 Information processing method and device for clothing matching
CN113344672A (en) * 2021-06-25 2021-09-03 钟明国 3D virtual fitting method and system for shopping webpage browsing interface
CN113822986A (en) * 2021-09-13 2021-12-21 温州医科大学 Virtual clothes changing method and system based on improved GRNet network
CN113822986B (en) * 2021-09-13 2023-06-30 温州医科大学 Virtual clothes changing method and system based on improved GRNet network
CN115311060A (en) * 2022-09-21 2022-11-08 武汉盛爱源科技有限公司 Intelligent product recommendation method and device based on 3D scene modeling
CN115631322A (en) * 2022-10-26 2023-01-20 钰深(北京)科技有限公司 User-oriented virtual three-dimensional fitting method and system
CN116797723A (en) * 2023-05-09 2023-09-22 阿里巴巴达摩院(杭州)科技有限公司 Three-dimensional modeling method for clothing, three-dimensional changing method and corresponding device
CN116797723B (en) * 2023-05-09 2024-03-26 阿里巴巴达摩院(杭州)科技有限公司 Three-dimensional modeling method for clothing, three-dimensional changing method and corresponding device
CN116757772A (en) * 2023-06-07 2023-09-15 广州星巢网络科技有限公司 Intelligent management system for renting and retail of clothes

Similar Documents

Publication Publication Date Title
CN109801380A (en) A kind of method, apparatus of virtual fitting, storage medium and computer equipment
CN110807836B (en) Three-dimensional face model generation method, device, equipment and medium
CN108305312B (en) Method and device for generating 3D virtual image
CN105354876B (en) A kind of real-time volume fitting method based on mobile terminal
CN102663820B (en) Three-dimensional head model reconstruction method
CN107610202B (en) Face image replacement method, device and storage medium
CN108447017A (en) Face virtual face-lifting method and device
CN109952594A (en) Image processing method, device, terminal and storage medium
EP3992919B1 (en) Three-dimensional facial model generation method and apparatus, device, and medium
CN107507216A (en) The replacement method of regional area, device and storage medium in image
CN106372333A (en) Method and device for displaying clothes based on face model
CN105913416A (en) Method for automatically segmenting three-dimensional human face model area
CN109886144B (en) Virtual trial sending method and device, computer equipment and storage medium
CN106910102A (en) The virtual try-in method of glasses and device
CN108537126A (en) A kind of face image processing system and method
CN111783511A (en) Beauty treatment method, device, terminal and storage medium
CN109410119A (en) Mask image distortion method and its system
CN107452049A (en) A kind of three-dimensional head modeling method and device
CN105869217A (en) Virtual method for trying on clothes by real person
CN111127642A (en) Human face three-dimensional reconstruction method
CN114283052A (en) Method and device for cosmetic transfer and training of cosmetic transfer network
Kaashki et al. Anet: A deep neural network for automatic 3d anthropometric measurement extraction
CN117157673A (en) Method and system for forming personalized 3D head and face models
US10152827B2 (en) Three-dimensional modeling method and electronic apparatus thereof
CN114155569B (en) Cosmetic progress detection method, device, equipment and storage medium

Legal Events

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