Virtual image display method and device, terminal and storage medium

CN115393562BActive Publication Date: 2026-09-04BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211079191.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-05
Publication Date
2026-09-04
Estimated Expiration
2042-09-05

AI Technical Summary

Technical Problem

但是,在生成虚拟形象的过程中,需要将二维人脸贴图贴覆于三维人脸模型上,会导致二维人脸贴图中的眉毛出现线条不平滑的情况,进而导致虚拟形象的显示效果不好

Benefits of technology

[0037]在本公开实施例中,通过先从二维的目标眉毛贴图中提取眉毛轮廓信息,该眉毛轮廓信息能够表征眉毛的轮廓,从而根据所提取的眉毛轮廓信息生成目标眉毛贴图对应的目标三维眉毛模型,实现了单独针对眉毛从二维贴图到三维模型的转换,从而能够分别基于目标三维眉毛模型和目标三维人脸模型,来显示目标人脸图像对应的虚拟形象,使得所显示的虚拟形象中的眉毛的线条较为平滑,改善了虚拟形象的显示效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115393562B_ABST
    Figure CN115393562B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a virtual image display method and device, a terminal and a storage medium, and belongs to the technical field of Internet. The method comprises: obtaining a target eyebrow map corresponding to a target face image and a target three-dimensional face model, the target three-dimensional face model not including eyebrows; extracting eyebrow contour information from the target eyebrow map, the eyebrow contour information representing the contour of the eyebrows in the target eyebrow map; generating a target three-dimensional eyebrow model corresponding to the target eyebrow map based on the eyebrow contour information; and displaying a virtual image corresponding to the target face image based on the target three-dimensional eyebrow model and the target three-dimensional face model. The method realizes the conversion from a two-dimensional map to a three-dimensional model for eyebrows alone, thereby enabling the display of a virtual image corresponding to the target face image based on the target three-dimensional eyebrow model and the target three-dimensional face model respectively, making the lines of the eyebrows in the displayed virtual image smoother, and improving the display effect of the virtual image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of Internet technology, and in particular to a method, apparatus, terminal and storage medium for displaying virtual images. Background Technology

[0002] With the rapid development of computer technology and mobile internet, the popularity of virtual avatars has added fun to people's lives. Related technologies involve collecting users' facial images and generating stylized virtual avatars based on those images. However, in the process of generating virtual avatars, a 2D facial texture needs to be overlaid onto a 3D facial model. This can cause uneven lines in the eyebrows of the 2D facial texture, resulting in poor display quality of the virtual avatar. Summary of the Invention

[0003] This disclosure provides a method, apparatus, terminal, and storage medium for displaying virtual avatars, which can improve the display effect of virtual avatars. The technical solution of this disclosure is as follows.

[0004] According to a first aspect of the present disclosure, a method for displaying a virtual avatar is provided, comprising: Obtain the target eyebrow texture and the target 3D face model corresponding to the target face image, wherein the target 3D face model does not include eyebrows; From the target eyebrow texture, eyebrow contour information is extracted, and the eyebrow contour information represents the contour of the eyebrow in the target eyebrow texture; Based on the eyebrow contour information, a target 3D eyebrow model corresponding to the target eyebrow texture is generated; Based on the target 3D eyebrow model and the target 3D face model, a virtual image corresponding to the target face image is displayed.

[0005] In some embodiments, extracting eyebrow contour information from the target eyebrow texture includes: Contour point recognition is performed on the target eyebrow texture to obtain the two-dimensional coordinates of multiple target contour points; The eyebrow contour information is determined based on the two-dimensional coordinates of the multiple target contour points, and the eyebrow contour information includes the two-dimensional coordinates of at least three target contour points.

[0006] In some embodiments, determining the eyebrow contour information based on the two-dimensional coordinates of the plurality of target contour points includes: From the plurality of target contour points, determine the first eyebrow point, the second eyebrow point, and the eyebrow tail point; Using the first eyebrow point, the second eyebrow point, and the eyebrow tail point as the endpoints of the eyebrow segment, the outline of the target eyebrow texture is divided into three eyebrow segments, each of which includes two endpoints and at least one target outline point between the two endpoints. Based on the two-dimensional coordinates of the target contour points in each eyebrow segment, segment contour information corresponding to each eyebrow segment is determined respectively. The first segment contour information corresponding to the first eyebrow segment includes the two-dimensional coordinates of the first eyebrow head point, the second eyebrow head point, and at least one target contour point between the first eyebrow head point and the second eyebrow head point. The second segment contour information corresponding to the second eyebrow segment includes the two-dimensional coordinates of the eyebrow tail point, the first eyebrow head point, and at least one target contour point between the eyebrow tail point and the first eyebrow head point. The third segment contour information corresponding to the third eyebrow segment includes the two-dimensional coordinates of the eyebrow tail point, the second eyebrow head point, and at least one target contour point between the eyebrow tail point and the second eyebrow head point.

[0007] In some embodiments, determining the segment contour information corresponding to each eyebrow segment based on the two-dimensional coordinates of the target contour points in each eyebrow segment includes: For any of the eyebrow segments mentioned: Based on the two-dimensional coordinates of each target contour point in the eyebrow segment, determine the first interpolation function corresponding to the eyebrow segment; Using the first interpolation function, determine the two-dimensional coordinates corresponding to at least one first interpolation point; Based on the two-dimensional coordinates of the endpoints in the eyebrow segment and the two-dimensional coordinates corresponding to the at least one first interpolation point, the segment contour information corresponding to the eyebrow segment is determined.

[0008] In some embodiments, the first interpolation function is used to represent the correspondence between the index of the first interpolation point in the eyebrow segment and the two-dimensional coordinates of the first interpolation point. The step of using the first interpolation function to determine the two-dimensional coordinates corresponding to at least one first interpolation point includes: Determine the first interpolation sequence corresponding to the eyebrow segment, wherein the first interpolation sequence includes the index of multiple first interpolation points; The first interpolation function is used to determine the two-dimensional coordinates corresponding to each first interpolation point.

[0009] In some embodiments, determining the first interpolation sequence corresponding to the eyebrow segment includes: Determine the maximum distance corresponding to the reference segment contour information of the eyebrow segment, wherein the maximum distance is the distance between two endpoints in the reference segment contour information, and the reference segment contour information is the contour information of the eyebrow segment in the reference 3D eyebrow model corresponding to the reference eyebrow texture; Determine the cumulative distance corresponding to each reference 3D contour point in the reference segment contour information, wherein the cumulative distance is the distance between the reference 3D contour point and the target endpoint in the reference segment contour information; Based on the ratio between the cumulative distance and the maximum distance corresponding to each of the reference 3D contour points, the first interpolation sequence corresponding to the eyebrow segment is determined.

[0010] In some embodiments, generating a target 3D eyebrow model corresponding to the target eyebrow texture based on the eyebrow contour information includes: Based on the eyebrow contour information, the reference 3D eyebrow model corresponding to the reference eyebrow texture is deformed to obtain the target 3D eyebrow model, so that the eyebrow contour of the target 3D eyebrow model matches the eyebrow contour information.

[0011] In some embodiments, the eyebrow contour information includes the two-dimensional coordinates of at least three target contour points. The step of deforming a reference 3D eyebrow model corresponding to a reference eyebrow texture based on the eyebrow contour information to obtain the target 3D eyebrow model, so that the eyebrow contour of the target 3D eyebrow model matches the eyebrow contour information, includes: Based on the eyebrow contour information, the reference eyebrow texture, and the reference 3D eyebrow model, determine the 3D coordinates of at least three target 3D contour points; Based on the three-dimensional coordinates of each target three-dimensional contour point, the reference three-dimensional eyebrow model is deformed to obtain the target three-dimensional eyebrow model.

[0012] In some embodiments, the eyebrow contour information includes first segment contour information corresponding to a first eyebrow segment, second segment contour information corresponding to a second eyebrow segment, and third segment contour information corresponding to a third eyebrow segment. Each segment contour information includes at least three two-dimensional coordinates of the target contour points. The two-dimensional coordinates include a first coordinate belonging to a first dimension and a second coordinate belonging to a second dimension. The reference eyebrow texture includes the two-dimensional coordinates of multiple reference contour points, and the reference three-dimensional eyebrow model includes the three-dimensional coordinates of multiple reference three-dimensional contour points. The three-dimensional coordinates include a first coordinate belonging to the first dimension, a second coordinate belonging to the second dimension, and a third coordinate belonging to the third dimension. The step of determining the 3D coordinates of at least three target 3D contour points based on the eyebrow contour information, the reference eyebrow texture, and the reference 3D eyebrow model includes: According to the mapping ratio between the reference eyebrow texture and the reference 3D eyebrow model, the first and second coordinates of each target contour point are adjusted respectively; The adjusted first and second coordinates of each target contour point, together with the third coordinate of the reference three-dimensional contour point corresponding to each target contour point, are used to determine the three-dimensional coordinates of a target three-dimensional contour point.

[0013] In some embodiments, adjusting the first and second coordinates of each target contour point according to the mapping ratio between the reference eyebrow texture and the reference 3D eyebrow model includes: Determine the first distance and the second distance corresponding to the reference eyebrow texture, wherein the first distance is the difference between the first coordinates of the two endpoints of the plurality of reference contour points, and the second distance is the difference between the second coordinates of the two endpoints of the plurality of reference contour points; The third distance and the fourth distance corresponding to the reference three-dimensional eyebrow model are determined. The third distance is the difference between the first coordinates of the two endpoints of the plurality of reference three-dimensional contour points, and the fourth distance is the difference between the second coordinates of the two endpoints of the plurality of reference three-dimensional contour points. A first ratio and a second ratio are determined respectively, wherein the first ratio is the ratio between the first distance and the third distance, and the second ratio is the ratio between the second distance and the fourth distance; Based on the first ratio, the first coordinates of each target contour point are adjusted, and based on the second ratio, the second coordinates of each target contour point are adjusted.

[0014] In some embodiments, the eyebrow contour information includes the two-dimensional coordinates of the target contour points in a plurality of eyebrow segments, and the step of deforming the reference three-dimensional eyebrow model based on the three-dimensional coordinates of each target three-dimensional contour point to obtain the target three-dimensional eyebrow model includes: For any of the eyebrow segments mentioned: Based on the three-dimensional coordinates of each target three-dimensional contour point in the eyebrow segment, determine the second interpolation function corresponding to the eyebrow segment; Using the second interpolation function, determine the three-dimensional coordinates corresponding to at least one second interpolation point; Based on the three-dimensional coordinates corresponding to the endpoints and the second interpolation point in each eyebrow segment, the reference three-dimensional eyebrow model is deformed to obtain the target three-dimensional eyebrow model.

[0015] In some embodiments, the second interpolation function is used to represent the correspondence between the index of the second interpolation point in the eyebrow segment and the three-dimensional coordinates of the second interpolation point. The step of using the second interpolation function to determine the three-dimensional coordinates corresponding to at least one second interpolation point includes: Determine the second interpolation sequence corresponding to the eyebrow segment, wherein the second interpolation sequence includes the index of multiple second interpolation points; The second interpolation function is used to determine the three-dimensional coordinates corresponding to each second interpolation point.

