CN107590708B - Method and device for generating user specific body shape model - Google Patents

Method and device for generating user specific body shape model Download PDF

Info

Publication number
CN107590708B
CN107590708B CN201610534953.5A CN201610534953A CN107590708B CN 107590708 B CN107590708 B CN 107590708B CN 201610534953 A CN201610534953 A CN 201610534953A CN 107590708 B CN107590708 B CN 107590708B
Authority
CN
China
Prior art keywords
model
human body
user
body shape
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610534953.5A
Other languages
Chinese (zh)
Other versions
CN107590708A (en
Inventor
贾宏愿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
LIANG RUYUAN
Original Assignee
LIANG RUYUAN
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 LIANG RUYUAN filed Critical LIANG RUYUAN
Priority to CN201610534953.5A priority Critical patent/CN107590708B/en
Publication of CN107590708A publication Critical patent/CN107590708A/en
Application granted granted Critical
Publication of CN107590708B publication Critical patent/CN107590708B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a method and a device for generating a user specific body shape model, and belongs to the field of virtual fitting. The method comprises the following steps: determining a basic human body model corresponding to body shape characteristic information in a pre-stored body shape sample library according to the body shape characteristic information input by a user; calculating the actual human body image uploaded by the user to generate a silhouette image, and acquiring human body shape data of the user from the silhouette image; and according to the human body shape data, carrying out deformation adjustment on the basic human body model to generate a user specific body shape model. By adopting the invention, the matching degree of the user specific body shape model and the real body shape can be improved.

Description

Method and device for generating user specific body shape model
Technical Field
The invention relates to the field of virtual fitting, in particular to a method and a device for generating a user specific body shape model.
Background
With the continuous development of network technology, online shopping has become an indispensable shopping mode in people's daily life, and more people are interested in purchasing goods such as clothes, food and the like on the internet.
The virtual fitting platform is generally provided with a universal human body model, and the universal human body model is a virtual model which is established on a computer by technicians according to body shape data of a standard human body. When a user purchases clothes on the internet, the user needs to provide the body shape characteristic information of the user, such as height, weight, three-dimensional circumference and the like, and then the virtual fitting platform can adjust the general body model according to the body shape characteristic information, so that the user specific body shape model approximately conforming to the body shape of the user can be obtained.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems:
because the figure of a person is influenced by various factors such as age, region, heredity and the like, the user specific figure model obtained by simple adjustment according to the figure characteristic information such as height, weight, three-dimensional and the like cannot accurately reflect the real figures of different persons, so that the matching degree of the user specific figure model and the real figures is poor.
Disclosure of Invention
To solve the problems of the prior art, embodiments of the present invention provide a method and apparatus for generating a user-specific body shape model. The technical scheme is as follows:
in a first aspect, there is provided a method of generating a user-specific body shape model, the method comprising:
determining a basic human body model corresponding to body shape characteristic information in a pre-stored body shape sample library according to the body shape characteristic information input by a user;
calculating the actual human body image uploaded by the user to generate a silhouette image, and acquiring human body shape data of the user from the silhouette image;
and according to the human body shape data, carrying out deformation adjustment on the basic human body model to generate a user specific body shape model.
In a second aspect, there is provided an apparatus for generating a user-specific body shape model, the apparatus comprising:
the body shape characteristic information processing module is used for processing body shape characteristic information input by a user;
the acquisition module is used for calculating the actual human body image uploaded by the user to generate a silhouette image and acquiring the human body shape data of the user from the silhouette image;
and the generating module is used for carrying out deformation adjustment on the basic human body model according to the human body shape data to generate a user specific body shape model.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, a basic human body model corresponding to body shape characteristic information is determined in a pre-stored body shape sample library according to the body shape characteristic information input by a user, a silhouette image is generated by calculating and processing an actual human body image uploaded by the user, human body shape data of the user is obtained from the silhouette image, and a basic human body model is subjected to deformation adjustment according to the human body shape data to generate a user specific body shape model. Therefore, the server can perform deformation processing on the basic human body model which is similar to the actual body shape of the user according to the actual human body image of the user, and the generated specific body shape model of the user is high in matching degree with the actual body shape of the user.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flow chart of a method for generating a user-specific body shape model according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an actual human body image provided by an embodiment of the present invention;
FIG. 3 is a schematic diagram of a method for determining actual body dimensions according to an embodiment of the present invention;
FIG. 4 is a simplified schematic diagram of a user's body section selection according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a grid provided by an embodiment of the present invention;
FIG. 6 is a schematic diagram of a compliant deformation provided by an embodiment of the present invention;
FIG. 7 is a schematic structural diagram of an apparatus for generating a user-specific body shape model according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
The embodiment of the invention provides a method for generating a user specific body shape model, and the execution subject of the method is a server. The server can be a server corresponding to the virtual fitting platform and has three-dimensional modeling and image processing functions. The server may have a processor, memory, screen, etc. disposed therein. The processor may be adapted to perform the process of generating the user-specific body shape model, the memory may be adapted to store data to be used or stored in the process of generating the user-specific body shape model, and the screen may be adapted to display the image or model. In this embodiment, a server is taken as an example to describe the scheme in detail, and other situations are similar to the above, and the description of this embodiment is not repeated.
The process flow shown in fig. 1 will be described in detail below with reference to specific embodiments, and the contents may be as follows:
step 101, according to the body shape characteristic information input by the user, determining a basic human body model corresponding to the body shape characteristic information in a pre-stored body shape sample library.
In practice, it is considered that various factors such as different ages, sexes, regions and hobbies have a great influence on the body shape of the user. For example, the body shape of the northern people is high, the body shape of the southern people is thin and small, the bodies of teenagers are tall and straight, the bodies of the old people are rickets, leg muscles which are fond of running are strong, upper body muscles which are fond of boxing are developed, and the like. Therefore, people with typical characteristics such as different ages, hobbies, regions and sexes can be scanned in a three-dimensional shape mode by using three-dimensional scanning equipment, and then a body shape sample library is constructed by using the scanned three-dimensional model data, namely, the corresponding relation between the ages, hobbies, regions and sexes and the basic human body model can be established in the body shape sample library. The basic human body model generated by three-dimensional scanning is optimized, so that the topological structure of the basic human body model is more standard, and the basic human body model is favorably applied to the fields of three-dimensional animation and physical simulation. Thus, when a user-specific body shape model is to be generated, the user can input body shape feature information according with the user, namely the age, hobbies, regions and the like of the user, and then the server can search the corresponding basic human body model in the body shape sample library according to the body shape feature information input by the user. It is worth mentioning that each basic human body model can comprise a preset number of surface vertexes, and each surface vertex is provided with a corresponding vertex serial number
And 102, calculating the actual human body image uploaded by the user to generate a silhouette image, and acquiring the human body shape data of the user from the silhouette image.
In implementation, after the user inputs the body shape characteristic information, the user can upload the actual body image of the user, namely, the shot picture of the body shape of the user. When taking a photo, in order to reduce errors of subsequent processing, the lens of the camera is in the same horizontal plane and vertical plane with the center position of a human body, the lens is kept in a horizontal plane and in a vertical plane, and the user can wear close-fitting clothes without pitching perspective, so that the actual body shape of the user can be accurately reflected by actual human body images. In addition, the user should take a picture in a preset posture, as shown in fig. 2, when taking a front picture, the user takes a posture that the two arms are extended and the two legs are standing differentially, and when taking a side picture, the user takes a posture that the two arms are drooped down, the user is tightly attached to the body and the two legs are closed, so that errors caused by various shelters can be effectively reduced. It should be noted that a reference object with a standard size can be further arranged in the shot picture, so that the proportional relation between the actual human body image and the actual body shape of the user can be determined according to the image size and the standard size of the reference object in the actual human body image.
And then, the server can calculate and process the actual human body image uploaded by the user to generate a silhouette image, and after the silhouette image is generated, the server can determine the human body shape data of the user according to the silhouette data of the human body in the silhouette image and the proportional relation. Specifically, the width and height of the actual human body image are known: wi, Hi (unit: pixel), width and height of the photoreceptor in mm: ws and Hs (unit: mm), the projection scaling factor M from the actual human body image to the photoreceptor is equal to (Wi)2+Hi2)/(Ws2+Hs2) (ii) a Then, the projection size a of the reference object on the photoreceptor and the projection size b of the actual human body on the photoreceptor can be calculated respectively according to the size a "of the reference object in the digital photograph (i.e. the actual human body image) and the size b" of the actual human body in the digital photograph; then, the actual size B of the human body, which is B (Af/a-s)/f, can be calculated according to the focal length f of the camera, the actual size a of the reference object, and the offset distance s between the actual human body and the reference object, as shown in fig. 3.
Two possible methods of generating a silhouette image are presented here by way of example: 1. the background image is subtracted from the actual human body image, specifically, a user can shoot and upload a background image of the same machine position, wherein the same machine position means that the spatial position, the shooting angle and the like of the camera are kept the same, the user is not included in the background image, and the rest parts are the same as the actual human body image. 2. The contour line of the human body in the actual human body image can be determined by adopting the existing contour line searching pattern recognition method, so that the actual human body image can be converted into a bitmap image, namely the pixel value of the pixel point in the area inside the contour line is set to be 1, and the pixel value of the pixel point in the area outside the contour line is set to be 0, and the silhouette image is generated. In addition, in the process of generating the silhouette image, the server can provide an image modification function for a user, namely the user can adjust the actual human body image by adjusting the Bezier curve, and the Bezier curve is adopted to circle out the region where the human body is located in the actual human body image, so that redundant image regions can be deleted, and the complexity of calculation is reduced; meanwhile, after the silhouette image is generated, the server can display the silhouette image to the user, and the user can finely adjust the silhouette image through the Bezier curve, so that the silhouette image is ensured to be more in line with the actual body shape of the user.
Optionally, the actual human body image may include a front human body image and a side human body image, the server may take a cross-section of the human body, and determine the body shape data according to the data of each cross-section of the human body, and accordingly, the processing in step 102 may be as follows: selecting a preset number of human body sections of the user from the human body of the user along the natural human body stretching direction, wherein the human body sections of the user are vertical to the natural human body stretching direction; calculating the human body front image and the human body side image uploaded by a user to generate a front silhouette image and a side silhouette image; determining corresponding cut-off line segments of the user human body section in the front side silhouette image and the side silhouette image, and determining human body width data and human body depth data of the user at the user human body section according to the lengths of the cut-off line segments.
In implementation, the user can take a front image and a side image of the user (i.e., a front image and a side image of the human body), and then upload the front image and the side image of the human body to the server. A hypothetical user body can be constructed in the server, and then a preset number of user body sections vertical to the natural human body extending direction are selected from the user body along the natural human body extending direction. Here, the human body may be divided into four parts, i.e., a trunk, arms, a neck, and legs, and the natural extension direction of the human body is the extension direction of the spine, the arm extension direction of the arms, and the extension direction of the legs. In order to facilitate subsequent calculation, the preset number of human body sections of the user can be uniformly selected along the natural extension direction of the human body. And then, the server can perform calculation processing according to the human body front image and the human body side image uploaded by the user to generate a front silhouette image and a side silhouette image. Furthermore, the server may determine the corresponding section lines of the user body section in the front-side and side-side silhouette images, and then may determine the body width data and body depth data of the user body at the corresponding user body section according to the lengths of the section lines, as shown in fig. 4.
And 103, carrying out deformation adjustment on the basic human body model according to the human body shape data to generate a user specific body shape model.
In this embodiment, a modeling program for constructing a model may be installed in the server, and the model transformation processing performed by the server described below may be performed by the server through the modeling program. After the server acquires the body shape data of the user according to the actual body image, the determined basic body model can be subjected to deformation adjustment according to the body shape data, so that the specific body shape model of the user can be generated. The user-specific form model may be bound to the account of the user, such that the server need not re-generate a new specific form model for the user within a certain amount of time. The model can be updated by uploading photos when the body shape of the user is changed remarkably, considering that the body shape of the human body changes with time.
Optionally, based on the determined length data and width data of the human body of each user, deformation adjustment may be performed on the basic human body model. The deformation adjustment mode is various, and two possible processing modes are exemplarily given here:
selecting a preset number of model sections from a preset position of a basic human body model along a natural human body stretching direction, and acquiring model width data and model depth data of the preset number of model sections, wherein the human body section of a user is vertical to the natural human body stretching direction; setting a model binding skeleton by taking the center of each model section as a node, performing skin treatment on the model and the skeleton according to a preset skin standard, and setting corresponding deformation weight; determining a scaling coefficient according to the model width data and the model depth data of the model section, and the human body width data and the human body depth data of the user at the corresponding human body section of the user; and zooming the model binding skeleton according to the zooming coefficient, and adjusting the position of the model binding skeleton according to the position of the human body section of the user to generate the model with the specific body shape of the user.
In implementation, the server may select a preset number of model sections from the basic human body model at a preset position along the natural human body extension direction according to the manner of intercepting the human body sections of the user, and then obtain model width data and model depth data of the preset number of model sections. Then, a model binding bone corresponding to the center of each model section can be set on the basic human body model by taking the center of each model section as a node, and the size of the model section corresponding to each bone node (namely, model width data and model depth data of the model section) is measured and stored. For example, if 50 sections are uniformly cut out of the trunk portion of the user's body in step 102, 50 sections are also uniformly cut out of the trunk portion of the base human body model, and 50 model-bound bones corresponding to the sections are provided. The above processes can be automated by programs, for example, in Maya, the automation operation can be implemented by using program modules such as PyMel and Maya API, which will not be described herein too much.
Further, the skin processing may be performed on the set model-bound bones according to a preset skin standard, that is, the surface vertex that each model-bound bone can affect on the basic human body model and the degree of influence (i.e., deformation weight) of each model-bound bone on the surface vertex of each basic human body model are set respectively. The preset skinning standard is referred to the existing computer character animation binding standard, and is not described herein again. And then the server can determine the scaling coefficient of each model binding skeleton according to the model width data and the model depth data of the model section and the corresponding human width data and human depth data of the user human body section. Furthermore, the server may scale the corresponding model-bound skeleton according to the determined scaling factor, and correspondingly adjust the positions of the nodes of the model-bound skeleton according to the positions of the sections of the user's body, for example, the length of the body of the basic body model is 1 meter, the length of the body of the user's actual body is 0.8 meter, and then 21 sections are uniformly selected, so that the positions of the nodes of the model-bound skeleton are 0cm, 5cm, 10cm, 8 · · and 100cm in sequence, and the positions of the sections of the user's body are 0cm, 4cm, 8cm, · and 80cm in sequence, so that the positions of the nodes of the model-bound skeleton can be adjusted to 0cm, 4cm, 8cm · and 80cm in sequence, and finally the purpose of adjusting the vertex coordinates of the surface of the basic body model is achieved, thereby generating the user-specific body shape model. It is worth mentioning that the scale of the model-bound bones of the torso part and the legs in the model section is an ellipse-like anisometric scale, while the model-bound bones of the arms and the neck in the model section are a cylinder-like anisometric scale. In addition, only one side of the arm and the leg and the left or right trunk need to be subjected to deformation calculation, and the other side can be completed only by simple mirror image transformation.
The second method comprises the following steps: selecting a preset number of model sections from a preset position of a basic human body model along the natural human body stretching direction, and obtaining the width and the depth of the preset number of model sections, wherein the human body section of a user is vertical to the natural human body stretching direction; taking the center of each model section as a control point, creating a model NURBS (non-uniform rational spline) curve, projecting the surface vertex of the basic human body model onto the model NURBS curve, and determining the relative vector of the projection point corresponding to each surface vertex and the NURBS curve parameter value corresponding to the projection point; determining a scaling coefficient according to the model width data and the model depth data of the model section, and the human body width data and the human body depth data of the user at the corresponding human body section of the user; establishing a NURBS curve of the human body of each user by taking the center of the human body section of each user as a control point; and generating a user specific body shape model according to the relative vector of the projection point corresponding to each surface vertex, the scaling coefficient, the NURBS curve parameter value corresponding to the projection point and the user human body NURBS curve.
In implementation, the server may select a preset number of model sections from the basic human body model at a preset position along the natural human body extension direction according to the manner of intercepting the human body sections of the user, and then obtain model width data and model depth data of the preset number of model sections. And determining a scaling coefficient according to the model width data and the model depth data of the model section and the human body width data and the human body depth data of the user at the corresponding human body section of the user. Furthermore, the basic human body model can be divided into a plurality of independent parts, namely the parts such as the trunk, the legs, the arms and the neck, then a preset number of model sections are selected from each part at a preset position along the natural extension direction of the human body, and simultaneously vertex sequence numbers of surface vertexes of the divided sections of each part on different parts are correspondingly stored. Then, for each part of the basic human body model, the center of each model section corresponding to the part is taken as a control point, and a corresponding model NURBS curve is created, that is, the model NURBS curve passes through the center of each model section, and the specific creation process of the model NURBS curve is the prior art and is not described herein again. It is worth mentioning that the space coordinate adopted by the scheme is taken as an example when the human body stands: the width direction of the front side of the human body is the X-axis direction, the vertical direction of the human body is the Y-axis direction, and the depth direction of the side surface of the human body is the Z-axis direction. The model NURBS curve may be a simultaneous system of equations of spatial coordinates X, Y, Z with respect to parameter T, and the parameter T of the model NURBS curve corresponding to each part is a region unified to [0,1], i.e., the parameter at the beginning of the model NURBS curve is 0 and the parameter at the end of the model NURBS curve is 1. Furthermore, the surface vertices of the base human body model may be projected onto a NURBS curve of the model, the relative vectors of the projection points corresponding to each surface vertex and the values of the NURBS curve parameters T corresponding to the projection points may be determined, and the relative vectors and the parameters T may be stored in an array data structure indexed by the vertex numbers of the corresponding surface vertices. For example, for surface vertices of the torso portion, the coordinates of the projected points and the corresponding parameter values T may be calculated from the coordinates of the surface vertices and a functional expression of a model NURBS curve corresponding to the torso portion. Then, the coordinate value of the surface vertex is subtracted by the coordinate of the projection point on the NURBS curve, and the relative vector of the surface vertex and the corresponding projection point is obtained.
Here, two possible schemes for determining the proxels are given:
in the first scheme, for each surface vertex, a mathematical plane which passes through the surface vertex and takes a vector of a natural extension direction of a body as a normal is determined, for example, a trunk, the normal of the mathematical plane is a Y axis, and then the coordinates of the intersection point (namely, a projection point) and the corresponding parameter value T are calculated through a model NURBS curve and a functional expression of the plane. Generally, the normal lines of the intersection test mathematical planes of the vertexes of the trunk, the legs and the neck are all Y-axes, the intersection test planes of the arm parts have two possibilities, and if the arms are in a horizontally straightened T-shaped posture, the normal lines are X-axes; if the arm is in a T-shaped posture, either obliquely up or obliquely down, its normal is the diagonal-like tilt axis.
Scheme two, since all control points of the model NURBS curve are known and are sorted arrays, for example, all control points across the torso portion are sorted arrays along the Y-axis. Therefore, according to the value of the Y axis of each surface vertex, a binary search algorithm may be used to determine two control points whose Y axis values are adjacent to the value of the Y axis of the surface vertex, and then determine the parameter value T of the projection point corresponding to the surface vertex by calculating the linear interpolation of the parameter values of the control points, so as to determine the coordinates of the projection point.
And similarly, a user human body NURBS curve is created by taking the center of each user human body section as a control point, and then the surface vertex of each basic human body model is deformed according to the user human body NURBS curve. In particular, according to eachThe vertex sequence number of the surface vertex of each basic human body model is searched out, the curve parameter T and the relative vector which correspond to the vertex sequence number are retrieved, then the parameter T is substituted into the function expression of the NURBS curve of the user human body, the projection point of the surface vertex on the NURBS curve of the user human body is solved, further, the transformation coordinate of the surface vertex in the NURBS curve space of the user human body is calculated according to the relative vector and the scaling coefficient which correspond to each surface vertex, and the model of each part in the model of the specific body shape of the user is generated. For example, the functional expression of the model NURBS curve is CmodelThe function expression of the NURBS curve of the human body of the user is CphotoFor the coordinates on the base phantom are
Figure BDA0001043693410000091
The projected coordinates on the model NURBS curve of the surface vertices of
Figure BDA0001043693410000092
The relative vector of the surface vertex and the corresponding projection point is
Figure BDA0001043693410000093
The curve parameter corresponding to the surface vertex is TmodelThe size of the model section corresponding to the surface vertex is Sxmodel,SymodelThe corresponding dimension of the human body section of the user is Sxphoto,SxphotoThen the scaling matrix is
Figure BDA0001043693410000094
The coordinates of the projection point corresponding to the surface vertex on the NURBS curve of the human body of the user are
Figure BDA0001043693410000095
And the coordinates of the surface vertex on the user-specified body shape model are
Figure BDA0001043693410000096
Then the mould of each part is putThe model is spliced and sewed, so that the user-specific body shape model can be generated. Specifically, the models of the respective parts may be moved to their corresponding positions based on the data collected from the photograph. For example, according to the leg position collected from the photo, the deformed leg model is moved to the corresponding position, and then the models of different parts are stitched according to the prestored vertex sequence numbers of the surface vertices at the interfaces of the models. When the spatial coordinates of two surface vertexes to be stitched of the models of the two portions do not coincide, deformation fine adjustment processing may be performed on these surface vertexes, and in order to make the stitched portion transition smoothly, deformation processing may be performed on other surface vertexes within a certain range of the surface vertexes, and the degree of deformation is attenuated according to the distance from the surface vertexes. Furthermore, the stitch target vertices and deformation attenuation are slightly different for different model sections: the stitching of the trunk to the thigh is relatively simple if the surface vertex has spatial coordinates in the model of the trunk section
Figure BDA0001043693410000097
With spatial coordinates in the model of the thigh section
Figure BDA0001043693410000098
If not, the spatial coordinates of the surface vertices can be adjusted to
Figure BDA0001043693410000099
Also, the torso portion is attenuated by a shorter distance than the legs. The stitching of the neck to the torso is more complex because the size of the neck can be estimated from the photograph and the stitching moves the apex of the torso portion with the apex of the neck as the target point size. Therefore, the spatial coordinates of the surface vertex at the trunk portion are
Figure BDA0001043693410000101
The spatial coordinates at the neck portion are
Figure BDA0001043693410000102
The surface may be peakedIs adjusted to
Figure BDA0001043693410000103
The deformation attenuation distance of the upper part of the trunk near the apex of the sutured portion is longer, but the neck has only a very short deformation attenuation. The sewing of the arm and the trunk is similar to that of the neck, the size of the arm can be measured from the frontal photograph, but the size of the armpit is difficult to measure and is very accurate, so the space coordinate of the surface vertex of the part is mainly based on the surface vertex at the interface of the arm, and the deformation attenuation distance of the surface vertex of the shoulder and the chest of the trunk is longer. Thus, the surface vertex of the body portion has a spatial coordinate of
Figure BDA0001043693410000104
The vertex of the surface of the arm part has the spatial coordinates of
Figure BDA0001043693410000105
Spatial coordinates of surface vertices at the suture
Figure BDA0001043693410000106
The stitching of the head and neck is special, and in the scheme, head models with different facial features are preset, and users can select models which are liked by the users or the models which the users think are closest to the users. The topology of these pre-set head models is optimized to ensure smooth concatenation with other partial models. To ensure the accuracy of fitting effect at the user's neckline, the surface vertices of the head model are usually adjusted to fit the user's neck model when sewing. Thus, the vertex of the surface of the neck part has a spatial coordinate of
Figure BDA0001043693410000107
The head portion surface vertex has a spatial coordinate of
Figure BDA0001043693410000108
Spatial coordinates of surface vertices at the suture
Figure BDA0001043693410000109
Other parts of the stitching, such as the hand and the foot, can only be roughly measured from the photo, so that in the present case, the approximate scaling of the hand and foot models is estimated firstly according to the sizes of the wrist and the ankle and the related data measured from the photo, and then the stitching is carried out.
It is worth mentioning that at the seams of different models, especially at the sharp corners like armpits, neck-shoulder joints etc., the shape of the model may not particularly conform to the silhouette of the user. The two principles are similar, but different methods are realized to carry out approximate deformation on the stitched model and the photo silhouette, so that the method is more accurate. The following two approximating deformation methods are simultaneously suitable for the two model deformation methods of the bound bone and the NURBS curve.
The method comprises the following steps: the method comprises the steps of projecting a user specific body shape model to a two-dimensional plane to generate a two-dimensional projection model, creating geometric two-dimensional grids, obtaining the shortest distance between each grid node and the boundary of a silhouette image and the gradient vector corresponding to the shortest distance, carrying out deformation processing on the two-dimensional projection model according to the gradient vector corresponding to the shortest distance and the shortest distance, and carrying out deformation processing on the user specific body shape model based on the two-dimensional projection model after the deformation processing.
In implementation, the stitched model is projected to two-dimensional planes of the front side and the side respectively, two geometric two-dimensional networks are created in the maximum boundary frame of the two-dimensional space according to the model, and the geometric two-dimensional networks are applied to the silhouette image. The first grid uses a scalar grid data structure for storing Signed Distance Field data (SDF); the second mesh employs a vector mesh data structure for storing gradient vector field data computed from the symbolic distance field. First, a preset number of sampling vectors are randomly generated within 360 degrees around each grid node of a scalar field. Pixels of the silhouette bitmap are detected from the current grid node along each of the randomly sampled vectors, and when the pixel values change, the boundary where the pixels are proved to be the silhouette is stored in a temporary array. And sorting the distance data acquired in the last step, and selecting the minimum value as the shortest distance. The distance may be set to a negative number if the currently sampled mesh node is inside a silhouette, and to a positive number otherwise. Here, the distance data collected from the silhouette image is in pixels, needs to be converted to a model unit space, and stored in a first scalar grid data structure as symbolic distance field data; the sampling vector used in the prior art does not need to be converted, and the vector can be used only by converting the vector into a unit vector with the length of 1. Then, gradient vector field data can be computed based on the symbolic distance field data, and the result of the computation stored in a second vector grid data structure. The calculation formula is a standard gradient formula:
Figure BDA0001043693410000111
then, two control lines are respectively created along the vertices of the boundary surfaces of the two human models projected in the two-dimensional space. The line segments between the vertices of these two lines are connected by straight lines. Obtaining the shortest distance d of the vertex of the current control line from the first scalar grid data structure by a linear interpolation method, and obtaining the gradient vector of the position of the vertex of the current control line from the second vector grid data structure
Figure BDA0001043693410000112
The current control line vertex can then be formulated
Figure BDA0001043693410000113
Moving to the boundary of the silhouette, and flexibly adjusting the surface vertex within the preset distance according to different attenuation ratios by using a control line, wherein the specific treatment can be as follows: using each surface vertex as a center, searching related control line vertexes in a preset radius R, calculating the distance between the current model vertex and each control line vertex, and calculating the attenuation coefficient by taking the distance data as the self-variationThe previously calculated displacement vector of the apex of the control line is superimposed on the apex of the surface at a different ratio according to the attenuation coefficient calculated in the previous step. For example, the displacement vector of the vertex of the current control line is
Figure BDA0001043693410000114
Wherein,
Figure BDA0001043693410000115
in order to control the coordinates after the vertex has moved,
Figure BDA0001043693410000116
to control the coordinates before vertex movement, the distance between the vertex of the current surface and the vertex of the control line affecting the point
Figure BDA0001043693410000117
Wherein,
Figure BDA0001043693410000118
the attenuation coefficient Decay of the vertex of the current surface is the coordinate before the vertex of the surface movesmi=DecayFn(Dmi/R), the coordinates of the surface vertex after moving are
Figure BDA0001043693410000119
And finally, after the approximation in the two-dimensional space is completed, the final result needs to be fed back to the three-dimensional coordinates of the model surface vertex. For example, the transformation results in XY plane space, will modify the X and Y component values of the three-dimensional space coordinates. In addition, the above processing may be performed by directly using the shortest distance and direction vector acquired from the silhouette image. By using the method of the symbolic distance field and the gradient vector field, a smoother and more stable interpolation vector can be obtained, and the approximation effect is more stable.
And secondly, converting the silhouette image into a two-dimensional vector graph, and then performing approximation processing on the surface vertex of the user-specific body shape model projected on the two-dimensional plane. The principle of the method is similar to that of the first scheme, and the method is different in a solving method of the nearest distance and the nearest direction vector, and after the shortest distance and the shortest direction are solved, the data can be directly used for approximation deformation, and a grid data structure is not needed. The method solves the problem by solving the intersection points of the vectors and the vector graphics, and the solving process is based on the conventional algorithm of the computer graphics. Here, when creating a vector graphic from a silhouette image, that is, in the process of vectorizing pixel data, spatial size conversion is performed so that a vector graphic corresponding to a newly created silhouette coincides with the size of a human body model.
Finally, the texture replacement algorithm can be used to set surface muscle deformation for the user-specified body shape model to increase the reality and detail of the model, where the replacement median value of the replacement material can be set to 1, i.e., the surface of the model corresponding to the portion of the chartlet texture with a value less than 1 can be recessed along the normal of the surface.
Optionally, after generating the user-specific body shape model, the user may adjust the model, and the corresponding processing may be as follows: carrying out projection processing on the user specific body shape model to generate a two-dimensional projection model; sending the two-dimensional projection model to a user so that the user can carry out error correction on the two-dimensional projection model according to the actual human body image; and carrying out deformation processing on the user specific body shape model based on the corrected two-dimensional projection model sent by the user.
In implementation, in consideration of the fact that an actual human body image uploaded by a user may have errors, and the finally generated user-specific human body model may have partial differences from the actual body shape of the user, the server may project the generated user-specific body shape model onto a two-dimensional plane, so as to obtain a two-dimensional projection model, where the two-dimensional projection model is different from the projection image, belongs to vector data, and may be divided into a front two-dimensional model and a side two-dimensional model. And then the server can send the composite data obtained by superposing the two-dimensional projection model and the real-shot photos to the user, and the user can perform error correction adjustment on the two-dimensional projection model according to the actual human body image so as to enable the two-dimensional projection model to be more matched with the actual body shape of the user. Specifically, the user may modify the two-dimensional projection model in a client installed in the terminal and provided by the virtual fitting platform, and further, may adopt a modification mode of mesh deformation and flexible deformation.
The processing of mesh deformation may be as follows: and dividing the surface vertexes of the sewn model into a plurality of vertex groups according to the serial numbers of the vertexes before sewing, wherein the vertex groups correspond to the models of all parts before sewing one by one. Note that, here, only one logical vertex group is used, and the model does not need to be physically divided, and the maximum bounding box is calculated for models of different vertex groups, as shown in fig. 5, the density of the mesh may be dynamically adjusted according to the needs of the user, that is, if the user needs to adjust each time to affect a larger range, the mesh may be sparse; conversely, if a local, small scale adjustment is required, a relatively dense grid is required. After the user adjusts the deformed mesh, the model vertex of the cover contained in the deformed mesh is subjected to interpolation transformation according to the deformation ratio of the mesh. Generally, only linear interpolation is needed, but of course, other interpolation algorithms, such as curve interpolation, may be used to achieve a smoother deformation effect. Here, mesh deformation is only suitable for application to the NURBS curve-related model deformation process described above.
The process of the flexible deformation may be as follows: the user may first select the target surface vertices that need to be modified
Figure BDA0001043693410000131
Setting corresponding influence radius r and deformation attenuation coefficient rs, clicking and dragging the vertex of the target surface, and calculating the displacement vector of the vertex of the target surface by the application program of the client terminal
Figure BDA0001043693410000132
Then traversing other surface vertexes of the model in the influence radius, determining the displacement vector of the other surface vertexes according to the distance D between the other surface vertexes and the target surface vertex and the attenuation coefficient, and thus obtaining the original position coordinates of the other surface vertexes
Figure BDA0001043693410000133
Determining position coordinates after dragging
Figure BDA0001043693410000134
Namely, it is
Figure BDA0001043693410000135
Where rs ═ D/r, decayfn (rs) is a predetermined attenuation function with rs as an argument, refer to fig. 6. The correction method is suitable for both bone and NURBS curve deformations.
The above-mentioned mesh deformation and flexible deformation process may be an interactive process between the client and the server, and the server receives the relevant settings input by the user at the client side and performs corresponding adjustment according to the relevant settings, and the interactive process is conventional and will not be described in more detail here. After the user finishes modifying, the adjusted two-dimensional projection model can be sent to a server, and the server can carry out finishing deformation processing on the user specific body shape model based on the modified two-dimensional projection model.
In the embodiment of the invention, a basic human body model corresponding to body shape characteristic information is determined in a pre-stored body shape sample library according to the body shape characteristic information input by a user, a silhouette image is generated by calculating and processing an actual human body image uploaded by the user, human body shape data of the user is obtained from the silhouette image, and a basic human body model is subjected to deformation adjustment according to the human body shape data to generate a user specific body shape model. Therefore, the server can perform deformation processing on the basic human body model which is matched with the actual body form of the user according to the actual human body image of the user, and the generated specific body form model of the user is high in matching degree with the actual body form of the user.
Based on the same technical concept, an embodiment of the present invention further provides an apparatus for generating a user-specific body shape model, as shown in fig. 7, the apparatus including:
a determining module 701, configured to determine, according to body shape feature information input by a user, a basic human body model corresponding to the body shape feature information in a body shape sample library stored in advance;
an obtaining module 702, configured to perform calculation processing on the actual human body image uploaded by the user to generate a silhouette image, and obtain human body shape data of the user from the silhouette image;
a generating module 703, configured to perform deformation adjustment on the basic human body model according to the human body shape data, so as to generate a user-specific body shape model.
Optionally, the actual human body image includes a human body front image and a human body side image;
the obtaining module 702 is configured to:
selecting a preset number of human body sections of the user from the human body of the user along the natural human body stretching direction, wherein the human body sections of the user are vertical to the natural human body stretching direction;
calculating the human body front image and the human body side image uploaded by the user to generate a front silhouette image and a side silhouette image;
and determining corresponding cut line segments of the user human body section in the front side silhouette image and the side silhouette image, and determining human body width data and human body depth data of the user at the user human body section according to the lengths of the cut line segments.
Optionally, the generating module 703 is configured to:
selecting a preset number of model sections of the basic human body model at a preset position along the natural human body stretching direction, and acquiring model width data and model depth data of the preset number of model sections, wherein the human body section of the user is vertical to the natural human body stretching direction;
setting a model binding skeleton by taking the center of each model section as a node, carrying out skin treatment on the model binding skeleton according to a preset skin standard, and setting a corresponding deformation weight;
determining a scaling coefficient according to the model width data and the model depth data of the model section, and the human body width data and the human body depth data of the user at the corresponding human body section of the user;
and scaling the model binding skeleton according to the scaling coefficient, and adjusting the position of the model binding skeleton according to the position of the human body section of the user to generate the model of the specific body shape of the user.
Optionally, the generating module 703 is configured to:
selecting a preset number of model sections of the basic human body model at a preset position along the natural human body stretching direction, and acquiring model width data and model depth data of the preset number of model sections, wherein the human body section of the user is vertical to the natural human body stretching direction;
taking the center of each model section as a control point, creating a model NURBS curve, projecting the surface vertex of the basic human body model onto the model NURBS curve, and determining the relative vector of the projection point corresponding to each surface vertex and the NURBS curve parameter value corresponding to the projection point;
determining a scaling coefficient according to the model width data and the model depth data of the model section, and the human body width data and the human body depth data of the user at the corresponding human body section of the user;
establishing a NURBS curve of the human body of the user by taking the center of each human body section of the user as a control point;
and generating a user specific body shape model according to the relative vector of the projection point corresponding to each surface vertex, the scaling coefficient, the NURBS curve parameter value corresponding to the projection point and the user human body NURBS curve.
Optionally, the apparatus further comprises:
and the deformation module is used for projecting the user-specific body shape model to a two-dimensional plane to generate a two-dimensional projection model after the basic body shape model is subjected to deformation adjustment according to the body shape data and the user-specific body shape model is generated, creating geometric two-dimensional grids, acquiring the shortest distance between each grid node and the boundary of the silhouette image and a gradient vector corresponding to the shortest distance, performing deformation processing on the two-dimensional projection model according to the shortest distance and the gradient vector corresponding to the shortest distance, and performing deformation processing on the user-specific body shape model based on the deformed two-dimensional projection model.
Optionally, the apparatus further comprises:
and the correction module is used for performing deformation adjustment on the first basic human body model according to the human body figure data to generate a user specific body figure model, then performing projection processing on the user specific body figure model to generate a two-dimensional projection model, sending the two-dimensional projection model to the user to enable the user to perform error correction on the two-dimensional projection model according to the actual human body image, and performing deformation processing on the user specific body figure model based on the corrected two-dimensional projection model sent by the user.
In the embodiment of the invention, a basic human body model corresponding to body shape characteristic information is determined in a pre-stored body shape sample library according to the body shape characteristic information input by a user, a silhouette image is generated by calculating and processing an actual human body image uploaded by the user, human body shape data of the user is obtained from the silhouette image, and a basic human body model is subjected to deformation adjustment according to the human body shape data to generate a user specific body shape model. Therefore, the server can perform deformation processing on the basic human body model which is matched with the actual body form of the user according to the actual human body image of the user, and the generated specific body form model of the user is high in matching degree with the actual body form of the user.
It should be noted that: in the device for generating a user-specific body shape model according to the above embodiment, when the user-specific body shape model is generated, only the division of the functional modules is illustrated, and in practical applications, the function distribution may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to perform all or part of the functions described above. In addition, the apparatus for generating a user-specific body shape model and the method for generating a user-specific body shape model provided in the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
The embodiment of the invention also provides a server, and fig. 8 is a schematic structural diagram of the server provided by the embodiment of the invention. The server 800, which may vary significantly depending on configuration or performance, may include one or more Central Processing Units (CPUs) 822 (e.g., one or more processors) and memory 832, one or more storage media 830 (e.g., one or more mass storage devices) storing applications 842 or data 844. Memory 832 and storage medium 830 may be, among other things, transient or persistent storage. The program stored in the storage medium 830 may include one or more modules (not shown), each of which may include a series of instruction operations for the server. Still further, a central processor 822 may be provided in communication with the storage medium 830 for executing a series of instruction operations in the storage medium 830 on the server 800.
The server 800 may also include one or more power supplies 826, one or more wired or wireless network interfaces 850, one or more input-output interfaces 858, one or more keyboards 856, and/or one or more operating systems 841, such as Windows Server, Mac OS XTM, UnixTM, Linux, FreeBSDTM, etc.
The server 800 may include memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions for:
determining a basic human body model corresponding to body shape characteristic information in a pre-stored body shape sample library according to the body shape characteristic information input by a user;
calculating the actual human body image uploaded by the user to generate a silhouette image, and acquiring human body shape data of the user from the silhouette image;
and according to the human body shape data, carrying out deformation adjustment on the basic human body model to generate a user specific body shape model.
Optionally, the actual human body image includes a human body front image and a human body side image;
the calculating the actual human body image uploaded by the user to generate a silhouette image and acquiring the human body shape data of the user from the silhouette image comprises the following steps:
selecting a preset number of human body sections of the user from the human body of the user along the natural human body stretching direction, wherein the human body sections of the user are vertical to the natural human body stretching direction;
calculating the human body front image and the human body side image uploaded by the user to generate a front silhouette image and a side silhouette image;
and determining corresponding cut line segments of the user human body section in the front side silhouette image and the side silhouette image, and determining human body width data and human body depth data of the user at the user human body section according to the lengths of the cut line segments.
Optionally, the performing deformation adjustment on the basic human body model according to the human body shape data to generate a user-specific body shape model includes:
selecting a preset number of model sections of the basic human body model at a preset position along the natural human body stretching direction, and acquiring model width data and model depth data of the preset number of model sections, wherein the human body section of the user is vertical to the natural human body stretching direction;
setting a model binding skeleton by taking the center of each model section as a node, carrying out skin treatment on the model binding skeleton according to a preset skin standard, and setting a corresponding deformation weight;
determining a scaling coefficient according to the model width data and the model depth data of the model section, and the human body width data and the human body depth data of the user at the corresponding human body section of the user;
and scaling the model binding skeleton according to the scaling coefficient, and adjusting the position of the model binding skeleton according to the position of the human body section of the user to generate the model of the specific body shape of the user.
Optionally, the performing deformation adjustment on the basic human body model according to the human body shape data to generate a user-specific body shape model includes:
selecting a preset number of model sections of the basic human body model at a preset position along the natural human body stretching direction, and acquiring model width data and model depth data of the preset number of model sections, wherein the human body section of the user is vertical to the natural human body stretching direction;
taking the center of each model section as a control point, creating a model NURBS curve, projecting the surface vertex of the basic human body model onto the model NURBS curve, and determining the relative vector of the projection point corresponding to each surface vertex and the NURBS curve parameter value corresponding to the projection point;
determining a scaling coefficient according to the model width data and the model depth data of the model section, and the human body width data and the human body depth data of the user at the corresponding human body section of the user;
establishing a NURBS curve of the human body of the user by taking the center of each human body section of the user as a control point;
and generating a user specific body shape model according to the relative vector of the projection point corresponding to each surface vertex, the scaling coefficient, the NURBS curve parameter value corresponding to the projection point and the user human body NURBS curve.
Optionally, after the deformation adjustment is performed on the basic human body model according to the human body shape data to generate the user-specific body shape model, the method further includes:
projecting the user specific body shape model to a two-dimensional plane to generate a two-dimensional projection model, and creating an equal-ratio two-dimensional grid;
acquiring the shortest distance between each grid node and the boundary of the silhouette image and a gradient vector corresponding to the shortest distance;
according to the shortest distance and the gradient vector corresponding to the shortest distance, carrying out deformation processing on the two-dimensional projection model;
and carrying out deformation processing on the user specific body shape model based on the two-dimensional projection model after the deformation processing.
Optionally, after the deformation adjustment is performed on the basic human body model according to the human body shape data to generate the user-specific body shape model, the method further includes:
performing projection processing on the user specific body shape model to generate a two-dimensional projection model;
sending the two-dimensional projection model to the user so that the user can perform error correction on the two-dimensional projection model according to the actual human body image;
and carrying out deformation processing on the user specific body shape model based on the corrected two-dimensional projection model sent by the user.
In the embodiment of the invention, a basic human body model corresponding to body shape characteristic information is determined in a pre-stored body shape sample library according to the body shape characteristic information input by a user, a silhouette image is generated by calculating and processing an actual human body image uploaded by the user, human body shape data of the user is obtained from the silhouette image, and a basic human body model is subjected to deformation adjustment according to the human body shape data to generate a user specific body shape model. Therefore, the server can perform deformation processing on the basic human body model which is matched with the actual body form of the user according to the actual human body image of the user, and the generated specific body form model of the user is high in matching degree with the actual body form of the user.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the relevant program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk, an optical disk, or the like.
The present invention is not limited to the above preferred embodiments, and any modifications, equivalent replacements, improvements, etc. within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (6)

