Eyeball registration method, device, server and medium based on three-dimensional cartoon model

By calculating the zoom and translation registration parameters in the three-dimensional cartoon model, the problem of complex eyeball registration algorithms and high computational overhead in the three-dimensional cartoon model is solved, and the registration efficiency and accuracy are improved.

CN112581518BActive Publication Date: 2024-09-06BIGO TECH PTE LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202011565476.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-25
Publication Date
2024-09-06
Estimated Expiration
2040-12-25

AI Technical Summary

Technical Problem

The eyeball registration algorithm in the existing three-dimensional cartoon model is complex and computationally expensive, which affects efficiency.

Method used

By deforming the 3D cartoon grid template according to the face image to be customized, and calculating the zoom and translation registration parameters, it ensures the accurate registration of the 3D eyeball template within the 3D face cartoon model, avoids interleaving, and reduces computational complexity.

Benefits of technology

The computational overhead of eyeball registration in the three-dimensional cartoon model is significantly reduced, the registration efficiency and accuracy are improved, and the complexity is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112581518B
    Figure CN112581518B
Patent Text Reader

Abstract

The embodiment of the present invention discloses an eyeball registration method, device, server and medium based on a three-dimensional cartoon model. The method includes: deforming a three-dimensional cartoon mesh template according to a face image to be customized to obtain a customized three-dimensional face cartoon model; calculating the scaling registration parameters of a preset three-dimensional eyeball template in the three-dimensional face cartoon model according to the orbital deformation information in the three-dimensional face cartoon model; and calculating the translation registration parameters of the three-dimensional eyeball template in the three-dimensional face cartoon model with the goal of ensuring that there is no interlacing between the three-dimensional eyeball template scaled according to the scaling registration parameters and the eyelid mesh in the three-dimensional face cartoon model. The technical solution provided by the embodiment of the present invention greatly reduces the computational overhead of eyeball registration in a three-dimensional cartoon model, reduces the complexity of eyeball registration in a three-dimensional cartoon model, and improves the efficiency of eyeball registration in a three-dimensional cartoon model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of three-dimensional model reconstruction, and in particular to an eyeball registration method, device, server and medium based on a three-dimensional cartoon model. Background Art

[0002] With the rapid development of computer technology, augmented reality (AR) products have been widely used in people's daily lives. The virtual content in AR products needs to be seamlessly embedded in real images to give users a feeling that the virtual content really exists. At this time, in order to achieve diversified user interaction in AR products, a solution will be specially designed to customize the corresponding three-dimensional cartoon image according to the user's actual image.

[0003] However, currently, when customizing 3D cartoon images for different users, it is necessary to adaptively adjust the size and position of the eyeballs in the 3D cartoon model according to the deformation of the model during the customization process. At this time, a large number of model points will be sampled in a general 3D grid model, and then the specific deformation of the 3D cartoon image and the eyeballs in the model will be analyzed simultaneously by calculating the nearest point of each model point, so that the eyeball alignment can be achieved simultaneously during the customization process of the 3D cartoon model. At this time, when using a general 3D grid model to analyze the specific deformation of the eyeball, the deformation of the model will also be considered, which makes the existing eyeball alignment algorithm more complicated and has a huge computational overhead, affecting the efficiency of eyeball alignment in the 3D cartoon model. Summary of the invention

[0004] The embodiments of the present invention provide a method, device, server and medium for eye registration based on a three-dimensional cartoon model, which reduces the computational overhead of eye registration in a three-dimensional cartoon model, reduces the complexity of eye registration in a three-dimensional cartoon model, and improves the efficiency of eye registration in a three-dimensional cartoon model.

[0005] In a first aspect, an embodiment of the present invention provides an eye registration method based on a three-dimensional cartoon model, the method comprising:

[0006] Deforming the 3D cartoon mesh template according to the face image to be customized to obtain a customized 3D face cartoon model;

[0007] Calculating scaling and registration parameters of a preset three-dimensional eyeball template in the three-dimensional human face cartoon model according to the orbital deformation information in the three-dimensional human face cartoon model;

[0008] With the goal of ensuring that there is no interlacing between the three-dimensional eyeball template scaled according to the scaling and registration parameters and the eyelid mesh in the three-dimensional face cartoon model, the translation registration parameters of the three-dimensional eyeball template in the three-dimensional face cartoon model are calculated.

[0009] In a second aspect, an embodiment of the present invention provides an eyeball registration device based on a three-dimensional cartoon model, the device comprising:

[0010] A cartoon model customization module is used to deform the three-dimensional cartoon mesh template according to the face image to be customized to obtain a customized three-dimensional face cartoon model;

[0011] A scaling registration determination module, used to calculate scaling registration parameters of a preset three-dimensional eyeball template in the three-dimensional human face cartoon model according to orbital deformation information in the three-dimensional human face cartoon model;

[0012] The translation registration determination module is used to calculate the translation registration parameters of the three-dimensional eyeball template in the three-dimensional human face cartoon model with the goal of ensuring that there is no interlacing between the three-dimensional eyeball template scaled according to the scaling registration parameters and the eyelid grid in the three-dimensional human face cartoon model.

[0013] In a third aspect, an embodiment of the present invention provides a server, the server comprising:

[0014] one or more processors;

[0015] A storage device for storing one or more programs;