[0016] In some embodiments, the target three-dimensional eyebrow model includes the three-dimensional coordinates of a plurality of target three-dimensional contour points, wherein the three-dimensional coordinates include a first coordinate belonging to a first dimension, a second coordinate belonging to a second dimension, and a third coordinate belonging to a third dimension; The process of displaying a virtual image corresponding to the target face image based on the target 3D eyebrow model and the target 3D face model includes: According to the mapping ratio between the reference 3D eyebrow model and the target 3D eyebrow model, the third coordinate of each target 3D contour point is adjusted respectively. The reference 3D eyebrow model includes the 3D coordinates of multiple reference 3D contour points. Based on the adjusted target 3D eyebrow model and target 3D face model, a virtual image corresponding to the target face image is displayed.

[0017] In some embodiments, adjusting the third coordinate of each target three-dimensional contour point according to the mapping ratio between the reference three-dimensional eyebrow model and the target three-dimensional eyebrow model includes: The fifth distance corresponding to the target 3D eyebrow model and the sixth distance corresponding to the reference 3D eyebrow model are determined respectively. The fifth distance is the difference between the third coordinates of the two endpoints of the plurality of target 3D contour points, and the sixth distance is the difference between the third coordinates of the two endpoints of the plurality of reference 3D contour points. A third ratio is determined, wherein the third ratio is the ratio between the fifth distance and the sixth distance; Based on the third ratio, the third coordinates of each of the target three-dimensional contour points are adjusted.

[0018] In some embodiments, obtaining the target eyebrow texture includes: Acquire the target face image; Based on the target face image, generate the target face texture; Extract the target eyebrow texture from the target face texture.

[0019] According to a second aspect of the present disclosure, a virtual avatar display device is provided, the device comprising: The acquisition unit is configured to acquire the target eyebrow texture and the target 3D face model corresponding to the target face image, wherein the target 3D face model does not include eyebrows; The extraction unit is configured to extract eyebrow contour information from the target eyebrow texture, the eyebrow contour information representing the contour of the eyebrow in the target eyebrow texture; The generation unit is configured to generate a target 3D eyebrow model corresponding to the target eyebrow texture based on the eyebrow contour information; The display unit is configured to display a virtual image corresponding to the target face image based on the target 3D eyebrow model and the target 3D face model.

[0020] In some embodiments, the extraction unit includes: The identification subunit is configured to perform contour point recognition on the target eyebrow texture to obtain the two-dimensional coordinates of multiple target contour points; The determination subunit is configured to perform the determination of eyebrow contour information based on the two-dimensional coordinates of the plurality of target contour points, wherein the eyebrow contour information includes the two-dimensional coordinates of at least three target contour points.

[0021] In some embodiments, the determining subunit is configured to perform: From the plurality of target contour points, determine the first eyebrow point, the second eyebrow point, and the eyebrow tail point; Using the first eyebrow point, the second eyebrow point, and the eyebrow tail point as the endpoints of the eyebrow segment, the outline of the target eyebrow texture is divided into three eyebrow segments, each of which includes two endpoints and at least one target outline point between the two endpoints. Based on the two-dimensional coordinates of the target contour points in each eyebrow segment, segment contour information corresponding to each eyebrow segment is determined respectively. The first segment contour information corresponding to the first eyebrow segment includes the two-dimensional coordinates of the first eyebrow head point, the second eyebrow head point, and at least one target contour point between the first eyebrow head point and the second eyebrow head point. The second segment contour information corresponding to the second eyebrow segment includes the two-dimensional coordinates of the eyebrow tail point, the first eyebrow head point, and at least one target contour point between the eyebrow tail point and the first eyebrow head point. The third segment contour information corresponding to the third eyebrow segment includes the two-dimensional coordinates of the eyebrow tail point, the second eyebrow head point, and at least one target contour point between the eyebrow tail point and the second eyebrow head point.

[0022] In some embodiments, the determining subunit is configured to perform: For any of the eyebrow segments mentioned: Based on the two-dimensional coordinates of each target contour point in the eyebrow segment, determine the first interpolation function corresponding to the eyebrow segment; Using the first interpolation function, determine the two-dimensional coordinates corresponding to at least one first interpolation point; Based on the two-dimensional coordinates of the endpoints in the eyebrow segment and the two-dimensional coordinates corresponding to the at least one first interpolation point, the segment contour information corresponding to the eyebrow segment is determined.

[0023] In some embodiments, the first interpolation function is used to represent the correspondence between the index of the first interpolation point in the eyebrow segment and the two-dimensional coordinates of the first interpolation point, and the determining subunit is configured to execute: Determine the first interpolation sequence corresponding to the eyebrow segment, wherein the first interpolation sequence includes the index of multiple first interpolation points; The first interpolation function is used to determine the two-dimensional coordinates corresponding to each first interpolation point.

[0024] In some embodiments, the determining subunit is configured to perform: Determine the maximum distance corresponding to the reference segment contour information of the eyebrow segment, wherein the maximum distance is the distance between two endpoints in the reference segment contour information, and the reference segment contour information is the contour information of the eyebrow segment in the reference 3D eyebrow model corresponding to the reference eyebrow texture; Determine the cumulative distance corresponding to each reference 3D contour point in the reference segment contour information, wherein the cumulative distance is the distance between the reference 3D contour point and the target endpoint in the reference segment contour information; Based on the ratio between the cumulative distance and the maximum distance corresponding to each of the reference 3D contour points, the first interpolation sequence corresponding to the eyebrow segment is determined.

[0025] In some embodiments, the generating unit includes: The deformation subunit is configured to perform deformation on the reference 3D eyebrow model corresponding to the reference eyebrow texture based on the eyebrow contour information to obtain the target 3D eyebrow model, so that the eyebrow contour of the target 3D eyebrow model matches the eyebrow contour information.

[0026] In some embodiments, the eyebrow contour information includes the two-dimensional coordinates of at least three target contour points, and the deformation subunit is configured to perform: Based on the eyebrow contour information, the reference eyebrow texture, and the reference 3D eyebrow model, determine the 3D coordinates of at least three target 3D contour points; Based on the three-dimensional coordinates of each target three-dimensional contour point, the reference three-dimensional eyebrow model is deformed to obtain the target three-dimensional eyebrow model.

[0027] In some embodiments, the eyebrow contour information includes first segment contour information corresponding to a first eyebrow segment, second segment contour information corresponding to a second eyebrow segment, and third segment contour information corresponding to a third eyebrow segment. Each segment contour information includes at least three two-dimensional coordinates of the target contour points. The two-dimensional coordinates include a first coordinate belonging to a first dimension and a second coordinate belonging to a second dimension. The reference eyebrow texture includes the two-dimensional coordinates of multiple reference contour points, and the reference three-dimensional eyebrow model includes the three-dimensional coordinates of multiple reference three-dimensional contour points. The three-dimensional coordinates include a first coordinate belonging to the first dimension, a second coordinate belonging to the second dimension, and a third coordinate belonging to the third dimension. The deformable subunit is configured to perform: According to the mapping ratio between the reference eyebrow texture and the reference 3D eyebrow model, the first and second coordinates of each target contour point are adjusted respectively; The adjusted first and second coordinates of each target contour point, together with the third coordinate of the reference three-dimensional contour point corresponding to each target contour point, are used to determine the three-dimensional coordinates of a target three-dimensional contour point.

[0028] In some embodiments, the deformable subunit is configured to perform: Determine the first distance and the second distance corresponding to the reference eyebrow texture, wherein the first distance is the difference between the first coordinates of the two endpoints of the plurality of reference contour points, and the second distance is the difference between the second coordinates of the two endpoints of the plurality of reference contour points; The third distance and the fourth distance corresponding to the reference three-dimensional eyebrow model are determined. The third distance is the difference between the first coordinates of the two endpoints of the plurality of reference three-dimensional contour points, and the fourth distance is the difference between the second coordinates of the two endpoints of the plurality of reference three-dimensional contour points. A first ratio and a second ratio are determined respectively, wherein the first ratio is the ratio between the first distance and the third distance, and the second ratio is the ratio between the second distance and the fourth distance; Based on the first ratio, the first coordinates of each target contour point are adjusted, and based on the second ratio, the second coordinates of each target contour point are adjusted.

[0029] In some embodiments, the eyebrow contour information includes the two-dimensional coordinates of the target contour points in a plurality of eyebrow segments, and the deformation subunit is configured to perform: For any of the eyebrow segments mentioned: Based on the three-dimensional coordinates of each target three-dimensional contour point in the eyebrow segment, determine the second interpolation function corresponding to the eyebrow segment; Using the second interpolation function, determine the three-dimensional coordinates corresponding to at least one second interpolation point; Based on the three-dimensional coordinates corresponding to the endpoints and the second interpolation point in each eyebrow segment, the reference three-dimensional eyebrow model is deformed to obtain the target three-dimensional eyebrow model.

[0030] In some embodiments, the second interpolation function is used to represent the correspondence between the index of the second interpolation point in the eyebrow segment and the three-dimensional coordinates of the second interpolation point, and the deformation subunit is configured to execute: Determine the second interpolation sequence corresponding to the eyebrow segment, wherein the second interpolation sequence includes the index of multiple second interpolation points; The second interpolation function is used to determine the three-dimensional coordinates corresponding to each second interpolation point.

[0031] In some embodiments, the target three-dimensional eyebrow model includes the three-dimensional coordinates of a plurality of target three-dimensional contour points, wherein the three-dimensional coordinates include a first coordinate belonging to a first dimension, a second coordinate belonging to a second dimension, and a third coordinate belonging to a third dimension; The display unit includes: The adjustment subunit is configured to perform adjustments to the third coordinates of each of the target three-dimensional contour points according to the mapping ratio between the reference three-dimensional eyebrow model and the target three-dimensional eyebrow model, wherein the reference three-dimensional eyebrow model includes the three-dimensional coordinates of multiple reference three-dimensional contour points. The display subunit is configured to perform the display of a virtual image corresponding to the target face image based on the adjusted target 3D eyebrow model and the target 3D face model.

[0032] In some embodiments, the adjustment subunit is configured to perform: The fifth distance corresponding to the target 3D eyebrow model and the sixth distance corresponding to the reference 3D eyebrow model are determined respectively. The fifth distance is the difference between the third coordinates of the two endpoints of the plurality of target 3D contour points, and the sixth distance is the difference between the third coordinates of the two endpoints of the plurality of reference 3D contour points. A third ratio is determined, wherein the third ratio is the ratio between the fifth distance and the sixth distance; Based on the third ratio, the third coordinates of each of the target three-dimensional contour points are adjusted.

[0033] In some embodiments, the acquisition unit is configured to perform: Acquire the target face image; Based on the target face image, generate the target face texture; Extract the target eyebrow texture from the target face texture.

[0034] According to a third aspect of the present disclosure, a terminal is provided, the terminal comprising: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the virtual avatar display method as described above.

[0035] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, which, when instructions in the computer-readable storage medium are executed by a processor of a terminal, enables the terminal to perform the virtual avatar display method as described above.

[0036] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the virtual avatar display method as described above.

[0037] In this embodiment, eyebrow contour information is first extracted from a two-dimensional target eyebrow texture map. This eyebrow contour information can characterize the outline of the eyebrow. Then, a target three-dimensional eyebrow model corresponding to the target eyebrow texture map is generated based on the extracted eyebrow contour information. This realizes the conversion from a two-dimensional texture map to a three-dimensional model for the eyebrow separately. Thus, the virtual image corresponding to the target face image can be displayed based on the target three-dimensional eyebrow model and the target three-dimensional face model respectively. This makes the lines of the eyebrows in the displayed virtual image smoother and improves the display effect of the virtual image.

