The invention relates to the technical fields of computer graphics, computer vision and virtual reality, specifically to a method of constructing 3D clothing model based on single image (an inputted image).
The construction of 3D model of scene object based on image is an important component of generating virtual reality and virtual scene. Particularly, the construction of 3D model of scene object of non-rigid deformation such as clothing is the research focus of international frontier at present.3D clothing model with strong sense of reality is of a value to be widely applied.
The conventional methods to construct clothing 3D clothing model refer to the processes of actual processes of designing and cutting a clothing and establish the steps including 2D pattern design, physical simulation, etc and utilize the human-involved parameter iterative optimization to create a final 3D clothing model. The conventional methods of constructing 3D model clothing depend too much on manual operation and consume a large amount of time in physical simulation. Meanwhile, a higher level of knowledge in clothing field is needed for a person to perform modeling, so these methods are difficult to get popular in non-professionals.
The method of constructing 3D clothing model based on sketch allows the user to design the silhouette and detail information of clothing directly on a model of human body. So the 3D clothing is modeled as a surface offset to the model of human body. In particular, the researchers of the University of British Columbia recently propose a method of analyzing the sketch of clothing with sensitive content which calculates the tension degree between a clothing and human body to successfully improve modeling quality in the loose areas of clothing. However, most of the existing methods of constructing 3D clothing model based on sketch have many limitations in human poses and user interaction. Specifically, on one hand, the existing methods require a standing pose of the model of human body and the skeleton movements are limited in 2D image plane; on the other hand, the existing methods require the user to design manually silhouette and details of clothing (such as folds and wrinkles, etc) and hence a higher level of professional knowledge is needed for an user.
The technology of 3D clothing acquisition without marker utilizes multiple synchronized cameras to construct a 3D clothing model through a series of steps as keeping space-time consistency, re-meshing and 3D deformation, etc. The latest technology of acquiring the movement of human body also utilizes several cameras in synchronization and can approximately model an human body wearing movement clothing. Both of the methods introduced above depend on a professional-level environment of multi-view modeling and so can only be used in the laboratories.
The researchers of Max Planck Institute of Germany present a method of acquiring the surface details of 3D clothing through utilizing the active lights and a photometric stereo reconstruction algorithm. However, this method is complex in modeling environment which needs setting not only multiple cameras of multi-spectrum and also setting the particular light sources after calibrated. The researchers of the University of British Columbia utilize a multi-view video of clothing movement to restore the surface details of 3D clothing through a space-time deformation method and the clothing edges in video images. This method also needs a multi-view modeling environment and depends partially some man-machine interaction during the course of designing clothing edge.
In conclusion, the existing methods of constructing 3D clothing model depend to a greater degree on setting a multi-view modeling environment and are difficult to be applied in complex 3D poses of human body and difficult to automatically acquire the geometry details of clothing surface.
In light of the practical demands and the key problems of constructing 3D clothing model for the object of human body, the purpose of the present invention is to put forward a method of constructing 3D clothing model based on single image which needs merely single image to create 3D clothing model with rich surface geometry details such as folds and wrinkles, etc to overcome the shortcomings of the existing methods in setting multi-view modeling environment, acquiring verisimilar surface geometry details and complex 3D poses of human body, etc.
In order to realize the purpose, the present invention employs a technical solution as follows:
A method of constructing 3D clothing model based on single image, characterized in that it comprises the steps as follows:
Step 1: To estimate 3D model of human body of and construct 3D clothing plane according to the clothing silhouette of the input image (an inputted image).
First, utilize a method of semi-automatic 3D pose estimation method to estimate 3D pose(s) of human body of the input image according to 2D joint(s) of human body in the input image specified by user; estimate the 3D model of human body in the input image through a method of deformable template according to a human contour line specified in the input image by user and the estimated 3D pose(s) of human body; specify the clothing silhouette by user in the input image; utilize the estimated 3D model of human body to divide the clothing silhouette specified by user into silhouette edge and boundary outline.
Then calculate the projection area of 3D model of human body on the image and the skeleton(s) related to clothing area; calculate a directed surface for each skeleton related to the clothing area through 3D coordinate(s) of skeleton joint(s) and a relative rotation matrix; calculate an intersection line between adjacent directed surfaces which is used to calculate an internal cutting line of the clothing area of the input image; utilize the internal cutting line to divide the clothing area of the input image into different parts of which each corresponds to one directed surface.
Then project the outline and the internal cutting line of each part of the clothing area of the input image on the corresponding directed surface to form 3D clothing area of each part accordingly; triangulate the 3D clothing area of each part and utilize the apex(s) of the common internal cutting lines between different 3D clothing areas to form an initial 3D clothing plane.
Finally, duplicate the initial 3D clothing plane; utilize the apex(s) of the silhouette edge on the initial 3D clothing plane as the common apex(s) to combine these initial 3D clothing planes before and after duplication to form a final 3D clothing plane.
Step 2: To utilize the final 3D clothing plane and the 3D model of human body to yield a smooth 3D clothing model through a deformation algorithm.
Firstly, utilize Laplace deformation algorithm to deform the final 3D clothing plane under a set of constraints of outline apex(s) and the 3D model of human body to initialize a 3D clothing model. Then calculate the tension degree of each apex of the initial 3D clothing model through calculating the shortest distance between the apex(s) of silhouette edge and the surface of the 3D model of human body. Finally utilize the rotating surface as the deformation constraint to initialize again the 3D clothing model in the area whose tension degree of apex(s) is marked loose to yield a smooth 3D clothing model.
Step 3: To utilize the intrinsic image decomposition algorithm and the shape-from-shading algorithm to acquire the detail information of clothing from the input image; shift the acquired detail information of clothing to the smooth 3D clothing mode through the weighted Laplace editing algorithm to yield a final 3D clothing model.
Firstly, utilize the intrinsic image decomposition algorithm to decompose the input image into a shading diagram and a reflectogram; utilize the shading diagram and the shape-from-shading algorithm to calculate a relative depth value corresponding to each pixel point; establish a corresponding relation between the clothing area of the input image and the final 3D clothing plane, and calculate the change of the relative depth of each apex of the 3D clothing plane according to the depth value corresponding to the pixel point of the clothing area; renew the final 3D clothing plane according to the calculated change of the relative depth to yield a 3D clothing detail plane.
Then calculate separately the Laplace coordinates of the apex(s) on the final 3D clothing plane and the 3D clothing detail plane; utilize these two Laplace coordinates of the apex(s) to calculate the detail information of surface geometry of the apex(s) on the 3D clothing.
Then utilize the Laplace coordinates of the apex(s) on the smooth 3D clothing model and the calculated detail information of surface geometry to calculate the shortest distance between the apex(s) and the apex(s) of silhouette edge so as to build a weighted Laplace deformation energy function.
Finally, utilize a linear optimization algorithm to minimize the deformation energy function mentioned as above to transfer the detail information of clothing surface geometry to the smooth 3D clothing mode to yield a final 3D clothing model.
Wherein: the “calculate a directed surface of each skeleton” described in Step 1 is realized specifically through the processes as follows:
Calculate the skeletons related to the clothing area and mark them as {li, . . . , li, . . . , ln} and define the directed surface Fl
Fl
nl
Wherein: Ll
Wherein: the “calculate the detail information of surface geometry of the apex(s) on the 3D clothing” described in Step 3 is realized specifically through the processes as follows:
Calculate the Laplace coordinate(s) corresponding to the apex(s) vi on the 3D clothing plane and denote it as δv
ξv
Wherein: the “calculate the shortest distance between the apex(s) and the apex(s) of silhouette edge so as to build a weighted Laplace deformation energy function” described in Step 3 is realized specifically through the processes as follows:
Build a weighted Laplace editing deformation energy function E to transfer the detail information of clothing to the smooth 3D clothing model:
Wherein: Lv
Wherein: d denotes the shortest distance between the apex(s) vi and the apex(s) of silhouette edge on the smooth 3D clothing model and usually μ=0.5:
Compare with the existing techniques, the beneficial features of the present invention are: the method of constructing 3D clothing model based on single image according to the present invention takes full advantages of 3D model of human body of the input image as well as the 3D pose information contained thereof and the shading information of the clothing area of the input image which needs merely single image to generate 3D clothing model with rich surface geometry details such as folds and wrinkles, etc so as to overcome the shortcomings of the existing methods in setting multi-view modeling environment, acquiring geometry detail of verisimilar surface and complex 3D poses of human body, etc.
Now the drawings are used to describe an embodiment according to the present invention in order to better understand the present invention. It is necessary to note in particular that: in the description as follows, in the case that the main contents of the present invention may be possibly subject to being weakened if any known function and design is introduced in detail, these descriptions will be omitted here.
With reference to
Step 1: To estimate 3D model of human body of and construct 3D clothing plane according to the clothing silhouette of the input image.
First, utilize a method of semi-automatic 3D pose estimation method to estimate 3D pose(s) of human body of the input image (as shown in
Then, specify the clothing silhouette by user in the input image; utilize the estimated 3D model of human body to divide the clothing silhouette specified by user into silhouette edge and boundary outline. The principle of dividing is: in the case that one outline specified by user crosses the project area of the 3D model of human body on the image, it will be divided as boundary outline; otherwise, it will be divided as silhouette edge.
Thirdly, project the estimated 3D model of human body on the image plane to calculate the overlap area between the projection area and the clothing area specified by user; calculate the skeletons related to the clothing area according to the overlap area and the skeleton dividing of the 3D model of human body and set them as {li, . . . , li, . . . , ln}.
Fourthly, define the directed surface Fl
Fl
nl
Wherein: Ll
Fifthly, calculate the intersection line between two adjacent surfaces. At the left side of
Sixthly: project the outlines (including silhouette edge and/or boundary outline) and the corresponding internal cutting lines of each part constituting the clothing area of the input image on the directed surface corresponding to each part to form the 3D clothing area for each constituting part. As shown in
Seventhly: triangulate the 3D clothing area of each constituting part on the corresponding directed surface to form multiple triangular meshes of clothing area; utilize the apex(s) of common internal cutting line(s) among 3D clothing areas to compose a triangular meshing of clothing area where two triangular meshing of clothing areas share same apex(s) of internal cutting line(s) to form the initial 3D clothing plane.
Finally, duplicate the initial 3D clothing plane; utilize the apex(s) of the silhouette edge on the initial 3D clothing plane as the common apex(s) to combine these initial 3D clothing planes before and after duplication where both initial 3D clothing planes share same apex(s) of silhouette edge to form the final 3D clothing plane M0 as shown in
Step 2: To utilize the final 3D clothing plane and the 3D model of human body to yield a smooth 3D clothing model through a deformation algorithm.
Firstly, utilize the Laplace deformation algorithm to deform the 3D clothing plane where the process of deformation is required that (1) the position(s) of the apex(s) of silhouette edge and the position(s) of the apex(s) of boundary outline will be kept unchanged as much as possible; (2) the position(s) of the apex(s) after deformation will be outside the 3D model of human body and will not collide with human body; the initial 3D clothing model is generated after deformation.
Then, calculate the shortest distance between the apex(s) of silhouette edge and the surface of 3D model of human body; build an exponential decay function to normalize this distance to be between 0-1 which is set as the tension degree on the apex(s) of silhouette edge where 0 denotes being loose and 1 denotes being tight; spread the tension degree of the apex(s) of silhouette edge to all the apex(s) of the initial 3D clothing model where the spreading process is required that: (1) the tension degrees of adjacent apexes are similar; (2) the spreading has a higher weight along the direction perpendicular to the skeleton and a lower weight along other directions; after spreading, each apex of the initial 3D clothing model will have a value of tension degree.
Finally, renew the initial 3D clothing model in the area(s) of 0 tension degree on the apex(s) (that is, these areas marked as being loose) through using the rotation surface, where the process of renewing is required that: (1) the positions of the apex(s) of silhouette edge and the positions of the apex(s) of boundary outline will be kept unchanged as much as possible; (2) the component of the normal vector of the apex on the rotation axis should be maintained as much as possible along the rotation direction of the rotation surface; (3)the component of the normal vector of the apex in the rotation direction should be maintained as much as possible along the direction of rotation axis of the rotation surface; (4) the clothing won't collide with the human body; a smooth 3D clothing model M1 will be yielded after renewing which is as shown in
Step 3: To utilize the intrinsic image decomposition algorithm and the shape-from-shading algorithm to acquire the detail information of clothing from the input image; shift the acquired detail information of clothing to the smooth 3D clothing mode through the weighted Laplace editing algorithm to yield a final 3D clothing model.
Firstly, utilize the intrinsic image decomposition algorithm to decompose the input image I into a shading diagram S and a reflectogram R where the process of decomposition is required that: Ip=SpRp is needed for the pixel point P, wherein: Ip denotes the intensity value of P on the input image I, Sp denotes the intensity value of p on the shading diagram S and Rp denotes the intensity value of P on the reflectogram R.
Then utilize the shading diagram S (as shown in
Then calculate the Laplace coordinate(s) corresponding to the apex(s) vi on M0 and denote it as δv
ξv
Fourthly, build a weighted Laplace editing deformation energy function E to transfer the detail information ξv
Wherein: Lv
Wherein: d denotes the shortest distance between the apex(s) vi and the apex(s) of silhouette edge on M1 and usually μ=0.5.
Finally, the linear optimization algorithm is used to minimize the energy function E, that is,
({tilde over (V)} indicates the position(s) of the apex(s) of the 3D clothing after transferred). Thus, a 3D clothing model {tilde over (M)}1 after transferred is yielded, that is, the final 3D clothing model which is as shown in
Number | Date | Country | Kind |
---|---|---|---|
201310435284.2 | Sep 2013 | CN | national |