WO2022135518A1 - Eyeball registration method and apparatus based on three-dimensional cartoon model, and server and medium - Google Patents

Eyeball registration method and apparatus based on three-dimensional cartoon model, and server and medium Download PDF

Info

Publication number
WO2022135518A1
WO2022135518A1 PCT/CN2021/140798 CN2021140798W WO2022135518A1 WO 2022135518 A1 WO2022135518 A1 WO 2022135518A1 CN 2021140798 W CN2021140798 W CN 2021140798W WO 2022135518 A1 WO2022135518 A1 WO 2022135518A1
Authority
WO
WIPO (PCT)
Prior art keywords
eyeball
dimensional
template
face
cartoon model
Prior art date
Application number
PCT/CN2021/140798
Other languages
French (fr)
Chinese (zh)
Inventor
章菲倩
Original Assignee
百果园技术(新加坡)有限公司
章菲倩
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 百果园技术(新加坡)有限公司, 章菲倩 filed Critical 百果园技术(新加坡)有限公司
Publication of WO2022135518A1 publication Critical patent/WO2022135518A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • G06T7/33Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods
    • G06T7/344Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods involving models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2219/00Indexing scheme for manipulating 3D models or images for computer graphics
    • G06T2219/20Indexing scheme for editing of 3D models
    • G06T2219/2021Shape modification

Definitions

  • the present application relates to the technical field of three-dimensional model reconstruction, for example, to an eye registration method, device, server and medium based on a three-dimensional cartoon model.
  • AR Augmented Reality
  • the present application provides an eyeball registration method, device, server and medium based on a three-dimensional cartoon model, which reduces the computational cost of eyeball registration in the three-dimensional cartoon model, reduces the complexity of eyeball registration in the three-dimensional cartoon model, and improves the three-dimensional cartoon model. Efficiency of mid-eye registration.
  • an eyeball registration method based on a three-dimensional cartoon model comprising:
  • an eyeball registration device based on a three-dimensional cartoon model comprising:
  • the cartoon model customization module is set to deform the 3D cartoon grid template according to the face image to be customized to obtain a customized 3D face cartoon model;
  • the scaling and registration determining module is configured to calculate the scaling and registration parameters of the preset 3D eyeball template in the 3D face cartoon model according to the orbital deformation information in the 3D face cartoon model;
  • the translation registration determination module is set to make the three-dimensional eyeball template scaled according to the scaling and registration parameters, and the eyelid grid in the three-dimensional face cartoon model not interspersed as the target, and calculate the three-dimensional eyeball The translation registration parameters of the template in the three-dimensional face cartoon model.
  • a server that includes:
  • processors one or more processors
  • storage means arranged to store one or more programs
  • the one or more processors When the one or more programs are executed by the one or more processors, the one or more processors implement the three-dimensional cartoon model-based eye registration method described in any embodiment of the present application.
  • a computer-readable storage medium which stores a computer program, and when the computer program is executed by a processor, implements the three-dimensional cartoon model-based eyeball registration method described in any embodiment of the present application.
  • FIG. 1A is a flowchart of a method for eyeball registration based on a three-dimensional cartoon model provided by Embodiment 1 of the present application;
  • FIG. 1B is a schematic diagram of the principle of an eyeball registration process based on a three-dimensional cartoon model provided in Embodiment 1 of the present application;
  • FIG. 2A is a flowchart of a method for eyeball registration based on a three-dimensional cartoon model according to Embodiment 2 of the present application;
  • FIG. 2B is a schematic diagram of the principle of an eyeball registration process based on a three-dimensional cartoon model according to Embodiment 2 of the present application;
  • Fig. 2C is the schematic diagram of the eyelid edge feature point in the three-dimensional face cartoon model in the method that the second embodiment of the application provides;
  • FIG. 2D is a schematic diagram of multiple feature points in the eyelid grid in the three-dimensional face cartoon model in the method provided in Embodiment 2 of the present application;
  • FIG. 3A is a flowchart of a method for eyeball registration based on a three-dimensional cartoon model provided in Embodiment 3 of the present application;
  • 3B is a schematic diagram of the center point of the pupil in the three-dimensional eyeball template in the method provided in Embodiment 3 of the present application;
  • 3C is a schematic diagram of the closest feature point of the pupil center point in the three-dimensional eyeball template on the three-dimensional cartoon grid template in the method provided by the third embodiment of the present application;
  • 3D is a schematic diagram of the principle of the translation registration process of the three-dimensional eyeball template in the method provided in Embodiment 3 of the present application;
  • FIG. 4 is a schematic structural diagram of an eyeball registration device based on a three-dimensional cartoon model according to Embodiment 4 of the present application;
  • FIG. 5 is a schematic structural diagram of a server according to Embodiment 5 of the present application.
  • FIG. 1A is a flowchart of a method for eyeball registration based on a 3D cartoon model provided in Embodiment 1 of the present application. size and location are registered.
  • the method for eyeball registration based on a 3D cartoon model provided in this embodiment may be performed by the device for eyeball registration based on a 3D cartoon model provided in this embodiment of the present application, which may be implemented by software and/or hardware, and It is integrated in a server that executes the method, and the server can be a background server with the ability of three-dimensional image reconstruction.
  • the method may include the following steps.
  • the present embodiment separates the three-dimensional cartoon image customization process and the eyeball registration process in the face image and implements them in sequence.
  • the three-dimensional cartoon image is reconstructed, and the eyeballs are registered in the reconstructed three-dimensional face cartoon model, so as to obtain the final three-dimensional face cartoon image.
  • the face image is the collected image data including the face image. Since this embodiment is mainly used to customize the 3D cartoon image of the face image collected in the AR product, the camera and the like configured in the AR product can be used. Image collector to collect the current face image. At the same time, in order to ensure the fidelity of the three-dimensional face cartoon image, this embodiment will preset a three-dimensional cartoon grid template with a standard cartoon face image, and the three-dimensional cartoon grid template is pre-created according to the standard face cartoon image 3D cartoon model with grid distribution indication added; during the creation of 3D cartoon grid template, 3D cartoon models with different precisions or different grid shapes can be created according to the pixel resolution of the selected model and the different grid shapes.
  • the grid template means that the density of grid distribution or the grid distribution shape in the created 3D cartoon grid template is different, for example, it can be composed of quadrilateral grids, and it can also be composed of triangular grids.
  • a created 3D cartoon grid template will be pre-stored, and the same 3D cartoon grid template can be subsequently matched with different face images by referring to the same 3D cartoon grid template. , to customize the 3D cartoon image of multiple face images, so as to avoid the restriction of face pose or image in different face images.
  • AR products are used to collect the face images that need to be referenced when customizing the 3D cartoon image, and the pre-stored images that support the accuracy of multiple users are collected.
  • the cartoon pose in the resulting three-dimensional cartoon grid template can be approximately the same as the face pose in the face image, and the deformed three-dimensional cartoon grid template is used as the three-dimensional face customized according to the face image in this embodiment.
  • Cartoon model at this time, for different face images, you can refer to the 3D cartoon grid template for corresponding deformation, so as to obtain a customized 3D face cartoon model under each face image.
  • the customized 3D face cartoon The model and the 3D cartoon mesh template have the same mesh vertices, so that the registration of the eyeball can be accurately analyzed according to the deformation of specific vertices on the eyelid.
  • this embodiment separates the three-dimensional cartoon image customizing process and the eyeball registration process in the face image.
  • this embodiment will preset a three-dimensional eyeball template with standard eyeball specifications, and customize the three-dimensional face according to the face posture in the face image.
  • the three-dimensional eyeball template can be adjusted adaptively, so that the adjusted three-dimensional eyeball template can completely fit the eye region in the customized three-dimensional face cartoon model.
  • the 3D face cartoon model is customized by deforming the 3D cartoon grid template according to the face image
  • the size and depth of the eye sockets in the customized 3D face cartoon model will be changed accordingly, so that the size of the eyeball and the The position will also change accordingly.
  • the change of the eyeball size can be represented by the zoom registration parameter of the eyeball
  • the change of the eyeball position can be represented by the translation registration parameter of the eyeball.
  • the 3D eyeball model after eyeball registration is also required to be completely adapted to the customized 3D eyeball model.
  • the orbit of the 3D face cartoon model as shown in Figure 1B, for the eye registration under either eye of the left eye and the right eye in the 3D cartoon grid template, it can be analyzed by analyzing the 3D cartoon grid template.
  • the difference between the original size of the orbit under the eye and the actual size of the orbit under the eye in the customized 3D face cartoon model after deformation is used to calculate the scaling of the 3D eye template under each eye in the 3D face cartoon model.
  • the depth of the eye socket in the 3D cartoon mesh model may be deformed according to the eye pose of the face image.
  • the scaled 3D eyeball template protrudes from the orbit in the 3D cartoon mesh model. Therefore, in order to ensure the adaptability between the scaled 3D eyeball template and the depth of the orbit in the 3D cartoon mesh model, this embodiment also requires the scaled 3D eyeball template.
  • the position of the 3D eyeball template is translated, so that the eyelids in the customized 3D face cartoon model can completely wrap the 3D eyeball model obtained after registration, so as to ensure the fidelity of eyeball registration in the 3D face cartoon model.
  • the 3D eye template is zoomed according to the scaling and registration parameters of the 3D eye template in the 3D face cartoon model, it can be analyzed by analyzing the scaled Whether there is interspersed between the 3D eyeball template and each eyelid grid in the 3D face cartoon model, and the specific interleaving situation, so as to determine the ability to make the scaled 3D eyeball template and the eyelid grid in the 3D face cartoon model. There are no interspersed translational registration parameters.
  • the scaling registration parameters and translation registration parameters of the 3D eyeball template in the 3D face cartoon model are determined, the scaling registration parameters and the translation registration parameters are also used in the 3D face cartoon model.
  • the three-dimensional eyeball template is registered in sequence; for the eyeball registration under each eye in the three-dimensional face cartoon model, the scaling and registration parameters calculated for the three-dimensional eyeball template under the eye in the three-dimensional face cartoon model are used.
  • the three-dimensional eyeball template is scaled in the eye of the cartoon face model, and the translation registration parameters under the eye are used again to continue to perform corresponding translation on the scaled three-dimensional eyeball template in the eye of the three-dimensional face cartoon model, thereby realizing
  • the eyeballs in each eye of the 3D face cartoon model are accurately registered to avoid the situation of interspersed between the registered 3D eyeball model and the eyelid grid in the 3D face cartoon model.
  • the uniformly set 3D cartoon grid template is deformed according to the face image to be customized to obtain a customized 3D face cartoon model, and according to the orbital deformation information in the 3D face cartoon model,
  • the deformation of a large number of model points in the mesh model greatly reduces the computational overhead of eyeball registration in the 3D cartoon model.
  • the 3D face can be realized directly by scaling and panning the 3D eye template in the 3D face cartoon model.
  • the eyeball registration in the cartoon model reduces the complexity of the eyeball registration in the three-dimensional cartoon model and improves the efficiency of the eyeball registration in the three-dimensional cartoon model.
  • FIG. 2A is a flowchart of a method for eyeball registration based on a 3D cartoon model according to Embodiment 2 of the present application
  • FIG. 2B is a schematic schematic diagram of the principle of an eyeball registration process based on a 3D cartoon model according to Embodiment 2 of the present application.
  • This embodiment is described on the basis of the above-mentioned embodiment.
  • Figure 2A in this embodiment, the deformation process of the three-dimensional cartoon grid template and the calculation process of the registration parameters of the three-dimensional eyeball template in the three-dimensional face cartoon model are mainly explained.
  • this embodiment may include the following steps.
  • the cartoon image of the face shape and the face expression can be matched with the face image.
  • the three-dimensional cartoon mesh template can be processed according to the facial shape and posture by analyzing the postures of multiple feature points representing the shape of the human face and the postures of the multiple feature points representing the facial expression in the face image. Shape deformation to ensure the matching between the cartoon shape in the 3D face cartoon model and the face image, and the deformed 3D cartoon mesh template is adjusted again under the facial expression according to the facial expression posture, so as to obtain a customized 3D model.
  • the face cartoon model ensures the fidelity of the face shape and facial expression in the three-dimensional face cartoon model.
  • the deformation between multiple feature points in the face image can be used to carry out three-dimensional cartoon modeling of the face shape, and in order to ensure the fidelity of the facial expressions in the three-dimensional face cartoon model, a three-dimensional cartoon model can be used.
  • Blend shape model realization including smile blendshape, left eye closed blendshape (eyeblink_L) and right eye closed blendshape (eyeblink), etc.
  • eyeblink_L left eye closed blendshape
  • eyeblink right eye closed blendshape
  • 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 orbit in each eye of the customized three-dimensional face cartoon model,
  • a plurality of eyelid edge feature points that can accurately represent the position of the orbit can be extracted from the eye region where the left eye or the right eye is located in the three-dimensional face cartoon model, and the three-dimensional cartoon image of each eyelid edge feature point before deformation can be analyzed.
  • the initial position in the grid template and the deformed position in the deformed 3D face cartoon model, and each eyelid edge feature is determined according to the deformation between the initial position of each eyelid edge feature point and the deformed position
  • the deformation information of the point is calculated to calculate the corresponding orbital deformation information.
  • FIG. 2C Exemplarily, as shown in FIG. 2C , if there are four eyelid edge feature points v l,i , v r,i , v u,i and v b,i in an eyelid part of the three-dimensional face cartoon model, and each The position coordinates of the eyelid edge feature points before deformation are represented by P, and the position coordinates after deformation are represented by Q, where i represents the left eye or right eye in the 3D face cartoon model, then the 3D eyeball template is in the 3D face cartoon model.
  • the scaling registration parameters of can be:
  • S240 Determine eyelid grids in different eyelid states in the three-dimensional face cartoon model, and extract feature points in each eyelid grid.
  • the corresponding eyelid mesh will be specially customized for the eyelid states under various eye expressions.
  • a large number of mesh vertices need to be extracted from each eyelid mesh under different eyelid states in the 3D face cartoon model, as the feature points in the eyelid mesh, and then the scaled 3D eyeball template will be analyzed subsequently. Whether there is interspersed with the eyelid mesh in the 3D
  • S250 Calculate the center point of the eyeball and the radius of the eyeball after the three-dimensional eyeball template is scaled according to the scaling and registration parameters.
  • the distance between the feature point and the center point of the eyeball scaled by the 3D eyeball template can be calculated separately. If the distance is smaller than the scaled eyeball radius of the 3D eyeball template, it means that the feature point in the eyelid grid in the 3D face cartoon model is interspersed in the scaled 3D eyeball template, so that the scaled 3D eyeball template is in the 3D face cartoon The eye socket of the model is highlighted. At this time, it is necessary to translate the scaled 3D eyeball template to the inside of the eye frame of the 3D face cartoon model, so that the feature point on the eyelid grid in the 3D face cartoon model will not be interspersed.
  • the corresponding feature point can be calculated when it meets the requirements of not being interspersed in the 3D eyeball model.
  • Sub-translation parameters at this time, according to the above steps, the sub-translation parameters corresponding to each feature point in each eyelid grid can be calculated, and then one can be selected from the sub-translation parameters corresponding to multiple feature points to make all the feature points There are no translational registration parameters interspersed in the 3D eyeball model.
  • each sub-translation parameter represents the translation distance of the 3D eyeball template, it can be compared by comparing each sub-translation parameter.
  • a sub-translation parameter corresponding to a feature point is screened out with the largest sub-translation parameter, so that all the feature points are not interspersed in the three-dimensional eyeball model, and then the screened out maximum sub-translation parameter is used as the three-dimensional eyeball template in this embodiment.
  • Translation registration parameters in the 3D face cartoon model to ensure the fidelity of eyeball registration in the 3D face cartoon model.
  • the technical solution provided by this embodiment uses the distance between each feature point on the eyelid grid in the three-dimensional face cartoon model and the center point of the eyeball after scaling, and the distance difference between the radius of the eyeball after scaling, to calculate each feature point.
  • Sub-translation parameters when a feature point satisfies the requirements of not interspersed in the registered 3D eyeball model compare the sub-translation parameters corresponding to multiple feature points, and determine the translation registration parameters of the 3D eye template in the 3D face cartoon model , to ensure the translation accuracy of the 3D eyeball template in the 3D face cartoon model, and improve the fidelity of eyeball registration in the 3D face cartoon model.
  • FIG. 3A is a flowchart of an eyeball registration method based on a three-dimensional cartoon model according to Embodiment 3 of the present application. This embodiment is described on the basis of the above-mentioned embodiment. As shown in FIG. 3A , in this embodiment, the process of calculating the center point of the eyeball and the radius of the eyeball after the three-dimensional eyeball template is scaled and the process of translation registration are mainly explained.
  • this embodiment may include the following steps.
  • the eyeball radius will also be scaled correspondingly.
  • the corresponding pupil center point can be extracted from the preset 3D eyeball template, as shown in FIG. 3B .
  • the original eyeball radius of the three-dimensional eyeball template can be calculated by analyzing the position of the pupil center point, and the 3D eyeball template is calculated according to the scaling registration parameters.
  • the original eyeball radius is correspondingly scaled, and the eyeball radius after the three-dimensional eyeball template is scaled according to the scaling and registration parameters can be obtained.
  • the eyeball radius after the three-dimensional eyeball template is scaled according to the scaling registration parameter may be: in, is the original eyeball radius of the three-dimensional eyeball template, E i is the coordinate system of the three-dimensional eyeball template, and c i is the pupil center point of the three-dimensional eyeball template.
  • S340 Calculate the center point of the eyeball after the three-dimensional eyeball template is scaled according to the scaling registration parameter according to the position of the nearest feature point in the three-dimensional face cartoon model and the eyeball radius of the pupil center point in the three-dimensional eyeball template.
  • the translation of the 3D eyeball template is set for the 3D face cartoon model
  • this embodiment can be approximated 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. Analyze the actual position of the pupil center point relative to the 3D face cartoon model, and then calculate the 3D eyeball template according to the distance difference between the closest feature point position of the pupil center point in the 3D face cartoon model and the radius of the eyeball.
  • the center point of the eyeball relative to the 3D face cartoon model after quasi-parameter scaling.
  • the calculation method for the position of the closest feature point of the pupil center point in the 3D face cartoon model may be: determine the original closest feature point of the pupil center point in the 3D eyeball template in the 3D cartoon mesh template;
  • the deformation position of the nearest feature point in the 3D face cartoon model is to determine the position of the nearest feature point of the pupil center point in the 3D face cartoon model.
  • t.barycentric is the barycentric coordinate of the original closest feature point in the 3D cartoon grid template of the pupil center point before deformation
  • t.triangle is the 3D cartoon grid of the pupil center point before deformation
  • the grid vertex in the grid where the original closest feature point in the template is located, and Q represents the specific deformation coordinates of the three-dimensional cartoon grid template.
  • the closest feature point of the pupil center point in the 3D face cartoon model can be approximated as the pupil center point, and by calculating the distance between the position of the closest feature point and the eyeball radius, the 3D eyeball template can be calculated according to the scaling parameters. After scaling, the center point of the eyeball relative to the 3D face cartoon model. At this time, the center point of the eyeball after the 3D eyeball template is scaled according to the scaling and registration parameters can be
  • the scaled 3D eyeball can be The template is exactly tangent to the feature point, that is, as shown in Figure 3D, the distance between the center point of the eyeball and the feature point obtained by translating the scaled 3D eyeball template by a certain distance is exactly equal to the scaled eyeball radius , at this time, if the sub-translation parameter corresponding to the feature point is set to be x, then the center point of the eyeball after the translation of the scaled 3D eyeball template is At this point it can be determined that is Arrange to get: The sub-translation parameter x corresponding to the feature point can be calculated; the sub-translation parameter corresponding to each feature point can be obtained according to the above steps, and the maximum sub-translation parameter can be obtained by comparing multiple sub-translation parameters Thus, the translation registration parameters of the 3D eyeball template in the
  • the uniformly set 3D cartoon grid template is deformed according to the face image to be customized to obtain a customized 3D face cartoon model, and according to the orbital deformation information in the 3D face cartoon model,
  • the deformation of a large number of model points in the mesh model greatly reduces the computational overhead of eyeball registration in the 3D cartoon model.
  • the 3D face can be realized directly by scaling and panning the 3D eye template in the 3D face cartoon model.
  • the eyeball registration in the cartoon model reduces the complexity of the eyeball registration in the three-dimensional cartoon model and improves the efficiency of the eyeball registration in the three-dimensional cartoon model.
  • FIG. 4 is a schematic structural diagram of an eyeball registration device based on a three-dimensional cartoon model according to Embodiment 4 of the present application. As shown in FIG. 4 , the device may include the following modules.
  • the cartoon model customization module 410 is configured to deform the three-dimensional cartoon grid template according to the face image to be customized to obtain a customized three-dimensional face cartoon model;
  • the scaling and registration determining module 420 is configured to calculate the scaling and registration parameters of the preset 3D eyeball template in the 3D face cartoon model according to the orbital deformation information in the 3D face cartoon model;
  • the translation registration determination module 430 is set to make the three-dimensional eyeball template scaled according to the scaling registration parameters and the eyelid meshes in the three-dimensional face cartoon model not interspersed as the goal, and calculate the three-dimensional The translation registration parameters of the eyeball template in the three-dimensional face cartoon model.
  • the uniformly set 3D cartoon grid template is deformed according to the face image to be customized to obtain a customized 3D face cartoon model, and according to the orbital deformation information in the 3D face cartoon model,
  • the deformation of a large number of model points in the mesh model greatly reduces the computational overhead of eyeball registration in the 3D cartoon model.
  • the 3D face can be realized directly by scaling and panning the 3D eye template in the 3D face cartoon model.
  • the eyeball registration in the cartoon model reduces the complexity of the eyeball registration in the three-dimensional cartoon model and improves the efficiency of the eyeball registration in the three-dimensional cartoon model.
  • the apparatus for eyeball registration based on a 3D cartoon model provided in this embodiment can be adapted to execute the method for eyeball registration based on a 3D cartoon model provided in any of the above embodiments, and has corresponding functions and effects.
  • FIG. 5 is a schematic structural diagram of a server according to Embodiment 5 of the present application.
  • the server includes a processor 50, a storage device 51 and a communication device 52; the number of processors 50 in the server may be one or more One processor 50 is taken as an example in FIG. 5 ; the processor 50 , the storage device 51 and the communication device 52 in the server may be connected through a bus or other means, and the connection through a bus is taken as an example in FIG. 5 .
  • the server provided in this embodiment can be used to execute the eye registration method based on the three-dimensional cartoon model provided by any of the above embodiments, and has corresponding functions and effects.
  • Embodiment 6 of the present application further provides a computer-readable storage medium on which a computer program is stored.
  • the computer program is executed by a processor, the method for eyeball registration based on a three-dimensional cartoon model in any of the foregoing embodiments can be implemented.
  • the method can include:
  • a storage medium containing computer-executable instructions provided by an embodiment of the present application the computer-executable instructions of the computer-executable instructions are not limited to the above-mentioned method operations, and can also perform the eyeball matching provided by any embodiment of the present application based on a three-dimensional cartoon model. related operations in the quasi-method.
  • the present application can be implemented by means of software and general hardware, and can also be implemented by hardware.
  • the present application 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 floppy disk of a computer, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory) , RAM), flash memory (FLASH), hard disk or optical disk, etc., including multiple instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute the methods described in the various embodiments of the present application.
  • the storage medium may be a non-transitory storage medium.
  • the multiple 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 realized; , the names of multiple functional units are only for the convenience of distinguishing from each other, and are not used to limit the protection scope of the present application.