[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the eye registration method based on the three-dimensional cartoon model described in any embodiment of the present invention.

[0017] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the eye registration method based on a three-dimensional cartoon model as described in any embodiment of the present invention.

[0018] The embodiment of the present invention provides an eyeball registration method, device, server and medium based on a three-dimensional cartoon model. First, a uniformly set three-dimensional cartoon mesh template is deformed according to a face image to be customized to obtain a customized three-dimensional face cartoon model. Then, according to the orbital deformation information in the three-dimensional face cartoon model, a scaling registration parameter of a preset three-dimensional eyeball template adapted to the orbital deformation in the three-dimensional face cartoon model is calculated. Then, the translation registration parameter of the three-dimensional eyeball template in the three-dimensional face cartoon model is calculated so that there is no interlacing between the three-dimensional eyeball template scaled according to the scaling registration parameter and the eyelid mesh in the three-dimensional face cartoon model, thereby avoiding the situation that the eyeball in the three-dimensional face cartoon model is not suitable. There is no need to calculate the deformation of a large number of model points in a general three-dimensional mesh model, which greatly reduces the calculation overhead of eyeball registration in the three-dimensional cartoon model. The eyeball registration in the three-dimensional face cartoon model can be achieved by directly scaling and translating the three-dimensional eyeball template in the three-dimensional face cartoon model, thereby reducing the complexity of eyeball registration in the three-dimensional cartoon model and improving the efficiency of eyeball registration in the three-dimensional cartoon model. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0020] Figure 1A A flowchart of an eyeball registration method based on a three-dimensional cartoon model provided in Embodiment 1 of the present invention;

[0021] Figure 1B A schematic diagram of the principle of the eyeball registration process based on the three-dimensional cartoon model provided in the first embodiment of the present invention;

[0022] Figure 2A A flowchart of an eyeball registration method based on a three-dimensional cartoon model provided in Embodiment 2 of the present invention;

[0023] Figure 2B A schematic diagram of the principle of the eyeball registration process based on the three-dimensional cartoon model provided in the second embodiment of the present invention;

[0024] Figure 2C A schematic diagram of eyelid edge feature points in a three-dimensional human face cartoon model in the method provided in Embodiment 2 of the present invention;

[0025] Figure 2D A schematic diagram of each feature point in the eyelid grid of the three-dimensional human face cartoon model in the method provided in the second embodiment of the present invention;

[0026] Figure 3A A flowchart of an eyeball registration method based on a three-dimensional cartoon model provided in Embodiment 3 of the present invention;

[0027] Figure 3B A schematic diagram of the pupil center point in the three-dimensional eyeball template in the method provided in the third embodiment of the present invention;

[0028] Figure 3C A schematic diagram of the nearest feature point of the pupil center point in the three-dimensional eyeball template on the three-dimensional cartoon mesh template in the method provided in the third embodiment of the present invention;

[0029] Figure 3D A schematic diagram of the principle of the translation registration process of the three-dimensional eyeball template in the method provided in the third embodiment of the present invention;

[0030] Figure 4 A schematic diagram of the structure of an eyeball registration device based on a three-dimensional cartoon model provided in Embodiment 4 of the present invention;

[0031] Figure 5 A schematic diagram of the structure of a server provided in Embodiment 5 of the present invention. DETAILED DESCRIPTION

[0032] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only the parts related to the present invention, rather than all structures, are shown in the accompanying drawings. In addition, the embodiments of the present invention and the features in the embodiments may be combined with each other without conflict.

[0033] Embodiment 1

[0034] Figure 1A This is a flowchart of an eyeball registration method based on a three-dimensional cartoon model provided in the first embodiment of the present invention. This embodiment can be applied to any situation where the size and position of the eyeballs in a three-dimensional cartoon image of a user are registered when the user customizes the three-dimensional cartoon image. The eyeball registration method based on a three-dimensional cartoon model provided in this embodiment can be executed by an eyeball registration device based on a three-dimensional cartoon model provided in an embodiment of the present invention. The device can be implemented in software and / or hardware and integrated in a server that executes this method. The server can be a background server with three-dimensional image reconstruction capabilities.

[0035] Specifically, refer to Figure 1A , the method may include the following steps:

[0036] S110, deforming the three-dimensional cartoon mesh template according to the face image to be customized to obtain a customized three-dimensional face cartoon model.

[0037] Specifically, in order to increase the user's diversified interactive gameplay in AR products, a function of customizing the corresponding three-dimensional cartoon image according to the user's actual image will be specially designed in AR products. At this time, in order to avoid using a large number of model points in a general three-dimensional grid model, when the eyeball registration is simultaneously realized in the process of customizing the three-dimensional cartoon model, there are problems of excessive computational overhead and complex customization algorithm. At the same time, considering that the eyeball that needs to be registered in the process of customizing the three-dimensional cartoon image belongs to a relatively regular three-dimensional model, this embodiment will separate the three-dimensional cartoon image customization process and the eyeball registration process in the face image and implement them in sequence. First, the user's facial shape, contour and expression are reconstructed into a three-dimensional cartoon image according to the actual image of the user in the face image, and then the eyeball is registered in the reconstructed three-dimensional face cartoon model to obtain the final three-dimensional face cartoon image.

[0038] Among them, the face image is the collected image data containing the face picture. Since this embodiment is mainly used for the three-dimensional cartoon image customization of the face image collected in the AR product, the current face image can be collected by the image collector such as the camera configured in the AR product. At the same time, in order to ensure the realism of the three-dimensional face cartoon image, this embodiment will pre-set a three-dimensional cartoon mesh template with a standard cartoon face image. The three-dimensional cartoon mesh template is a three-dimensional cartoon model with a grid distribution diagram added in advance based on the standard face cartoon image; in the process of creating the three-dimensional cartoon mesh template, different precisions or different grid shapes can be created according to the selected model pixel resolution and grid shape. That is, the grid distribution density or grid distribution shape in the created three-dimensional cartoon mesh template is different, for example, it can be composed of quadrilateral grids or triangular grids. Before customizing the corresponding three-dimensional cartoon image according to a certain face image, this embodiment will first pre-store a created three-dimensional cartoon mesh template. Subsequently, the same three-dimensional cartoon mesh template can be referred to and matched with different face images to customize the three-dimensional cartoon image of each face image, so as to avoid restrictions on facial postures or images in different face images.