1. A method of generating a user-specific body shape model, the method comprising:
determining a basic human body model corresponding to body shape characteristic information in a pre-stored body shape sample library according to the body shape characteristic information input by a user;
calculating the actual human body image uploaded by the user to generate a silhouette image, and acquiring human body shape data of the user from the silhouette image, wherein the actual human body image comprises a human body front image and a human body side image;
according to the human body shape data, carrying out deformation adjustment on the basic human body model to generate a user specific body shape model;
the calculating the actual human body image uploaded by the user to generate a silhouette image, and acquiring the human body shape data of the user from the silhouette image includes:
selecting a preset number of human body sections of the user from the human body of the user along the natural human body stretching direction, wherein the human body sections of the user are vertical to the natural human body stretching direction;
calculating the human body front image and the human body side image uploaded by the user to generate a front silhouette image and a side silhouette image;
determining corresponding cut line segments of the user human body section in the front side silhouette image and the side silhouette image, and determining human body width data and human body depth data of the user at the user human body section according to the lengths of the cut line segments;
wherein, according to the human body shape data, the basic human body model is deformed and adjusted to generate a user specific body shape model, and the method comprises the following steps:
selecting a preset number of model sections of the basic human body model at a preset position along the natural human body stretching direction, and obtaining model width data and model depth data of the preset number of model sections, wherein the model sections are vertical to the natural human body stretching direction;
setting a model binding skeleton by taking the center of each model section as a node, performing skin treatment on the model binding skeleton according to a preset skin standard, and setting a corresponding deformation weight, wherein the deformation weight is used for indicating the influence degree of the model binding skeleton on the surface vertex of the basic human body model;
determining a scaling coefficient according to the model width data and the model depth data of the model section, and the human body width data and the human body depth data of the user at the corresponding human body section of the user;
scaling the model binding skeleton according to the scaling coefficient, and adjusting the position of the model binding skeleton according to the position of the human body section of the user so as to achieve the purpose of adjusting the vertex coordinates of the surface of the basic human body model and generate a user specific body shape model;
or,
selecting a preset number of model sections of the basic human body model at a preset position along the natural human body stretching direction, and obtaining model width data and model depth data of the preset number of model sections, wherein the model sections are vertical to the natural human body stretching direction;
taking the center of each model section as a control point, creating a model NURBS curve, projecting the surface vertex of the basic human body model onto the model NURBS curve, and determining the relative vector of the projection point corresponding to each surface vertex and the NURBS curve parameter value corresponding to the projection point;
determining a scaling coefficient according to the model width data and the model depth data of the model section, and the human body width data and the human body depth data of the user at the corresponding human body section of the user;
establishing a NURBS curve of the human body of the user by taking the center of each human body section of the user as a control point;
and generating a user specific body shape model according to the relative vector of the projection point corresponding to each surface vertex, the scaling coefficient, the NURBS curve parameter value corresponding to the projection point and the user human body NURBS curve.
2. The method of claim 1, wherein after said generating a user-specific body shape model by performing a deformation adjustment on said base body model according to said body shape data, said method further comprises:
projecting the user specific body shape model to a two-dimensional plane to generate a two-dimensional projection model, and creating an equal-ratio two-dimensional grid;
acquiring the shortest distance between each grid node and the boundary of the silhouette image and a gradient vector corresponding to the shortest distance;
according to the shortest distance and the gradient vector corresponding to the shortest distance, carrying out deformation processing on the two-dimensional projection model;
and carrying out deformation processing on the user specific body shape model based on the two-dimensional projection model after the deformation processing.
3. The method of claim 1, wherein after said generating a user-specific body shape model by performing a deformation adjustment on said base body model according to said body shape data, said method further comprises:
performing projection processing on the user specific body shape model to generate a two-dimensional projection model;
sending the two-dimensional projection model to the user so that the user can perform error correction on the two-dimensional projection model according to the actual human body image;
and carrying out deformation processing on the user specific body shape model based on the corrected two-dimensional projection model sent by the user.
4. An apparatus for generating a user-specific body shape model, the apparatus comprising:
the body shape characteristic information processing module is used for processing body shape characteristic information input by a user;
the acquisition module is used for calculating and processing the actual human body image uploaded by the user to generate a silhouette image and acquiring the human body shape data of the user from the silhouette image, wherein the actual human body image comprises a human body front image and a human body side image;
the generating module is used for carrying out deformation adjustment on the basic human body model according to the human body shape data to generate a user specific body shape model;
wherein the obtaining module is configured to:
selecting a preset number of human body sections of the user from the human body of the user along the natural human body stretching direction, wherein the human body sections of the user are vertical to the natural human body stretching direction;
calculating the human body front image and the human body side image uploaded by the user to generate a front silhouette image and a side silhouette image;
determining corresponding cut line segments of the user human body section in the front side silhouette image and the side silhouette image, and determining human body width data and human body depth data of the user at the user human body section according to the lengths of the cut line segments;
wherein the generation module is configured to:
selecting a preset number of model sections of the basic human body model at a preset position along the natural human body stretching direction, and obtaining model width data and model depth data of the preset number of model sections, wherein the model sections are vertical to the natural human body stretching direction;
setting a model binding skeleton by taking the center of each model section as a node, performing skin treatment on the model binding skeleton according to a preset skin standard, and setting a corresponding deformation weight, wherein the deformation weight is used for indicating the influence degree of the model binding skeleton on the surface vertex of the basic human body model;
determining a scaling coefficient according to the model width data and the model depth data of the model section, and the human body width data and the human body depth data of the user at the corresponding human body section of the user;
scaling the model binding skeleton according to the scaling coefficient, and adjusting the position of the model binding skeleton according to the position of the human body section of the user so as to achieve the purpose of adjusting the vertex coordinates of the surface of the basic human body model and generate a user specific body shape model;
or, the generating module is configured to:
selecting a preset number of model sections of the basic human body model at a preset position along the natural human body stretching direction, and obtaining model width data and model depth data of the preset number of model sections, wherein the model sections are vertical to the natural human body stretching direction;
taking the center of each model section as a control point, creating a model NURBS curve, projecting the surface vertex of the basic human body model onto the model NURBS curve, and determining the relative vector of the projection point corresponding to each surface vertex and the NURBS curve parameter value corresponding to the projection point;
determining a scaling coefficient according to the model width data and the model depth data of the model section, and the human body width data and the human body depth data of the user at the corresponding human body section of the user;
establishing a NURBS curve of the human body of the user by taking the center of each human body section of the user as a control point;
and generating a user specific body shape model according to the relative vector of the projection point corresponding to each surface vertex, the scaling coefficient, the NURBS curve parameter value corresponding to the projection point and the user human body NURBS curve.
5. The apparatus of claim 4, further comprising:
and the deformation module is used for projecting the user-specific body shape model to a two-dimensional plane to generate a two-dimensional projection model after the basic body shape model is subjected to deformation adjustment according to the body shape data and the user-specific body shape model is generated, creating geometric two-dimensional grids, acquiring the shortest distance between each grid node and the boundary of the silhouette image and a gradient vector corresponding to the shortest distance, performing deformation processing on the two-dimensional projection model according to the shortest distance and the gradient vector corresponding to the shortest distance, and performing deformation processing on the user-specific body shape model based on the deformed two-dimensional projection model.
6. The apparatus of claim 4, further comprising:
and the correction module is used for performing deformation adjustment on the basic human body model according to the human body figure data to generate a user specific figure model, then performing projection processing on the user specific figure model to generate a two-dimensional projection model, sending the two-dimensional projection model to the user to enable the user to perform error correction on the two-dimensional projection model according to the actual human body image, and performing deformation processing on the user specific figure model based on the corrected two-dimensional projection model sent by the user.
CN201610534953.5A 2016-07-07 2016-07-07 Method and device for generating user specific body shape model Active CN107590708B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610534953.5A CN107590708B (en) 2016-07-07 2016-07-07 Method and device for generating user specific body shape model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610534953.5A CN107590708B (en) 2016-07-07 2016-07-07 Method and device for generating user specific body shape model