Abstract

Provided are an eyeball registration method and apparatus based on a three-dimensional cartoon model, and a server and a medium. The eyeball registration method based on a three-dimensional cartoon model comprises: performing transformation on a three-dimensional cartoon grid template according to a facial image to be customized, so as to obtain a customized three-dimensional facial cartoon model; calculating a scaling registration parameter of a preset three-dimensional eyeball template in the three-dimensional facial cartoon model according to eye socket transformation information in the three-dimensional facial cartoon model; and with the aim of there being no interpenetration between a three-dimensional eyeball template scaled according to the scaling registration parameter and an eyelid grid in the three-dimensional facial cartoon model, calculating a translation registration parameter of the three-dimensional eyeball template in the three-dimensional facial cartoon model.

Description

基于三维卡通模型的眼球配准方法、装置、服务器和介质Eyeball registration method, device, server and medium based on 3D cartoon model
本申请要求在2020年12月25日提交中国专利局、申请号为202011565476.1的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application No. 202011565476.1 filed with the China Patent Office on December 25, 2020, the entire contents of which are incorporated herein by reference.
技术领域technical field
本申请涉及三维模型重建技术领域,例如涉及一种基于三维卡通模型的眼球配准方法、装置、服务器和介质。The present application relates to the technical field of three-dimensional model reconstruction, for example, to an eye registration method, device, server and medium based on a three-dimensional cartoon model.
背景技术Background technique
随着计算机技术的快速发展,增强现实(Augmented Reality,AR)类的产品已经广泛应用到人们的日常生活中,AR产品中的虚拟内容需要无缝嵌入到真实图像中,从而给予用户一种虚拟内容真实存在的感觉;此时,为了实现用户在AR类产品中的多样化互动,会专门设计一种按照用户实际形象来定制对应的三维卡通形象的方案。With the rapid development of computer technology, Augmented Reality (AR) products have been widely used in people's daily life. The virtual content in AR products needs to be seamlessly embedded in real images, so as to give users a virtual The feeling of the real existence of the content; at this time, in order to realize the diversified interaction of users in AR products, a solution will be specially designed to customize the corresponding 3D cartoon image according to the actual image of the user.
然而,在针对不同用户的三维卡通形象定制时,需要在定制三维卡通模型的过程中,同时根据模型形变情况对三维卡通模型内的眼球大小和位置等进行适应性调整,此时会在通用的三维网格模型中采样大量模型点,然后通过计算多个模型点中的最近点情况,同步分析三维卡通形象和模型内眼球的具体形变,从而在三维卡通模型的定制过程中同步实现眼球的配准;此时,采用通用的三维网格模型来分析眼球的具体形变时,还会考虑模型的形变情况,使得相关技术中的眼球配准算法较为复杂,存在极大的计算开销,影响三维卡通模型中的眼球配准效率。However, when customizing the 3D cartoon image for different users, it is necessary to adjust the size and position of the eyeballs in the 3D cartoon model according to the deformation of the model during the process of customizing the 3D cartoon model. A large number of model points are sampled in the 3D mesh model, and then by calculating the closest point among multiple model points, the 3D cartoon image and the specific deformation of the eyeball in the model are analyzed synchronously, so as to realize the synchronization of the eyeball during the customization process of the 3D cartoon model. At this time, when using a general three-dimensional mesh model to analyze the specific deformation of the eyeball, the deformation of the model will also be considered, which makes the eyeball registration algorithm in the related art more complicated, and there is a huge computational cost, which affects the three-dimensional cartoon. Eye registration efficiency in the model.
发明内容SUMMARY OF THE INVENTION
本申请提供了一种基于三维卡通模型的眼球配准方法、装置、服务器和介质,减少三维卡通模型中眼球配准的计算开销,降低三维卡通模型中眼球配准的复杂性,提高三维卡通模型中眼球配准的高效性。The present application provides an eyeball registration method, device, server and medium based on a three-dimensional cartoon model, which reduces the computational cost of eyeball registration in the three-dimensional cartoon model, reduces the complexity of eyeball registration in the three-dimensional cartoon model, and improves the three-dimensional cartoon model. Efficiency of mid-eye registration.
提供了一种基于三维卡通模型的眼球配准方法,该方法包括:Provided is an eyeball registration method based on a three-dimensional cartoon model, the method comprising:
根据待定制的人脸图像对三维卡通网格模板进行形变,得到定制的三维人脸卡通模型;Deform the 3D cartoon grid template according to the face image to be customized to obtain a customized 3D face cartoon model;
根据所述三维人脸卡通模型内的眼眶形变信息,计算预设的三维眼球模板在所述三维人脸卡通模型内的缩放配准参数;According to the orbital deformation information in the 3D face cartoon model, calculate the scaling and registration parameters of the preset 3D eyeball template in the 3D face cartoon model;
以使按照所述缩放配准参数缩放后的三维眼球模板,与所述三维人脸卡通模型内的眼皮网格之间不存在穿插为目标,计算所述三维眼球模板在所述三维人脸卡通模型内的平移配准参数。With the goal that there is no interspersed between the 3D eyeball template scaled according to the scaling and registration parameters and the eyelid grid in the 3D face cartoon model, calculate the 3D eyeball template in the 3D face cartoon model. Translational registration parameters within the model.
还提供了一种基于三维卡通模型的眼球配准装置,该装置包括:Also provided is an eyeball registration device based on a three-dimensional cartoon model, the device comprising:
卡通模型定制模块,设置为根据待定制的人脸图像对三维卡通网格模板进行形变,得到定制的三维人脸卡通模型;The cartoon model customization module is set to deform the 3D cartoon grid template according to the face image to be customized to obtain a customized 3D face cartoon model;
缩放配准确定模块,设置为根据所述三维人脸卡通模型内的眼眶形变信息,计算预设的三维眼球模板在所述三维人脸卡通模型内的缩放配准参数;The scaling and registration determining module is configured to calculate the scaling and registration parameters of the preset 3D eyeball template in the 3D face cartoon model according to the orbital deformation information in the 3D face cartoon model;
平移配准确定模块,设置为以使按照所述缩放配准参数缩放后的三维眼球模板,与所述三维人脸卡通模型内的眼皮网格之间不存在穿插为目标,计算所述三维眼球模板在所述三维人脸卡通模型内的平移配准参数。The translation registration determination module is set to make the three-dimensional eyeball template scaled according to the scaling and registration parameters, and the eyelid grid in the three-dimensional face cartoon model not interspersed as the target, and calculate the three-dimensional eyeball The translation registration parameters of the template in the three-dimensional face cartoon model.
还提供了一种服务器,该服务器包括:Also provided is a server that includes:
一个或多个处理器;one or more processors;
存储装置,设置为存储一个或多个程序;storage means arranged to store 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 three-dimensional cartoon model-based eye registration method described in any embodiment of the present application.
还提供了一种计算机可读存储介质,存储有计算机程序,该计算机程序被处理器执行时实现本申请任意实施例所述的基于三维卡通模型的眼球配准方法。A computer-readable storage medium is also provided, which stores a computer program, and when the computer program is executed by a processor, implements the three-dimensional cartoon model-based eyeball registration method described in any embodiment of the present application.
附图说明Description of drawings
图1A为本申请实施例一提供的一种基于三维卡通模型的眼球配准方法的流程图;1A is a flowchart of a method for eyeball registration based on a three-dimensional cartoon model provided by Embodiment 1 of the present application;
图1B为本申请实施例一提供的基于三维卡通模型的眼球配准过程的原理示意图;1B is a schematic diagram of the principle of an eyeball registration process based on a three-dimensional cartoon model provided in Embodiment 1 of the present application;
图2A为本申请实施例二提供的一种基于三维卡通模型的眼球配准方法的流程图;2A is a flowchart of a method for eyeball registration based on a three-dimensional cartoon model according to Embodiment 2 of the present application;
图2B为本申请实施例二提供的基于三维卡通模型的眼球配准过程的原理示意图;FIG. 2B is a schematic diagram of the principle of an eyeball registration process based on a three-dimensional cartoon model according to Embodiment 2 of the present application;
图2C为本申请实施例二提供的方法中三维人脸卡通模型内的眼皮边缘特征 点的示意图;Fig. 2C is the schematic diagram of the eyelid edge feature point in the three-dimensional face cartoon model in the method that the second embodiment of the application provides;
图2D为本申请实施例二提供的方法中三维人脸卡通模型中眼皮网格内的多个特征点的示意图;2D is a schematic diagram of multiple feature points in the eyelid grid in the three-dimensional face cartoon model in the method provided in Embodiment 2 of the present application;
图3A为本申请实施例三提供的一种基于三维卡通模型的眼球配准方法的流程图;3A is a flowchart of a method for eyeball registration based on a three-dimensional cartoon model provided in Embodiment 3 of the present application;
图3B为本申请实施例三提供的方法中三维眼球模板内瞳孔中心点的示意图;3B is a schematic diagram of the center point of the pupil in the three-dimensional eyeball template in the method provided in Embodiment 3 of the present application;
图3C为本申请实施例三提供的方法中三维眼球模板内瞳孔中心点在三维卡通网格模板上的最近特征点的示意图;3C is a schematic diagram of the closest feature point of the pupil center point in the three-dimensional eyeball template on the three-dimensional cartoon grid template in the method provided by the third embodiment of the present application;
图3D为本申请实施例三提供的方法中三维眼球模板的平移配准过程的原理示意图;3D is a schematic diagram of the principle of the translation registration process of the three-dimensional eyeball template in the method provided in Embodiment 3 of the present application;
图4为本申请实施例四提供的一种基于三维卡通模型的眼球配准装置的结构示意图;4 is a schematic structural diagram of an eyeball registration device based on a three-dimensional cartoon model according to Embodiment 4 of the present application;
图5为本申请实施例五提供的一种服务器的结构示意图。FIG. 5 is a schematic structural diagram of a server according to Embodiment 5 of the present application.
具体实施方式Detailed ways
下面结合附图和实施例对本申请进行说明。此处所描述的实施例仅仅用于解释本申请,而非对本申请的限定。附图中仅示出了与本申请相关的部分而非全部结构。此外,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The present application will be described below with reference to the accompanying drawings and embodiments. The embodiments described here are only used to explain the present application, but not to limit the present application. The drawings show only some but not all structures related to the present application. Furthermore, the embodiments in this application and features in the embodiments may be combined with each other without conflict.
实施例一Example 1
图1A为本申请实施例一提供的一种基于三维卡通模型的眼球配准方法的流程图,本实施例可适用于任一种在定制用户的三维卡通形象时,对三维卡通形象内的眼球大小和位置进行配准的情况中。本实施例提供的一种基于三维卡通模型的眼球配准方法可以由本申请实施例提供的基于三维卡通模型的眼球配准装置来执行,该装置可以通过软件和/或硬件的方式来实现,并集成在执行本方法的服务器中,该服务器可以是具备三维图像重建能力的后台服务器。1A is a flowchart of a method for eyeball registration based on a 3D cartoon model provided in Embodiment 1 of the present application. size and location are registered. The method for eyeball registration based on a 3D cartoon model provided in this embodiment may be performed by the device for eyeball registration based on a 3D cartoon model provided in this embodiment of the present application, which may be implemented by software and/or hardware, and It is integrated in a server that executes the method, and the server can be a background server with the ability of three-dimensional image reconstruction.
参考图1A,该方法可以包括如下步骤。Referring to Figure 1A, the method may include the following steps.
S110,根据待定制的人脸图像对三维卡通网格模板进行形变,得到定制的三维人脸卡通模型。S110, deform the three-dimensional cartoon grid template according to the face image to be customized to obtain a customized three-dimensional face cartoon model.
为了增加用户在AR类产品的多样化互动玩法,会在AR类产品中专门设计 一种按照用户实际形象来定制对应的三维卡通形象的功能,此时为了避免采用通用的三维网格模型中的大量模型点,在三维卡通模型定制过程中同步实现眼球配准时,存在的计算开销过大且定制算法复杂的问题,同时考虑到在三维卡通形象的定制过程中需要配准的眼球,属于一种相对规则的三维模型,本实施例会将人脸图像中的三维卡通形象定制过程和眼球配准过程分离开来依次实现,按照人脸图像中的用户实际形象对用户的人脸外形、轮廓和表情等进行三维卡通形象的重建,在重建后的三维人脸卡通模型中对眼球进行配准,从而得到最终的三维人脸卡通形象。In order to increase users' diversified interactive gameplay in AR products, a function to customize the corresponding 3D cartoon image according to the user's actual image will be specially designed in AR products. With a large number of model points, when the eyeball registration is realized synchronously during the customization of the 3D cartoon model, there are problems of excessive computational overhead and complex customization algorithms. At the same time, considering the eyeballs that need to be registered in the customization process of the 3D cartoon image, it belongs to a kind of Relative to a regular three-dimensional model, the present embodiment separates the three-dimensional cartoon image customization process and the eyeball registration process in the face image and implements them in sequence. The three-dimensional cartoon image is reconstructed, and the eyeballs are registered in the reconstructed three-dimensional face cartoon model, so as to obtain the final three-dimensional face cartoon image.
其中,人脸图像是采集的包含有人脸画面的图像数据,由于本实施例主要应用于对AR类产品中采集的人脸图像进行三维卡通形象定制,因此可以通过AR类产品中配置的摄像头等图像采集器来采集当前的人脸图像。同时,为了保证三维人脸卡通形象的逼真性,本实施例会预先设定一个具备有标准卡通人脸形象的三维卡通网格模板,该三维卡通网格模板是根据标准的人脸卡通形象预先创建的添加有网格分布示意的三维卡通模型;在三维卡通网格模板的创建过程中,可以根据选定的模型像素分辨率以及网格形状不同,而创建不同精度或者不同网格形状的三维卡通网格模板,也就是使创建的三维卡通网格模板中的网格分布密集程度或者网格分布形状不同,例如可以由四边形的网格组成,还可以由三角形的网格组成。本实施例在按照一个人脸图像定制对应的三维卡通形象之前,会预存储一个创建好的三维卡通网格模板,后续可以参考同一个三维卡通网格模板,分别与不同的人脸图像进行匹配,来对多个人脸图像进行三维卡通形象定制,以避免不同人脸图像中人脸姿态或形象的限制。Among them, the face image is the collected image data including the face image. Since this embodiment is mainly used to customize the 3D cartoon image of the face image collected in the AR product, the camera and the like configured in the AR product can be used. Image collector to collect the current face image. At the same time, in order to ensure the fidelity of the three-dimensional face cartoon image, this embodiment will preset a three-dimensional cartoon grid template with a standard cartoon face image, and the three-dimensional cartoon grid template is pre-created according to the standard face cartoon image 3D cartoon model with grid distribution indication added; during the creation of 3D cartoon grid template, 3D cartoon models with different precisions or different grid shapes can be created according to the pixel resolution of the selected model and the different grid shapes. The grid template means that the density of grid distribution or the grid distribution shape in the created 3D cartoon grid template is different, for example, it can be composed of quadrilateral grids, and it can also be composed of triangular grids. In this embodiment, before customizing a corresponding 3D cartoon image according to a face image, a created 3D cartoon grid template will be pre-stored, and the same 3D cartoon grid template can be subsequently matched with different face images by referring to the same 3D cartoon grid template. , to customize the 3D cartoon image of multiple face images, so as to avoid the restriction of face pose or image in different face images.
可选的,本实施例在对三维卡通形象中的眼球进行配准前,会通过AR类产品来采集本次定制三维卡通形象时需要参考的人脸图像,以及预先存储的支持多个用户准确定制三维卡通形象的三维卡通网格模板,进而通过分析人脸图像中每个特征点的姿态位置等信息,对该三维卡通网格模板中的同一个特征点进行相应的形变处理,以使形变后的三维卡通网格模板中卡通姿态能够与该人脸图像中的人脸姿态近似相同,并将形变后的三维卡通网格模板作为本实施例中按照该人脸图像所定制的三维人脸卡通模型,此时对于不同的人脸图像,均可以参考该三维卡通网格模板进行相应的形变,以得到每个人脸图像下定制的三维人脸卡通模型,此时所定制的三维人脸卡通模型与三维卡通网格模板中具有相同的网格顶点,以便后续根据眼皮部位上特定顶点的形变情况,来准确分析眼球的配准情况。Optionally, in this embodiment, before registering the eyeballs in the 3D cartoon image, AR products are used to collect the face images that need to be referenced when customizing the 3D cartoon image, and the pre-stored images that support the accuracy of multiple users are collected. Customize the 3D cartoon grid template of the 3D cartoon image, and then perform corresponding deformation processing on the same feature point in the 3D cartoon grid template by analyzing the posture position and other information of each feature point in the face image, so as to make the deformation The cartoon pose in the resulting three-dimensional cartoon grid template can be approximately the same as the face pose in the face image, and the deformed three-dimensional cartoon grid template is used as the three-dimensional face customized according to the face image in this embodiment. Cartoon model, at this time, for different face images, you can refer to the 3D cartoon grid template for corresponding deformation, so as to obtain a customized 3D face cartoon model under each face image. At this time, the customized 3D face cartoon The model and the 3D cartoon mesh template have the same mesh vertices, so that the registration of the eyeball can be accurately analyzed according to the deformation of specific vertices on the eyelid.
S120,根据三维人脸卡通模型内的眼眶形变信息,计算预设的三维眼球模板在三维人脸卡通模型内的缩放配准参数。S120, according to the orbital deformation information in the three-dimensional face cartoon model, calculate the scaling and registration parameters of the preset three-dimensional eyeball template in the three-dimensional face cartoon model.
可选的,考虑到在三维卡通形象的定制过程中需要配准的眼球,属于一种相对规则的三维模型,本实施例会将人脸图像中的三维卡通形象定制过程和眼球配准过程分离开来依次实现,此时针对三维人脸卡通模型内的眼球准确配准,本实施例会预先设定一个具有标准眼球规格的三维眼球模板,在按照人脸图像中的人脸姿态定制出三维人脸卡通模型后,可以通过适应性调整该三维眼球模板,以使调整后的三维眼球模板能够完全适合于所定制的三维人脸卡通模型内的眼部区域。Optionally, considering that the eyeballs that need to be registered in the customizing process of the three-dimensional cartoon image belong to a relatively regular three-dimensional model, this embodiment separates the three-dimensional cartoon image customizing process and the eyeball registration process in the face image. In this case, for the accurate registration of the eyeballs in the three-dimensional face cartoon model, this embodiment will preset a three-dimensional eyeball template with standard eyeball specifications, and customize the three-dimensional face according to the face posture in the face image. After the cartoon model, the three-dimensional eyeball template can be adjusted adaptively, so that the adjusted three-dimensional eyeball template can completely fit the eye region in the customized three-dimensional face cartoon model.
其中,由于按照人脸图像对三维卡通网格模板进行形变来定制三维人脸卡通模型时,所定制的三维人脸卡通模型中的眼眶大小和深度等均会发生相应的改变,使得眼球大小和位置也会产生相应变化,此时眼球大小的变化可以通过眼球的缩放配准参数来表示,而眼球位置的变化可以通过眼球的平移配准参数来表示。Among them, when the 3D face cartoon model is customized by deforming the 3D cartoon grid template according to the face image, the size and depth of the eye sockets in the customized 3D face cartoon model will be changed accordingly, so that the size of the eyeball and the The position will also change accordingly. At this time, the change of the eyeball size can be represented by the zoom registration parameter of the eyeball, and the change of the eyeball position can be represented by the translation registration parameter of the eyeball.
在本实施例中,由于预设的三维眼球模板能够完整适配于预设的三维卡通网格模板中的眼眶内,而对眼球配准后的三维眼球模型也要求能够完整适配于所定制的三维人脸卡通模型中的眼眶内,因此如图1B所示,针对三维卡通网格模板中左眼和右眼的任一眼睛下的眼球配准,可以通过分析三维卡通网格模板中该眼睛下的眼眶原始大小,与形变后定制的三维人脸卡通模型内该眼睛下的眼眶实际大小之间的差异,来计算该三维眼球模板在三维人脸卡通模型内每只眼睛下的缩放配准参数,后续采用该缩放配准参数对该三维眼球模板在不同眼睛下进行对应的缩放操作,能够使缩放后得到的三维眼球模型能够完整适配于该三维人脸卡通模型中对应眼睛的眼眶内,从而保证所定制的三维人脸卡通模型内眼球大小配准的准确性。In this embodiment, since the preset 3D eyeball template can be completely adapted to the orbit in the preset 3D cartoon grid template, the 3D eyeball model after eyeball registration is also required to be completely adapted to the customized 3D eyeball model. In the orbit of the 3D face cartoon model, as shown in Figure 1B, for the eye registration under either eye of the left eye and the right eye in the 3D cartoon grid template, it can be analyzed by analyzing the 3D cartoon grid template. The difference between the original size of the orbit under the eye and the actual size of the orbit under the eye in the customized 3D face cartoon model after deformation is used to calculate the scaling of the 3D eye template under each eye in the 3D face cartoon model. Then use the scaling and registration parameters to perform corresponding scaling operations on the 3D eyeball template under different eyes, so that the 3D eyeball model obtained after scaling can be completely adapted to the orbits of the corresponding eyes in the 3D face cartoon model In order to ensure the accuracy of eyeball size registration in the customized 3D face cartoon model.
S130,以使按照缩放配准参数缩放后的三维眼球模板,与三维人脸卡通模型内的眼皮网格之间不存在穿插为目标,计算三维眼球模板在三维人脸卡通模型内的平移配准参数。S130, calculating the translation registration of the 3D eyeball template in the 3D face cartoon model with the goal of making the 3D eyeball template scaled according to the scaling and registration parameters not interspersed with the eyelid grid in the 3D face cartoon model parameter.
可选的,由于在定制三维人脸卡通模型时,按照人脸图像的眼部姿态可能会对三维卡通网格模型中眼眶深度进行形变,此时如果仅对三维眼球模板进行缩放,可能会使缩放后的三维眼球模板从三维卡通网格模型中的眼眶内突出,因此为了保证缩放后的三维眼球模板与三维卡通网格模型中眼眶深度的适配性,本实施例还需要对该缩放后的三维眼球模板进行位置平移,以使所定制的三维人脸卡通模型中的眼皮能够完整包裹住配准后得到的三维眼球模型,保证三维人脸卡通模型内眼球配准的逼真程度。Optionally, when customizing the 3D face cartoon model, the depth of the eye socket in the 3D cartoon mesh model may be deformed according to the eye pose of the face image. The scaled 3D eyeball template protrudes from the orbit in the 3D cartoon mesh model. Therefore, in order to ensure the adaptability between the scaled 3D eyeball template and the depth of the orbit in the 3D cartoon mesh model, this embodiment also requires the scaled 3D eyeball template. The position of the 3D eyeball template is translated, so that the eyelids in the customized 3D face cartoon model can completely wrap the 3D eyeball model obtained after registration, so as to ensure the fidelity of eyeball registration in the 3D face cartoon model.
本实施例针对三维人脸卡通模型中每一只眼睛内的眼球配准,均可以通过分析缩放后的三维眼球模板,与三维人脸卡通模型内该眼睛下的眼皮网格之间 是否存在穿插,来判断配准得到的三维眼球模型与三维卡通网格模型中的眼眶深度之间是否完整适配,此时在三维卡通网格模型的定制过程中同步查找出每一只眼睛下为满足多种睁眼或闭眼情况下所定制的眼皮网格,此时如果按照三维眼球模板在三维人脸卡通模型内的缩放配准参数,对该三维眼球模板进行缩放操作后,通过分析缩放后的三维眼球模板与三维人脸卡通模型内的每个眼皮网格之间是否存在穿插,以及具体的穿插情况,从而确定出能够使缩放后的三维眼球模板与三维人脸卡通模型内的眼皮网格之间不存在任何穿插的平移配准参数。In this embodiment, for the eyeball registration in each eye in the 3D face cartoon model, it is possible to analyze whether there is interspersed between the scaled 3D eyeball template and the eyelid grid under the eye in the 3D face cartoon model , to judge whether the registered 3D eyeball model and the orbital depth in the 3D cartoon mesh model are completely suitable. This kind of eyelid grid is customized when eyes are open or closed. At this time, if the 3D eye template is zoomed according to the scaling and registration parameters of the 3D eye template in the 3D face cartoon model, it can be analyzed by analyzing the scaled Whether there is interspersed between the 3D eyeball template and each eyelid grid in the 3D face cartoon model, and the specific interleaving situation, so as to determine the ability to make the scaled 3D eyeball template and the eyelid grid in the 3D face cartoon model. There are no interspersed translational registration parameters.
此外,本实施例在确定出三维眼球模板在三维人脸卡通模型内的缩放配准参数和平移配准参数后,还会在三维人脸卡通模型内,采用缩放配准参数和平移配准参数依次对三维眼球模板进行配准;针对三维人脸卡通模型内每一只眼睛下的眼球配准,采用三维人脸卡通模型内该眼睛下为三维眼球模板计算出的缩放配准参数,在三维人脸卡通模型的该眼睛内对三维眼球模板进行缩放,再次采用该眼睛下的平移配准参数,继续在三维人脸卡通模型的该眼睛内对缩放后的三维眼球模板进行对应平移,从而实现三维人脸卡通模型的每只眼睛内的眼球准确配准,避免出现配准后的三维眼球模型与三维人脸卡通模型内的眼皮网格之间存在穿插的情况。In addition, in this embodiment, after the scaling registration parameters and translation registration parameters of the 3D eyeball template in the 3D face cartoon model are determined, the scaling registration parameters and the translation registration parameters are also used in the 3D face cartoon model. The three-dimensional eyeball template is registered in sequence; for the eyeball registration under each eye in the three-dimensional face cartoon model, the scaling and registration parameters calculated for the three-dimensional eyeball template under the eye in the three-dimensional face cartoon model are used. The three-dimensional eyeball template is scaled in the eye of the cartoon face model, and the translation registration parameters under the eye are used again to continue to perform corresponding translation on the scaled three-dimensional eyeball template in the eye of the three-dimensional face cartoon model, thereby realizing The eyeballs in each eye of the 3D face cartoon model are accurately registered to avoid the situation of interspersed between the registered 3D eyeball model and the eyelid grid in the 3D face cartoon model.
本实施例提供的技术方案,按照待定制的人脸图像对统一设定的三维卡通网格模板进行形变,得到定制的三维人脸卡通模型,按照该三维人脸卡通模型内的眼眶形变信息,来计算预设的三维眼球模板在该三维人脸卡通模型内适应于该眼眶形变下的缩放配准参数,进而以使按照缩放配准参数缩放后的三维眼球模板,与三维人脸卡通模型内的眼皮网格之间不存在穿插为目标,计算三维眼球模板在三维人脸卡通模型内的平移配准参数,从而避免出现三维人脸卡通模型内眼球不适配的情况,无需计算通用的三维网格模型中大量模型点的形变情况,极大减少三维卡通模型中眼球配准的计算开销,直接通过在三维人脸卡通模型内对三维眼球模板进行缩放和平移操作,即可实现三维人脸卡通模型内的眼球配准,降低了三维卡通模型中眼球配准的复杂性,提高了三维卡通模型中眼球配准的高效性。In the technical solution provided by this embodiment, the uniformly set 3D cartoon grid template is deformed according to the face image to be customized to obtain a customized 3D face cartoon model, and according to the orbital deformation information in the 3D face cartoon model, To calculate the preset 3D eyeball template in the 3D face cartoon model to adapt to the orbital deformation under the scaling registration parameters, and then make the 3D eyeball template scaled according to the scaling registration parameters, and the 3D face cartoon model. There is no interspersed between the eyelid grids as the target, and the translation registration parameters of the 3D eye template in the 3D face cartoon model are calculated, so as to avoid the situation that the eyeballs in the 3D face cartoon model do not fit, and there is no need to calculate the general 3D face model. The deformation of a large number of model points in the mesh model greatly reduces the computational overhead of eyeball registration in the 3D cartoon model. The 3D face can be realized directly by scaling and panning the 3D eye template in the 3D face cartoon model. The eyeball registration in the cartoon model reduces the complexity of the eyeball registration in the three-dimensional cartoon model and improves the efficiency of the eyeball registration in the three-dimensional cartoon model.
实施例二Embodiment 2
图2A为本申请实施例二提供的一种基于三维卡通模型的眼球配准方法的流程图,图2B为本申请实施例二提供的基于三维卡通模型的眼球配准过程的原理示意图。本实施例是在上述实施例的基础上进行说明。如图2A所示,本实施例中主要对于三维卡通网格模板的形变过程以及三维眼球模板在三维人脸卡通 模型内的配准参数的计算过程进行解释说明。2A is a flowchart of a method for eyeball registration based on a 3D cartoon model according to Embodiment 2 of the present application, and FIG. 2B is a schematic schematic diagram of the principle of an eyeball registration process based on a 3D cartoon model according to Embodiment 2 of the present application. This embodiment is described on the basis of the above-mentioned embodiment. As shown in Figure 2A, in this embodiment, the deformation process of the three-dimensional cartoon grid template and the calculation process of the registration parameters of the three-dimensional eyeball template in the three-dimensional face cartoon model are mainly explained.
可选的,如图2A所示,本实施例中可以包括如下步骤。Optionally, as shown in FIG. 2A , this embodiment may include the following steps.
S210,按照待定制的人脸图像中的人脸外形与人脸表情依次对三维卡通网格模板进行形变,得到定制的三维人脸卡通模型。S210 , transforming the three-dimensional cartoon grid template in turn according to the face shape and face expression in the face image to be customized, to obtain a customized three-dimensional face cartoon model.
可选的,在按照人脸图像定制相应的三维卡通形象时,要求人脸外形和人脸表情的卡通形象能够与人脸图像相匹配,本实施例为了确保三维人脸卡通模型的逼真程度,如图2B所示,可以通过分析人脸图像中表示人脸外形的多个特征点的姿态,以及表示人脸表情的多个特征点的姿态,按照人脸外形姿态对三维卡通网格模板进行外形形变,以保证三维人脸卡通模型中卡通外形与人脸图像的匹配性,按照人脸表情姿态对形变后的三维卡通网格模板再次进行人脸表情下的形变调整,从而得到定制的三维人脸卡通模型,保证三维人脸卡通模型内人脸外形与人脸表情的逼真性。Optionally, when customizing the corresponding three-dimensional cartoon image according to the face image, it is required that the cartoon image of the face shape and the face expression can be matched with the face image. In this embodiment, in order to ensure the fidelity of the three-dimensional face cartoon model, As shown in FIG. 2B , the three-dimensional cartoon mesh template can be processed according to the facial shape and posture by analyzing the postures of multiple feature points representing the shape of the human face and the postures of the multiple feature points representing the facial expression in the face image. Shape deformation to ensure the matching between the cartoon shape in the 3D face cartoon model and the face image, and the deformed 3D cartoon mesh template is adjusted again under the facial expression according to the facial expression posture, so as to obtain a customized 3D model. The face cartoon model ensures the fidelity of the face shape and facial expression in the three-dimensional face cartoon model.
示例性的,本实施例可以利用人脸图像中多个特征点间的形变,来对人脸外形进行三维卡通建模,而为了保证三维人脸卡通模型中人脸表情的逼真性,可以采用混合变形(blendshape)模型实现,包括微笑blendshape、闭左眼blendshape(eyeblink_L)和闭右眼blendshape(eyeblink)等,此时按照人脸表情对每个blendshape网格进行对应形变,从而获得符合人脸实际形象的三维人脸卡通模型。Exemplarily, in this embodiment, the deformation between multiple feature points in the face image can be used to carry out three-dimensional cartoon modeling of the face shape, and in order to ensure the fidelity of the facial expressions in the three-dimensional face cartoon model, a three-dimensional cartoon model can be used. Blend shape model realization, including smile blendshape, left eye closed blendshape (eyeblink_L) and right eye closed blendshape (eyeblink), etc. At this time, each blendshape grid is deformed correspondingly according to the facial expression, so as to obtain a face conforming to the human face. 3D face cartoon model of actual image.
S220,提取三维人脸卡通模型内的眼皮边缘特征点,并按照每个眼皮边缘特征点的形变信息,计算对应的眼眶形变信息。S220, extracting the eyelid edge feature points in the three-dimensional face cartoon model, and calculating the corresponding orbital deformation information according to the deformation information of each eyelid edge feature point.
在本实施例中,计算三维眼球模板在三维人脸卡通模型内的缩放配准参数时所参考的眼眶形变信息主要用于判断所定制的三维人脸卡通模型的每个眼睛内的眼眶大小,本实施例可以从三维人脸卡通模型中左眼或右眼所在的眼部区域内提取出能够准确表示眼眶位置的多个眼皮边缘特征点,分析每一个眼皮边缘特征点在形变前的三维卡通网格模板内的初始位置,以及在形变后的三维人脸卡通模型内的形变位置,并根据每一个眼皮边缘特征点的初始位置与形变位置之间的形变情况,确定出每个眼皮边缘特征点的形变信息,从而计算出对应的眼眶形变信息。In this 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 orbit in each eye of the customized three-dimensional face cartoon model, In this embodiment, a plurality of eyelid edge feature points that can accurately represent the position of the orbit can be extracted from the eye region where the left eye or the right eye is located in the three-dimensional face cartoon model, and the three-dimensional cartoon image of each eyelid edge feature point before deformation can be analyzed. The initial position in the grid template and the deformed position in the deformed 3D face cartoon model, and each eyelid edge feature is determined according to the deformation between the initial position of each eyelid edge feature point and the deformed position The deformation information of the point is calculated to calculate the corresponding orbital deformation information.
示例性的,如图2C所示,如果三维人脸卡通模型的一个眼皮部位存在4个眼皮边缘特征点v l,i、v r,i、v u,i和v b,i,且每个眼皮边缘特征点形变前的位置坐标采用P表示,而形变后的位置坐标采用Q表示,其中i表示三维人脸卡通模型内的左眼或者右眼,那么三维眼球模板在三维人脸卡通模型内的缩放配准参数可以 为:
Figure PCTCN2021140798-appb-000001
Exemplarily, as shown in FIG. 2C , if there are four eyelid edge feature points v l,i , v r,i , v u,i and v b,i in an eyelid part of the three-dimensional face cartoon model, and each The position coordinates of the eyelid edge feature points before deformation are represented by P, and the position coordinates after deformation are represented by Q, where i represents the left eye or right eye in the 3D face cartoon model, then the 3D eyeball template is in the 3D face cartoon model. The scaling registration parameters of can be:
Figure PCTCN2021140798-appb-000001
S230,根据三维人脸卡通模型内的眼眶形变信息,计算预设的三维眼球模板在三维人脸卡通模型内的缩放配准参数。S230, according to the orbital deformation information in the three-dimensional face cartoon model, calculate the scaling and registration parameters of the preset three-dimensional eyeball template in the three-dimensional face cartoon model.
S240,确定三维人脸卡通模型内不同眼皮状态下的眼皮网格,并提取每一个眼皮网格内的特征点。S240: Determine eyelid grids in different eyelid states in the three-dimensional face cartoon model, and extract feature points in each eyelid grid.
可选的,由于三维人脸卡通模型在定制过程中,为了满足在多种眼部表情下眼皮开闭的逼真性,会针对多种眼部表情下的眼皮状态,专门同步定制对应的眼皮网格,以确保三维人脸卡通模型在多种眼部表情下的逼真性;同时,后续在按照缩放配准参数缩放三维眼球模板后,可以通过分析缩放后的三维眼球模板内的眼球中心点与眼皮网格内的每个特征点之间的距离是否超出缩放后的眼球半径,来判断缩放后的三维眼球模板与三维人脸卡通模型内的眼皮网格之间是否存在穿插,因此如图2D所示,需要从三维人脸卡通模型内不同眼皮状态下的每一个眼皮网格中对应提取出大量网格顶点,作为该眼皮网格内的特征点,后续以此分析缩放后的三维眼球模板与三维人脸卡通模型内的眼皮网格之间是否存在穿插的情况。Optionally, during the customization process of the 3D face cartoon model, in order to meet the fidelity of eyelid opening and closing under various eye expressions, the corresponding eyelid mesh will be specially customized for the eyelid states under various eye expressions. In order to ensure the fidelity of the 3D face cartoon model under various eye expressions; at the same time, after scaling the 3D eyeball template according to the scaling and registration parameters, you can analyze the center point of the eyeball in the scaled 3D eyeball template and the Whether the distance between each feature point in the eyelid grid exceeds the zoomed eyeball radius to determine whether there is an interspersed between the zoomed 3D eyeball template and the eyelid grid in the 3D face cartoon model, as shown in Figure 2D As shown, a large number of mesh vertices need to be extracted from each eyelid mesh under different eyelid states in the 3D face cartoon model, as the feature points in the eyelid mesh, and then the scaled 3D eyeball template will be analyzed subsequently. Whether there is interspersed with the eyelid mesh in the 3D face cartoon model.
S250,计算三维眼球模板按照缩放配准参数缩放后的眼球中心点和眼球半径。S250: Calculate the center point of the eyeball and the radius of the eyeball after the three-dimensional eyeball template is scaled according to the scaling and registration parameters.
在本实施例中,为了准确分析缩放后的三维眼球模板与三维人脸卡通模型内的眼皮网格之间是否存在穿插的情况,则需要在按照缩放配准参数对三维眼球模板进行缩放操作后,对应计算三维眼球模板缩放后的眼球半径;并分析三维眼球模板与形变前的三维卡通网格模板之间的关联特征点,在对应形变后得到形变位置,进而按照该关联特征点形变后的位置与三维眼球模板缩放后的眼球半径,对应计算出三维眼球模板缩放后相对于三维人脸卡通模型的眼球中心点,后续通过分析三维人脸卡通模型内的每个特征点与该眼球中心点之间的距离是否超出缩放后的眼球半径,来判断缩放后的三维眼球模板与三维人脸卡通模型内的眼皮网格之间是否存在穿插。In this embodiment, in order to accurately analyze whether there is interspersed between the scaled 3D eyeball template and the eyelid grid in the 3D face cartoon model, it is necessary to perform a scaling operation on the 3D eyeball template according to the scaling and registration parameters. , correspondingly calculate the eyeball radius after scaling of the 3D eyeball template; and analyze the associated feature points between the 3D eyeball template and the 3D cartoon grid template before deformation, obtain the deformation position after the corresponding deformation, and then according to the associated feature point after deformation The position corresponds to the eyeball radius after the scaled 3D eyeball template, and the center point of the eyeball relative to the 3D face cartoon model after the 3D eyeball template is scaled is calculated correspondingly, and then each feature point in the 3D face cartoon model and the center point of the eyeball are analyzed. Whether the distance between them exceeds the zoomed eyeball radius is used to determine whether there is interspersed between the zoomed three-dimensional eyeball template and the eyelid grid in the three-dimensional face cartoon model.
S260,针对三维人脸卡通模型内眼皮网格上的每一个特征点,根据该特征点与眼球中心点的距离,与眼球半径之间的差异,计算该特征点对应的子平移参数。S260, for each feature point on the eyelid grid in the three-dimensional 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, calculate the sub-translation parameter corresponding to the feature point.
在从三维人脸卡通模型内每一个眼皮网格上提取出多个特征点后,可以针对每一个特征点,分别计算出该特征点与三维眼球模板缩放后的眼球中心点之 间的距离,如果该距离小于三维眼球模板缩放后的眼球半径,说明三维人脸卡通模型中眼皮网格内的该特征点穿插在缩放后的三维眼球模板内,使得缩放后的三维眼球模板在三维人脸卡通模型的眼眶中突出显示,此时需要将缩放后的三维眼球模板向三维人脸卡通模型的眼框内部平移一段距离,以使三维人脸卡通模型内眼皮网格上的该特征点不会穿插到三维眼球模型中,此时根据该特征点与眼球中心点的距离,相对于缩放后的眼球半径之间的距离差异,可以计算出该特征点满足不穿插在三维眼球模型的要求时对应的子平移参数;此时,按照上述步骤可以计算出每个眼皮网格内的每一个特征点对应的子平移参数,后续从多个特征点对应的子平移参数中选取出一个能够使全部特征点均不穿插在三维眼球模型中的平移配准参数。After extracting multiple feature points from each eyelid grid in the 3D face cartoon model, for each feature point, the distance between the feature point and the center point of the eyeball scaled by the 3D eyeball template can be calculated separately. If the distance is smaller than the scaled eyeball radius of the 3D eyeball template, it means that the feature point in the eyelid grid in the 3D face cartoon model is interspersed in the scaled 3D eyeball template, so that the scaled 3D eyeball template is in the 3D face cartoon The eye socket of the model is highlighted. At this time, it is necessary to translate the scaled 3D eyeball template to the inside of the eye frame of the 3D face cartoon model, so that the feature point on the eyelid grid in the 3D face cartoon model will not be interspersed. In the 3D 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 radii, the corresponding feature point can be calculated when it meets the requirements of not being interspersed in the 3D eyeball model. Sub-translation parameters; at this time, according to the above steps, the sub-translation parameters corresponding to each feature point in each eyelid grid can be calculated, and then one can be selected from the sub-translation parameters corresponding to multiple feature points to make all the feature points There are no translational registration parameters interspersed in the 3D eyeball model.
S270,比对三维人脸卡通模型内眼皮网格上的每一个特征点对应的子平移参数,确定三维眼球模板在三维人脸卡通模型内的平移配准参数。S270, compare the sub-translation parameters corresponding to each feature point on the eyelid grid in the three-dimensional face cartoon model, and determine the translation registration parameters of the three-dimensional eyeball template in the three-dimensional face cartoon model.
可选的,在计算出三维人脸卡通模型中每个眼皮网格内的每一个特征点对应的子平移参数后,由于每个子平移参数表示三维眼球模板的平移距离,因此可以通过比对每一个特征点对应的子平移参数,筛选出最大的子平移参数,从而使全部特征点均不穿插在三维眼球模型中,进而将所筛选出的最大子平移参数作为本实施例中三维眼球模板在三维人脸卡通模型内的平移配准参数,以确保三维人脸卡通模型内眼球配准的逼真性。Optionally, after calculating the sub-translation parameter corresponding to each feature point in each eyelid grid in the 3D face cartoon model, since each sub-translation parameter represents the translation distance of the 3D eyeball template, it can be compared by comparing each sub-translation parameter. A sub-translation parameter corresponding to a feature point is screened out with the largest sub-translation parameter, so that all the feature points are not interspersed in the three-dimensional eyeball model, and then the screened out maximum sub-translation parameter is used as the three-dimensional eyeball template in this embodiment. Translation registration parameters in the 3D face cartoon model to ensure the fidelity of eyeball registration in the 3D face cartoon model.
本实施例提供的技术方案,利用三维人脸卡通模型内眼皮网格上的每一个特征点与缩放后的眼球中心点的距离,相对于缩放后的眼球半径之间的距离差异,来计算每一个特征点满足不穿插在配准后的三维眼球模型的要求时的子平移参数,比对多个特征点对应的子平移参数,确定三维眼球模板在三维人脸卡通模型内的平移配准参数,确保三维眼球模板在三维人脸卡通模型内的平移准确性,提高三维人脸卡通模型内眼球配准的逼真性。The technical solution provided by this embodiment uses the distance between each feature point on the eyelid grid in the three-dimensional face cartoon model and the center point of the eyeball after scaling, and the distance difference between the radius of the eyeball after scaling, to calculate each feature point. Sub-translation parameters when a feature point satisfies the requirements of not interspersed in the registered 3D eyeball model, compare the sub-translation parameters corresponding to multiple feature points, and determine the translation registration parameters of the 3D eye template in the 3D face cartoon model , to ensure the translation accuracy of the 3D eyeball template in the 3D face cartoon model, and improve the fidelity of eyeball registration in the 3D face cartoon model.
实施例三Embodiment 3
图3A为本申请实施例三提供的一种基于三维卡通模型的眼球配准方法的流程图。本实施例是在上述实施例的基础上进行说明。如图3A所示,本实施例中主要对于三维眼球模板缩放后的眼球中心点和眼球半径的计算过程和平移配准过程进行解释说明。FIG. 3A is a flowchart of an eyeball registration method based on a three-dimensional cartoon model according to Embodiment 3 of the present application. This embodiment is described on the basis of the above-mentioned embodiment. As shown in FIG. 3A , in this embodiment, the process of calculating the center point of the eyeball and the radius of the eyeball after the three-dimensional eyeball template is scaled and the process of translation registration are mainly explained.
可选的,如图3A所示,本实施例中可以包括如下步骤。Optionally, as shown in FIG. 3A , this embodiment may include the following steps.
S310,根据待定制的人脸图像对三维卡通网格模板进行形变,得到定制的三维人脸卡通模型。S310 , deform the three-dimensional cartoon grid template according to the face image to be customized to obtain a customized three-dimensional face cartoon model.
S320,根据三维人脸卡通模型内的眼眶形变信息,计算预设的三维眼球模板在三维人脸卡通模型内的缩放配准参数。S320, according to the orbital deformation information in the three-dimensional face cartoon model, calculate the scaling and registration parameters of the preset three-dimensional eyeball template in the three-dimensional face cartoon model.
S330,按照三维眼球模板的原始眼球半径和缩放配准参数,计算三维眼球模板按照缩放配准参数缩放后的眼球半径。S330 , according to the original eyeball radius of the three-dimensional eyeball template and the scaling registration parameter, calculate the eyeball radius after the three-dimensional eyeball template is scaled according to the scaling registration parameter.
可选的,由于三维眼球模板按照缩放配准参数进行缩放操作时,眼球半径也会对应的缩放,此时可以在预设的三维眼球模板中提取出对应的瞳孔中心点,如图3B所示,由于在三维眼球模板下的眼球中心点可以为坐标原点,因此通过分析该瞳孔中心点的位置,即可计算出三维眼球模板的原始眼球半径,按照该缩放配准参数对该三维眼球模板的原始眼球半径进行对应的缩放,可以得到三维眼球模板按照缩放配准参数缩放后的眼球半径。Optionally, since the 3D eyeball template is scaled according to the scaling and registration parameters, the eyeball radius will also be scaled correspondingly. At this time, the corresponding pupil center point can be extracted from the preset 3D eyeball template, as shown in FIG. 3B . , since the center point of the eyeball under the three-dimensional eyeball template can be the origin of coordinates, the original eyeball radius of the three-dimensional eyeball template can be calculated by analyzing the position of the pupil center point, and the 3D eyeball template is calculated according to the scaling registration parameters. The original eyeball radius is correspondingly scaled, and the eyeball radius after the three-dimensional eyeball template is scaled according to the scaling and registration parameters can be obtained.
示例性的,如果缩放配准参数为s i,三维眼球模板按照缩放配准参数缩放后的眼球半径可以为:
Figure PCTCN2021140798-appb-000002
其中,
Figure PCTCN2021140798-appb-000003
为三维眼球模板的原始眼球半径,E i为三维眼球模板的坐标系,c i为三维眼球模板的瞳孔中心点。
Exemplarily, if the scaling registration parameter is s i , the eyeball radius after the three-dimensional eyeball template is scaled according to the scaling registration parameter may be:
Figure PCTCN2021140798-appb-000002
in,
Figure PCTCN2021140798-appb-000003
is the original eyeball radius of the three-dimensional eyeball template, E i is the coordinate system of the three-dimensional eyeball template, and c i is the pupil center point of the three-dimensional eyeball template.
S340,根据三维眼球模板内的瞳孔中心点在三维人脸卡通模型中的最近特征点位置和眼球半径,计算三维眼球模板按照缩放配准参数缩放后的眼球中心点。S340: Calculate the center point of the eyeball after the three-dimensional eyeball template is scaled according to the scaling registration parameter according to the position of the nearest feature point in the three-dimensional face cartoon model and the eyeball radius of the pupil center point in the three-dimensional eyeball template.
可选的,由于三维眼球模板的平移是面向三维人脸卡通模型所设的,因此在分析三维人脸卡通模型中眼皮网格内的每一个特征点与缩放后的眼球中心点的距离时,也需要计算出眼球中心点相对于该三维人脸卡通模型的位置,因此本实施例可以通过分析三维眼球模板的瞳孔中心点在三维人脸卡通模型中的最近特征点的形变位置,来近似于分析瞳孔中心点相对于三维人脸卡通模型的实际位置,进而按照该瞳孔中心点在三维人脸卡通模型中的最近特征点位置和眼球半径之间的距离差异,计算出三维眼球模板按照缩放配准参数缩放后相对于三维人脸卡通模型的眼球中心点。Optionally, since the translation of the 3D eyeball template is set for the 3D face cartoon model, when analyzing the distance between each feature point in the eyelid grid in the 3D face cartoon model and the zoomed eyeball center point, It is also necessary to calculate the position of the center point of the eyeball relative to the three-dimensional face cartoon model, so this embodiment can be approximated 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. Analyze the actual position of the pupil center point relative to the 3D face cartoon model, and then calculate the 3D eyeball template according to the distance difference between the closest feature point position of the pupil center point in the 3D face cartoon model and the radius of the eyeball. The center point of the eyeball relative to the 3D face cartoon model after quasi-parameter scaling.
示例性的,对于瞳孔中心点在三维人脸卡通模型中的最近特征点位置的计算方式可以为:确定三维眼球模板内的瞳孔中心点在三维卡通网格模板中的原始最近特征点;基于原始最近特征点在三维人脸卡通模型中的形变位置,确定瞳孔中心点在三维人脸卡通模型中的最近特征点位置。Exemplarily, the calculation method for the position of the closest feature point of the pupil center point in the 3D face cartoon model may be: determine the original closest feature point of the pupil center point in the 3D eyeball template in the 3D cartoon mesh template; The deformation position of the nearest feature point in the 3D face cartoon model is to determine the position of the nearest feature point of the pupil center point in the 3D face cartoon model.
如图3C所示,按照三维卡通网格模板中的左眼和右眼,可以计算出三维眼球模板内的瞳孔中心点在形变前的三维卡通网格模板中任一眼皮下的原始最近特征点位置为:b i={barycentric,triangle};其中,barycentric为该原始最近特征点的 重心坐标,triangle为该原始最近特征点在三维卡通网格模板中所处的一个网格内的多个网格顶点,在对三维卡通网格模板进行形变而得到定制的三维人脸卡通模型后,可以计算出形变后的最近特征点在形变后的三维人脸卡通模型中的位置为t i'=t.barycentricgQ(t.triangle);其中,t.barycentric为瞳孔中心点在形变前的三维卡通网格模板中的原始最近特征点的重心坐标,t.triangle为瞳孔中心点在形变前的三维卡通网格模板中的原始最近特征点所处网格内的网格顶点,Q表示三维卡通网格模板的具体形变坐标。可以将瞳孔中心点在三维人脸卡通模型中的最近特征点近似作为该瞳孔中心点,通过计算该最近特征点位置和眼球半径之间的差距,即可计算出三维眼球模板按照缩放配准参数缩放后相对于三维人脸卡通模型的眼球中心点,此时三维眼球模板按照缩放配准参数缩放后的眼球中心点可以为
Figure PCTCN2021140798-appb-000004
As shown in Figure 3C, according to the left eye and right eye in the 3D cartoon grid template, the position of the original closest feature point under any eyelid in the 3D cartoon grid template before deformation of the pupil center point in the 3D eyeball template can be calculated is: b i ={barycentric, triangle}; wherein, barycentric is the barycentric coordinate of the original closest feature point, triangle is a plurality of grids in a grid where the original closest feature point is located in the 3D cartoon grid template Vertex, after deforming the 3D cartoon mesh template to obtain a customized 3D face cartoon model, the position of the deformed closest feature point in the deformed 3D face cartoon model can be calculated as t i '=t. barycentricgQ(t.triangle); where t.barycentric is the barycentric coordinate of the original closest feature point in the 3D cartoon grid template of the pupil center point before deformation, and t.triangle is the 3D cartoon grid of the pupil center point before deformation The grid vertex in the grid where the original closest feature point in the template is located, and Q represents the specific deformation coordinates of the three-dimensional cartoon grid template. The closest feature point of the pupil center point in the 3D face cartoon model can be approximated as the pupil center point, and by calculating the distance between the position of the closest feature point and the eyeball radius, the 3D eyeball template can be calculated according to the scaling parameters. After scaling, the center point of the eyeball relative to the 3D face cartoon model. At this time, the center point of the eyeball after the 3D eyeball template is scaled according to the scaling and registration parameters can be
Figure PCTCN2021140798-appb-000004
S350,针对三维人脸卡通模型内眼皮网格上的每一个特征点,以使三维眼球模板平移后的眼球中心点与该特征点的距离,与眼球半径相等为目标,计算该特征点对应的子平移参数。S350, for each feature point on the eyelid grid in the three-dimensional face cartoon model, the distance between the center point of the eyeball after the translation of the three-dimensional eyeball template and the feature point is equal to the radius of the eyeball as the target, and calculate the corresponding feature point. Sub translation parameter.
示例性的,针对三维人脸卡通模型内每个眼皮网格上的每一个特征点p i,如果要求该特征点未穿插在该缩放后的三维眼球模板内,则可以使缩放后的三维眼球模板与该特征点正好相切,也就是如图3D所示,在将缩放后的三维眼球模板平移一定距离后所得到的眼球中心点与该特征点的距离,正好与缩放后的眼球半径相等,此时若设定该特征点对应的子平移参数为x,那么缩放后的三维眼球模板在平移后的眼球中心点为
Figure PCTCN2021140798-appb-000005
此时可确定
Figure PCTCN2021140798-appb-000006
也就是
Figure PCTCN2021140798-appb-000007
整理可得:
Figure PCTCN2021140798-appb-000008
即可计算出该特征点对应的子平移参数x;按照上述步骤可以得到每一个特征点对应的子平移参数,通过比对多个子平移参数,得到最大子平移参数
Figure PCTCN2021140798-appb-000009
从而计算出三 维眼球模板在三维人脸卡通模型内的平移配准参数为
Figure PCTCN2021140798-appb-000010
而缩放配准参数为s i,后续直接依次按照缩放配准参数和平移配准参数对三维眼球模板进行缩放和平移操作,即可实现三维人脸卡通模型内的眼球准确配准。
Exemplarily, for each feature point p i on each eyelid grid in the 3D face cartoon model, if it is required that the feature point is not interspersed in the scaled 3D eyeball template, the scaled 3D eyeball can be The template is exactly tangent to the feature point, that is, as shown in Figure 3D, the distance between the center point of the eyeball and the feature point obtained by translating the scaled 3D eyeball template by a certain distance is exactly equal to the scaled eyeball radius , at this time, if the sub-translation parameter corresponding to the feature point is set to be x, then the center point of the eyeball after the translation of the scaled 3D eyeball template is
Figure PCTCN2021140798-appb-000005
At this point it can be determined
Figure PCTCN2021140798-appb-000006
that is
Figure PCTCN2021140798-appb-000007
Arrange to get:
Figure PCTCN2021140798-appb-000008
The sub-translation parameter x corresponding to the feature point can be calculated; the sub-translation parameter corresponding to each feature point can be obtained according to the above steps, and the maximum sub-translation parameter can be obtained by comparing multiple sub-translation parameters
Figure PCTCN2021140798-appb-000009
Thus, the translation registration parameters of the 3D eyeball template in the 3D face cartoon model are calculated as
Figure PCTCN2021140798-appb-000010
The scaling registration parameter is s i , and the 3D eyeball template is directly scaled and translated in sequence according to the scaling registration parameter and the translation registration parameter, so as to achieve accurate registration of the eyeballs in the 3D face cartoon model.
S360,比对三维人脸卡通模型内眼皮网格上的每一个特征点对应的子平移参数,确定三维眼球模板在三维人脸卡通模型内的平移配准参数。S360, compare the sub-translation parameters corresponding to each feature point on the eyelid grid in the three-dimensional face cartoon model, and determine the translation registration parameters of the three-dimensional eyeball template in the three-dimensional face cartoon model.
本实施例提供的技术方案,按照待定制的人脸图像对统一设定的三维卡通网格模板进行形变,得到定制的三维人脸卡通模型,按照该三维人脸卡通模型内的眼眶形变信息,来计算预设的三维眼球模板在该三维人脸卡通模型内适应于该眼眶形变下的缩放配准参数,进而以使按照缩放配准参数缩放后的三维眼球模板,与三维人脸卡通模型内的眼皮网格之间不存在穿插为目标,计算三维眼球模板在三维人脸卡通模型内的平移配准参数,从而避免出现三维人脸卡通模型内眼球不适配的情况,无需计算通用的三维网格模型中大量模型点的形变情况,极大减少三维卡通模型中眼球配准的计算开销,直接通过在三维人脸卡通模型内对三维眼球模板进行缩放和平移操作,即可实现三维人脸卡通模型内的眼球配准,降低了三维卡通模型中眼球配准的复杂性,提高了三维卡通模型中眼球配准的高效性。In the technical solution provided by this embodiment, the uniformly set 3D cartoon grid template is deformed according to the face image to be customized to obtain a customized 3D face cartoon model, and according to the orbital deformation information in the 3D face cartoon model, To calculate the preset 3D eyeball template in the 3D face cartoon model to adapt to the orbital deformation under the scaling registration parameters, and then make the 3D eyeball template scaled according to the scaling registration parameters, and the 3D face cartoon model. There is no interspersed between the eyelid grids as the target, and the translation registration parameters of the 3D eye template in the 3D face cartoon model are calculated, so as to avoid the situation that the eyeballs in the 3D face cartoon model do not fit, and there is no need to calculate the general 3D face model. The deformation of a large number of model points in the mesh model greatly reduces the computational overhead of eyeball registration in the 3D cartoon model. The 3D face can be realized directly by scaling and panning the 3D eye template in the 3D face cartoon model. The eyeball registration in the cartoon model reduces the complexity of the eyeball registration in the three-dimensional cartoon model and improves the efficiency of the eyeball registration in the three-dimensional cartoon model.
实施例四Embodiment 4
图4为本申请实施例四提供的一种基于三维卡通模型的眼球配准装置的结构示意图,如图4所示,该装置可以包括以下模块。FIG. 4 is a schematic structural diagram of an eyeball registration device based on a three-dimensional cartoon model according to Embodiment 4 of the present application. As shown in FIG. 4 , the device may include the following modules.
卡通模型定制模块410,设置为根据待定制的人脸图像对三维卡通网格模板进行形变,得到定制的三维人脸卡通模型;The cartoon model customization module 410 is configured to deform the three-dimensional cartoon grid template according to the face image to be customized to obtain a customized three-dimensional face cartoon model;
缩放配准确定模块420,设置为根据所述三维人脸卡通模型内的眼眶形变信息,计算预设的三维眼球模板在所述三维人脸卡通模型内的缩放配准参数;The scaling and registration determining module 420 is configured to calculate the scaling and registration parameters of the preset 3D eyeball template in the 3D face cartoon model according to the orbital deformation information in the 3D face cartoon model;
平移配准确定模块430,设置为以使按照所述缩放配准参数缩放后的三维眼球模板,与所述三维人脸卡通模型内的眼皮网格之间不存在穿插为目标,计算所述三维眼球模板在所述三维人脸卡通模型内的平移配准参数。The translation registration determination module 430 is set to make the three-dimensional eyeball template scaled according to the scaling registration parameters and the eyelid meshes in the three-dimensional face cartoon model not interspersed as the goal, and calculate the three-dimensional The translation registration parameters of the eyeball template in the three-dimensional face cartoon model.
本实施例提供的技术方案,按照待定制的人脸图像对统一设定的三维卡通网格模板进行形变,得到定制的三维人脸卡通模型,按照该三维人脸卡通模型内的眼眶形变信息,来计算预设的三维眼球模板在该三维人脸卡通模型内适应于该眼眶形变下的缩放配准参数,进而以使按照缩放配准参数缩放后的三维眼 球模板,与三维人脸卡通模型内的眼皮网格之间不存在穿插为目标,计算三维眼球模板在三维人脸卡通模型内的平移配准参数,从而避免出现三维人脸卡通模型内眼球不适配的情况,无需计算通用的三维网格模型中大量模型点的形变情况,极大减少三维卡通模型中眼球配准的计算开销,直接通过在三维人脸卡通模型内对三维眼球模板进行缩放和平移操作,即可实现三维人脸卡通模型内的眼球配准,降低了三维卡通模型中眼球配准的复杂性,提高了三维卡通模型中眼球配准的高效性。In the technical solution provided by this embodiment, the uniformly set 3D cartoon grid template is deformed according to the face image to be customized to obtain a customized 3D face cartoon model, and according to the orbital deformation information in the 3D face cartoon model, To calculate the preset 3D eyeball template in the 3D face cartoon model to adapt to the orbital deformation under the scaling registration parameters, and then make the 3D eyeball template scaled according to the scaling registration parameters, and the 3D face cartoon model. There is no interspersed between the eyelid grids as the target, and the translation registration parameters of the 3D eye template in the 3D face cartoon model are calculated, so as to avoid the situation that the eyeballs in the 3D face cartoon model do not fit, and there is no need to calculate the general 3D face model. The deformation of a large number of model points in the mesh model greatly reduces the computational overhead of eyeball registration in the 3D cartoon model. The 3D face can be realized directly by scaling and panning the 3D eye template in the 3D face cartoon model. The eyeball registration in the cartoon model reduces the complexity of the eyeball registration in the three-dimensional cartoon model and improves the efficiency of the eyeball registration in the three-dimensional cartoon model.
本实施例提供的基于三维卡通模型的眼球配准装置可适用于执行上述任意实施例提供的基于三维卡通模型的眼球配准方法,具备相应的功能和效果。The apparatus for eyeball registration based on a 3D cartoon model provided in this embodiment can be adapted to execute the method for eyeball registration based on a 3D cartoon model provided in any of the above embodiments, and has corresponding functions and effects.
实施例五Embodiment 5
图5为本申请实施例五提供的一种服务器的结构示意图,如图5所示,该服务器包括处理器50、存储装置51和通信装置52;服务器中处理器50的数量可以是一个或多个,图5中以一个处理器50为例;服务器中的处理器50、存储装置51和通信装置52可以通过总线或其他方式连接,图5中以通过总线连接为例。FIG. 5 is a schematic structural diagram of a server according to Embodiment 5 of the present application. As shown in FIG. 5 , the server includes a processor 50, a storage device 51 and a communication device 52; the number of processors 50 in the server may be one or more One processor 50 is taken as an example in FIG. 5 ; the processor 50 , the storage device 51 and the communication device 52 in the server may be connected through a bus or other means, and the connection through a bus is taken as an example in FIG. 5 .
本实施例提供的一种服务器可用于执行上述任意实施例提供的基于三维卡通模型的眼球配准方法,具备相应的功能和效果。The server provided in this embodiment can be used to execute the eye registration method based on the three-dimensional cartoon model provided by any of the above embodiments, and has corresponding functions and effects.
实施例六Embodiment 6
本申请实施例六还提供了一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时可实现上述任意实施例中的基于三维卡通模型的眼球配准方法。该方法可以包括:Embodiment 6 of the present application further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method for eyeball registration based on a three-dimensional cartoon model in any of the foregoing embodiments can be implemented. The method can include:
根据待定制的人脸图像对三维卡通网格模板进行形变,得到定制的三维人脸卡通模型;Deform the 3D cartoon grid template according to the face image to be customized to obtain a customized 3D face cartoon model;
根据所述三维人脸卡通模型内的眼眶形变信息,计算预设的三维眼球模板在所述三维人脸卡通模型内的缩放配准参数;According to the orbital deformation information in the 3D face cartoon model, calculate the scaling and registration parameters of the preset 3D eyeball template in the 3D face cartoon model;
以使按照所述缩放配准参数缩放后的三维眼球模板,与所述三维人脸卡通模型内的眼皮网格之间不存在穿插为目标,计算所述三维眼球模板在所述三维人脸卡通模型内的平移配准参数。With the goal that there is no interspersed between the 3D eyeball template scaled according to the scaling and registration parameters and the eyelid grid in the 3D face cartoon model, calculate the 3D eyeball template in the 3D face cartoon model. Translational registration parameters within the model.
本申请实施例所提供的一种包含计算机可执行指令的存储介质,其计算机可执行指令不限于如上所述的方法操作,还可以执行本申请任意实施例所提供 的基于三维卡通模型的眼球配准方法中的相关操作。A storage medium containing computer-executable instructions provided by an embodiment of the present application, the computer-executable instructions of the computer-executable instructions are not limited to the above-mentioned method operations, and can also perform the eyeball matching provided by any embodiment of the present application based on a three-dimensional cartoon model. related operations in the quasi-method.
本申请可借助软件及通用硬件来实现,也可以通过硬件实现。本申请可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如计算机的软盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、闪存(FLASH)、硬盘或光盘等,包括多个指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请多个实施例所述的方法。存储介质可以是非暂态(non-transitory)存储介质。The present application can be implemented by means of software and general hardware, and can also be implemented by hardware. The present application 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 floppy disk of a computer, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory) , RAM), flash memory (FLASH), hard disk or optical disk, etc., including multiple instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute the methods described in the various embodiments of the present application. The storage medium may be a non-transitory storage medium.
上述基于三维卡通模型的眼球配准装置的实施例中,所包括的多个单元和模块只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,多个功能单元的名称也只是为了便于相互区分,并不用于限制本申请的保护范围。In the above-mentioned embodiment of the eye registration device based on the three-dimensional cartoon model, the multiple 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 realized; , the names of multiple functional units are only for the convenience of distinguishing from each other, and are not used to limit the protection scope of the present application.