[0038] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0039] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.

[0040] Figure 1 This is a flowchart illustrating a virtual avatar display method according to an exemplary embodiment; Figure 2 This is a flowchart illustrating another method for displaying a virtual image according to an exemplary embodiment; Figure 3 This is a schematic diagram illustrating a target eyebrow texture according to an exemplary embodiment; Figure 4 This is a schematic diagram illustrating an eyebrow texture and a three-dimensional eyebrow model according to an exemplary embodiment; Figure 5 This is a schematic diagram illustrating a target human face model and a target three-dimensional eyebrow model according to an exemplary embodiment; Figure 6 This is a schematic diagram illustrating a virtual avatar display process according to an exemplary embodiment; Figure 7 This is a structural block diagram of a virtual avatar display device according to an exemplary embodiment; Figure 8 This is a structural block diagram of a terminal according to an exemplary embodiment. Detailed Implementation

[0041] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0042] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0043] The user information disclosed herein may be information authorized by the user or fully authorized by all parties.

[0044] This disclosure provides a method for displaying a virtual avatar, which is executed by a terminal. In some embodiments, the terminal is a laptop computer, mobile phone, tablet computer, or other terminal.

[0045] The virtual avatar display method provided in this disclosure can be applied to scenarios involving virtual avatar display. The application scenarios of the embodiments of this disclosure are described below.

[0046] For example, when a user sets their own virtual avatar on a terminal, the terminal collects the user's facial image and displays the virtual avatar corresponding to the user's facial image through the virtual avatar display method provided in this embodiment of the present disclosure, thereby realizing a stylized virtual avatar that conforms to the user's intention and the display effect of the virtual avatar is good.

[0047] The virtual avatar display method provided in this disclosure can also be applied to other scenarios, and this disclosure does not limit it.

[0048] Figure 1 This is a flowchart illustrating a virtual avatar display method according to an exemplary embodiment, such as... Figure 1 As shown, this method is executed by the terminal and includes the following steps.

[0049] In step 101, the terminal acquires the target eyebrow texture and the target 3D face model corresponding to the target face image. The target 3D face model does not include eyebrows.

[0050] The target face image is a user's face image, where the user is the user of the terminal. In some embodiments, the target face image is acquired by the terminal. The target eyebrow texture is a two-dimensional texture containing eyebrows, and this target eyebrow texture is extracted from the target face texture, which is a two-dimensional texture containing a face, including textures at at least one of the following locations: eyebrows, eyes, nose, mouth, and ears. The target three-dimensional face model is used to represent the three-dimensional contour of the face, and the target face model does not contain the facial features, including eyebrows.

[0051] In related technologies, the terminal acquires a two-dimensional face texture and a three-dimensional face model corresponding to a face image, and then overlays the two-dimensional face texture onto the three-dimensional face model. Based on the two-dimensional face texture and the three-dimensional face model, a virtual image is displayed. However, since the two-dimensional face texture and the three-dimensional face model are generated separately and there is no direct connection between them, when there are some straight color blocks in the eyebrows of the two-dimensional face texture, these straight color blocks may be curved when overlaid on the three-dimensional face model for display, resulting in uneven lines in the displayed virtual image and poor display effect of the virtual image.

[0052] In this embodiment, the terminal separately acquires the target eyebrow texture corresponding to the target face image, processes the target eyebrow texture, and then generates the target three-dimensional eyebrow model corresponding to the target eyebrow texture. This realizes the construction of a three-dimensional model for the eyebrows separately. Then, based on the target three-dimensional eyebrow model and the target three-dimensional face model, the virtual image is displayed. Since it is displayed based on a three-dimensional model, the bending of straight color blocks is avoided, and the lines in the displayed virtual image are relatively smooth, resulting in a better display effect of the virtual image.

[0053] In some embodiments, when a user triggers the terminal to display a virtual avatar, the terminal captures the user's facial image to obtain a target facial image, and then obtains the target eyebrow texture and target 3D facial model corresponding to the target facial image, thereby displaying the virtual avatar.

[0054] In step 102, the terminal extracts eyebrow contour information from the target eyebrow texture, and the eyebrow contour information represents the contour of the eyebrow in the target eyebrow texture.

[0055] In the target eyebrow texture, the eyebrows are represented by eyebrow-shaped color blocks, and the eyebrow contour information represents the contour of the eyebrows in the target eyebrow texture. This contour indicates the shape and position of the eyebrows.

[0056] In step 103, the terminal generates a target 3D eyebrow model corresponding to the target eyebrow texture based on the eyebrow contour information.

[0057] Among them, the target 3D eyebrow model is a 3D model of the eyebrow, which can represent the outline of the eyebrow in 3D space.

[0058] In this embodiment of the disclosure, eyebrow contour information is first extracted from the two-dimensional target eyebrow texture. This eyebrow contour information can characterize the outline of the eyebrow. Then, a target three-dimensional eyebrow model corresponding to the target eyebrow texture is generated based on the extracted eyebrow contour information, thereby realizing the conversion from two-dimensional texture to three-dimensional model for the eyebrow separately.

[0059] In step 104, the terminal displays a virtual image corresponding to the target face image based on the target 3D eyebrow model and the target 3D face model.

[0060] The virtual avatar displayed is a stylized representation of the target human face image.

[0061] In this embodiment, eyebrow contour information is first extracted from a two-dimensional target eyebrow texture map. This eyebrow contour information can characterize the outline of the eyebrow. Then, a target three-dimensional eyebrow model corresponding to the target eyebrow texture map is generated based on the extracted eyebrow contour information. This realizes the conversion from a two-dimensional texture map to a three-dimensional model for the eyebrow separately. Thus, the virtual image corresponding to the target face image can be displayed based on the target three-dimensional eyebrow model and the target three-dimensional face model respectively. This makes the lines of the eyebrows in the displayed virtual image smoother and improves the display effect of the virtual image.

[0062] Figure 2 This is a flowchart illustrating a virtual avatar display method according to an exemplary embodiment, such as... Figure 2 As shown, this method is executed by the terminal and includes the following steps.

[0063] In step 201, the terminal acquires the target eyebrow texture and the target 3D face model corresponding to the target face image. The target 3D face model does not include eyebrows.

[0064] The target face image is the user's face image, referring to the user using the terminal. The target eyebrow texture is a 2D texture containing eyebrows. The target 3D face model represents the 3D outline of the face, but does not include facial features, including eyebrows.

[0065] In some embodiments, the target eyebrow texture is extracted from the target face texture. Accordingly, the implementation of obtaining the target eyebrow texture corresponding to the target face image includes: obtaining the target face image; generating the target face texture based on the target face image; and extracting the target eyebrow texture from the target face texture.

[0066] The target face texture is a two-dimensional texture containing a face, including textures at at least one of the following locations: eyebrows, eyes, nose, mouth, and ears. In one possible implementation of this embodiment, when the user triggers the display of a virtual avatar on the terminal, the terminal acquires the user's face image to obtain the target face image, and then generates the target face texture. In this implementation, after acquiring the target face image, the terminal also generates a target three-dimensional face model based on the target face image.

[0067] The position of the eyebrows in the target face texture is fixed, and correspondingly, the terminal stores the position of the eyebrows in the target face texture. After obtaining the target face texture, the target eyebrow texture at that position is extracted from the target face texture. The position can be represented in the form of a coordinate region. Since the target face texture includes two eyebrows, two target eyebrow textures are extracted. Because the two eyebrows are symmetrical, this embodiment uses one target eyebrow texture as an example for explanation; the other target eyebrow texture is described similarly, and will not be repeated in this embodiment.

[0068] It should be noted that after extracting the target eyebrow texture from the target face texture, the eyebrow area in the target face texture can be filled with skin to ensure the integrity of the target face texture.

[0069] In this embodiment of the disclosure, considering that it is necessary to extract the eyebrows separately from the target face texture, the target eyebrow texture is extracted from the target face texture, so that the target eyebrow texture can be processed subsequently. The amount of data for processing the target eyebrow texture is smaller than the amount of data for processing the target face texture, and it avoids affecting other areas in the target face texture.

[0070] In step 202, the terminal performs contour point recognition on the target eyebrow texture to obtain the two-dimensional coordinates of multiple target contour points.

[0071] The target eyebrow texture includes the eyebrow and the surrounding skin, with the eyebrow outline defined by the eyebrow's boundary. The terminal can perform contour point recognition on the target eyebrow texture, identifying contour points on the eyebrow boundary as target contour points, thus obtaining the two-dimensional coordinates of these target contour points. These two-dimensional coordinates include a first coordinate belonging to a first dimension and a second coordinate belonging to a second dimension. In some embodiments, the terminal calls a contour point recognition function to perform contour point recognition on the target eyebrow texture. The contour point recognition function can be configured as needed, such as the findContours (contour recognition) function or other functions.

[0072] If the color of the eyebrows and the surrounding skin is very similar, it is difficult to distinguish the outline of the eyebrows, making it difficult to perform outline point recognition on the target eyebrow texture. In some embodiments, before performing outline point recognition on the target eyebrow texture, the terminal first adjusts the color of the target eyebrow texture, and then performs outline point recognition on the color-adjusted target eyebrow texture. In the color-adjusted target eyebrow texture, the color of the eyebrows differs significantly from the surrounding skin, thus facilitating outline point recognition and improving the accuracy of outline point recognition.

[0073] In one possible implementation of this embodiment, the method for adjusting the color of the target eyebrow texture includes: setting the grayscale value of the pixels in the eyebrow region of the target eyebrow texture to a first grayscale value, and setting the grayscale value of the pixels in the skin region of the target eyebrow texture to a second grayscale value. The first and second grayscale values ​​are different and can be set as needed; for example, the first grayscale value is the grayscale value corresponding to white, and the second grayscale value is the grayscale value corresponding to black. By setting the pixels in the eyebrow region and the skin region to different grayscale values, the eyebrow region is distinguished from the skin region, which can be considered as extracting the eyebrow region.

[0074] For example, see Figure 3 After extracting the target eyebrow texture, the eyebrow region is extracted from the target eyebrow texture, and then contour point recognition is performed. Figure 3 In the top row, the black dots on the third target eyebrow texture from the left represent the identified target contour points.

[0075] After identifying contour points in the target eyebrow texture and obtaining the two-dimensional coordinates of multiple target contour points, the eyebrow contour information can be determined based on these coordinates. The eyebrow contour information represents the contour of the eyebrow in the target eyebrow texture and includes the two-dimensional coordinates of at least three target contour points. These at least three target contour points determine the location of the eyebrow contour. The specific process of determining the eyebrow contour information based on the two-dimensional coordinates of multiple target contour points is detailed in steps 203-205 below. Of course, steps 203-205 are merely an example; other methods can also be used to determine the eyebrow contour information in this embodiment.

[0076] In this embodiment of the disclosure, contour point recognition is first performed on the target eyebrow texture to obtain the two-dimensional coordinates of multiple target contour points, thereby obtaining more contour boundary information. Then, eyebrow contour information is determined based on the two-dimensional coordinates of multiple target contour points, so that the determined eyebrow contour information is rich and can accurately represent the eyebrow.