[0039] Optionally, before aligning the eyeballs in the three-dimensional cartoon image, this embodiment first uses AR products to collect the facial images that need to be referenced when customizing the three-dimensional cartoon image, as well as a pre-stored three-dimensional cartoon mesh template that supports each user to accurately customize the three-dimensional cartoon image, and then analyzes the posture position and other information of each feature point in the facial image, and performs corresponding deformation processing on the same feature point in the three-dimensional cartoon mesh template, so that the cartoon posture in the deformed three-dimensional cartoon mesh template can be approximately the same as the facial posture in the facial image, and the deformed three-dimensional cartoon mesh template is used as the three-dimensional facial cartoon model customized according to the facial image in this embodiment. At this time, for different facial images, the three-dimensional cartoon mesh template can be referred to for corresponding deformation to obtain the three-dimensional facial cartoon model customized for each facial image. At this time, the customized three-dimensional facial cartoon model has the same mesh vertices as those in the three-dimensional cartoon mesh template, so that the registration of the eyeball can be accurately analyzed according to the deformation of specific vertices on the eyelid area.

[0040] S120, calculating scaling and registration parameters of a preset three-dimensional eyeball template in the three-dimensional human face cartoon model according to the orbital deformation information in the three-dimensional human face cartoon model.

[0041] Optionally, considering that the eyeballs that need to be aligned during the customization of the three-dimensional cartoon image belong to a relatively regular three-dimensional model, the present embodiment will separate the three-dimensional cartoon image customization process and the eyeball alignment process in the face image and implement them in sequence. At this time, for the accurate alignment of the eyeballs in the three-dimensional face cartoon model, the present embodiment will pre-set a three-dimensional eyeball template with standard eyeball specifications. After the three-dimensional face cartoon model is customized according to the facial posture in the face image, the three-dimensional eyeball template can be adaptively adjusted to make the adjusted three-dimensional eyeball template fully suitable for the eye area in the customized three-dimensional face cartoon model.

[0042] Among them, when the 3D cartoon mesh template is deformed according to the face image to customize the 3D face cartoon model, the size and depth of the eye sockets in the customized 3D face cartoon model will change accordingly, so that the size and position of the eyeballs will also change accordingly. At this time, the change in the size of the eyeball can be represented by the scaling and registration parameters of the eyeball, and the change in the position of the eyeball can be represented by the translation and registration parameters of the eyeball.

[0043] In this embodiment, since the preset 3D eyeball template can be completely adapted to the eye socket in the preset 3D cartoon mesh template, and the 3D eyeball model after eyeball registration is also required to be completely adapted to the eye socket in the customized 3D human face cartoon model, Figure 1BAs shown, for the eyeball registration under any one of the left eye and the right eye in the three-dimensional cartoon mesh template, the scaling and registration parameters of the three-dimensional eyeball template under each eye in the three-dimensional human face cartoon model can be calculated by analyzing the difference between the original size of the eye socket under the eye in the three-dimensional cartoon mesh template and the actual size of the eye socket under the eye in the customized three-dimensional human face cartoon model after deformation. Subsequently, the scaling and registration parameters are used to perform corresponding scaling operations on the three-dimensional eyeball template under different eyes, so that the three-dimensional eyeball model obtained after scaling can be completely adapted to the eye socket of the corresponding eye in the three-dimensional human face cartoon model, thereby ensuring the accuracy of the eyeball size registration in the customized three-dimensional human face cartoon model.

[0044] S130, with the goal of eliminating the interlacing between the three-dimensional eyeball template scaled according to the scaling and registration parameters and the eyelid mesh in the three-dimensional face cartoon model, calculating the translation registration parameters of the three-dimensional eyeball template in the three-dimensional face cartoon model.

[0045] Optionally, since the eye socket depth in the 3D cartoon mesh model may be deformed according to the eye posture of the facial image when customizing a 3D human face cartoon model, if only the 3D eyeball template is scaled, the scaled 3D eyeball template may protrude from the eye socket in the 3D cartoon mesh model. Therefore, in order to ensure the compatibility of the scaled 3D eyeball template with the eye socket depth in the 3D cartoon mesh model, this embodiment also needs to further translate the scaled 3D eyeball template so that the eyelids in the customized 3D human face cartoon model can completely wrap the 3D eyeball model obtained after registration, thereby ensuring the realism of the eyeball registration in the 3D human face cartoon model.

[0046] Specifically, in this embodiment, for the eyeball registration in each eye in the three-dimensional human face cartoon model, the three-dimensional eyeball template after scaling can be analyzed to determine whether there is any interlacing between the eyelid mesh under the eye in the three-dimensional human face cartoon model, so as to determine whether the registered three-dimensional eyeball model and the orbital depth in the three-dimensional cartoon mesh model are completely adapted. At this time, the eyelid mesh customized for each eye to meet various eye-opening or eye-closing conditions is firstly synchronously found in the customization process of the three-dimensional cartoon mesh model. At this time, if the three-dimensional eyeball template is scaled according to the scaling and registration parameters of the three-dimensional eyeball template in the three-dimensional human face cartoon model, the three-dimensional eyeball template is scaled, and the scaled three-dimensional eyeball template and each eyelid mesh in the three-dimensional human face cartoon model are analyzed to determine whether there is any interlacing between the scaled three-dimensional eyeball template and each eyelid mesh in the three-dimensional human face cartoon model, as well as the specific interlacing conditions, so as to determine the translation registration parameters that can ensure that there is no interlacing between the scaled three-dimensional eyeball template and the eyelid mesh in the three-dimensional human face cartoon model.

