Facial expression capturing method and device, electronic equipment and storage medium
By using lip closure constraints in facial expression capture technology and optimizing controller parameters in combination with two-dimensional and three-dimensional coordinates, the problem of poor facial expression generation in the existing technology is solved, and the authenticity and capture accuracy of facial expressions are significantly improved.
Patent Information
- Application Number
- CN202410709816.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-03
- Publication Date
- 2024-09-10
AI Technical Summary
Existing facial expression capture technology only considers two-dimensional coordinate constraints when obtaining controller parameters, resulting in a large difference between the generated facial expression and the real facial expression, and the generation effect is poor.
By obtaining the two-dimensional coordinates of the key points of the upper and lower lips in the facial image, they are restored to three-dimensional coordinates, and combined with the three-dimensional coordinates of the Mesh vertices to construct lip closure constraints, the controller parameters are optimized to improve the generation effect of facial expressions.
This makes the generated facial expressions closer to those of real actors, improving the accuracy and effect of facial expression capture.
Smart Images

Figure CN118629074A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer vision, and in particular to a facial expression capture method, device, electronic device and storage medium. Background Art
[0002] At present, facial expression capture technology is widely used in film and television production, game production, motion analysis and other fields to create facial animations of realistic characters.
[0003] When acquiring controller parameters, the facial expression capture technology in the related art only considers the two-dimensional coordinate constraints of the relevant points, which results in a large difference between the facial expressions generated by the facial expression capture technology and the real facial expressions, and the facial expression generation effect is poor. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a facial expression capture method, device, electronic device and storage medium to improve the generation effect of facial expressions.
[0005] In a first aspect, an embodiment of the present application provides a facial expression capture method, the method comprising: obtaining a facial image of a character to be bound and two-dimensional coordinates of key points of upper and lower lips in the facial image in a camera coordinate system; restoring the two-dimensional coordinates of the key points to obtain three-dimensional coordinates of the key points in a world coordinate system; constructing a lip closure constraint according to the two-dimensional coordinates of the key points, the three-dimensional coordinates of the key points, and the three-dimensional coordinates of Mesh vertices corresponding to the upper and lower lip key points in the real generated expression; wherein the lip closure constraint is used to characterize the difference between the degree of lip closure in the expected generated expression and the degree of lip closure in the real generated expression generated by the character model; using the lip closure constraint to obtain controller optimization parameters and a character optimization model using the controller optimization parameters; and using the character optimization model to obtain the character facial expression animation.
[0006] In the process of implementing the above scheme, a lip closure constraint is constructed together according to the two-dimensional coordinates of the key points of the upper and lower lips in the facial image in the camera coordinate system, the three-dimensional coordinates of the key points obtained after restoring the two-dimensional coordinates of the key points, and the three-dimensional coordinates of the Mesh vertices corresponding to the two-dimensional coordinates of the key points, so as to constrain the degree of lip closure in the expected generated expression and the degree of lip closure in the real generated expression generated by the character model, so that the facial expression generated by the character model can be closer to the real facial expression of the real actor, thereby improving the generation effect of facial expression.
[0007] In an implementation of the first aspect, constructing a lip closure constraint based on the two-dimensional coordinates of the key points, the three-dimensional coordinates of the key points, and the three-dimensional coordinates of the Mesh vertices corresponding to the upper and lower lip key points in the real generated expression includes: constructing a first lip closure sub-constraint in the lip closure constraint for characterizing the degree of lip closure based on the two-dimensional coordinates of the key points; constructing a second lip closure sub-constraint in the lip closure constraint for characterizing the difference between the three-dimensional coordinates of the key points and the three-dimensional coordinates of the Mesh vertices corresponding to the upper and lower lip key points in the real generated expression.
[0008] In the implementation process of the above scheme, by constructing a first lip closure sub-constraint characterizing the degree of lip closure and a second lip closure sub-constraint characterizing the difference between the three-dimensional coordinates of the key points and the three-dimensional coordinates of the Mesh vertices, the lip closure constraint can comprehensively consider the degree of lip closure and the difference between the lip closure state in the generated expression and the lip closure state in the real expression, so that the optimization parameters of the optimized controller using the lip closure constraint are more accurate, which is conducive to improving the generation effect of facial expressions.
[0009] In an implementation of the first aspect, constructing a first lip closure sub-constraint in the lip closure constraint for characterizing the degree of lip closure based on the two-dimensional coordinates of the key points includes: traversing the upper lip key point set, calculating a first energy term in the first lip closure sub-constraint for characterizing the sum of distances between the upper lip key point and the nearest point in the lower lip fitting line segment; traversing the lower lip key point set, calculating a second energy term in the first lip closure sub-constraint for characterizing the sum of distances between the lower lip key point and the nearest point in the upper lip fitting line segment.
[0010] In the implementation process of the above scheme, the first energy term used to characterize the sum of the distances between the upper lip key points and the nearest points in the lower lip fitting line segment and the second energy term used to characterize the sum of the distances between the lower lip key points and the nearest points in the upper lip fitting line segment are jointly constructed, so that the first lip closure sub-constraint can accurately characterize the degree of lip closure of the real facial expression in the facial image, and the lip closure constraint with the first lip closure constraint is used to optimize the controller parameters, which is conducive to improving the generation effect of facial expressions.
[0011] In an implementation of the first aspect, calculating a first energy term in the first lip closure sub-constraint for characterizing the sum of distances between an upper lip key point and a nearest point in a lower lip fitting line segment includes: calculating a first energy term in the first lip closure sub-constraint for characterizing the sum of distances between an upper lip key point and a nearest point in a lower lip fitting line segment in combination with a first threshold weight function for controlling whether the upper lip key point enables the lip closure constraint according to the distance between the upper lip key point and the nearest point in the lower lip fitting line segment and a preset distance threshold;
[0012] The calculating of the second energy term in the first lip closure sub-constraint for characterizing the sum of the distances between the lower lip key point and the nearest point in the upper lip fitting line segment includes: calculating the second energy term in the first lip closure sub-constraint for characterizing the sum of the distances between the lower lip key point and the nearest point in the upper lip fitting line segment in combination with a second threshold weighting function for controlling whether the lip closure constraint is enabled for the lower lip key point based on the distance between the lower lip key point and the nearest point in the upper lip fitting line segment and the preset distance threshold.
[0013] In the implementation process of the above scheme, by adding the first threshold weight function and the second threshold weight function for controlling whether the key point enables the lip closure constraint in the first lip closure sub-constraint, the first lip closure sub-constraint can determine whether the lip closure constraint needs to be enabled according to the lip closure threshold, so that the first lip closure constraint can more accurately represent the lip closure of the real facial expression in the facial image, and the controller parameters are optimized using the lip closure constraint with the first lip closure constraint, which is conducive to improving the generation effect of facial expressions.
[0014] In an implementation method of the first aspect, the two-dimensional coordinates of the key points are restored to obtain the three-dimensional coordinates of the key points in the world coordinate system, including: obtaining a depth map corresponding to the facial image based on the internal and external parameters of the camera and the facial image; and calculating the three-dimensional coordinates of the key points corresponding to the two-dimensional coordinates of the key points based on the depth and surface normal in the depth map.
[0015] In the implementation process of the above scheme, the internal and external parameters of the binocular camera can be used to obtain the depth information corresponding to the facial image, and then more accurate three-dimensional coordinates of key points can be quickly obtained through the depth information, so that the constructed lip closure constraint is also more accurate, which is conducive to improving the generation effect of facial expressions.
[0016] In an implementation of the first aspect, the use of the lip closure constraint to obtain controller optimization parameters and a character optimization model using the controller optimization parameters includes: using the lip closure constraint, combining at least one of a two-dimensional coordinate constraint, a depth map constraint, and a continuous frame constraint to jointly construct an objective function; solving the objective function to obtain controller optimization parameters and a character optimization model using the controller optimization parameters.
[0017] In the process of implementing the above scheme, on the basis of adopting the lip closure constraint, it is also possible to consider adding at least one constraint among the two-dimensional coordinate constraint, the depth map constraint and the continuous frame constraint to jointly construct the objective function, so as to improve the accuracy of facial expression capture.
[0018] In an implementation of the first aspect, before constructing the lip closure constraint based on the two-dimensional coordinates of the key points, the three-dimensional coordinates of the key points, and the three-dimensional coordinates of the Mesh vertices corresponding to the upper and lower lip key points in the real generated expression, the method also includes: determining the Mesh vertex indexes corresponding to the upper and lower lip key points; and determining the three-dimensional coordinates of the Mesh vertices corresponding to the upper and lower lip key points in the real generated expression generated by the character model based on the Mesh vertex indexes.
[0019] In the implementation process of the above scheme, the three-dimensional coordinates of the Mesh points corresponding to the upper and lower lip key points are determined in the Mesh grid through the correspondence between the upper and lower lip key points and the Mesh vertex index, which is convenient for constructing lip closure constraints and is beneficial to improving the facial expression capture efficiency and capture accuracy of the above facial expression capture method.
[0020] In a second aspect, an embodiment of the present application provides a facial expression capturing device, the device comprising:
[0021] A key point two-dimensional coordinate acquisition module is used to acquire the facial image of the character to be bound and the two-dimensional coordinates of the key points of the upper and lower lips in the facial image in the camera coordinate system;
[0022] A coordinate recovery module, used to recover the two-dimensional coordinates of the key points and obtain the three-dimensional coordinates of the key points in the world coordinate system;
[0023] A lip closure constraint construction module is used to construct a lip closure constraint according to the two-dimensional coordinates of the key points, the three-dimensional coordinates of the key points, and the three-dimensional coordinates of the Mesh vertices corresponding to the upper and lower lip key points in the real generated expression; wherein the lip closure constraint is used to characterize the difference between the lip closure degree in the expected generated expression and the lip closure degree in the real generated expression generated by the character model;
[0024] An optimization parameter acquisition module, used to adopt the lip closure constraint to acquire controller optimization parameters and a character optimization model using the controller optimization parameters;
[0025] The character facial expression animation acquisition module is used to acquire the character facial expression animation using the character optimization model.
[0026] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a memory, and a communication bus, wherein the processor and the memory communicate with each other through the communication bus; the memory stores computer program instructions that can be executed by the processor, and when the computer program instructions are read and run by the processor, the method provided by the first aspect or any possible implementation of the first aspect is executed.
[0027] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are read and executed by a processor, the method provided by the first aspect or any possible implementation of the first aspect is executed.
[0028] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the embodiments of the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0030] Figure 1 A flowchart of a facial expression capture method provided in an embodiment of the present application;
[0031] Figure 2 A schematic diagram of key points of the upper and lower inner lips of the face provided in an embodiment of the present application;
[0032] Figure 3 A schematic diagram of the structure of a facial expression capture device provided in an embodiment of the present application;
[0033] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0034] The following will describe the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings in the embodiments of the present application. The following embodiments are only used to more clearly illustrate the technical solutions of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.
[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.
[0036] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0037] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0038] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0039] Facial expression capture technology, also known as facial motion capture or facial expression motion capture, is an important part of motion capture technology. Facial expression capture technology uses cameras and other equipment to record and analyze the facial expressions and movements of the people being photographed, and converts these facial expressions and movements into a series of parameter data that can be quantified and processed. Facial expression capture technology is widely used in the film industry, animation industry, motion analysis, virtual reality and other fields. For example, in animation production and game production, facial expression capture technology can be used to capture the facial expressions and movements of real actors in real time, and then transcribe them into the expressions and movements of digital character models.
[0040] At present, the facial expression capture method in the related technology only considers the two-dimensional coordinate constraints of the relevant points when obtaining the controller parameters, that is, only considers the deviation between the two-dimensional coordinates of the relevant points in the camera coordinate system and the projection of the corresponding vertices of the character model Mesh in the camera coordinate system. As a result, the facial expressions generated by the facial expression capture technology are quite different from the real facial expressions, and the facial expression generation effect is poor.
[0041] Based on this, an embodiment of the present application provides a facial expression capture method, which constructs a lip closure constraint based on the two-dimensional coordinates of the key points of the upper and lower lips in the facial image in the camera coordinate system, the three-dimensional coordinates of the key points obtained after restoring the two-dimensional coordinates of the key points, and the three-dimensional coordinates of the Mesh vertices corresponding to the two-dimensional coordinates of the key points, thereby constraining the degree of lip closure in the expected generated expression and the degree of lip closure in the real generated expression generated by the character model, so that the facial expression generated by the character model can be closer to the real facial expression of the real actor, thereby improving the generation effect of facial expressions.
[0042] The following is a detailed description of the above facial expression capture methods. Figure 1 , an embodiment of the present application provides a facial expression capture method, the method comprising:
[0043] Step S110: Obtaining a facial image of the person to be bound and two-dimensional coordinates of key points of the upper and lower lips in the facial image in a camera coordinate system;
[0044] Step S120: restoring the two-dimensional coordinates of the key points to obtain the three-dimensional coordinates of the key points in the world coordinate system;
[0045] Step S130: constructing a lip closure constraint according to the two-dimensional coordinates of the key points, the three-dimensional coordinates of the key points, and the three-dimensional coordinates of the Mesh vertices corresponding to the key points of the upper and lower lips in the real generated expression; wherein the lip closure constraint is used to characterize the difference between the lip closure degree in the expected generated expression and the lip closure degree in the real generated expression generated by the character model;
[0046] Step S140: using the lip closure constraint to obtain controller optimization parameters and a character optimization model using the controller optimization parameters;
[0047] Step S150: using the character optimization model to obtain the character's facial expression animation.
[0048] First, let's introduce the characters to be bound, the role models, and the relationship between them:
[0049] The character to be bound is a real person in the real world, and the role model is a virtual character that exists in the virtual world. It can be understood that the purpose of facial capture technology is to create a virtual character in the virtual world for a real person in the real world, and to convert the facial movements of the real person into facial animations of the virtual character.
[0050] In addition, the above-mentioned character model can be understood as a mathematical model, the input of which is the controller parameters, and the output of which is the position of the mesh vertices of the virtual character's face (the combination of multiple mesh vertices forms the facial expression). Among them, the controller parameters are the specific quantitative representation of the facial shape features and expressions. By adjusting the controller parameters, the facial expression animation output by the character model can be made closer to the real facial expression.
[0051] In addition, it can be understood that the relevant contents of coordinate systems such as the camera coordinate system and the world coordinate system involved in the embodiments of the present application are existing technologies in computer vision technology. Please refer to the relevant technologies for specific contents, and the embodiments of the present application will not be repeated.
[0052] It is understandable that the role model before optimization can adopt the relevant role model stored in the relevant software (such as Maya, MetaHuman, etc.), and the role model can be obtained after the facial image of the character to be bound is preliminarily bound to the relevant role model. Taking MetaHuman software as an example, in MetaHuman software, the identity file of the actor can be generated according to the acquired facial image of the character to be bound. This file can be understood as a parameterized mathematical model, which is a name for the MetaHuman facial binding file. For ease of understanding, the specific implementation of the mathematical model is no longer described in detail in the embodiment of the present application. A brief introduction to the file is as follows: the input of the model is the controller parameter, and the output is a two-dimensional array of [N, 3]. Each row of the array is a set of three-dimensional coordinates, which is used to represent the position of the Mesh vertex in the target role model, and N represents the number of Mesh vertices.
[0053] It can be understood that the electronic device that executes the above-mentioned facial expression capture method can obtain the facial image of the person to be bound by other electronic devices that can capture the facial image of the person to be bound (for example, using a stereo head-mounted camera), or the facial image of the person to be bound can be captured by the electronic device that executes the above-mentioned facial expression capture method.
[0054] It can be understood that the facial image of the person to be bound obtained in step S110 may be an image captured by a binocular camera.
[0055] The key points of the upper and lower lips in step S110 are introduced below:
[0056] It can be understood that the upper and lower lip key points in step S110 include the upper lip key points and the lower lip key points. Figure 2 Inner lip key points shown.
[0057] It is understandable that the key points of the upper and lower lips can be obtained through facial key point detection. Facial key points refer to the key areas of the face located in the face image, including eyebrows, eyes, nose, mouth, facial contours and other feature points. Facial key points can be obtained through key point detection algorithms or by manually tracking facial feature points. The key points of the upper and lower lips can be obtained from the facial key points.
[0058] The method for obtaining the key points of the upper and lower lips in step S110 may be: presetting the number of facial key points to be collected, then using a facial key point detection algorithm to detect facial key points in each facial image, and obtaining the two-dimensional coordinates of each facial key point in the camera coordinate system, and then filtering the upper and lower lip key points from the facial key points. Of course, the key point detection algorithm may also be directly used to detect the key points of the upper and lower lips in the facial image.
[0059] It is understandable that the facial key points in the camera coordinate system have a certain correspondence with the Mesh vertices in the character model. When performing facial key point detection, the number of key points and their corresponding names can be determined in advance and kept consistent in the tracking sequence. The key point information configuration can be as follows:
[0060] "pt_eye_corner_inner_1":
[0061] {
[0062] "type": "landmark"
[0063] "vID":4009
[0064] }
[0065] The above pt_eye_corner_inner_1 represents the name of the key point, and vID represents the point order of the Mesh vertex, which can also be understood as an index. When vID is 4009, it means that the vertex with point order 4009 in the Mesh vertex corresponds to the key point pt_eye_corner_inner_1.
[0066] It is understandable that there are as many Mesh vertices as there are key points on the face. Of course, there are as many Mesh vertices as there are key points on the upper and lower lips.
[0067] The coordinates of the upper and lower lip key points obtained after key point detection on the facial image of the person to be bound collected by the binocular camera in the embodiment of the present application include:
[0068] The facial key points detected in the facial image captured by the upper camera are (Uu i ,Vu i ), the facial key points detected in the facial image captured by the camera below are (Ub i ,Vb i ).
[0069] The following is an introduction to the scheme of restoring the two-dimensional coordinates of the key points in step S120 to obtain the three-dimensional coordinates of the key points:
[0070] It is understandable that there are many implementation methods for obtaining the three-dimensional coordinates of key points from the two-dimensional coordinates of key points, which may include a recovery method using depth information, a recovery method using machine learning or deep learning, and a recovery method using geometric constraints. The following describes these three implementation methods in detail:
[0071] The first implementation method: using depth information to restore the three-dimensional coordinates of the key points from the two-dimensional coordinates of the key points;
[0072] As an optional implementation of the above-mentioned facial expression capture method, step S120 includes: obtaining a depth map corresponding to the facial image according to the internal and external parameters of the camera and the facial image; and calculating the three-dimensional coordinates of the key points corresponding to the two-dimensional coordinates of the key points according to the depth and surface normal in the depth map. This implementation is for example:
[0073] According to the internal and external parameters of the binocular camera and the facial images from upper and lower perspectives, the disparity map can be obtained through the stereo vision algorithm, and then the depth map can be obtained through the disparity map. The depth corresponding to each pixel in the facial image and the normal of the face surface can be obtained through the depth map. Then, the three-dimensional coordinates of the key points corresponding to the upper and lower lip key points can be obtained through the depth and normal at the upper and lower lip key points.
[0074] The above scheme can use the internal and external parameters of the binocular camera to obtain the depth information corresponding to the facial image, and then quickly obtain more accurate three-dimensional coordinates of key points through the depth information, so that the constructed lip closure constraint is also more accurate, which is conducive to improving the generation effect of facial expressions.
[0075] The second implementation method: using machine learning or deep learning technology to restore the three-dimensional coordinates of the key points from the two-dimensional coordinates of the key points;
[0076] In this embodiment, a deep learning or machine learning model such as a convolutional neural network (CNN) may be used to restore the three-dimensional coordinates of the key points based on the two-dimensional coordinates of the key points.
[0077] The third implementation method: using geometric constraints to recover the three-dimensional coordinates of key points;
[0078] In this implementation, multiple images from different perspectives may be used to restore the three-dimensional coordinates of key points by matching points in a manner that relies on the geometric relationship between images to restore the three-dimensional coordinates of key points.
[0079] The following is an introduction to the scheme of constructing the lip closure constraint in step S130:
[0080] First, let's introduce the components of the lip closure constraint:
[0081] As an optional implementation of the above facial expression capture method, the above step S130 includes: constructing a first lip closure sub-constraint in the lip closure constraint for characterizing the degree of lip closure according to the two-dimensional coordinates of the key points; constructing a second lip closure sub-constraint in the lip closure constraint for characterizing the difference between the three-dimensional coordinates of the key points and the three-dimensional coordinates of the Mesh vertices corresponding to the key points of the upper and lower lips in the real generated expression. This implementation is for example:
[0082] The above lip closure constraint can be expressed as:
[0083] E lipclosure =weight model E lipclosuremodel +weight lipclosure3d E lipclosure3d
[0084] Among them, E lipclosure is the lip closure constraint; E lipclosuremodel is the first lip closure sub-constraint; E lipclosure3d For the second sub-constraint; weight model and weight lipclosure3d are the first lip closure sub-constraint weight and the second sub-constraint weight, respectively.
[0085] The above scheme constructs a first lip closure sub-constraint that characterizes the degree of lip closure and a second lip closure sub-constraint that characterizes the difference between the three-dimensional coordinates of the key points and the three-dimensional coordinates of the Mesh vertices, so that the lip closure constraint can comprehensively consider the degree of lip closure and the difference between the lip closure state in the generated expression and the lip closure state in the real expression, thereby making the optimization parameters of the controller optimized by using the lip closure constraint more accurate, which is conducive to improving the generation effect of facial expressions.
[0086] The following describes how to obtain the three-dimensional coordinates of the above Mesh vertices:
[0087] As an optional implementation of the above-mentioned facial expression capture method, before step S130, the above-mentioned facial expression capture method also includes: determining the Mesh vertex indexes corresponding to the upper and lower lip key points; and determining the three-dimensional coordinates of the Mesh vertices corresponding to the upper and lower lip key points in the real generated expression generated by the character model according to the Mesh vertex indexes.
[0088] It can be understood that each Mesh vertex in the character model has a corresponding vertex index. Since each facial key point has a corresponding relationship with the vertex index of the Mesh vertex in the target character model, the Mesh vertex corresponding to each upper and lower lip key point and its corresponding Mesh vertex three-dimensional coordinates can be determined through the correspondence between the facial key point and the vertex index of the Mesh vertex.
[0089] In addition, it is understandable that before obtaining the three-dimensional coordinates of the Mesh vertices corresponding to the key points of the upper and lower lips, a coordinate system conversion algorithm such as the Procrustes algorithm can be used to convert the Mesh vertices of the character model to the world coordinate system set during camera calibration.
[0090] The above scheme determines the three-dimensional coordinates of the Mesh points corresponding to the upper and lower lip key points in the Mesh grid through the correspondence between the upper and lower lip key points and the Mesh vertex index, which is convenient for constructing lip closure constraints and is beneficial to improving the facial expression capture efficiency and capture accuracy of the above facial expression capture method.
[0091] Before introducing the first lip closure sub-constraint and the second lip closure sub-constraint, the lip closure degree involved in the embodiment of the present application is first introduced:
[0092] It is understood that the degree of lip closure can be characterized in several ways:
[0093] (1) The angle between the key points of the upper and lower lips;
[0094] By measuring the angle formed between the upper lip key points and the lower lip key points, the shape and degree of closure of the lips can be further quantified. For example, the angle between the corner of the mouth and the center point of the lips can be measured to determine the degree of closure of the lips.
[0095] (2) the curvature of the lip contour;
[0096] The lip contour is fitted through the key points of the upper and lower lips, and the degree of lip closure is determined by analyzing the curvature change of the lip contour.
[0097] (3) Lip area;
[0098] The upper lip segment and the lower lip segment are fitted through the key points of the upper and lower lips respectively, and then the area of the area enclosed by the upper lip segment and the lower lip segment, that is, the mouth area, is calculated, and the degree of lip closure is determined by the mouth area. Generally speaking, the larger the mouth area, the smaller the lip closure, and vice versa, the smaller the mouth area, the greater the lip closure.
[0099] (4) Deep learning features;
[0100] The degree of lip closure is determined by extracting features of the lip area using deep learning models such as convolutional neural networks.
[0101] (5) The distance between the key point of the upper lip and the corresponding key point of the lower lip;
[0102] The upper lip key point set is defined as:
[0103] LipUpper={vu0,vu1,vu2,...,vu n}, vu i ∈R 3×1 , 0≤i≤n, where n is the number of key points on the upper lip;
[0104] Define the lower lip key point set as:
[0105] LipLower={vl0,vl1,vl2,...,vl m}, vl i ∈R 3×1 , 0≤i≤m, where m is the number of key points of the lower lip;
[0106] It can be understood that the number of key points included in the upper lip key point set LipUpper and the lower lip key point set LipLower may be equal or unequal.
[0107] The upper lip key point set LipUpper and the lower lip key point set LipLower may be fitted into line segment LipUpper and line segment LipLower respectively.
[0108] Before calculating the distance between the upper lip key point and the lower lip key point, it is necessary to first determine the lower lip key point corresponding to the upper lip key point, or determine the upper lip key point corresponding to the lower lip key point. Taking determining the lower lip key point corresponding to the upper lip key point as an example, the determination method can be:
[0109] For the point vu in the upper lip key point set LipUpper i , with vu iAs the vertex, draw a perpendicular line perpendicular to the line segment LipLower fitted by the key point of the lower lip, determine the shortest perpendicular line, and the intersection of the perpendicular line and the line segment LipLower is the distance point vu in the line segment LipLower. i The nearest point coordinates
[0110] The above process of finding the nearest point can be recorded as:
[0111] FindClosestLineCoor(Points_set,points)
[0112] Points_set represents the line segment fitted by the point set, such as the line segment LipUpper and the line segment LipLower; points is the key point to find the closest point, such as point vu in the upper lip key point set. i , or vl in the lower lip key point set i ; The function of the above FindClosestLineCoor is to return the coordinates of the closest point in Points_set that is closest to point points.
[0113] The lip closure value LipclosureValue in the embodiment of the present application can be defined as the average distance between the closest points corresponding to the upper lip key points and the fitted line segments of the lower lip key points, or the average distance between the closest points corresponding to the lower lip key points and the fitted line segments of the upper lip key points. The expression can be:
[0114]
[0115] or,
[0116]
[0117] The above two expressions of lip closure degree are only expressed by using two-dimensional coordinates of key points. Of course, three-dimensional coordinates of key points can also be used for expression. The principle is similar to that of using two-dimensional coordinates of key points, which will not be repeated here.
[0118] In addition, it can be understood that the above-mentioned lip closure degree LipclosureValue is used to characterize the opening range of the mouth. The larger the opening range of the mouth, the larger the value of LipclosureValue. Conversely, the smaller the opening range of the mouth, the smaller the value of LipclosureValue.
[0119] The following is an introduction to the first lip closure sub-constraint in the lip closure constraint:
[0120] As an optional implementation of the above-mentioned facial expression capture method, based on the two-dimensional coordinates of the key points, constructing the first lip closure sub-constraint in the lip closure constraint for characterizing the degree of lip closure, including: traversing the upper lip key point set, calculating the first energy term in the first lip closure sub-constraint for characterizing the sum of the distances between the upper lip key point and the nearest point in the lower lip fitting line segment; traversing the lower lip key point set, calculating the second energy term in the first lip closure sub-constraint for characterizing the sum of the distances between the lower lip key point and the nearest point in the upper lip fitting line segment. This implementation is for example:
[0121] The expression for the first lip closure sub-constraint can be:
[0122]
[0123] in, is the first energy term; is the second energy term; w1 and w2 are the weights of the first energy term and the second energy term respectively. In the embodiment of the present application, w1 and w2 can both be 20.
[0124] The above scheme combines the first energy term used to characterize the sum of the distances between the upper lip key points and the nearest points in the lower lip fitting line segments and the second energy term used to characterize the sum of the distances between the lower lip key points and the nearest points in the upper lip fitting line segments to jointly construct the first lip closure sub-constraint, so that the first lip closure sub-constraint can accurately characterize the degree of lip closure of the real facial expression in the facial image, which is conducive to improving the generation effect of facial expressions.
[0125] As an optional implementation of the above-mentioned facial expression capture method, calculating a first energy term in the first lip closure sub-constraint for characterizing the sum of the distances between the upper lip key point and the nearest point in the lower lip fitting line segment, including: combining a first threshold weight function for controlling whether the upper lip key point enables the lip closure constraint according to the distance between the upper lip key point and the nearest point in the lower lip fitting line segment and a preset distance threshold, calculating a first energy term in the first lip closure sub-constraint for characterizing the sum of the distances between the upper lip key point and the nearest point in the lower lip fitting line segment;
[0126] Calculating a second energy term in the first lip closure sub-constraint for characterizing the sum of distances between a lower lip key point and the nearest point in an upper lip fitting line segment, comprising: combining a second threshold weight function for controlling whether the lower lip key point enables the lip closure constraint according to the distance between the lower lip key point and the nearest point in the upper lip fitting line segment and a preset distance threshold, calculating a second energy term in the first lip closure sub-constraint for characterizing the sum of distances between the lower lip key point and the nearest point in the upper lip fitting line segment.
[0127] This implementation example is:
[0128] The distance between the corresponding nearest points in the fitted line segments of the upper lip key points and the lower lip key points is defined as L1, that is:
[0129] L1=‖vu i -FindClosestLineCoor(LipLower,vu i )‖2
[0130] The distance between the corresponding nearest points in the fitted line segments of the lower lip key points and the upper lip key points is defined as L2, that is:
[0131] L2=‖vl i -FindClosestLineCoor(LipUpper,vl i )‖2
[0132] The expression of the first threshold weight function can be:
[0133]
[0134] The expression of the second threshold weight function can be:
[0135]
[0136] Wherein, threshhold is the lip closure threshold, which can be 0.01 in the embodiment of the present application;
[0137] It can be understood that the first threshold weight function and the second threshold weight function are both used to control whether the key point enables the lip closure constraint. Taking the first threshold weight function as an example, when the distance between the corresponding nearest points in the fitted line segments of the upper lip key point and the lower lip key point, i.e., L1, is less than the lip closure threshold, the weight function is enabled. And the weight The strength of is proportional to the size of L1, that is, within the lip closure threshold range, the larger L1 is, the greater the weight is. When L1 exceeds the lip closure threshold, it is considered that the lips at this upper lip key point are not closed, so the weight Set to 0.
[0138] Adding the first threshold weight function and the second threshold weight function Then, the expression of the first lip closure sub-constraint can be:
[0139]
[0140] The above scheme adds a first threshold weight function and a second threshold weight function for controlling whether the key point enables the lip closure constraint in the first lip closure sub-constraint, so that the first lip closure sub-constraint can determine whether the lip closure constraint needs to be enabled according to the lip closure threshold, so that the first lip closure constraint can more accurately represent the lip closure of the real facial expression in the facial image. The lip closure constraint with the first lip closure constraint is used to optimize the controller parameters, thereby improving the generation effect of facial expressions.
[0141] Next, the second lip closure sub-constraint E in the above lip closure constraint is lipclosure3d To introduce:
[0142] Second lip closure sub-constraint E lipclosure3d The expression can be:
[0143]
[0144] Among them, Mvu i and Mvl i are the upper lip key points and the lower lip key points in the Mesh mesh respectively; LipLpper3d and LipLower3d are the three-dimensional coordinates of the key points restored according to the two-dimensional coordinates of the key points in step S120; and denote the weights of the first energy term and the second energy term in the second lip closure sub-constraint respectively; w 3d To adjust the weight, the embodiment of the present application can take 1.0.
[0145] Step S140 and step S150 are introduced below:
[0146] As an optional implementation of the above-mentioned facial expression capture method, the above-mentioned step S140 includes: using the lip closure constraint, combining at least one of the two-dimensional coordinate constraint, the depth map constraint and the continuous frame constraint, to jointly construct an objective function; solving the objective function, obtaining controller optimization parameters and a character optimization model using the controller optimization parameters.
[0147] The following describes the construction methods of two-dimensional coordinate constraints, depth map constraints, and continuous frame constraints:
[0148] Two-dimensional coordinate constraint: Since the facial key points have a certain correspondence with the Mesh vertices in the character model, the projection point coordinates of the Mesh vertices corresponding to the facial key points in the camera coordinate system can be obtained by:
[0149] (PUu i ,PVu i )=In u Exu Identity(GuiInput)[:,Vid i ]
[0150] (PUb i ,PVb i )=In b Ex b Identity(GuiInput)[:,Vid i ]
[0151] Among them, (PUu i ,PVu i ) and (PUb i ,PVb i ) are facial key points (Uu i ,Vu i ) and (Ub i ,Vb i ) The projection point of the corresponding Mesh vertex in the camera coordinate system; In u and Ex u In are the intrinsic parameters and extrinsic parameters of the upper camera in the binocular camera respectively; b and Ex b are the intrinsic and extrinsic parameters of the lower camera in the binocular camera respectively; Vid i Indicates the Mesh vertex index corresponding to the facial key points; Identity (GuiIput) is the output of the Identity model, that is, the output of the role model.
[0152] Construct a 2D coordinate constraint:
[0153]
[0154] Among them, N1 is the number of facial key points involved in the two-dimensional coordinate constraint; weight 2d is the 2D coordinate constraint weight.
[0155] It is understandable that the above parameters In u 、Ex u 、In b and Ex b It can be obtained through camera calibration. The binocular camera calibration method can adopt Zhang's calibration method and other methods, or it can be calibrated by using the calibration toolbox in the related technology, which will not be described in detail in the embodiments of this application.
[0156] Depth map constraint: Based on the internal and external parameters of the camera and the facial images captured by the upper and lower cameras, the disparity map can be obtained through the stereo vision algorithm, and then the depth map can be further obtained through the disparity map. The depth map can be used to obtain the depth of each pixel and the normal map of the face surface.
[0157] Based on the depth D mn and normal (Tx mn ,Ty mn ,Tz mn ) to obtain the world coordinates (Dwx ab ,Dwy ab ,Dw ab ), where (a, b) represents pixel coordinates, 0≤a≤image height, 0≤b≤image width;
[0158] By projecting Identity (GuiInput) onto the image, we can obtain the world coordinates (Mwx mn ,Mwy mn ,Mwz mn );
[0159] Construct the depth map constraint:
[0160]
[0161] Among them, weight depth is the depth map constraint weight; N2 is the number of facial key points involved in the depth map constraint;
[0162] Construct a continuous frame constraint:
[0163]
[0164] in, represents the value of the i-th controller in the t-th frame; N3 represents the number of controllers;
[0165] The objective function constructed by using lip closure constraint, two-dimensional coordinate constraint, depth map constraint and continuous frame constraint can be:
[0166] cost = E 2d +E lipclosure +E depth +E continue
[0167]
[0168] st-1≤GuiInput≤1
[0169] After constructing the objective function, the objective function can be solved by the Gauss-Newton iteration method to obtain the controller optimization parameters and the role optimization model using the controller optimization parameters.
[0170] In addition to the lip closure constraint, the above scheme may also consider adding at least one of the two-dimensional coordinate constraint, the depth map constraint, and the continuous frame constraint to jointly construct the objective function, thereby further improving the accuracy of facial expression capture.
[0171] See also Figure 3 Based on the same inventive concept, the embodiment of the present application further provides a facial expression capturing device 200, which includes:
[0172] The key point two-dimensional coordinate acquisition module 210 is used to acquire the facial image of the character to be bound and the key point two-dimensional coordinates of the upper and lower lip key points in the facial image in the camera coordinate system;
[0173] A coordinate recovery module 220 is used to recover the two-dimensional coordinates of the key points to obtain the three-dimensional coordinates of the key points in the world coordinate system;
[0174] The lip closure constraint construction module 230 is used to construct a lip closure constraint according to the two-dimensional coordinates of the key points, the three-dimensional coordinates of the key points, and the three-dimensional coordinates of the Mesh vertices corresponding to the upper and lower lip key points in the real generated expression; wherein the lip closure constraint is used to characterize the difference between the lip closure degree in the expected generated expression and the lip closure degree in the real generated expression generated by the character model;
[0175] An optimization parameter acquisition module 240, used to adopt the lip closure constraint to acquire controller optimization parameters and a character optimization model using the controller optimization parameters;
[0176] The character facial expression animation acquisition module 250 is used to acquire the character facial expression animation using the character optimization model.
[0177] As an optional implementation of the facial expression capture device, the lip closure constraint construction module 230 includes:
[0178] A first lip closure sub-constraint construction unit, configured to construct a first lip closure sub-constraint in the lip closure constraint for characterizing the degree of lip closure according to the two-dimensional coordinates of the key points;
[0179] The second lip closure sub-constraint construction unit is used to construct the second lip closure sub-constraint in the lip closure constraint for characterizing the difference between the three-dimensional coordinates of the key points and the three-dimensional coordinates of the Mesh vertices corresponding to the upper and lower lip key points in the real generated expression.
[0180] As an optional implementation of the above-mentioned facial expression capture device, the above-mentioned first lip closure sub-constraint construction unit is specifically used to: traverse the upper lip key point set, calculate the first energy term in the first lip closure sub-constraint for characterizing the sum of the distances between the upper lip key point and the nearest point in the lower lip fitting line segment; traverse the lower lip key point set, calculate the second energy term in the first lip closure sub-constraint for characterizing the sum of the distances between the lower lip key point and the nearest point in the upper lip fitting line segment.
[0181] As an optional implementation manner of the above-mentioned facial expression capture device, the above-mentioned first lip closure sub-constraint construction unit is specifically used to: combine with a first threshold weight function for controlling whether the upper lip key point enables the lip closure constraint according to the distance between the upper lip key point and the nearest point in the lower lip fitting line segment and a preset distance threshold, and calculate a first energy term in the first lip closure sub-constraint for characterizing the sum of the distances between the upper lip key point and the nearest point in the lower lip fitting line segment; combine with a second threshold weight function for controlling whether the lower lip key point enables the lip closure constraint according to the distance between the lower lip key point and the nearest point in the upper lip fitting line segment and the preset distance threshold, and calculate a second energy term in the first lip closure sub-constraint for characterizing the sum of the distances between the lower lip key point and the nearest point in the upper lip fitting line segment.
[0182] As an optional implementation of the above-mentioned facial expression capture device, the above-mentioned coordinate recovery module 220 is specifically used to: obtain a depth map corresponding to the facial image based on the internal and external parameters of the camera and the facial image; calculate the three-dimensional coordinates of the key points corresponding to the two-dimensional coordinates of the key points based on the depth and surface normal in the depth map.
[0183] As an optional implementation of the above-mentioned facial expression capture device, the above-mentioned optimization parameter acquisition module 240 is specifically used to: adopt the lip closure constraint, combine at least one of the two-dimensional coordinate constraint, the depth map constraint and the continuous frame constraint, and jointly construct the objective function; solve the objective function, obtain the controller optimization parameters and the character optimization model using the controller optimization parameters.
[0184] As an optional implementation of the facial expression capturing device, the facial expression capturing device 200 further includes:
[0185] The Mesh vertex three-dimensional coordinate acquisition module is used to determine the Mesh vertex index corresponding to the upper and lower lip key points; according to the Mesh vertex index, the Mesh vertex three-dimensional coordinates corresponding to the upper and lower lip key points are determined in the real generated expression generated by the character model.
[0186] Figure 4 A schematic diagram of an electronic device provided in an embodiment of the present application. Figure 4The electronic device 300 includes: a processor 310, a memory 320 and a communication interface 330. These components are interconnected and communicate with each other through a communication bus 340 and / or other forms of connection mechanisms (not shown).
[0187] The memory 320 includes one or more (only one is shown in the figure), which may be, but not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc. The processor 310 and other possible components may access the memory 320 and read and / or write data therein.
[0188] The processor 310 includes one or more (only one is shown in the figure), which can be an integrated circuit chip with signal processing capabilities. The above-mentioned processor 310 can be a general-purpose processor, including a central processing unit (CPU), a micro controller unit (MCU), a network processor (NP) or other conventional processors; it can also be a special-purpose processor, including a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0189] The communication interface 330 includes one or more (only one is shown in the figure), which can be used to communicate directly or indirectly with other devices to exchange data. For example, the communication interface 330 can be an Ethernet interface; it can be a mobile communication network interface, such as an interface of a 3G, 4G, or 5G network; or it can be other types of interfaces with data transceiving functions.
[0190] One or more computer program instructions may be stored in the memory 320 , and the processor 310 may read and execute these computer program instructions to implement the facial expression capture method and other desired functions provided in the embodiments of the present application.
[0191] Understandably, Figure 4 The structure shown is for illustration only. The electronic device 300 may also include Figure 4 More or fewer components as shown, or with Figure 4 Different configurations are shown. Figure 4 Each component shown in the figure can be implemented by hardware, software or a combination thereof. For example, the electronic device 300 can be a single server (or other device with computing processing capabilities), a combination of multiple servers, a cluster of a large number of servers, etc., and can be both a physical device and a virtual device.
[0192] The present application also provides a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are read and executed by a computer processor, the facial expression capture method provided by the present application is executed. For example, the computer-readable storage medium can be implemented as Figure 4 The memory 320 in the electronic device 300.
[0193] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0194] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0195] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0196] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A facial expression capture method, characterized in that: The method comprises: Obtaining a facial image of a person to be bound and two-dimensional coordinates of key points of upper and lower lips in the facial image in a camera coordinate system; Restoring the two-dimensional coordinates of the key points to obtain the three-dimensional coordinates of the key points in the world coordinate system; Constructing a lip closure constraint according to the two-dimensional coordinates of the key points, the three-dimensional coordinates of the key points, and the three-dimensional coordinates of the Mesh vertices corresponding to the upper and lower lip key points in the real generated expression; wherein the lip closure constraint is used to characterize the difference between the lip closure degree in the expected generated expression and the lip closure degree in the real generated expression generated by the character model; Using the lip closure constraint, obtaining controller optimization parameters and a character optimization model using the controller optimization parameters; The character optimization model is used to obtain the character's facial expression animation.
2. The facial expression capturing method according to claim 1, wherein: The step of constructing the lip closing constraint according to the two-dimensional coordinates of the key points, the three-dimensional coordinates of the key points, and the three-dimensional coordinates of the Mesh vertices corresponding to the key points of the upper and lower lips in the real generated expression includes: According to the two-dimensional coordinates of the key points, construct a first lip closure sub-constraint in the lip closure constraint for characterizing the degree of lip closure; According to the three-dimensional coordinates of the key points and the three-dimensional coordinates of the Mesh vertices corresponding to the upper and lower lip key points in the real generated expression, a second lip closure sub-constraint in the lip closure constraint is constructed to characterize the difference between the three-dimensional coordinates of the key points and the three-dimensional coordinates of the Mesh vertices.
3. The facial expression capturing method according to claim 2, wherein: The step of constructing a first lip closure sub-constraint in the lip closure constraint for characterizing the degree of lip closure according to the two-dimensional coordinates of the key points includes: Traversing the upper lip key point set, calculating the first energy term in the first lip closure sub-constraint for characterizing the sum of the distances between the upper lip key point and the nearest point in the lower lip fitting line segment; The lower lip key point set is traversed to calculate a second energy term in the first lip closure sub-constraint, which is used to characterize the sum of the distances between the lower lip key point and the nearest point in the upper lip fitting line segment.
4. The facial expression capturing method according to claim 3, wherein: The calculating of the first energy term for characterizing the sum of distances between the upper lip key point and the nearest point in the lower lip fitting line segment in the first lip closure sub-constraint includes: In combination with a first threshold weight function for controlling whether the upper lip key point enables the lip closure constraint according to the distance between the upper lip key point and the nearest point in the lower lip fitting line segment and a preset distance threshold, a first energy term for characterizing the sum of the distances between the upper lip key point and the nearest point in the lower lip fitting line segment in the first lip closure sub-constraint is calculated; The calculating of the second energy term for representing the sum of distances between the lower lip key point and the nearest point in the upper lip fitting line segment in the first lip closure sub-constraint includes: In combination with a second threshold weight function for controlling whether the lower lip key point enables the lip closure constraint based on the distance between the lower lip key point and the nearest point in the upper lip fitting line segment and the preset distance threshold, a second energy term in the first lip closure sub-constraint is calculated to characterize the sum of the distances between the lower lip key point and the nearest point in the upper lip fitting line segment.
5. The facial expression capturing method according to any one of claims 1 to 4, characterized in that: The step of restoring the two-dimensional coordinates of the key points to obtain the three-dimensional coordinates of the key points in the world coordinate system includes: Acquire a depth map corresponding to the facial image according to internal and external parameters of the camera and the facial image; The three-dimensional coordinates of the key points corresponding to the two-dimensional coordinates of the key points are calculated according to the depth and the surface normal in the depth map.
6. The facial expression capturing method according to any one of claims 1 to 4, characterized in that: The step of adopting the lip closure constraint, obtaining controller optimization parameters, and adopting the character optimization model of the controller optimization parameters includes: The lip closure constraint is used in combination with at least one of a two-dimensional coordinate constraint, a depth map constraint, and a continuous frame constraint to jointly construct an objective function; Solve the objective function, obtain controller optimization parameters and a role optimization model using the controller optimization parameters.
7. The facial expression capturing method according to any one of claims 1 to 4, characterized in that: Before constructing the lip closure constraint according to the two-dimensional coordinates of the key points, the three-dimensional coordinates of the key points, and the three-dimensional coordinates of the Mesh vertices corresponding to the upper and lower lip key points in the real generated expression, the method further includes: Determine the Mesh vertex indexes corresponding to the upper and lower lip key points; According to the Mesh vertex index, the three-dimensional coordinates of the Mesh vertices corresponding to the upper and lower lip key points are determined in the real generated expression generated by the character model.
8. A facial expression capturing device, characterized in that: The device comprises: A key point two-dimensional coordinate acquisition module is used to acquire the facial image of the character to be bound and the two-dimensional coordinates of the key points of the upper and lower lips in the facial image in the camera coordinate system; A coordinate recovery module, used to recover the two-dimensional coordinates of the key points and obtain the three-dimensional coordinates of the key points in the world coordinate system; A lip closure constraint construction module is used to construct a lip closure constraint according to the two-dimensional coordinates of the key points, the three-dimensional coordinates of the key points, and the three-dimensional coordinates of the Mesh vertices corresponding to the upper and lower lip key points in the real generated expression; wherein the lip closure constraint is used to characterize the difference between the lip closure degree in the expected generated expression and the lip closure degree in the real generated expression generated by the character model; An optimization parameter acquisition module, used to adopt the lip closure constraint to acquire controller optimization parameters and a character optimization model using the controller optimization parameters; The character facial expression animation acquisition module is used to acquire the character facial expression animation using the character optimization model.
9. An electronic device, characterized in that: include: A processor, a memory and a communication bus, wherein the processor and the memory communicate with each other via the communication bus; The memory stores program instructions executable by the processor, and the processor can execute the method according to any one of claims 1 to 7 by calling the program instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a computer, the computer is caused to perform the method according to any one of claims 1 to 7.
Citation Information
Cited By
Geometric constraint-based face mouth shape coordination generation method
CN120543764A
Face mouth shape coordination generation method based on geometric constraint
CN120543764B