[0077] In step 203, the terminal determines the first eyebrow point, the second eyebrow point, and the eyebrow tail point from multiple target contour points.

[0078] The multiple target contour points include inflection points within the eyebrow and the two endpoints of line segments. Therefore, these multiple target contour points contain relatively detailed contour boundary information, but do not include semantic information related to the eyebrow. Accordingly, the terminal determines the contour points for the beginning and end of the eyebrow from these multiple target contour points. The beginning of the eyebrow corresponds to two contour points: the first beginning eyebrow point and the second beginning eyebrow point, while the end of the eyebrow corresponds to one contour point: the end eyebrow point.

[0079] The two-dimensional coordinates of the first eyebrow point, the second eyebrow point, and the eyebrow tail point can represent semantic information related to eyebrows. These three points can be considered as three key contour points of the eyebrow, such as the position of the eyebrow tail and the position of the eyebrow head. Taking the eyebrow in the target eyebrow texture as the left eyebrow on the face as an example, the eyebrow tail point is the leftmost contour point among multiple target contour points, the first eyebrow point is the contour point at the upper right of the eyebrow, and the second eyebrow point is the contour point at the lower right of the eyebrow.

[0080] See Figure 3 In the fourth target eyebrow texture from left to right in the top row, the leftmost contour point among multiple target contour points, which is the first contour point that intersects the vertical line on the left, is the eyebrow tail point; the first eyebrow head point is located on the upper right of the eyebrow, which is the first contour point that intersects the first diagonal line on the upper right, and the first diagonal line is the straight line obtained by rotating the vertical line counterclockwise by 45°; the second eyebrow head point is located on the lower right of the eyebrow, which is the first contour point that intersects the second diagonal line on the lower right, and the second diagonal line is the straight line obtained by rotating the vertical line clockwise by 45°. Figure 3In the middle, the fifth point from the left in the top row of the target eyebrow texture map is the three extracted key contour points.

[0081] In step 204, the terminal uses the first eyebrow point, the second eyebrow point, and the eyebrow tail point as the endpoints of the eyebrow segment, and divides the outline of the target eyebrow texture into three eyebrow segments. Each eyebrow segment includes two endpoints and at least one target outline point between the two endpoints.

[0082] After obtaining the three first eyebrow points, second eyebrow points, and eyebrow tail points, the eyebrow can be divided into three eyebrow segments: the eyebrow tail point to the first eyebrow point is one eyebrow segment, the first eyebrow point to the second eyebrow point is one eyebrow segment, and the second eyebrow point to the eyebrow tail point is one eyebrow segment.

[0083] In some embodiments, a first set of contour points, a second set of contour points, and a third set of contour points are first determined based on the two-dimensional coordinates of multiple identified target contour points. The first set of contour points includes the two-dimensional coordinates of a first eyebrow point, a second eyebrow point, and each target contour point between the first and second eyebrow points. The second set of contour points includes the two-dimensional coordinates of a first eyebrow tail point, a first eyebrow point, and each target contour point between the first eyebrow tail point and the first eyebrow head point. The third set of contour points includes the two-dimensional coordinates of a first eyebrow tail point, a second eyebrow point, and each target contour point between the first eyebrow tail point and the second eyebrow head point. Each set of contour points represents an eyebrow segment.

[0084] This step divides multiple target contour points into three contour point sets, and the contour point sets of two adjacent eyebrow segments both include the target contour points at the segment boundaries.

[0085] See Figure 3 The eyebrow can be divided into three segments: the upper edge, the inner corner, and the lower edge. Taking the segment from the tail point of the upper edge to the first inner corner as an example, the coordinates of the target contour points in the second contour point set are arranged in order from the tail point to the first inner corner as follows: .

[0086] In step 205, the terminal determines the segment contour information corresponding to each eyebrow segment based on the two-dimensional coordinates of the target contour points in each eyebrow segment.

[0087] The eyebrow contour information includes first segment contour information, second segment contour information, and third segment contour information. Each segment contour information refers to an eyebrow segment. The first segment contour information corresponding to the first eyebrow segment includes the two-dimensional coordinates of the first eyebrow head point, the second eyebrow head point, and at least one target contour point between the first eyebrow head point and the second eyebrow head point. The second segment contour information corresponding to the second eyebrow segment includes the two-dimensional coordinates of the eyebrow tail point, the first eyebrow head point, and at least one target contour point between the eyebrow tail point and the first eyebrow head point. The third segment contour information corresponding to the third eyebrow segment includes the two-dimensional coordinates of the eyebrow tail point, the second eyebrow head point, and at least one target contour point between the eyebrow tail point and the second eyebrow head point.

[0088] In this embodiment of the disclosure, by first performing contour point recognition on the target eyebrow texture, the two-dimensional coordinates of multiple target contour points are obtained, thereby obtaining more contour boundary information. Then, the first eyebrow point, the second eyebrow point, and the eyebrow tail point with semantic information are extracted from them. This allows the eyebrow to be divided into three eyebrow segments. The determined eyebrow contour information includes the segment contour information referring to each eyebrow segment. Therefore, the determined eyebrow contour information is relatively rich and can accurately represent the eyebrow.

[0089] Since the positions of the extracted target contour points on the eyebrow may not be uniform, directly using multiple target contour points to perform subsequent processing on the target eyebrow texture may affect the accuracy of the processing. Therefore, based on the two-dimensional coordinates of multiple target contour points, the eyebrow contour information can be further determined. In some embodiments, step 205 is implemented by including the following steps 2051-2053.

[0090] 2051. For any eyebrow segment, determine the first interpolation function corresponding to the eyebrow segment based on the two-dimensional coordinates of each target contour point in the eyebrow segment.

[0091] The eyebrow segment includes at least three target contour points. Interpolation can be performed based on the two-dimensional coordinates of each target contour point, resulting in a first interpolation function that represents the distribution of the target contour points in the eyebrow segment. The domain of the first interpolation function is a preset domain, and each target contour point is represented by a corresponding value within this preset domain. The preset domain can be set as needed, for example, it can be set to [0, 1]. Afterward, keeping the two endpoints of the eyebrow segment unchanged, other target contour points are no longer considered. Instead, evenly distributed first interpolation points are selected from the eyebrow segment as the target contour points of the eyebrow segment.

[0092] In some embodiments, the first interpolation function is used to represent the correspondence between the index of the first interpolation point in the eyebrow segment and the two-dimensional coordinates of the first interpolation point. The first interpolation point is a point extracted from the eyebrow contour using the first interpolation function, and the index of each first interpolation point refers to its order among all first interpolation points.

[0093] For example, suppose in Figure 3 In the third target eyebrow texture from the left in the top row, the target outline points are arranged in order from the tail of the eyebrow to the head of the eyebrow. Therefore, by performing interpolation, we can obtain an interpolation function with a domain of [0, 1]. The following relationship must be satisfied.

[0094] .

[0095] Where n represents the interpolation density, that is, the number of interpolation points to be selected. n can be any value, so uniform contour points can be obtained by interpolation with any density.

[0096] 2052. Using the first interpolation function, determine the two-dimensional coordinates corresponding to at least one first interpolation point.

[0097] After determining the first interpolation function, it is necessary to use the first interpolation function to select uniform first interpolation points from the outline of the eyebrow segment, so as to obtain at least one two-dimensional coordinate corresponding to the first interpolation point.

[0098] The index of the first interpolation point is the independent variable of the first interpolation function. The terminal calls the first interpolation function and performs calculations based on the independent variable and the first interpolation function to obtain the dependent variable of the first interpolation function, which is the two-dimensional coordinates corresponding to the first interpolation point.

[0099] For example, the first interpolation function is If we want to extract 5 first interpolation points from the eyebrow segment, then n=5, and the two-dimensional coordinates corresponding to the 5 extracted first interpolation points are: .

[0100] In some embodiments, a first interpolation sequence corresponding to the eyebrow segment is determined, the first interpolation sequence including the indices of multiple first interpolation points. A first interpolation function is used to determine the two-dimensional coordinates corresponding to each first interpolation point. Since this first interpolation point is the target contour point to be selected from the eyebrow segment, the two-dimensional coordinates are used to represent a target contour point. The target contour points previously obtained through contour recognition are no longer considered.

[0101] In some embodiments, determining the first interpolation sequence corresponding to an eyebrow segment includes: determining the maximum distance corresponding to the reference segment contour information of the eyebrow segment, wherein the maximum distance is the distance between two endpoints in the reference segment contour information, and the reference segment contour information is the contour information of the eyebrow segment in the reference 3D eyebrow model corresponding to the reference eyebrow texture; determining the cumulative distance corresponding to each reference 3D contour point in the reference segment contour information, wherein the cumulative distance is the distance between the reference 3D contour point and the target endpoint in the reference segment contour information; and determining the first interpolation sequence corresponding to the eyebrow segment based on the ratio between the cumulative distance and the maximum distance corresponding to each reference 3D contour point.

[0102] Among them, the reference eyebrow texture and the reference 3D eyebrow model are used to provide a reference for determining the target 3D eyebrow model, and the terminal stores the reference eyebrow texture and the reference 3D eyebrow model.

[0103] The reference 3D eyebrow model includes first reference segment contour information, second reference segment contour information, and third reference segment contour information. Each reference segment contour information includes the 3D coordinates of at least three reference 3D contour points. Each reference segment contour information represents an eyebrow segment. The 3D coordinates include a first coordinate belonging to the first dimension, a second coordinate belonging to the second dimension, and a third coordinate belonging to the third dimension. The first reference segment contour information includes the 3D coordinates of the first eyebrow head point, the second eyebrow head point, and each reference 3D contour point between the first and second eyebrow head points. The second reference segment contour information includes the eyebrow tail point, the first eyebrow head point, and each reference 3D contour point between the eyebrow tail point and the first eyebrow head point. The third reference 3D contour information includes the eyebrow tail point, the second eyebrow head point, and each reference 3D contour point between the eyebrow tail point and the second eyebrow head point.

[0104] In some embodiments, the distance between the two endpoints is calculated based on the three-dimensional coordinates of the two endpoints. For example, taking the upper edge of the eyebrow segment as an example, the three-dimensional coordinates of the five reference three-dimensional contour points included in the second reference segment contour information are as follows: Where p=4, the cumulative distances corresponding to each reference 3D contour point are shown in the following formulas.

[0105] ; ; .

[0106] Accordingly, the multiple first interpolation points included in the first interpolation sequence are shown in the following formulas.

[0107] .

[0108] in, The maximum distance corresponding to the reference segment outline information of the eyebrow segment.

[0109] In this embodiment of the disclosure, since the three-dimensional coordinates of multiple reference three-dimensional contour points in the reference three-dimensional eyebrow model are known, and the distance between the multiple reference three-dimensional contour points is set relatively uniformly, the first interpolation sequence is determined based on the maximum distance corresponding to the multiple reference three-dimensional contour points and the cumulative distance corresponding to each reference three-dimensional contour point, so that the distance between the multiple interpolation points in the determined first interpolation sequence is relatively uniform, thereby improving the uniformity of the first interpolation sequence.

[0110] 2053. Based on the two-dimensional coordinates of the endpoints in the eyebrow segment and the two-dimensional coordinates corresponding to at least one first interpolation point, determine the segment contour information corresponding to the eyebrow segment.