[0047] In addition, after determining the scaling registration parameters and translation registration parameters of the three-dimensional eyeball template in the three-dimensional face cartoon model, this embodiment will also use the scaling registration parameters and translation registration parameters to sequentially register the three-dimensional eyeball template in the three-dimensional face cartoon model; specifically, for the eyeball registration under each eye in the three-dimensional face cartoon model, the scaling registration parameters calculated for the three-dimensional eyeball template under the eye in the three-dimensional face cartoon model are first used to scale the three-dimensional eyeball template in the eye of the three-dimensional face cartoon model, and then the translation registration parameters under the eye are used again to continue to translate the scaled three-dimensional eyeball template accordingly in the eye of the three-dimensional face cartoon model, thereby achieving accurate alignment of the eyeballs in each eye of the three-dimensional face cartoon model and avoiding the situation where there is interlacing between the registered three-dimensional eyeball model and the eyelid mesh in the three-dimensional face cartoon model.

[0048] The technical solution provided by the present embodiment first deforms a uniformly set 3D cartoon mesh template according to a face image to be customized to obtain a customized 3D face cartoon model, and then calculates scaling and registration parameters of a preset 3D eyeball template in the 3D face cartoon model to adapt to the eyeball deformation according to the eye socket deformation information in the 3D face cartoon model, and then calculates translation registration parameters of the 3D eyeball template in the 3D face cartoon model with the goal of eliminating interlacing between the 3D eyeball template scaled according to the scaling and registration parameters and the eyelid mesh in the 3D face cartoon model, thereby avoiding the situation where the eyeball in the 3D face cartoon model is not suitable, and there is no need to calculate the deformation of a large number of model points in a general 3D mesh model, which greatly reduces the calculation overhead of eyeball registration in the 3D cartoon model, and directly realizes eyeball registration in the 3D face cartoon model by scaling and translating the 3D eyeball template in the 3D face cartoon model, thereby reducing the complexity of eyeball registration in the 3D cartoon model and improving the efficiency of eyeball registration in the 3D cartoon model.

[0049] Embodiment 2

[0050] Figure 2A A flowchart of an eyeball registration method based on a three-dimensional cartoon model provided in Embodiment 2 of the present invention, Figure 2B The schematic diagram of the principle of the eyeball registration process based on the three-dimensional cartoon model provided in the second embodiment of the present invention. This embodiment is optimized on the basis of the above embodiment. Specifically, Figure 2A As shown, this embodiment mainly explains in detail the specific deformation process of the 3D cartoon mesh template and the specific calculation process of the registration parameters of the 3D eyeball template in the 3D human face cartoon model.

[0051] Optional, such as Figure 2A As shown, this embodiment may include the following steps:

[0052] S210, deforming the three-dimensional cartoon mesh template in sequence according to the facial appearance and facial expression in the face image to be customized, to obtain a customized three-dimensional face cartoon model.

[0053] Optionally, when customizing a corresponding 3D cartoon image according to a face image, it is required that the face shape and facial expression of the cartoon image can match the face image. In order to ensure the realism of the 3D face cartoon model, Figure 2B As shown, the postures of various feature points representing the facial shape and the facial expression in the facial image can be analyzed, and then the 3D cartoon mesh template can be deformed according to the facial shape posture to ensure the matching of the cartoon shape and the facial image in the 3D face cartoon model. Then, the deformed 3D cartoon mesh template can be further deformed again under the facial expression according to the facial expression posture to obtain a customized 3D face cartoon model, thereby ensuring the realism of the facial shape and facial expression in the 3D face cartoon model.

[0054] Exemplarily, this embodiment can utilize the deformation between each feature point in the face image to perform three-dimensional cartoon modeling of the face shape. In order to ensure the realism of the facial expression in the three-dimensional face cartoon model, a mixed deformation (blendshape) model can be used, including smiling blendshape, closed left eye blendshape (eyeblink_L) and closed right eye blendshape (eyeblink), etc. At this time, each blendshape grid is deformed accordingly according to the facial expression, so as to obtain a three-dimensional face cartoon model that conforms to the actual image of the face.

[0055] S220, extracting eyelid edge feature points in the three-dimensional human face cartoon model, and calculating corresponding eye socket deformation information according to the deformation information of each eyelid edge feature point.

[0056] In the present embodiment, the orbital deformation information referred to when calculating the scaling and registration parameters of the three-dimensional eyeball template in the three-dimensional face cartoon model is mainly used to determine the size of the orbits in each eye of the customized three-dimensional face cartoon model. The present embodiment can extract each eyelid edge feature point that can accurately represent the position of the orbit from the eye area where the left eye or the right eye is located in the three-dimensional face cartoon model, and then analyze the initial position of each eyelid edge feature point in the three-dimensional cartoon mesh template before deformation, and the deformed position in the three-dimensional face cartoon model after deformation, and the deformation between the initial position and the deformed position of each eyelid edge feature point, to determine the deformation information of each eyelid edge feature point, thereby calculating the corresponding orbital deformation information.

[0057] For example, Figure 2CAs shown in the figure, if there are 4 eyelid edge feature points v in a certain eyelid part of the 3D face cartoon model l,i 、v r,i 、v u,i and v b,i , and the position coordinates of each eyelid edge feature point before deformation are represented by P, and the position coordinates after deformation are represented by Q, where i represents the left eye or the right eye in the 3D face cartoon model, then the scaling registration parameters of the 3D eyeball template in the 3D face cartoon model can be:

[0058] S230, calculating scaling and registration parameters of a preset three-dimensional eyeball template in the three-dimensional human face cartoon model according to the orbital deformation information in the three-dimensional human face cartoon model.

[0059] S240, determining eyelid meshes in different eyelid states in the three-dimensional human face cartoon model, and extracting feature points in each eyelid mesh.

[0060] Optionally, during the customization process of the 3D human face cartoon model, in order to meet the realism of eyelid opening and closing under various eye expressions, the corresponding eyelid meshes will be specially and synchronously customized according to the eyelid states under various eye expressions to ensure the realism of the 3D human face cartoon model under various eye expressions; at the same time, after the 3D eyeball template is scaled according to the scaling and registration parameters, the distance between the eyeball center point in the scaled 3D eyeball template and each feature point in the eyelid mesh can be analyzed to see whether it exceeds the scaled eyeball radius, so as to determine whether there is any interlacing between the scaled 3D eyeball template and the eyelid mesh in the 3D human face cartoon model. Figure 2D As shown, first, a large number of mesh vertices need to be extracted from each eyelid mesh under different eyelid states in the 3D human face cartoon model as feature points in the eyelid mesh, and then this is used to analyze whether there is any interlacing between the scaled 3D eyeball template and the eyelid mesh in the 3D human face cartoon model.