Claims (12)

  1. 一种基于三维卡通模型的眼球配准方法,包括:An eye registration method based on a three-dimensional cartoon model, comprising:
    根据待定制的人脸图像对三维卡通网格模板进行形变,得到定制的三维人脸卡通模型;Deform the 3D cartoon grid template according to the face image to be customized to obtain a customized 3D face cartoon model;
    根据所述三维人脸卡通模型内的眼眶形变信息,计算预设的三维眼球模板在所述三维人脸卡通模型内的缩放配准参数;According to the orbital deformation information in the 3D face cartoon model, calculate the scaling and registration parameters of the preset 3D eyeball template in the 3D face cartoon model;
    以使按照所述缩放配准参数缩放后的三维眼球模板,与所述三维人脸卡通模型内的眼皮网格之间不存在穿插为目标,计算所述三维眼球模板在所述三维人脸卡通模型内的平移配准参数。With the goal that there is no interspersed between the 3D eyeball template scaled according to the scaling and registration parameters and the eyelid grid in the 3D face cartoon model, calculate the 3D eyeball template in the 3D face cartoon model. Translational registration parameters within the model.
  2. 根据权利要求1所述的方法,其中,所述以使按照所述缩放配准参数缩放后的三维眼球模板,与所述三维人脸卡通模型内的眼皮网格之间不存在穿插为目标,计算所述三维眼球模板在所述三维人脸卡通模型内的平移配准参数,包括:The method according to claim 1, wherein the goal is to make the three-dimensional eyeball template scaled according to the scaling registration parameters and the eyelid grid in the three-dimensional face cartoon model not interspersed as the goal, Calculate the translation registration parameters of the 3D eyeball template in the 3D face cartoon model, including:
    计算所述三维眼球模板按照所述缩放配准参数缩放后的眼球中心点和眼球半径;calculating the center point of the eyeball and the radius of the eyeball after the three-dimensional eyeball template is scaled according to the scaling and registration parameters;
    针对所述三维人脸卡通模型内眼皮网格上的每一个特征点,根据所述特征点与所述眼球中心点的距离、与所述眼球半径之间的差异,计算所述特征点对应的子平移参数;For each feature point on the eyelid grid in the three-dimensional face cartoon model, according to the distance between the feature point and the center point of the eyeball, and the difference between the radius of the eyeball, the corresponding feature point is calculated. subtranslation parameter;
    比对所述三维人脸卡通模型内眼皮网格上的每一个特征点对应的子平移参数,确定所述三维眼球模板在所述三维人脸卡通模型内的平移配准参数。The sub-translation parameters corresponding to each feature point on the eyelid grid in the three-dimensional face cartoon model are compared, and the translation registration parameters of the three-dimensional eyeball template in the three-dimensional face cartoon model are determined.
  3. 根据权利要求2所述的方法,其中,所述计算所述三维眼球模板按照所述缩放配准参数缩放后的眼球中心点和眼球半径,包括:The method according to claim 2, wherein the calculating the center point of the eyeball and the eyeball radius after the three-dimensional eyeball template is scaled according to the scaling and registration parameters, comprises:
    按照所述三维眼球模板的原始眼球半径和所述缩放配准参数,计算所述三维眼球模板按照所述缩放配准参数缩放后的眼球半径;According to the original eyeball radius of the three-dimensional eyeball template and the scaling registration parameter, calculate the eyeball radius after the three-dimensional eyeball template is scaled according to the scaling registration parameter;
    根据所述三维眼球模板内的瞳孔中心点在所述三维人脸卡通模型中的最近特征点位置和所述眼球半径,计算所述三维眼球模板按照所述缩放配准参数缩放后的眼球中心点。Calculate the center point of the eyeball after the three-dimensional eyeball template is scaled according to the scaling and registration parameters according to the position of the nearest feature point in the three-dimensional face cartoon model and the eyeball radius of the pupil center point in the three-dimensional eyeball template .
  4. 根据权利要求3所述的方法,其中,在所述根据所述三维眼球模板内的瞳孔中心点在所述三维人脸卡通模型中的最近特征点位置和所述眼球半径,计算所述三维眼球模板按照所述缩放配准参数缩放后的眼球中心点之前,还包括:The method according to claim 3, wherein, calculating the three-dimensional eyeball according to the position of the nearest feature point in the three-dimensional face cartoon model and the eyeball radius according to the pupil center point in the three-dimensional eyeball template The template further includes:
    确定所述三维眼球模板内的瞳孔中心点在所述三维卡通网格模板中的原始最近特征点;determining the original closest feature point of the pupil center point in the three-dimensional eyeball template in the three-dimensional cartoon grid template;
    基于所述原始最近特征点在所述三维人脸卡通模型中的形变位置,确定所 述瞳孔中心点在所述三维人脸卡通模型中的最近特征点位置。Based on the deformation position of the original nearest feature point in the three-dimensional face cartoon model, determine the nearest feature point position of the pupil center point in the three-dimensional face cartoon model.
  5. 根据权利要求2所述的方法,其中,在所述根据待定制的人脸图像对三维卡通网格模板进行形变,得到定制的三维人脸卡通模型之后,还包括:The method according to claim 2, wherein, after the three-dimensional cartoon grid template is deformed according to the face image to be customized to obtain the customized three-dimensional face cartoon model, the method further comprises:
    确定所述三维人脸卡通模型内不同眼皮状态下的眼皮网格,并提取每一个眼皮网格内的特征点。The eyelid grids under different eyelid states in the three-dimensional face cartoon model are determined, and the feature points in each eyelid grid are extracted.
  6. 根据权利要求2所述的方法,其中,所述针对所述三维人脸卡通模型内眼皮网格上的每一个特征点,根据所述特征点与所述眼球中心点的距离、与所述眼球半径之间的差异,计算所述特征点对应的子平移参数,包括:The method according to claim 2, wherein, for each feature point on the eyelid grid in the three-dimensional face cartoon model, according to the distance between the feature point and the center point of the eyeball, and the eyeball Calculate the difference between the radii, and calculate the sub-translation parameters corresponding to the feature points, including:
    针对所述三维人脸卡通模型内眼皮网格上的每一个特征点,以使所述三维眼球模板平移后的眼球中心点与所述特征点的距离、与所述眼球半径相等为目标,计算所述特征点对应的子平移参数。For each feature point on the eyelid grid in the three-dimensional face cartoon model, the distance between the center point of the eyeball after the translation of the three-dimensional eyeball template and the feature point is equal to the radius of the eyeball, and calculating Sub-translation parameters corresponding to the feature points.
  7. 根据权利要求1-6中任一项所述的方法,其中,在所述根据所述三维人脸卡通模型内的眼眶形变信息,计算预设的三维眼球模板在所述三维人脸卡通模型内的缩放配准参数之前,还包括:The method according to any one of claims 1-6, wherein, in the calculation according to the orbital deformation information in the three-dimensional face cartoon model, a preset three-dimensional eyeball template is calculated in the three-dimensional face cartoon model Before the scaling registration parameters, also include:
    提取所述三维人脸卡通模型内的眼皮边缘特征点,并按照每个眼皮边缘特征点的形变信息,计算对应的眼眶形变信息。The eyelid edge feature points in the three-dimensional face cartoon model are extracted, and the corresponding orbital deformation information is calculated according to the deformation information of each eyelid edge feature point.
  8. 根据权利要求1-6中任一项所述的方法,其中,所述根据待定制的人脸图像对三维卡通网格模板进行形变,得到定制的三维人脸卡通模型,包括:The method according to any one of claims 1-6, wherein the three-dimensional cartoon grid template is deformed according to the face image to be customized to obtain a customized three-dimensional face cartoon model, comprising:
    按照所述待定制的人脸图像中的人脸外形与人脸表情依次对所述三维卡通网格模板进行形变,得到所述定制的三维人脸卡通模型。The three-dimensional cartoon grid template is sequentially deformed according to the face shape and face expression in the face image to be customized to obtain the customized three-dimensional face cartoon model.
  9. 根据权利要求1-6中任一项所述的方法,其中,在所述计算所述三维眼球模板在所述三维人脸卡通模型内的平移配准参数之后,还包括:The method according to any one of claims 1-6, wherein after calculating the translation registration parameters of the three-dimensional eyeball template in the three-dimensional face cartoon model, the method further comprises:
    在所述三维人脸卡通模型内,采用所述缩放配准参数和所述平移配准参数依次对所述三维眼球模板进行配准。In the three-dimensional face cartoon model, the three-dimensional eyeball template is registered sequentially by using the zoom registration parameter and the translation registration parameter.
  10. 一种基于三维卡通模型的眼球配准装置,包括:An eye registration device based on a three-dimensional cartoon model, comprising:
    卡通模型定制模块,设置为根据待定制的人脸图像对三维卡通网格模板进行形变,得到定制的三维人脸卡通模型;The cartoon model customization module is set to deform the 3D cartoon grid template according to the face image to be customized to obtain a customized 3D face cartoon model;
    缩放配准确定模块,设置为根据所述三维人脸卡通模型内的眼眶形变信息,计算预设的三维眼球模板在所述三维人脸卡通模型内的缩放配准参数;The scaling and registration determining module is configured to calculate the scaling and registration parameters of the preset 3D eyeball template in the 3D face cartoon model according to the orbital deformation information in the 3D face cartoon model;
    平移配准确定模块,设置为以使按照所述缩放配准参数缩放后的三维眼球模板,与所述三维人脸卡通模型内的眼皮网格之间不存在穿插为目标,计算所述三维眼球模板在所述三维人脸卡通模型内的平移配准参数。The translation registration determination module is set to make the three-dimensional eyeball template scaled according to the scaling and registration parameters, and the eyelid grid in the three-dimensional face cartoon model not interspersed as the target, and calculate the three-dimensional eyeball The translation registration parameters of the template in the three-dimensional face cartoon model.
  11. 一种服务器,包括:A server that includes:
    一个或多个处理器;one or more processors;
    存储装置,设置为存储一个或多个程序;storage means arranged to store one or more programs;
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-9中任一项所述的基于三维卡通模型的眼球配准方法。When the one or more programs are executed by the one or more processors, the one or more processors implement the three-dimensional cartoon model-based eye registration according to any one of claims 1-9 method.
  12. 一种计算机可读存储介质,存储有计算机程序,其中,所述计算机程序被处理器执行时实现如权利要求1-9中任一项所述的基于三维卡通模型的眼球配准方法。A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the method for eyeball registration based on a three-dimensional cartoon model according to any one of claims 1-9 is implemented.