[0111] The eyebrow segment includes two endpoints and a first interpolation point located between the two endpoints. These points are the at least three target contour points of the eyebrow segment. The two-dimensional coordinates of the at least three target contour points corresponding to the eyebrow segment constitute the segment contour information corresponding to the eyebrow segment.

[0112] In this embodiment of the disclosure, since the first interpolation function is determined based on the two-dimensional coordinates of at least three target contour points of the eyebrow segment, the first interpolation function can represent the distribution of target contour points on the contour of the eyebrow segment. The two-dimensional coordinates determined based on the first interpolation function and the first interpolation point are also located on the eyebrow segment. Therefore, the first interpolation point is also a contour point on the eyebrow segment. Moreover, the positions of the multiple first interpolation points determined by interpolation are relatively uniform, and the determined segment contour information can accurately represent the contour of the eyebrow segment.

[0113] In some embodiments, steps 202-205 are one way for the terminal to extract eyebrow contour information from the target eyebrow texture. Other methods can also be used to extract eyebrow contour information in this disclosure embodiment.

[0114] It should be noted that the number of target contour points corresponding to each eyebrow segment can be achieved by setting the number of reference 3D contour points corresponding to each eyebrow segment in the reference 3D eyebrow model. For example, see... Figure 3 For example, in the first target eyebrow texture from left to right in the lower row, the upper edge of the eyebrow has 5 target contour points. Similarly, in the second target eyebrow texture from left to right in the lower row, the upper edge of the eyebrow has 10 target contour points. And in the third target eyebrow texture from left to right in the lower row, the upper edge of the eyebrow has 20 target contour points. (See also...) Figure 3 The eyebrows in the fourth and fifth target eyebrow textures from left to right in the bottom row show the target contour points with fewer and more points, respectively.

[0115] In step 206, the terminal generates a target 3D eyebrow model corresponding to the target eyebrow texture based on the eyebrow contour information.

[0116] In this embodiment of the disclosure, a separate 3D model of the eyebrows, i.e., the target 3D eyebrow model, is generated. In some embodiments, the method for generating the target 3D eyebrow model corresponding to the target eyebrow texture based on eyebrow contour information includes: deforming the reference 3D eyebrow model corresponding to the reference eyebrow texture based on the eyebrow contour information to obtain the target 3D eyebrow model, so that the eyebrow contour of the target 3D eyebrow model matches the eyebrow contour information. For example, see... Figure 4 The top left side shows the reference eyebrow texture, and the right side shows the target eyebrow texture. The bottom left side shows the reference 3D eyebrow model, and the bottom side shows the target 3D eyebrow model.

[0117] In this embodiment, a reference 3D eyebrow model is used to provide a reference. The eyebrow contour information is used as the target of the eyebrow contour. The reference 3D eyebrow model is deformed so that the eyebrow contour of the deformed target 3D eyebrow model matches the eyebrow contour information. Therefore, the target 3D eyebrow model is the target 3D eyebrow model corresponding to the target eyebrow texture. This method of generating 3D models can greatly reduce the processing load and improve the efficiency of 3D model generation by utilizing the prior information provided in the reference 3D eyebrow model.

[0118] In some embodiments, based on eyebrow contour information, the reference three-dimensional eyebrow model corresponding to the reference eyebrow texture is deformed to obtain the target three-dimensional eyebrow model, so that the eyebrow contour of the target three-dimensional eyebrow model matches the eyebrow contour information. The implementation method includes the following steps 2061-2062.

[0119] 2061. Based on eyebrow contour information, reference eyebrow texture, and reference 3D eyebrow model, determine the 3D coordinates of at least three target 3D contour points.

[0120] The eyebrow contour information includes the first segment contour information corresponding to the first eyebrow segment, the second segment contour information corresponding to the second eyebrow segment, and the third segment contour information corresponding to the third eyebrow segment. Each segment contour information includes the two-dimensional coordinates of at least three target contour points. The two-dimensional coordinates include the first coordinate belonging to the first dimension and the second coordinate belonging to the second dimension.

[0121] The reference eyebrow texture includes the two-dimensional coordinates of multiple reference contour points, and the reference three-dimensional eyebrow model includes the three-dimensional coordinates of multiple reference three-dimensional contour points. The three-dimensional coordinates include the first coordinate belonging to the first dimension, the second coordinate belonging to the second dimension, and the third coordinate belonging to the third dimension.

[0122] Accordingly, based on eyebrow contour information, reference eyebrow texture, and reference 3D eyebrow model, the 3D coordinates of at least three target 3D contour points are determined, including: adjusting the first and second coordinates of each target contour point according to the mapping ratio between the reference eyebrow texture and the reference 3D eyebrow model, and determining the 3D coordinates of a target 3D contour point by combining the adjusted first and second coordinates of each target contour point with the third coordinate of the reference 3D contour point corresponding to each target contour point.

[0123] In this design, the reference eyebrow texture is a 2D texture, and the reference 3D eyebrow model is a 3D model, with a mapping ratio between them. In some embodiments, the first and second coordinates of each target contour point are adjusted according to the mapping ratio between the reference eyebrow texture and the reference 3D eyebrow model, including: determining a first distance and a second distance corresponding to the reference eyebrow texture, where the first distance is the difference between the first coordinates of two endpoints of multiple reference contour points, and the second distance is the difference between the second coordinates of two endpoints of multiple reference contour points; determining a third distance and a fourth distance corresponding to the reference 3D eyebrow model, where the third distance is the difference between the first coordinates of two endpoints of multiple reference 3D contour points, and the fourth distance is the difference between the second coordinates of two endpoints of multiple reference 3D contour points; determining a first ratio and a second ratio, where the first ratio is the ratio between the first distance and the third distance, and the second ratio is the ratio between the second distance and the fourth distance; adjusting the first coordinates of each target contour point based on the first ratio, and adjusting the second coordinates of each target contour point based on the second ratio.

[0124] Additionally, the set of coordinates of the target contour points corresponding to the target eyebrow texture is as follows: The coordinate set of the reference 3D contour points and the coordinate set of the target 3D contour points corresponding to the reference 3D eyebrow model are respectively... The coordinate range formed by the first and second distances corresponding to the eyebrow texture is as follows: The coordinate range formed by the third and fourth distances corresponding to the 3D eyebrow model is as follows: Therefore, the following relationship is satisfied.

[0125] .

[0126] In this embodiment, the first and second coordinates of the target contour point are adjusted based on the mapping ratio between the reference eyebrow texture and the reference 3D eyebrow model, thereby achieving the mapping of the first and second coordinates of the target contour point to 3D space. The first and second coordinates in 3D space are obtained, and then combined with the third coordinate of the reference 3D contour point to obtain a 3D target contour point, i.e., the target 3D contour point. Thus, based on the 3D coordinates of each target 3D contour point in each eyebrow segment, and with the help of the existing reference 3D eyebrow model, the target 3D eyebrow model can be obtained, resulting in high accuracy of the target 3D eyebrow model.

[0127] 2062. Based on the three-dimensional coordinates of each target three-dimensional contour point in each eyebrow segment, deform the reference three-dimensional eyebrow model to obtain the target three-dimensional eyebrow model.

[0128] In some embodiments, a target three-dimensional eyebrow model is deformed based on the three-dimensional coordinates of each target three-dimensional contour point in each eyebrow segment to obtain a target three-dimensional eyebrow model, including: for any eyebrow segment: determining a second interpolation function corresponding to the eyebrow segment based on the three-dimensional coordinates of each target three-dimensional contour point in the eyebrow segment; using the second interpolation function to determine the three-dimensional coordinates corresponding to at least one second interpolation point; and deforming the reference three-dimensional eyebrow model based on the endpoints and the three-dimensional coordinates corresponding to the second interpolation points in each eyebrow segment to obtain a target three-dimensional eyebrow model.

[0129] In this model, three-dimensional coordinates are used to represent a target three-dimensional contour point within an eyebrow segment. In the reference three-dimensional eyebrow model, the eyebrow segment includes at least three target three-dimensional contour points. Interpolation can be performed based on the three-dimensional coordinates of each target three-dimensional contour point, resulting in a second interpolation function that represents the distribution of target three-dimensional contour points within the eyebrow segment. The domain of the second interpolation function is a preset domain, and each target three-dimensional contour point is represented by a corresponding value within this preset domain. The preset domain can be set as needed, for example, it can be set to [0, 1]. Afterward, keeping the two endpoints of the eyebrow segment unchanged, other target three-dimensional contour points are no longer considered. Instead, evenly distributed second interpolation points are selected from the eyebrow segment as the target contour points of the eyebrow segment.

[0130] In this embodiment of the disclosure, in the target three-dimensional eyebrow model, since the second interpolation function is determined based on the three-dimensional coordinates of at least three target contour points of the eyebrow segment, the second interpolation function can represent the distribution of target contour points on the contour of the eyebrow segment. The three-dimensional coordinates determined based on the second interpolation function and the second interpolation point are also located on the eyebrow segment. Therefore, the second interpolation point is also a contour point on the eyebrow segment. Moreover, the positions of the multiple second interpolation points determined by interpolation are relatively uniform, and the determined segment contour information can accurately represent the contour of the eyebrow segment.

[0131] In some embodiments, the second interpolation function is used to represent the correspondence between the index of the second interpolation point in the eyebrow segment and the three-dimensional coordinates of the second interpolation point, wherein the second interpolation point is a point extracted from the eyebrow contour using the second interpolation function, and the index of each second interpolation point refers to the order of each second interpolation point among all the second interpolation points.

[0132] The second interpolation function is used to determine the three-dimensional coordinates corresponding to at least one second interpolation point, including: determining the second interpolation sequence corresponding to the eyebrow segment, the second interpolation sequence including the serial numbers of multiple second interpolation points; and using the second interpolation function to determine the three-dimensional coordinates corresponding to each second interpolation point.

[0133] After determining the second interpolation function, it is necessary to use this function to select uniform second interpolation points from the contour of the eyebrow segment, thereby obtaining the three-dimensional coordinates corresponding to at least one second interpolation point. For example, after obtaining 10 target three-dimensional contour points of the target three-dimensional eyebrow model, it can still be divided into three eyebrow segments: the upper edge of the eyebrow, the inner corner of the eyebrow, and the lower edge of the eyebrow. Taking the upper edge of the eyebrow as an example, the target three-dimensional contour points in the upper edge of the eyebrow are... The second interpolation function The following conditions must be met.

[0134] .

[0135] See Figure 4 The reference 3D contour points are obtained by identifying all the representative contours of the upper edge of the eyebrow in the reference 3D eyebrow model. The second interpolation sequence is The target's three-dimensional contour points can be obtained through interpolation. Then, using the ARAP (As-Rigid-As-Possible) method, the reference 3D eyebrow model can be smoothly deformed into the target 3D eyebrow model, thus obtaining the target 3D eyebrow model that matches the target eyebrow texture.

[0136] In this embodiment of the disclosure, since the three-dimensional coordinates of multiple reference three-dimensional contour points in the reference three-dimensional eyebrow model are known, and the distance between the multiple reference three-dimensional contour points is set relatively uniformly, the second interpolation sequence is determined so that the distance between the multiple interpolation points in the determined second interpolation sequence is relatively uniform, thereby improving the uniformity of the second interpolation sequence.

[0137] In step 207, the terminal displays a virtual image corresponding to the target face image based on the target 3D eyebrow model and the target 3D face model.