[0061] S250, calculating the eyeball center point and the eyeball radius after the three-dimensional eyeball template is scaled according to the scaling registration parameters.

[0062] In this embodiment, in order to accurately analyze whether there is interlacing between the scaled 3D eyeball template and the eyelid mesh in the 3D face cartoon model, it is necessary to calculate the eyeball radius of the scaled 3D eyeball template after scaling the 3D eyeball template according to the scaling and registration parameters; and analyze the associated feature points between the 3D eyeball template and the 3D cartoon mesh template before deformation, and obtain the deformation position after the corresponding deformation, and then calculate the eyeball center point of the scaled 3D eyeball template relative to the 3D face cartoon model according to the deformed position of the associated feature points and the eyeball radius of the scaled 3D eyeball template, and subsequently determine whether there is interlacing between the scaled 3D eyeball template and the eyelid mesh in the 3D face cartoon model by analyzing whether the distance between each feature point in the 3D face cartoon model and the eyeball center point exceeds the scaled eyeball radius.

[0063] S260, for each feature point on the eyelid mesh within the three-dimensional human face cartoon model, calculate a sub-translation parameter corresponding to the feature point according to the difference between the distance between the feature point and the center point of the eyeball and the radius of the eyeball.

[0064] Specifically, after extracting each feature point from each eyelid grid in the 3D human face cartoon model, the distance between the feature point and the center point of the eyeball after the 3D eyeball template is scaled can be calculated for each feature point. If the distance is less than the radius of the eyeball after the 3D eyeball template is scaled, it means that the feature point in the eyelid grid in the 3D human face cartoon model is interspersed in the scaled 3D eyeball template, so that the scaled 3D eyeball template is highlighted in the eye socket of the 3D human face cartoon model. At this time, the scaled 3D eyeball template needs to be translated into the eye frame of the 3D human face cartoon model by a distance. Distance, so that the feature point on the eyelid grid in the three-dimensional human face cartoon model will not be interspersed in the three-dimensional eyeball model. At this time, according to the distance between the feature point and the center point of the eyeball, relative to the distance difference between the zoomed eyeball radius, the sub-translation parameter corresponding to the feature point when it meets the requirement of not being interspersed in the three-dimensional eyeball model can be calculated; at this time, the sub-translation parameter corresponding to each feature point in each eyelid grid can be calculated according to the above steps, and subsequently a translation alignment parameter that can prevent all feature points from being interspersed in the three-dimensional eyeball model is selected from the sub-translation parameters corresponding to each feature point.

[0065] S270, comparing the sub-translation parameters corresponding to each feature point on the eyelid grid in the three-dimensional human face cartoon model, and determining the translation registration parameters of the three-dimensional eyeball template in the three-dimensional human face cartoon model.

[0066] Optionally, after calculating the sub-translation parameters corresponding to each feature point in each eyelid grid in the three-dimensional facial cartoon model, since each sub-translation parameter represents the translation distance of the three-dimensional eyeball template, the sub-translation parameters corresponding to each feature point can be compared to screen out the largest sub-translation parameter, so that all feature points are not interspersed in the three-dimensional eyeball model, and then the screened maximum sub-translation parameter is used as the translation alignment parameter of the three-dimensional eyeball template in the three-dimensional facial cartoon model in this embodiment, so as to ensure the realism of the eyeball alignment in the three-dimensional facial cartoon model.

[0067] The technical solution provided in this embodiment uses the distance between each feature point on the eyelid grid in the three-dimensional face cartoon model and the scaled eyeball center point, relative to the distance difference between the scaled eyeball radius, to calculate the sub-translation parameters of each feature point when it meets the requirement of not being interspersed in the three-dimensional eyeball model after registration, and then compares the sub-translation parameters corresponding to each feature point to determine the translation registration parameters of the three-dimensional eyeball template in the three-dimensional face cartoon model, thereby ensuring the translation accuracy of the three-dimensional eyeball template in the three-dimensional face cartoon model and improving the realism of the eyeball registration in the three-dimensional face cartoon model.

[0068] Embodiment 3

[0069] Figure 3A The flowchart of the eyeball registration method based on the three-dimensional cartoon model provided in the third embodiment of the present invention is as follows. This embodiment is optimized on the basis of the above embodiment. Specifically, Figure 3A As shown, this embodiment mainly explains in detail the specific calculation process of the eyeball center point and the eyeball radius after the three-dimensional eyeball template is scaled and the translation alignment process.

[0070] Optional, such as Figure 3A As shown, this embodiment may include the following steps:

[0071] S310, deforming the three-dimensional cartoon mesh template according to the face image to be customized to obtain a customized three-dimensional face cartoon model.

[0072] S320, calculating scaling and registration parameters of a preset three-dimensional eyeball template in the three-dimensional human face cartoon model according to the orbital deformation information in the three-dimensional human face cartoon model.

[0073] S330, according to the original eyeball radius and the scaling and registration parameters of the three-dimensional eyeball template, calculating the eyeball radius of the three-dimensional eyeball template after scaling according to the scaling and registration parameters.

[0074] Optionally, when the 3D eyeball template is scaled according to the scaling registration parameters, the eyeball radius will also be scaled accordingly. At this time, the corresponding pupil center point can be firstly extracted from the preset 3D eyeball template, such as Figure 3BAs shown, since the center point of the eyeball under the three-dimensional eyeball template can be the coordinate origin, the original eyeball radius of the three-dimensional eyeball template can be calculated by analyzing the position of the pupil center point, and then the original eyeball radius of the three-dimensional eyeball template is scaled accordingly according to the scaling and registration parameters, and the eyeball radius of the three-dimensional eyeball template after scaling according to the scaling and registration parameters can be obtained.