PCT/CN2021/140798 2020-12-25 2021-12-23 Eyeball registration method and apparatus based on three-dimensional cartoon model, and server and medium WO2022135518A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011565476.1A CN112581518A (en) 2020-12-25 2020-12-25 Eyeball registration method, device, server and medium based on three-dimensional cartoon model
CN202011565476.1 2020-12-25

Publications (1)

Publication Number Publication Date
WO2022135518A1 true WO2022135518A1 (en) 2022-06-30

Family

ID=75140730

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/140798 WO2022135518A1 (en) 2020-12-25 2021-12-23 Eyeball registration method and apparatus based on three-dimensional cartoon model, and server and medium

Country Status (2)

Country Link
CN (1) CN112581518A (en)
WO (1) WO2022135518A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116188640A (en) * 2022-12-09 2023-05-30 北京百度网讯科技有限公司 Three-dimensional virtual image generation method, device, equipment and medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112581518A (en) * 2020-12-25 2021-03-30 百果园技术(新加坡)有限公司 Eyeball registration method, device, server and medium based on three-dimensional cartoon model

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090087035A1 (en) * 2007-10-02 2009-04-02 Microsoft Corporation Cartoon Face Generation
CN102157010A (en) * 2011-05-25 2011-08-17 上海大学 Method for realizing three-dimensional facial animation based on layered modeling and multi-body driving
CN102262788A (en) * 2010-05-24 2011-11-30 上海一格信息科技有限公司 Method and device for processing interactive makeup information data of personal three-dimensional (3D) image
CN104715447A (en) * 2015-03-02 2015-06-17 百度在线网络技术(北京)有限公司 Image synthesis method and device
CN108717719A (en) * 2018-05-23 2018-10-30 腾讯科技(深圳)有限公司 Generation method, device and the computer storage media of cartoon human face image
CN112085835A (en) * 2020-08-31 2020-12-15 腾讯科技(深圳)有限公司 Three-dimensional cartoon face generation method and device, electronic equipment and storage medium
CN112581518A (en) * 2020-12-25 2021-03-30 百果园技术(新加坡)有限公司 Eyeball registration method, device, server and medium based on three-dimensional cartoon model

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020014844A (en) * 2000-07-18 2002-02-27 최창석 Three dimensional face modeling method
KR101757642B1 (en) * 2016-07-20 2017-07-13 (주)레벨소프트 Apparatus and method for 3d face modeling
CN107330371A (en) * 2017-06-02 2017-11-07 深圳奥比中光科技有限公司 Acquisition methods, device and the storage device of the countenance of 3D facial models
CN109191552A (en) * 2018-08-16 2019-01-11 Oppo广东移动通信有限公司 Threedimensional model processing method, device, electronic equipment and storage medium
CN109191508A (en) * 2018-09-29 2019-01-11 深圳阜时科技有限公司 A kind of simulation beauty device, simulation lift face method and apparatus
CN111382618B (en) * 2018-12-28 2021-02-05 广州市百果园信息技术有限公司 Illumination detection method, device, equipment and storage medium for face image
CN110585592B (en) * 2019-07-31 2022-11-22 济南瞳星智能科技有限公司 Personalized electronic acupuncture device and generation method and generation device thereof
CN111028343B (en) * 2019-12-16 2020-12-11 腾讯科技(深圳)有限公司 Three-dimensional face model generation method, device, equipment and medium
CN111882627A (en) * 2020-07-20 2020-11-03 广州市百果园信息技术有限公司 Image processing method, video processing method, device, equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090087035A1 (en) * 2007-10-02 2009-04-02 Microsoft Corporation Cartoon Face Generation
CN102262788A (en) * 2010-05-24 2011-11-30 上海一格信息科技有限公司 Method and device for processing interactive makeup information data of personal three-dimensional (3D) image
CN102157010A (en) * 2011-05-25 2011-08-17 上海大学 Method for realizing three-dimensional facial animation based on layered modeling and multi-body driving
CN104715447A (en) * 2015-03-02 2015-06-17 百度在线网络技术(北京)有限公司 Image synthesis method and device
CN108717719A (en) * 2018-05-23 2018-10-30 腾讯科技(深圳)有限公司 Generation method, device and the computer storage media of cartoon human face image
CN112085835A (en) * 2020-08-31 2020-12-15 腾讯科技(深圳)有限公司 Three-dimensional cartoon face generation method and device, electronic equipment and storage medium
CN112581518A (en) * 2020-12-25 2021-03-30 百果园技术(新加坡)有限公司 Eyeball registration method, device, server and medium based on three-dimensional cartoon model

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CAO YUZHE: "The Study of Complete Virtual Human Head Modeling and Facial Expression Synthesis", MASTER THESIS, TIANJIN POLYTECHNIC UNIVERSITY, CN, no. 1, 15 January 2017 (2017-01-15), CN , XP055946683, ISSN: 1674-0246 *
LEI TENG: "The Study of Virtual Human's Eye Movement and Facial Expression Synthesis", MASTER THESIS, TIANJIN POLYTECHNIC UNIVERSITY, CN, no. 9, 15 September 2014 (2014-09-15), CN , XP055946687, ISSN: 1674-0246 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116188640A (en) * 2022-12-09 2023-05-30 北京百度网讯科技有限公司 Three-dimensional virtual image generation method, device, equipment and medium
CN116188640B (en) * 2022-12-09 2023-09-08 北京百度网讯科技有限公司 Three-dimensional virtual image generation method, device, equipment and medium