[0138] In some embodiments, the target three-dimensional eyebrow model includes the three-dimensional coordinates of multiple target three-dimensional contour points, the three-dimensional coordinates including a first coordinate belonging to a first dimension, a second coordinate belonging to a second dimension, and a third coordinate belonging to a third dimension; based on the target three-dimensional eyebrow model and the target three-dimensional face model, displaying the virtual image corresponding to the target face image includes the following steps 2071-2072.

[0139] 2071. Adjust the third coordinate of each target 3D contour point according to the mapping ratio between the reference 3D eyebrow model and the target 3D eyebrow model.

[0140] In some embodiments, the third coordinate of each target 3D contour point is adjusted according to the mapping ratio between the reference 3D eyebrow model and the target 3D eyebrow model, including: determining the fifth distance corresponding to the target 3D eyebrow model and the sixth distance corresponding to the reference 3D eyebrow model, wherein the fifth distance is the difference between the third coordinates of the two endpoints of the multiple target 3D contour points, and the sixth distance is the difference between the third coordinates of the two endpoints of the multiple reference 3D contour points; determining a third ratio, wherein the third ratio is the ratio between the fifth distance and the sixth distance; and adjusting the third coordinate of each target 3D contour point based on the third ratio.

[0141] In this embodiment of the disclosure, by adjusting the third coordinate of each target three-dimensional contour point according to the mapping ratio between the reference three-dimensional eyebrow model and the target three-dimensional eyebrow model, the third coordinate of the target three-dimensional contour point in the target three-dimensional eyebrow model is aligned with the third coordinate of the face contour point in the target face model, thereby improving the accuracy of the target three-dimensional eyebrow model.

[0142] 2072. Based on the adjusted target 3D eyebrow model and target 3D face model, display the virtual image corresponding to the target face image.

[0143] In this embodiment of the disclosure, since the target three-dimensional eyebrow model is obtained by deformation of the reference three-dimensional eyebrow model, and the third coordinate of the target three-dimensional contour point in the target three-dimensional eyebrow model uses the third coordinate of the reference three-dimensional contour point in the reference three-dimensional eyebrow model, by aligning the third coordinate of the target three-dimensional contour point in the target three-dimensional eyebrow model with the third coordinate of the face contour point in the target face model, the accuracy of the target three-dimensional eyebrow model is improved, and the display of the target three-dimensional eyebrow model is facilitated.

[0144] After obtaining the target 3D eyebrow model corresponding to the target eyebrow texture, the model needs to be fitted onto the target face model to obtain the final virtual image.

[0145] The position of the target 3D eyebrow model needs to be aligned with the eyebrow region in the target 3D face model. For example, first select a set of 10 face contour points on the target 3D face model that correspond to the semantics of 10 target 3D contour points, denoted as . The set of 10 target 3D contour points of the target 3D eyebrow model is denoted as First, obtain the range of the third coordinate of the eyebrow region in the target face model, and then... Range Alignment The range can be solved. Let T be a rigid body transformation, then the vertex transformation of the target 3D eyebrow model is: .

[0146] For example, see Figure 5 , Figure 5 This demonstrates a target 3D eyebrow model aligned with the eyebrow region in the target 3D face model.

[0147] For example, see Figure 6 This disclosure provides a novel technique for generating stylized eyebrow shapes, avoiding eyebrow imperfections that occur when face textures are applied to 3D face models. The embodiments of this disclosure first determine a target face texture and a target 3D face model based on a target face image. A target eyebrow texture is extracted from the target face texture. Using a reference eyebrow texture and a reference 3D eyebrow model, eyebrow contour information is extracted from the target eyebrow texture to represent the eyebrow contour. This transforms the target eyebrow texture into a smooth target 3D eyebrow model, eliminating the problem of uneven eyebrow contours introduced by textures in virtual avatars. The target face texture and target eyebrow texture are then applied to the target 3D face model, thereby displaying the virtual avatar corresponding to the target face and improving the display effect of the virtual avatar.

[0148] In this embodiment, eyebrow contour information is first extracted from a two-dimensional target eyebrow texture. This eyebrow contour information can characterize the outline of the eyebrow. Then, a target three-dimensional eyebrow model corresponding to the target eyebrow texture is generated based on the extracted eyebrow contour information. This realizes the conversion from a two-dimensional texture to a three-dimensional model for the eyebrow separately. Thus, the virtual image corresponding to the target face image can be displayed based on the target three-dimensional eyebrow model and the target three-dimensional face model respectively. This makes the lines of the eyebrows in the displayed virtual image smoother and improves the display effect of the virtual image.

[0149] Figure 7 This is a structural block diagram illustrating a virtual avatar display device according to an exemplary embodiment. (Refer to...) Figure 7 The device includes: The acquisition unit 701 is configured to acquire the target eyebrow texture and the target 3D face model corresponding to the target face image, wherein the target 3D face model does not include eyebrows; Extraction unit 702 is configured to extract eyebrow contour information from the target eyebrow texture, wherein the eyebrow contour information represents the contour of the eyebrow in the target eyebrow texture. The generation unit 703 is configured to generate a target 3D eyebrow model corresponding to the target eyebrow texture based on eyebrow contour information. Display unit 704 is configured to perform the display of a virtual image corresponding to the target face image based on the target 3D eyebrow model and the target 3D face model.

[0150] In some embodiments, the extraction unit 702 includes: The recognition subunit is configured to perform contour point recognition on the target eyebrow texture to obtain the two-dimensional coordinates of multiple target contour points; The determination subunit is configured to perform two-dimensional coordinate determination of eyebrow contour information based on multiple target contour points, the eyebrow contour information including the two-dimensional coordinates of at least three target contour points.

[0151] In some embodiments, a subunit is determined and configured to perform: From multiple target contour points, determine the first eyebrow point, the second eyebrow point, and the eyebrow tail point; Using the first eyebrow point, the second eyebrow point, and the eyebrow tail point as the endpoints of the eyebrow segment, the outline of the target eyebrow texture is divided into three eyebrow segments, each of which includes two endpoints and at least one target outline point between the two endpoints. Based on the two-dimensional coordinates of the target contour points in each eyebrow segment, the segment contour information corresponding to each eyebrow segment is determined. The first segment contour information corresponding to the first eyebrow segment includes the two-dimensional coordinates of the first eyebrow head point, the second eyebrow head point, and at least one target contour point between the first eyebrow head point and the second eyebrow head point. The second segment contour information corresponding to the second eyebrow segment includes the two-dimensional coordinates of the eyebrow tail point, the first eyebrow head point, and at least one target contour point between the eyebrow tail point and the first eyebrow head point. The third segment contour information corresponding to the third eyebrow segment includes the two-dimensional coordinates of the eyebrow tail point, the second eyebrow head point, and at least one target contour point between the eyebrow tail point and the second eyebrow head point.

[0152] In some embodiments, a subunit is determined and configured to perform: For any eyebrow segment: Based on the two-dimensional coordinates of each target contour point in the eyebrow segment, determine the first interpolation function corresponding to the eyebrow segment; Using a first interpolation function, determine the two-dimensional coordinates corresponding to at least one first interpolation point; Based on the two-dimensional coordinates of the endpoints in the eyebrow segment and the two-dimensional coordinates corresponding to at least one first interpolation point, the segment contour information corresponding to the eyebrow segment is determined.

[0153] In some embodiments, the first interpolation function is used to represent the correspondence between the index of the first interpolation point in the eyebrow segment and the two-dimensional coordinates of the first interpolation point, and the subunit is configured to execute: Determine the first interpolation sequence corresponding to the eyebrow segment. The first interpolation sequence includes the index of multiple first interpolation points. The first interpolation function is used to determine the two-dimensional coordinates corresponding to each first interpolation point.

[0154] In some embodiments, a subunit is determined and configured to perform: Determine the maximum distance corresponding to the reference segment contour information of the eyebrow segment. The maximum distance is the distance between the two endpoints in the reference segment contour information. The reference segment contour information is the contour information of the eyebrow segment in the reference 3D eyebrow model corresponding to the reference eyebrow texture. Determine the cumulative distance corresponding to each reference 3D contour point in the reference segment contour information. The cumulative distance is the distance between the reference 3D contour point and the target endpoint in the reference segment contour information. Based on the ratio between the cumulative distance and the maximum distance corresponding to each reference 3D contour point, the first interpolation sequence corresponding to the eyebrow segment is determined.

[0155] In some embodiments, the generation unit 703 includes: The deformation subunit is configured to perform deformation on the reference 3D eyebrow model corresponding to the reference eyebrow texture based on the eyebrow contour information to obtain the target 3D eyebrow model, so that the eyebrow contour of the target 3D eyebrow model matches the eyebrow contour information.

[0156] In some embodiments, the eyebrow contour information includes the two-dimensional coordinates of at least three target contour points, and the deformation subunit is configured to perform: Based on eyebrow contour information, reference eyebrow texture, and reference 3D eyebrow model, determine the 3D coordinates of at least three target 3D contour points. Based on the three-dimensional coordinates of each target three-dimensional contour point, the reference three-dimensional eyebrow model is deformed to obtain the target three-dimensional eyebrow model.

[0157] In some embodiments, the eyebrow contour information includes first segment contour information corresponding to the first eyebrow segment, second segment contour information corresponding to the second eyebrow segment, and third segment contour information corresponding to the third eyebrow segment. Each segment contour information includes the two-dimensional coordinates of at least three target contour points. The two-dimensional coordinates include a first coordinate belonging to the first dimension and a second coordinate belonging to the second dimension. The reference eyebrow texture includes the two-dimensional coordinates of multiple reference contour points, and the reference three-dimensional eyebrow model includes the three-dimensional coordinates of multiple reference three-dimensional contour points. The three-dimensional coordinates include the first coordinate belonging to the first dimension, the second coordinate belonging to the second dimension, and the third coordinate belonging to the third dimension. The deformable subunit is configured to perform: Based on the mapping ratio between the reference eyebrow texture and the reference 3D eyebrow model, the first and second coordinates of each target contour point are adjusted respectively; The adjusted first and second coordinates of each target contour point, along with the third coordinate of the corresponding reference 3D contour point, are used to determine the 3D coordinates of a target 3D contour point.

[0158] In some embodiments, the deformable subunit is configured to perform: Determine the first distance and the second distance corresponding to the reference eyebrow texture. The first distance is the difference between the first coordinates of the two endpoints of multiple reference contour points, and the second distance is the difference between the second coordinates of the two endpoints of multiple reference contour points. Determine the third and fourth distances corresponding to the reference 3D eyebrow model. The third distance is the difference of the first coordinates of the two endpoints of multiple reference 3D contour points, and the fourth distance is the difference of the second coordinates of the two endpoints of multiple reference 3D contour points. Determine the first ratio and the second ratio respectively. The first ratio is the ratio between the first distance and the third distance, and the second ratio is the ratio between the second distance and the fourth distance. Based on the first scale, the first coordinates of each target contour point are adjusted, and based on the second scale, the second coordinates of each target contour point are adjusted.