Publications (2)

Publication Number Publication Date
CN107590708A CN107590708A (en) 2018-01-16
CN107590708B true CN107590708B (en) 2021-01-01

Family

ID=61046009

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610534953.5A Active CN107590708B (en) 2016-07-07 2016-07-07 Method and device for generating user specific body shape model

Country Status (1)

Country Link
CN (1) CN107590708B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110766607A (en) * 2018-07-25 2020-02-07 北京市商汤科技开发有限公司 Image processing method and device and computer storage medium
CN109697748B (en) * 2018-12-19 2023-05-16 网易(杭州)网络有限公司 Model compression processing method, model mapping processing method, model compression processing device, and storage medium
CN109770943B (en) * 2019-01-28 2021-11-02 电子科技大学 Ultrasonic automatic optimization method using computer vision positioning
CN109829794A (en) * 2019-02-28 2019-05-31 深圳市翰香文化科技传媒有限公司 A kind of virtual fit method and virtual fitting system based on mobile terminal
CN109993689B (en) * 2019-03-14 2023-05-16 郑州阿帕斯科技有限公司 Cosmetic method and device
CN110910481A (en) * 2019-11-26 2020-03-24 浙江大学 Three-dimensional garment mannequin modeling method based on contour deformation
CN111861822B (en) * 2020-06-03 2023-11-21 四川大学华西医院 Patient model construction method, equipment and medical education system
CN113837835B (en) * 2021-09-18 2022-10-04 完美世界(北京)软件科技发展有限公司 Role model-based wearable product display method and device
CN114511377A (en) * 2022-01-17 2022-05-17 阿里巴巴(中国)有限公司 Virtual fitting method and device
CN117297593B (en) * 2023-10-30 2024-04-05 济宁医学院附属医院 Action detection system and detection method for ankylosing spondylitis patient

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101017575A (en) * 2007-02-15 2007-08-15 东华大学 Method for automatically forming 3D virtual human body based on human component template and body profile
CN101515374A (en) * 2008-02-20 2009-08-26 中国科学院自动化研究所 Individualized realistic virtual character modeling method based on images
CN103810750A (en) * 2014-01-16 2014-05-21 北京航空航天大学 Human body section ring based parametric deformation method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101194604B1 (en) * 2008-12-22 2012-10-25 한국전자통신연구원 Method and apparatus for shape deforming surface based 3d human model

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101017575A (en) * 2007-02-15 2007-08-15 东华大学 Method for automatically forming 3D virtual human body based on human component template and body profile
CN101515374A (en) * 2008-02-20 2009-08-26 中国科学院自动化研究所 Individualized realistic virtual character modeling method based on images
CN103810750A (en) * 2014-01-16 2014-05-21 北京航空航天大学 Human body section ring based parametric deformation method