[0075] For example, if the scaling registration parameter is s i , the radius of the eyeball after the three-dimensional eyeball template is scaled according to the scaling registration parameters can be: in, is the original eyeball radius of the 3D eyeball template, E i is the coordinate system of the 3D eyeball template, c i It is the pupil center point of the 3D eyeball template.

[0076] S340, calculating the eyeball center point after the three-dimensional eyeball template is scaled according to the scaling registration parameter, based on the nearest feature point position of the pupil center point in the three-dimensional eyeball template in the three-dimensional face cartoon model and the eyeball radius.

[0077] Optionally, since the translation of the three-dimensional eyeball template is set for the three-dimensional face cartoon model, when analyzing the distance between each feature point in the eyelid grid in the three-dimensional face cartoon model and the scaled eyeball center point, it is also necessary to calculate the position of the eyeball center point relative to the three-dimensional face cartoon model. Therefore, this embodiment can approximate the analysis of the actual position of the pupil center point relative to the three-dimensional face cartoon model by analyzing the deformation position of the nearest feature point of the pupil center point of the three-dimensional eyeball template in the three-dimensional face cartoon model, and then calculate the eyeball center point of the three-dimensional eyeball template relative to the three-dimensional face cartoon model after scaling according to the scaling and registration parameters according to the distance difference between the nearest feature point position of the pupil center point in the three-dimensional face cartoon model and the eyeball radius.

[0078] Exemplarily, the specific calculation method for the position of the nearest feature point of the pupil center point in the three-dimensional face cartoon model can be: determining the original nearest feature point of the pupil center point in the three-dimensional eyeball template in the three-dimensional cartoon mesh template; based on the deformation position of the original nearest feature point in the three-dimensional face cartoon model, determining the position of the nearest feature point of the pupil center point in the three-dimensional face cartoon model.

[0079] Specifically, Figure 3C As shown, according to the left eye and the right eye in the 3D cartoon mesh template, the original nearest feature point position of the pupil center point in the 3D eyeball template under any eyelid in the 3D cartoon mesh template before deformation can be calculated as: i={barycentric, triangle}; where barycentric is the centroid coordinate of the original nearest feature point, and triangle is each mesh vertex in a certain mesh where the original nearest feature point is located in the 3D cartoon mesh template. Then, after the 3D cartoon mesh template is deformed to obtain a customized 3D human face cartoon model, the position of the deformed nearest feature point in the deformed 3D human face cartoon model can be calculated as t′ i =t.barycentric·Q(t.triangle); where t.barycentric is the centroid coordinate of the original nearest feature point of the pupil center in the 3D cartoon mesh template before deformation, t.triangle is the mesh vertex in the mesh where the original nearest feature point of the pupil center in the 3D cartoon mesh template before deformation is located, and Q represents the specific deformation coordinates of the 3D cartoon mesh template. Then, the nearest feature point of the pupil center in the 3D face cartoon model can be approximated as the pupil center. By calculating the difference between the position of the nearest feature point and the eyeball radius, the eyeball center of the 3D eyeball template relative to the 3D face cartoon model after scaling according to the scaling registration parameters can be calculated. At this time, the eyeball center of the 3D eyeball template scaled according to the scaling registration parameters can be

[0080] S350, for each feature point on the eyelid grid of the three-dimensional human face cartoon model, with the goal of making the distance between the eyeball center point after the three-dimensional eyeball template is translated and the feature point equal to the eyeball radius, calculate the sub-translation parameter corresponding to the feature point.

[0081] For example, for each feature point pi on each eyelid grid in the three-dimensional face cartoon model, if it is required that the feature point does not intersect the scaled three-dimensional eyeball template, the scaled three-dimensional eyeball template can be made to be exactly tangent to the feature point, that is, Figure 3D As shown in the figure, after translating the scaled 3D eyeball template by a certain distance, the distance between the eyeball center point and the feature point is exactly equal to the radius of the scaled eyeball. At this time, if the sub-translation parameter corresponding to the feature point is set to x, then the distance between the scaled 3D eyeball template and the eyeball center point after translation is At this time, it can be determined That is After finishing, we can get: The sub-translation parameter x corresponding to the feature point can be calculated; according to the above steps, the sub-translation parameter corresponding to each feature point can be obtained, and the maximum sub-translation parameter can be obtained by comparing each sub-translation parameter Thus, the translation registration parameters of the 3D eyeball template in the 3D face cartoon model are calculated as The scaling registration parameter is s iSubsequently, the three-dimensional eyeball template is scaled and translated according to the scaling registration parameters and the translation registration parameters in sequence, so that the eyeball in the three-dimensional face cartoon model can be accurately registered.

[0082] S360, comparing the sub-translation parameters corresponding to each feature point on the eyelid grid in the three-dimensional human face cartoon model, and determining the translation registration parameters of the three-dimensional eyeball template in the three-dimensional human face cartoon model.

[0083] The technical solution provided by the present embodiment first deforms a uniformly set 3D cartoon mesh template according to a face image to be customized to obtain a customized 3D face cartoon model, and then calculates scaling and registration parameters of a preset 3D eyeball template in the 3D face cartoon model to adapt to the eyeball deformation according to the eye socket deformation information in the 3D face cartoon model, and then calculates translation registration parameters of the 3D eyeball template in the 3D face cartoon model with the goal of eliminating interlacing between the 3D eyeball template scaled according to the scaling and registration parameters and the eyelid mesh in the 3D face cartoon model, thereby avoiding the situation where the eyeball in the 3D face cartoon model is not suitable, and there is no need to calculate the deformation of a large number of model points in a general 3D mesh model, which greatly reduces the calculation overhead of eyeball registration in the 3D cartoon model, and directly realizes eyeball registration in the 3D face cartoon model by scaling and translating the 3D eyeball template in the 3D face cartoon model, thereby reducing the complexity of eyeball registration in the 3D cartoon model and improving the efficiency of eyeball registration in the 3D cartoon model.