[0159] In some embodiments, eyebrow contour information includes two-dimensional coordinates of target contour points in multiple eyebrow segments, and a deformation subunit is configured to perform: For any eyebrow segment: Based on the three-dimensional coordinates of each target three-dimensional contour point in the eyebrow segment, determine the second interpolation function corresponding to the eyebrow segment; A second interpolation function is used to determine the three-dimensional coordinates corresponding to at least one second interpolation point; Based on the three-dimensional coordinates of the endpoints and the second interpolation point in each eyebrow segment, the reference three-dimensional eyebrow model is deformed to obtain the target three-dimensional eyebrow model.

[0160] In some embodiments, the second interpolation function is used to represent the correspondence between the index of the second interpolation point in the eyebrow segment and the three-dimensional coordinates of the second interpolation point, and the deformation subunit is configured to execute: Determine the second interpolation sequence corresponding to the eyebrow segment. The second interpolation sequence includes the index of multiple second interpolation points. The second interpolation function is used to determine the three-dimensional coordinates corresponding to each second interpolation point.

[0161] In some embodiments, the target three-dimensional eyebrow model includes the three-dimensional coordinates of a plurality of target three-dimensional contour points, wherein the three-dimensional coordinates include a first coordinate belonging to a first dimension, a second coordinate belonging to a second dimension, and a third coordinate belonging to a third dimension; Display unit 704 includes: The adjustment subunit is configured to adjust the third coordinate of each target 3D contour point according to the mapping ratio between the reference 3D eyebrow model and the target 3D eyebrow model. The reference 3D eyebrow model includes the 3D coordinates of multiple reference 3D contour points. The display subunit is configured to perform the display of a virtual image corresponding to the target face image based on the adjusted target 3D eyebrow model and target 3D face model.

[0162] In some embodiments, the adjustment subunit is configured to perform: The fifth distance corresponding to the target 3D eyebrow model and the sixth distance corresponding to the reference 3D eyebrow model are determined respectively. The fifth distance is the difference of the third coordinates of the two endpoints of multiple target 3D contour points, and the sixth distance is the difference of the third coordinates of the two endpoints of multiple reference 3D contour points. Determine the third ratio, which is the ratio between the fifth distance and the sixth distance; Based on the third scale, the third coordinate of each target 3D contour point is adjusted.

[0163] In some embodiments, the acquisition unit 701 is configured to perform: Acquire the target face image; Generate a target face texture based on the target face image; Extract the target eyebrow texture from the target face texture.

[0164] In this embodiment, eyebrow contour information is first extracted from a two-dimensional target eyebrow texture map. This eyebrow contour information can characterize the outline of the eyebrow. Then, a target three-dimensional eyebrow model corresponding to the target eyebrow texture map is generated based on the extracted eyebrow contour information. This realizes the conversion from a two-dimensional texture map to a three-dimensional model for the eyebrow separately. Thus, the virtual image corresponding to the target face image can be displayed based on the target three-dimensional eyebrow model and the target three-dimensional face model respectively. This makes the lines of the eyebrows in the displayed virtual image smoother and improves the display effect of the virtual image.

[0165] Regarding the virtual image display device in the above embodiments, the specific way in which each unit performs operations has been described in detail in the embodiments of the relevant methods, and will not be elaborated here.

[0166] Figure 8 This is a structural block diagram of a terminal according to an exemplary embodiment. In some embodiments, terminal 800 includes: a desktop computer, a laptop computer, a tablet computer, a smartphone, or other terminals. Terminal 800 may also be referred to as user equipment, portable terminal, laptop terminal, desktop terminal, or other names.

[0167] Typically, terminal 800 includes a processor 801 and a memory 802.

[0168] In some embodiments, processor 801 includes one or more processing cores, such as a quad-core processor, an octa-core processor, etc. In some embodiments, processor 801 is implemented using at least one hardware form of DSP (Digital Signal Processing) or FPGA (Field-Programmable Gate Array). In some embodiments, processor 801 also includes a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 801 integrates a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 801 also includes an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0169] In some embodiments, memory 802 includes one or more computer-readable storage media that are non-transitory. In some embodiments, memory 802 also includes high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in memory 802 is used to store executable instructions that are executed by processor 801 to implement the virtual avatar display method provided in the method embodiments of this disclosure.

[0170] In some embodiments, the terminal 800 may optionally include a peripheral device interface 803 and at least one peripheral device. In some embodiments, the processor 801, memory 802, and peripheral device interface 803 are connected via a bus or signal line. In some embodiments, each peripheral device is connected to the peripheral device interface 803 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of the following: radio frequency circuit 804, display screen 805, camera assembly 806, audio circuit 807, positioning assembly 808, and power supply 809.

[0171] Peripheral device interface 803 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 801 and memory 802. In some embodiments, processor 801, memory 802 and peripheral device interface 803 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 801, memory 802 and peripheral device interface 803 are implemented on separate chips or circuit boards, which is not limited in this embodiment.

[0172] The radio frequency (RF) circuit 804 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 804 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 804 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. In some embodiments, the RF circuit 804 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. In some embodiments, the RF circuit 804 communicates with other terminals via at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 804 also includes circuitry related to NFC (Near Field Communication), which is not limited herein.

[0173] Display screen 805 is used to display a UI (User Interface). In some embodiments, the UI includes graphics, text, icons, videos, and any combination thereof. When display screen 805 is a touch display screen, display screen 805 also has the ability to collect touch signals on or above the surface of display screen 805. In some embodiments, the touch signals are input as control signals to processor 801 for processing. At this time, display screen 805 is also used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, there is one display screen 805, which is disposed on the front panel of terminal 800; in other embodiments, there are at least two display screens 805, which are disposed on different surfaces of terminal 800 or are folded; in other embodiments, display screen 805 is a flexible display screen, which is disposed on the curved surface or folded surface of terminal 800. Furthermore, display screen 805 is also configured as a non-rectangular irregular shape, i.e., a non-rectangular screen. In some embodiments, display screen 805 is made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0174] The camera assembly 806 is used to acquire images or videos. In some embodiments, the camera assembly 806 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the terminal, and the rear-facing camera is located on the back of the terminal. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 806 also includes a flash. In some embodiments, the flash is a single-color temperature flash; in some embodiments, the flash is a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm-light flash and a cool-light flash, used for light compensation at different color temperatures.

[0175] In some embodiments, the audio circuit 807 includes a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals that are input to the processor 801 for processing, or input to the radio frequency circuit 804 to achieve voice communication. For stereo sound acquisition or noise reduction purposes, in some embodiments, there are multiple microphones, each located at a different part of the terminal 800. In some embodiments, the microphone is an array microphone or an omnidirectional microphone. The speaker is used to convert the electrical signals from the processor 801 or the radio frequency circuit 804 into sound waves. In some embodiments, the speaker is a conventional diaphragm speaker; in some embodiments, the speaker is a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into sound waves that humans can hear, but also into sound waves that humans cannot hear for purposes such as distance measurement. In some embodiments, the audio circuit 807 also includes a headphone jack.

[0176] The positioning component 808 is used to locate the current geographical location of the terminal 800 in order to enable navigation or LBS (Location Based Service).

[0177] Power supply 809 is used to power various components in terminal 800. In some embodiments, power supply 809 is alternating current, direct current, a disposable battery, or a rechargeable battery. When power supply 809 includes a rechargeable battery, the rechargeable battery is a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged via a wired line, and a wireless rechargeable battery is a battery that is charged via a wireless coil. The rechargeable battery also supports fast charging technology.

[0178] In some embodiments, the terminal 800 further includes one or more sensors 810. The one or more sensors 810 include, but are not limited to, an acceleration sensor 811, a gyroscope sensor 812, a pressure sensor 813, an optical sensor 814, and a proximity sensor 815.

[0179] In some embodiments, the accelerometer 811 detects the magnitude of acceleration along the three coordinate axes of a coordinate system established with the terminal 800. For example, the accelerometer 811 is used to detect the components of gravitational acceleration along the three coordinate axes. In some embodiments, the processor 801 controls the display screen 805 to display the user interface in a landscape or portrait view based on the gravitational acceleration signal acquired by the accelerometer 811. In some embodiments, the accelerometer 811 is also used for acquiring game or user motion data.

[0180] In some embodiments, the gyroscope sensor 812 detects the orientation and rotation angle of the terminal 800. The gyroscope sensor 812 and the accelerometer sensor 811 work together to acquire the user's 3D movements on the terminal 800. Based on the data acquired by the gyroscope sensor 812, the processor 801 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.

[0181] In some embodiments, the pressure sensor 813 is disposed on the side bezel of the terminal 800 and / or the lower layer of the display screen 805. When the pressure sensor 813 is disposed on the side bezel of the terminal 800, it can detect the user's grip signal on the terminal 800, and the processor 801 performs left / right hand recognition or quick operation based on the grip signal collected by the pressure sensor 813. When the pressure sensor 813 is disposed on the lower layer of the display screen 805, the processor 801 controls the operable controls on the UI interface based on the user's pressure operation on the display screen 805. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.

[0182] An optical sensor 814 is used to collect ambient light intensity. In one embodiment, the processor 801 controls the display brightness of the display screen 805 based on the ambient light intensity collected by the optical sensor 814. Specifically, when the ambient light intensity is high, the display brightness of the display screen 805 is increased; when the ambient light intensity is low, the display brightness of the display screen 805 is decreased. In another embodiment, the processor 801 also dynamically adjusts the shooting parameters of the camera assembly 806 based on the ambient light intensity collected by the optical sensor 814.

[0183] The proximity sensor 815, also known as a distance sensor, is typically located on the front panel of the terminal 800. The proximity sensor 815 is used to detect the distance between the user and the front of the terminal 800. In one embodiment, when the proximity sensor 815 detects that the distance between the user and the front of the terminal 800 is gradually decreasing, the processor 801 controls the display screen 805 to switch from a screen-on state to a screen-off state; when the proximity sensor 815 detects that the distance between the user and the front of the terminal 800 is gradually increasing, the processor 801 controls the display screen 805 to switch from a screen-off state to a screen-on state.

[0184] Those skilled in the art will understand that Figure 8 The structure shown does not constitute a limitation on terminal 800, which may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0185] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory including instructions, which can be executed by a terminal's processor to complete the virtual avatar display method in the above method embodiments. In some embodiments, the computer-readable storage medium may be ROM (Read-Only Memory), RAM (Random Access Memory), CD-ROM (Compact Disc Read-Only Memory), magnetic tape, floppy disk, and optical data storage device, etc.

[0186] In an exemplary embodiment, a computer program product is also provided, which includes a computer program that, when executed by a processor, implements the virtual image display method in the above method embodiments.

[0187] In some embodiments, the computer program disclosed herein may be deployed and executed on an electronic device, or on multiple electronic devices located in one location, or on multiple electronic devices distributed across multiple locations and interconnected via a communication network. These multiple electronic devices distributed across multiple locations and interconnected via a communication network may constitute a blockchain system. The electronic device may be provided as a terminal.

[0188] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the foregoing claims.