Also Published As

Publication number Publication date
CN112581518A (en) 2021-03-30

Similar Documents

Publication Publication Date Title
US11302064B2 (en) Method and apparatus for reconstructing three-dimensional model of human body, and storage medium
CN111598998B (en) Three-dimensional virtual model reconstruction method, three-dimensional virtual model reconstruction device, computer equipment and storage medium
WO2020207270A1 (en) Three-dimensional face reconstruction method, system and apparatus, and storage medium
WO2022135518A1 (en) Eyeball registration method and apparatus based on three-dimensional cartoon model, and server and medium
EP3992919B1 (en) Three-dimensional facial model generation method and apparatus, device, and medium
WO2022143645A1 (en) Three-dimensional face reconstruction method and apparatus, device, and storage medium
WO2022095721A1 (en) Parameter estimation model training method and apparatus, and device and storage medium
CN111710036B (en) Method, device, equipment and storage medium for constructing three-dimensional face model
AU2018377863B2 (en) Customization method and apparatus
CN113628327B (en) Head three-dimensional reconstruction method and device
WO2021244172A1 (en) Image processing method and image synthesis method, image processing apparatus and image synthesis apparatus, and storage medium
TWI780919B (en) Method and apparatus for processing face image, electronic device and storage medium
CN112102480B (en) Image data processing method, apparatus, device and medium
TWI750710B (en) Image processing method and apparatus, image processing device and storage medium
JP2024004444A (en) Three-dimensional face reconstruction model training, three-dimensional face image generation method, and device
EP3855386B1 (en) Method, apparatus, device and storage medium for transforming hairstyle and computer program product
WO2023185398A1 (en) Facial processing method and apparatus, and computer device and storage medium
CN117132711A (en) Digital portrait customizing method, device, equipment and storage medium
CN115496864B (en) Model construction method, model reconstruction device, electronic equipment and storage medium
WO2021197230A1 (en) Three-dimensional head model constructing method, device, system, and storage medium
JP3757123B2 (en) Three-dimensional CG character generation method, apparatus thereof, program for realizing the method, and recording medium recording the program
CN111429406A (en) Method and device for detecting breast X-ray image lesion by combining multi-view reasoning
JP2003030684A (en) Face three-dimensional computer graphic generation method and device, face three-dimensional computer graphic generation program and storage medium storing face three-dimensional computer graphic generation program
CN111369651A (en) Three-dimensional expression animation generation method and system
CN116912433B (en) Three-dimensional model skeleton binding method, device, equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21909513

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21909513

Country of ref document: EP

Kind code of ref document: A1