Method of creating avatar from user submitted image
One example embodiment includes a method for creating an avatar from an image. The method includes receiving an image including a face from a user. The method also includes constructing a 3D model of the face from the image. The method further includes animating the 3D model. The method additionally includes attaching the 3D model to an animated character.
1. A method for creating an avatar from an image, the method comprising:
receiving an image including a face from a user;
constructing a 3D model of the face from the image, wherein constructing a 3D model of the face includes:
adding an alpha channel using an alpha template, wherein the alpha template is deformed so that its facial feature coordinates match those of the face from the user;
adding a predefined teeth texture to the 3D model; and
adjusting the color of the 3D model to match the skin color of the animated character;
animating the 3D model, wherein animating the 3D model includes:
an expression definition, wherein the expression definition:
defines a certain facial state; and
includes:
muscle parameters, wherein the muscle parameters:
model the contraction an anatomically plausible facial muscle; and
are applied in successive iterations; and
attaching the 3D model to an animated character.
2. The method of claim 1 , wherein constructing a 3D model of the face includes:
finding a region contain the face in the image using a cascade classifier.
3. The method of claim 1 , wherein constructing a 3D model of the face includes:
identifying the coordinates of one or more facial features within the face using at least one of:
an active shape model;
a genetic algorithm method; or
a mean shift method.
4. The method of claim 1 , wherein constructing a 3D model of the face includes:
identifying a facial expression within the face;
choosing a predefined 3D model with a facial expression that matches the identified facial expression; and
deforming the predefined 3D model to match the shape and location of the identified coordinates of the one or more facial features.
5. The method of claim 4 , wherein constructing a 3D model of the face includes:
projecting the facial image over a predefined 3D model.
6. The method of claim 1 , wherein constructing a 3D model of the face includes:
transforming the 3D model to become frontal, wherein transforming the 3D model to become frontal includes:
storing the facial feature coordinates of an average frontal face;
calculating a deformation matrix from the facial feature coordinates of the average frontal face and from the 3D coordinates of the 3D model.
7. The method of claim 1 , wherein constructing a 3D model of the face includes:
correcting uneven lighting of the 3D model.
8. A method for creating an avatar from an image, the method comprising:
receiving an image including a face from a user;
identifying the coordinates of one or more facial features within the face;
constructing a 3D model of the face from the image including:
choosing a predefined 3D model;
adding an alpha channel using an alpha template, wherein the alpha template is deformed so that its facial feature coordinates match those of the face from the user;
deforming the predefined 3D model to match the shape and location of the identified coordinates of the one or more facial features;
projecting the facial image over a predefined 3D model;
correcting uneven lighting of the 3D model;
adding a predefined teeth texture to the 3D model; and
adjusting the color of the 3D model to match the skin color of the animated character;
animating the 3D model, wherein animating the 3D model includes:
an expression definition, wherein the expression definition:
defines a certain facial state: and
includes:
muscle parameters, wherein the muscle parameters:
model the contraction an anatomically plausible facial muscle; and
are applied in successive iterations; and
translation parameters; and
furrow parameters, wherein the furrow parameters:
alter the texture of the 3D model;
deform a furrow image so that its facial feature coordinates match those of the face from the user; and
leave the coordinates of the vertices of the 3D model unchanged; and
attaching the 3D model to an animated character.
9. The method of claim 8 , wherein animating the 3D model includes:
rendering the 3D model at a predefined 3D angle as a 2D image.
10. The method of claim 8 , wherein animating the 3D model includes:
scaling the rendered 3D model to match the size of the animated character; and
pasting the scaled 2D image over the character's 2D image.
11. In a computing system, a non-transitory computer-readable storage medium including instructions that, when executed by a computing device, cause the computing device to create an avatar from an image by performing the steps:
receiving an image including a face from a user;
identifying the coordinates of one or more facial features within the face;
constructing a 3D model of the face from the image including:
choosing a predefined 3D model;
adding an alpha channel using an alpha template, wherein the alpha template is deformed so that its facial feature coordinates match those of the face from the user;
deforming the predefined 3D model to match the shape and location of the identified coordinates of the one or more facial features;
transforming the 3D model to become frontal, wherein transforming the 3D model to become frontal includes:
storing the facial feature coordinates of an average frontal face;
calculating a deformation matrix from the facial feature coordinates of the average frontal face and from the 3D coordinates of the 3D model;
projecting the facial image over a predefined 3D model;
adding a predefined teeth texture to the 3D model; and
adjusting the color of the 3D model to match the skin color of the animated character;
rendering the 3D model at a predefined 3D angle;
animating the 3D model, wherein animating the 3D model includes:
an expression definition, wherein the expression definition:
defines a certain facial state: and
includes:
translation parameters;
muscle parameters, wherein the muscle parameters:
model the contraction an anatomically plausible facial muscle; and
are applied in successive iterations;
include:
a vertex to which a muscle is attached; and
a vertex which moves on muscle contraction; and
furrow parameters, wherein the furrow parameters:
alter the texture of the 3D model;
deform a furrow image so that its facial feature coordinates match those of the face from the user; and
leave the coordinates of the vertices of the 3D model unchanged; and
attaching the 3D model to an animated character.
12. The method of claim 11 , wherein animating the 3D model includes:
achieving special effects.
13. The method of claim 12 , wherein achieving special effects includes:
simulating a facial layer, wherein simulating a facial layer includes depicting elements over certain facial features; and
deforming the facial layer to align the facial features of the facial layer with the facial features of the face.
14. The method of claim 11 , wherein animating the 3D model includes:
specifying parameters for each frame, wherein the parameters include:
specifying the parameters of each expression definition to show various expressions;
the image of a bottom layer; and
the image of a top layer.
15. The method of claim 11 , wherein animating the 3D model includes:
rendering each frame according to a template.
16. The method of claim 11 , wherein animating the 3D model includes:
saving the rendered frames to a video file.
17. The method of claim 11 , wherein animating the 3D model includes:
displaying the video file to the user.