[0189] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A method for displaying a virtual image, characterized in that, include: Obtain the target eyebrow texture and the target 3D face model corresponding to the target face image, wherein the target 3D face model does not include eyebrows; From the target eyebrow texture, eyebrow contour information is extracted, and the eyebrow contour information represents the contour of the eyebrow in the target eyebrow texture; Based on the eyebrow contour information, a target 3D eyebrow model corresponding to the target eyebrow texture is generated; Based on the target 3D eyebrow model and the target 3D face model, display the virtual image corresponding to the target face image; The target 3D eyebrow model includes the 3D coordinates of multiple target 3D contour points, and the 3D coordinates include a first coordinate belonging to the first dimension, a second coordinate belonging to the second dimension, and a third coordinate belonging to the third dimension. The process of displaying a virtual image corresponding to the target face image based on the target 3D eyebrow model and the target 3D face model includes: According to the mapping ratio between the reference 3D eyebrow model and the target 3D eyebrow model, the third coordinate of each target 3D contour point is adjusted respectively. The reference 3D eyebrow model includes the 3D coordinates of multiple reference 3D contour points. Based on the adjusted target 3D eyebrow model and target 3D face model, a virtual image corresponding to the target face image is displayed.

2. The method according to claim 1, characterized in that, Extracting eyebrow contour information from the target eyebrow texture includes: Contour point recognition is performed on the target eyebrow texture to obtain the two-dimensional coordinates of multiple target contour points; The eyebrow contour information is determined based on the two-dimensional coordinates of the multiple target contour points, and the eyebrow contour information includes the two-dimensional coordinates of at least three target contour points.

3. The method according to claim 2, characterized in that, The determination of the eyebrow contour information based on the two-dimensional coordinates of the plurality of target contour points includes: From the plurality of target contour points, determine the first eyebrow point, the second eyebrow point, and the eyebrow tail point; Using the first eyebrow point, the second eyebrow point, and the eyebrow tail point as the endpoints of the eyebrow segment, the outline of the target eyebrow texture is divided into three eyebrow segments, each of which includes two endpoints and at least one target outline point between the two endpoints. Based on the two-dimensional coordinates of the target contour points in each eyebrow segment, segment contour information corresponding to each eyebrow segment is determined respectively. The first segment contour information corresponding to the first eyebrow segment includes the two-dimensional coordinates of the first eyebrow head point, the second eyebrow head point, and at least one target contour point between the first eyebrow head point and the second eyebrow head point. The second segment contour information corresponding to the second eyebrow segment includes the two-dimensional coordinates of the eyebrow tail point, the first eyebrow head point, and at least one target contour point between the eyebrow tail point and the first eyebrow head point. The third segment contour information corresponding to the third eyebrow segment includes the two-dimensional coordinates of the eyebrow tail point, the second eyebrow head point, and at least one target contour point between the eyebrow tail point and the second eyebrow head point.

4. The method according to claim 3, characterized in that, The step of determining the segment contour information corresponding to each eyebrow segment based on the two-dimensional coordinates of the target contour points in each eyebrow segment includes: For any of the eyebrow segments mentioned: Based on the two-dimensional coordinates of each target contour point in the eyebrow segment, determine the first interpolation function corresponding to the eyebrow segment; Using the first interpolation function, determine the two-dimensional coordinates corresponding to at least one first interpolation point; Based on the two-dimensional coordinates of the endpoints in the eyebrow segment and the two-dimensional coordinates corresponding to the at least one first interpolation point, the segment contour information corresponding to the eyebrow segment is determined.

5. The method according to claim 4, characterized in that, The first interpolation function is used to represent the correspondence between the index of the first interpolation point in the eyebrow segment and the two-dimensional coordinates of the first interpolation point. The step of using the first interpolation function to determine the two-dimensional coordinates corresponding to at least one first interpolation point includes: Determine the first interpolation sequence corresponding to the eyebrow segment, wherein the first interpolation sequence includes the index of multiple first interpolation points; The first interpolation function is used to determine the two-dimensional coordinates corresponding to each first interpolation point.

6. The method according to claim 5, characterized in that, Determining the first interpolation sequence corresponding to the eyebrow segment includes: Determine the maximum distance corresponding to the reference segment contour information of the eyebrow segment, wherein the maximum distance is the distance between two endpoints in the reference segment contour information, and the reference segment contour information is the contour information of the eyebrow segment in the reference 3D eyebrow model corresponding to the reference eyebrow texture; Determine the cumulative distance corresponding to each reference 3D contour point in the reference segment contour information, wherein the cumulative distance is the distance between the reference 3D contour point and the target endpoint in the reference segment contour information; Based on the ratio between the cumulative distance and the maximum distance corresponding to each of the reference 3D contour points, the first interpolation sequence corresponding to the eyebrow segment is determined.

7. The method according to claim 1, characterized in that, The step of generating a target 3D eyebrow model corresponding to the target eyebrow texture based on the eyebrow contour information includes: Based on the eyebrow contour information, the reference 3D eyebrow model corresponding to the reference eyebrow texture is deformed to obtain the target 3D eyebrow model, so that the eyebrow contour of the target 3D eyebrow model matches the eyebrow contour information.

8. The method according to claim 7, characterized in that, The eyebrow contour information includes the two-dimensional coordinates of at least three target contour points. The step of deforming the reference 3D eyebrow model corresponding to the reference eyebrow texture based on the eyebrow contour information to obtain the target 3D eyebrow model, so that the eyebrow contour of the target 3D eyebrow model matches the eyebrow contour information, includes: Based on the eyebrow contour information, the reference eyebrow texture, and the reference 3D eyebrow model, determine the 3D coordinates of at least three target 3D contour points; Based on the three-dimensional coordinates of each target three-dimensional contour point, the reference three-dimensional eyebrow model is deformed to obtain the target three-dimensional eyebrow model.

9. The method according to claim 8, characterized in that, The eyebrow contour information includes the first segment contour information corresponding to the first eyebrow segment, the second segment contour information corresponding to the second eyebrow segment, and the third segment contour information corresponding to the third eyebrow segment. Each segment contour information includes the two-dimensional coordinates of at least three target contour points. The two-dimensional coordinates include the first coordinate belonging to the first dimension and the second coordinate belonging to the second dimension. The reference eyebrow texture includes the two-dimensional coordinates of multiple reference contour points, and the reference three-dimensional eyebrow model includes the three-dimensional coordinates of multiple reference three-dimensional contour points. The three-dimensional coordinates include a first coordinate belonging to the first dimension, a second coordinate belonging to the second dimension, and a third coordinate belonging to the third dimension. The step of determining the 3D coordinates of at least three target 3D contour points based on the eyebrow contour information, the reference eyebrow texture, and the reference 3D eyebrow model includes: According to the mapping ratio between the reference eyebrow texture and the reference 3D eyebrow model, the first and second coordinates of each target contour point are adjusted respectively; The adjusted first and second coordinates of each target contour point, together with the third coordinate of the reference three-dimensional contour point corresponding to each target contour point, are used to determine the three-dimensional coordinates of a target three-dimensional contour point.

10. The method according to claim 9, characterized in that, The step of adjusting the first and second coordinates of each target contour point according to the mapping ratio between the reference eyebrow texture and the reference 3D eyebrow model includes: Determine the first distance and the second distance corresponding to the reference eyebrow texture, wherein the first distance is the difference between the first coordinates of the two endpoints of the plurality of reference contour points, and the second distance is the difference between the second coordinates of the two endpoints of the plurality of reference contour points; The third distance and the fourth distance corresponding to the reference three-dimensional eyebrow model are determined. The third distance is the difference between the first coordinates of the two endpoints of the plurality of reference three-dimensional contour points, and the fourth distance is the difference between the second coordinates of the two endpoints of the plurality of reference three-dimensional contour points. A first ratio and a second ratio are determined respectively, wherein the first ratio is the ratio between the first distance and the third distance, and the second ratio is the ratio between the second distance and the fourth distance; Based on the first ratio, the first coordinates of each target contour point are adjusted, and based on the second ratio, the second coordinates of each target contour point are adjusted.

11. The method according to claim 8, characterized in that, The eyebrow contour information includes the two-dimensional coordinates of the target contour points in multiple eyebrow segments. The step of deforming the reference three-dimensional eyebrow model based on the three-dimensional coordinates of each target three-dimensional contour point to obtain the target three-dimensional eyebrow model includes: For any of the eyebrow segments mentioned: Based on the three-dimensional coordinates of each target three-dimensional contour point in the eyebrow segment, determine the second interpolation function corresponding to the eyebrow segment; Using the second interpolation function, determine the three-dimensional coordinates corresponding to at least one second interpolation point; Based on the three-dimensional coordinates corresponding to the endpoints and the second interpolation point in each eyebrow segment, the reference three-dimensional eyebrow model is deformed to obtain the target three-dimensional eyebrow model.

12. The method according to claim 11, characterized in that, The second interpolation function is used to represent the correspondence between the index of the second interpolation point in the eyebrow segment and the three-dimensional coordinates of the second interpolation point. The step of using the second interpolation function to determine the three-dimensional coordinates corresponding to at least one second interpolation point includes: Determine the second interpolation sequence corresponding to the eyebrow segment, wherein the second interpolation sequence includes the index of multiple second interpolation points; The second interpolation function is used to determine the three-dimensional coordinates corresponding to each second interpolation point.

13. The method according to claim 1, characterized in that, The step of adjusting the third coordinate of each target 3D contour point according to the mapping ratio between the reference 3D eyebrow model and the target 3D eyebrow model includes: The fifth distance corresponding to the target 3D eyebrow model and the sixth distance corresponding to the reference 3D eyebrow model are determined respectively. The fifth distance is the difference between the third coordinates of the two endpoints of the plurality of target 3D contour points, and the sixth distance is the difference between the third coordinates of the two endpoints of the plurality of reference 3D contour points. A third ratio is determined, wherein the third ratio is the ratio between the fifth distance and the sixth distance; Based on the third ratio, the third coordinates of each of the target three-dimensional contour points are adjusted.

14. The method according to any one of claims 1-13, characterized in that, Obtaining the target eyebrow texture includes: Acquire the target face image; Based on the target face image, generate the target face texture; Extract the target eyebrow texture from the target face texture.

15. A virtual avatar display device, characterized in that, The device includes: The acquisition unit is configured to acquire the target eyebrow texture and the target 3D face model corresponding to the target face image, wherein the target 3D face model does not include eyebrows; The extraction unit is configured to extract eyebrow contour information from the target eyebrow texture, the eyebrow contour information representing the contour of the eyebrow in the target eyebrow texture; The generation unit is configured to generate a target 3D eyebrow model corresponding to the target eyebrow texture based on the eyebrow contour information; The display unit is configured to perform the task of displaying a virtual image corresponding to the target face image based on the target 3D eyebrow model and the target 3D face model; The target 3D eyebrow model includes the 3D coordinates of multiple target 3D contour points, and the 3D coordinates include a first coordinate belonging to the first dimension, a second coordinate belonging to the second dimension, and a third coordinate belonging to the third dimension. The display unit includes: The adjustment subunit is configured to perform adjustments to the third coordinates of each of the target three-dimensional contour points according to the mapping ratio between the reference three-dimensional eyebrow model and the target three-dimensional eyebrow model, wherein the reference three-dimensional eyebrow model includes the three-dimensional coordinates of multiple reference three-dimensional contour points. The display subunit is configured to perform the display of a virtual image corresponding to the target face image based on the adjusted target 3D eyebrow model and the target 3D face model.

16. A terminal, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the virtual avatar display method as described in any one of claims 1 to 14.

17. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the terminal, the terminal is enabled to perform the virtual avatar display method as described in any one of claims 1 to 14.

Citation Information

Patent Citations

  • Virtual makeup trying method and device, electronic equipment and readable storage medium

    CN111861632A

  • Virtual image generation method and device, electronic equipment and storage medium

    CN114581585A