Also Published As

Publication number Publication date
CN107590708A (en) 2018-01-16

Similar Documents

Publication Publication Date Title
CN107590708B (en) Method and device for generating user specific body shape model
CN110443885B (en) Three-dimensional human head and face model reconstruction method based on random human face image
Feng et al. Avatar reshaping and automatic rigging using a deformable model
CN109427007B (en) Virtual fitting method based on multiple visual angles
CN108475439B (en) Three-dimensional model generation system, three-dimensional model generation method, and recording medium
KR20180069786A (en) Method and system for generating an image file of a 3D garment model for a 3D body model
Li et al. Fitting 3D garment models onto individual human models
CN114119908A (en) Clothing model driving method, equipment and storage medium
CN114663199A (en) Dynamic display real-time three-dimensional virtual fitting system and method
Li et al. In-home application (App) for 3D virtual garment fitting dressing room
CN114119906A (en) Self-adaptive driving method and device for clothing model and storage medium
CN114119911A (en) Human body model neural network training method, device and storage medium
CN109509241A (en) Based on the bone reorientation method of quaternary number in role animation
CN112401369A (en) Body parameter measuring method, system, equipment, chip and medium based on human body reconstruction
CN112233222A (en) Human body parametric three-dimensional model deformation method based on neural network joint point estimation
Bang et al. Estimating garment patterns from static scan data
CN114693570A (en) Human body model image fusion processing method, device and storage medium
US11461914B2 (en) Measuring surface distances on human bodies
Shi et al. Automatic 3D virtual fitting system based on skeleton driving
CN114219001A (en) Model fusion method and related device
Huang et al. Computational light painting and kinetic photography
CN116580148A (en) Parameterized human body model fitting method based on human body point cloud and measurement parameters
Ma et al. Realistic modeling and animation of human body based on scanned data
WO2018182938A1 (en) Method and system for wireless ultra-low footprint body scanning
CN116766596A (en) Character model printing method, character model printing device, electronic 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
GR01 Patent grant
GR01 Patent grant