[0084] Embodiment 4

[0085] Figure 4 A schematic diagram of the structure of an eyeball registration device based on a three-dimensional cartoon model provided in Embodiment 4 of the present invention, specifically, Figure 4 As shown, the device may include:

[0086] A cartoon model customization module 410 is used to deform the three-dimensional cartoon mesh template according to the face image to be customized to obtain a customized three-dimensional face cartoon model;

[0087] A scaling registration determination module 420 is used to calculate scaling registration parameters of a preset three-dimensional eyeball template in the three-dimensional human face cartoon model according to the orbital deformation information in the three-dimensional human face cartoon model;

[0088] The translation registration determination module 430 is used to calculate the translation registration parameters of the three-dimensional eyeball template in the three-dimensional human face cartoon model with the goal of eliminating interlacing between the three-dimensional eyeball template scaled according to the scaling registration parameters and the eyelid mesh in the three-dimensional human face cartoon model.

[0089] The technical solution provided by the present embodiment first deforms a uniformly set 3D cartoon mesh template according to a face image to be customized to obtain a customized 3D face cartoon model, and then calculates scaling and registration parameters of a preset 3D eyeball template in the 3D face cartoon model to adapt to the eyeball deformation according to the eye socket deformation information in the 3D face cartoon model, and then calculates translation registration parameters of the 3D eyeball template in the 3D face cartoon model with the goal of eliminating interlacing between the 3D eyeball template scaled according to the scaling and registration parameters and the eyelid mesh in the 3D face cartoon model, thereby avoiding the situation where the eyeball in the 3D face cartoon model is not suitable, and there is no need to calculate the deformation of a large number of model points in a general 3D mesh model, which greatly reduces the calculation overhead of eyeball registration in the 3D cartoon model, and directly realizes eyeball registration in the 3D face cartoon model by scaling and translating the 3D eyeball template in the 3D face cartoon model, thereby reducing the complexity of eyeball registration in the 3D cartoon model and improving the efficiency of eyeball registration in the 3D cartoon model.

[0090] The eyeball registration device based on a three-dimensional cartoon model provided in this embodiment can be applied to the eyeball registration method based on a three-dimensional cartoon model provided in any of the above embodiments, and has corresponding functions and beneficial effects.

[0091] Embodiment 5

[0092] Figure 5 A schematic diagram of the structure of a server provided in Embodiment 5 of the present invention is shown in FIG. Figure 5 As shown, the server includes a processor 50, a storage device 51 and a communication device 52; the number of processors 50 in the server can be one or more. Figure 5 A processor 50 is taken as an example; the processor 50, the storage device 51 and the communication device 52 in the server can be connected by a bus or other means. Figure 5 The example of connecting through bus is taken in the following.

[0093] A server provided in this embodiment can be used to execute the eye registration method based on the three-dimensional cartoon model provided in any of the above embodiments, and has corresponding functions and beneficial effects.

[0094] Embodiment 6

[0095] Embodiment 6 of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the eye registration method based on a three-dimensional cartoon model in any of the above embodiments can be implemented. The method may specifically include:

[0096] Deforming the 3D cartoon mesh template according to the face image to be customized to obtain a customized 3D face cartoon model;

[0097] Calculating scaling and registration parameters of a preset three-dimensional eyeball template in the three-dimensional human face cartoon model according to the orbital deformation information in the three-dimensional human face cartoon model;

[0098] With the goal of ensuring that there is no interlacing between the three-dimensional eyeball template scaled according to the scaling and registration parameters and the eyelid mesh in the three-dimensional face cartoon model, the translation registration parameters of the three-dimensional eyeball template in the three-dimensional face cartoon model are calculated.

[0099] Of course, the storage medium containing computer executable instructions provided in an embodiment of the present invention is not limited to the method operations described above, and can also execute related operations in the eye registration method based on the three-dimensional cartoon model provided in any embodiment of the present invention.

[0100] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0101] It is worth noting that in the above-mentioned embodiment of the eye alignment device based on the three-dimensional cartoon model, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0102] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. An eyeball registration method based on a three-dimensional cartoon model, characterized in that: include: Deforming the 3D cartoon mesh template according to the face image to be customized to obtain a customized 3D face cartoon model; Calculating scaling and registration parameters of a preset three-dimensional eyeball template in the three-dimensional human face cartoon model according to the orbital deformation information in the three-dimensional human face cartoon model; The translation registration parameters of the three-dimensional eyeball template in the three-dimensional face cartoon model are calculated with the goal of ensuring that there is no interlacing between the three-dimensional eyeball template scaled according to the scaling registration parameters and the eyelid mesh in the three-dimensional face cartoon model, wherein whether there is interlacing between the scaled three-dimensional eyeball template and the eyelid mesh in the three-dimensional face cartoon model is determined by analyzing whether the distance between the eyeball center point in the scaled three-dimensional eyeball template and each feature point in the eyelid mesh exceeds the scaled eyeball radius; The step of calculating the scaling registration parameters of the preset three-dimensional eyeball template in the three-dimensional face cartoon model according to the orbital deformation information in the three-dimensional face cartoon model includes: The difference between the original size of the eye socket under any eye in the three-dimensional cartoon mesh template and the actual size of the eye socket under the eye in the customized three-dimensional human face cartoon model after deformation is analyzed, and the scaling and registration parameters of the preset three-dimensional eyeball template under each eye in the three-dimensional human face cartoon model are calculated.

2. The method according to claim 1, characterized in that: The step of calculating the translation registration parameters of the three-dimensional eyeball template in the three-dimensional human face cartoon model with the goal of eliminating interlacing between the three-dimensional eyeball template scaled according to the scaling registration parameters and the eyelid mesh in the three-dimensional human face cartoon model comprises: Calculate the eyeball center point and eyeball radius after scaling the three-dimensional eyeball template according to the scaling registration parameters; For each feature point on the eyelid mesh of the three-dimensional human face cartoon model, a sub-translation parameter corresponding to the feature point is calculated according to the difference between the distance between the feature point and the center point of the eyeball and the radius of the eyeball; The sub-translation parameters corresponding to each feature point on the eyelid grid in the three-dimensional human face cartoon model are compared to determine the translation registration parameters of the three-dimensional eyeball template in the three-dimensional human face cartoon model.

3. The method according to claim 2, characterized in that The step of calculating the eyeball center point and the eyeball radius after scaling the three-dimensional eyeball template according to the scaling registration parameters comprises: According to the original eyeball radius of the three-dimensional eyeball template and the scaling and registration parameters, calculating the eyeball radius of the three-dimensional eyeball template after scaling according to the scaling and registration parameters; According to the nearest feature point position of the pupil center point in the three-dimensional eyeball template in the three-dimensional human face cartoon model and the eyeball radius, the eyeball center point of the three-dimensional eyeball template after scaling according to the scaling and registration parameters is calculated.

4. The method according to claim 3, characterized in that Before calculating the eyeball center point of the three-dimensional eyeball template scaled according to the scaling registration parameter based on the nearest feature point position of the pupil center point in the three-dimensional eyeball template in the three-dimensional human face cartoon model and the eyeball radius, the method further includes: Determine the original nearest feature point of the pupil center point in the three-dimensional eyeball template in the three-dimensional cartoon mesh template; Based on the deformed position of the original nearest feature point in the three-dimensional human face cartoon model, the nearest feature point position of the pupil center point in the three-dimensional human face cartoon model is determined.

5. The method according to claim 2, characterized in that: After deforming the 3D cartoon mesh template according to the face image to be customized to obtain a customized 3D face cartoon model, the method further includes: Eyelid meshes under different eyelid states in the three-dimensional human face cartoon model are determined, and feature points in each eyelid mesh are extracted.

6. The method according to claim 2, characterized in that For each feature point on the eyelid grid of the three-dimensional human face cartoon model, according to the difference between the distance between the feature point and the center point of the eyeball and the radius of the eyeball, calculating the sub-translation parameter corresponding to the feature point includes: For each feature point on the eyelid grid of the three-dimensional human face cartoon model, a sub-translation parameter corresponding to the feature point is calculated with the goal of making the distance between the eyeball center point after translation of the three-dimensional eyeball template and the feature point equal to the eyeball radius.

7. The method according to any one of claims 1 to 6, characterized in that: Before calculating the scaling and registration parameters of the preset three-dimensional eyeball template in the three-dimensional human face cartoon model according to the orbital deformation information in the three-dimensional human face cartoon model, the method further includes: Eyelid edge feature points in the three-dimensional human face cartoon model are extracted, and corresponding orbital deformation information is calculated according to deformation information of each eyelid edge feature point.

8. The method according to any one of claims 1 to 6, characterized in that: The step of deforming the three-dimensional cartoon mesh template according to the face image to be customized to obtain a customized three-dimensional face cartoon model includes: The three-dimensional cartoon mesh template is deformed in turn according to the facial appearance and facial expression in the face image to be customized to obtain a customized three-dimensional face cartoon model.

9. The method according to any one of claims 1 to 6, characterized in that: After calculating the translation registration parameters of the three-dimensional eyeball template in the three-dimensional human face cartoon model, the method further includes: In the three-dimensional human face cartoon model, the three-dimensional eyeball template is registered in sequence using the scaling registration parameter and the translation registration parameter.

10. An eyeball registration device based on a three-dimensional cartoon model, characterized in that: include: A cartoon model customization module is used to deform the three-dimensional cartoon mesh template according to the face image to be customized to obtain a customized three-dimensional face cartoon model; A scaling registration determination module, used to calculate scaling registration parameters of a preset three-dimensional eyeball template in the three-dimensional human face cartoon model according to orbital deformation information in the three-dimensional human face cartoon model; A translation registration determination module is used to calculate the translation registration parameters of the three-dimensional eyeball template in the three-dimensional face cartoon model with the goal of ensuring that there is no interlacing between the three-dimensional eyeball template scaled according to the scaling registration parameters and the eyelid mesh in the three-dimensional face cartoon model, wherein whether there is interlacing between the scaled three-dimensional eyeball template and the eyelid mesh in the three-dimensional face cartoon model is determined by analyzing whether the distance between the eyeball center point in the scaled three-dimensional eyeball template and each feature point in the eyelid mesh exceeds the scaled eyeball radius; The step of calculating the scaling registration parameters of the preset three-dimensional eyeball template in the three-dimensional face cartoon model according to the orbital deformation information in the three-dimensional face cartoon model includes: The difference between the original size of the eye socket under any eye in the three-dimensional cartoon mesh template and the actual size of the eye socket under the eye in the customized three-dimensional human face cartoon model after deformation is analyzed, and the scaling and registration parameters of the preset three-dimensional eyeball template under each eye in the three-dimensional human face cartoon model are calculated.

11. A server, characterized in that: The server comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the eye registration method based on a three-dimensional cartoon model as described in any one of claims 1-9.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the eye registration method based on a three-dimensional cartoon model as described in any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Method and device for acquiring facial expression of 3D face model and storage device

    CN107330371A

  • Face-lift simulation device, face-lift simulation method and apparatus

    CN109191508A

  • 3D model processing method and device, electronic apparatus and storage medium

    CN109191552A

  • Personalized electronic acupuncture device and generation method and generation device thereof

    CN110585592A

  • Three-dimensional face model generation method and device, equipment and medium

    CN111028343A