Facial image display method, device, electronic device, and storage medium
The facial image display method addresses the lack of diversity in interaction methods by dynamically displaying and fusing face masks with the target face, enhancing user interaction and enjoyment.
Patent Information
- Application Number
- JP2023507827
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-09-17
- Filing Date
- 2021-08-24
- Publication Date
- 2024-10-02
- Estimated Expiration
- 2041-08-24
AI Technical Summary
Conventional application programs lack diversity in interaction methods while displaying facial images, failing to meet user needs.
A facial image display method that dynamically displays a face mask array at a preset relative position of a target face using a preset movement method, allowing users to select and fuse a target face mask with the target face in response to a trigger command.
Enhances interactivity by enabling users to dynamically display and fuse specific face masks with the target face, improving user interaction and enjoyment.
Smart Images

Figure 0007560208000006 
Figure 0007560208000007 
Figure 0007560208000008
Abstract
Description
[Technical field]
[0001] The present disclosure relates to the field of image processing technology, and in particular to a face image display method, device, electronic device, and storage medium. [Background technology]
[0002] 2. Description of the Related Art With the development of science and technology, many application scenarios arise for the display of face images, and in some application scenarios, users may want to process face images before displaying them.
[0003] However, although conventional application programs can perform various types of processing on facial images using image processing methods and display the processed facial images, conventional application programs cannot meet users' needs for a variety of interaction methods while displaying facial images. Summary of the Invention [Problem to be solved by the invention]
[0004] The present disclosure provides a method, device, electronic device and storage medium for displaying a facial image to solve the technical problem that the current technical needs of users for the diversity of interaction methods during facial image display cannot be met. [Means for solving the problem]
[0005] In a first aspect, embodiments of the present disclosure include dynamically displaying a face mask array including a plurality of face masks corresponding to the target face at a predetermined relative position of the target face through a predetermined moving manner; a step of blending a target facial mask with the subject face and displaying the target facial mask in response to a trigger command acting on the target facial mask, the target facial mask being one of the facial mask arrays; face a step of displaying a face image by a mask.
[0006] In a second aspect, embodiments of the present disclosure include a display module for dynamically displaying a facial mask array including a plurality of facial masks corresponding to a target face at a predetermined relative position of the target face through a predetermined moving manner; an acquisition module for acquiring trigger instructions to act on a target facial mask; a processing module for fusing the target facial mask with the target face, the target facial mask being one of the facial mask arrays; face a processing module which is a mask; The display module further provides a face image display device, which is used to display the target face fused with the target face mask.
[0007] In a third aspect, an embodiment of the present disclosure provides an electronic device including at least one processor and a memory; the memory storing computer executable instructions; An electronic device is provided in which the at least one processor executes computer-executable instructions stored in the memory, thereby causing the at least one processor to perform the facial image display method described in the first aspect and various possible designs of the first aspect.
[0008] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having computer-executable instructions stored thereon, the computer-readable storage medium executing the computer-executable instructions causing a processor to realize the facial image display method described in the first aspect above and various possible designs of the first aspect.
[0009] In a fifth aspect, an embodiment of the present disclosure provides a computer program product including a computer program, which, when executed by a processor, realises the facial image display method as described in the first aspect above and various possible designs of the first aspect.
[0010] In a sixth aspect, an embodiment of the present disclosure provides a computer program which, when executed by a processor, realises the facial image display method as described in the first aspect above and various possible designs of the first aspect. Effect of the Invention
[0011] The facial image display method, device, electronic device, and storage medium provided in the embodiments of the present disclosure dynamically display a facial mask array at a predetermined relative position of a target face through a predetermined movement manner, and after a user triggers a target facial mask in the facial mask array, the target facial mask is blended and displayed on the target face, thereby improving interactivity in the facial image display process, and also achieving the effect of displaying a specific facial mask on the target face by blending and displaying the target facial mask on the target face after a user triggers the target facial mask. [Brief description of the drawings]
[0012] In the following, in order to more clearly describe the embodiments of the present disclosure or the technical solutions in the prior art, drawings that need to be used in the description of the embodiments or the prior art are briefly introduced. Obviously, the drawings in the following description are some embodiments of the present disclosure, and those skilled in the art can obtain other drawings based on these drawings without any creative efforts. [Figure 1] 1 is a flowchart of a face image display method according to an exemplary embodiment of the present disclosure. [Diagram 2] FIG. 2 is a schematic diagram of the generation of a facial mask according to an exemplary embodiment of the present disclosure. [Diagram 3] FIG. 2 is a schematic diagram of a facial mask array generation according to an exemplary embodiment of the present disclosure. [Figure 4] FIG. 2 is a scene diagram of a triggering process of a face image display method according to an exemplary embodiment of the present disclosure. [Diagram 5] 13 is a flowchart of a fusion display step performed after a target face mask is triggered according to an exemplary embodiment of the present disclosure. [Figure 6]11 is a flowchart of a face image display method according to another exemplary embodiment of the present disclosure. [Figure 7] 4 is a flowchart of a rendering step according to an exemplary embodiment of the present disclosure. [Figure 8] 8 is a schematic diagram of a display result after rendering in the rendering step shown in FIG. 7. [Figure 9] FIG. 1 is a structural schematic diagram of a face image display device according to an exemplary embodiment of the present disclosure. [Figure 10] FIG. 1 is a structural schematic diagram of an electronic device according to an exemplary embodiment of the disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] Hereinafter, the embodiments of the present disclosure will be described in more detail with reference to the drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be realized in various forms and should not be construed as being limited to the embodiments described herein, but rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are used only for illustration and do not limit the protection scope of the present disclosure.
[0014] It should be understood that the steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. Additionally, method embodiments may include additional steps and / or omit the performance of steps illustrated. The scope of the present disclosure is not limited in this respect.
[0015] As used herein, the term "including" and variations thereof are intended to mean an open inclusion, i.e., including, but not limited to. The term "based on" means "based at least in part on." The term "in one embodiment" means "at least one embodiment," "in another embodiment" means "at least one other embodiment," and "in some embodiments" means "at least some embodiments." Relevant definitions of other terms are provided below.
[0016] It should be noted that concepts such as "first" and "second" referred to in this disclosure are merely intended to distinguish different devices, modules or units, and are not intended to limit the order or interdependence of functions performed by these devices, modules or units.
[0017] It should be noted that the modifiers "a" and "a plurality" referred to in the present disclosure are intended to be illustrative rather than limiting, and should be understood as "one or more" unless the context clearly indicates otherwise, as can be understood by one of ordinary skill in the art.
[0018] At present, there are various processing methods for face images, for example, face beautification processing may be performed on face images, and deformation processing may be performed on face images. Many application scenarios are created for the processed face images, but all of them are directly used based on the face images after processing is completed, and cannot meet the needs of users for the diversity of interaction methods during the display of face images.
[0019] In an embodiment provided in the present disclosure, a user can obtain a target face through a terminal device (e.g., a device such as a personal computer, a notebook computer, a tablet, or a smartphone), and then first generate a facial mask array based on the target face, where the facial mask array includes multiple facial masks. Note that the facial masks in the facial mask array may be facial masks that directly correspond to the target face, or may be facial masks that are generated after performing related processing (e.g., deformation processing, beauty processing) on the target face. In addition, in one embodiment, the facial mask array may include masks corresponding to multiple different facial shapes.
[0020] After generating the facial mask array, the facial masks in the facial mask array can be arranged according to a certain distribution rule, for example, the facial masks in the facial mask array can be arranged according to a preset circumferential direction, where the preset circumferential direction is centered on the target face and the top direction of the target face is the central axis, thereby achieving the effect of the facial mask array rotating around the target face. In addition, the facial mask array can be dynamically displayed according to a preset moving manner, for example, the facial mask array can rotate around the target face.
[0021] Additionally, the rotational speed at which the facial mask array rotates around the target face may be determined based on the physical characteristics of the user, such as the degree to which the user opens their mouth, the degree to which the user laughs, and associated gestures of the user. Determine the rotation speed This can be illustrated by way of example, where the rotation speed at which the facial mask array rotates around the target face increases as the user opens their mouth more, i.e., the wider the user opens their mouth, the faster the facial mask array rotates around the target face. In this way, the user can accelerate or decelerate the speed at which the facial mask array rotates around the target face by adjusting the degree to which the user opens their mouth.
[0022] When a user triggers one of the masks in the facial mask array, for example, the user clicks on the screen to select one of the masks in the facial mask array, which becomes the target facial mask. After triggering, the speed at which the facial mask array rotates around the target face is first reduced until the target facial mask moves to face the target face, at which time the facial mask array stops rotating, and the target facial mask can be merged with the target face and displayed. Furthermore, the other facial masks in the facial mask array other than the target facial mask can be gradually changed and disappeared according to a preset transparency change rule.
[0023] In the embodiment provided in the present disclosure, a facial mask array is dynamically displayed at a preset relative position of a target face through a preset moving manner, and after a user triggers a target facial mask in the facial mask array, the target facial mask is merged and displayed on the target face. This can achieve the effect of having an interaction between the display manner of the facial mask array and the target face before the user triggers the target facial mask, and can also achieve the effect of merging the target facial mask with the target face and displaying a specific facial mask on the target face after the user triggers the target facial mask. Below, the image processing method will be described in detail through several specific implementation manners.
[0024] 1 is a flowchart of a face image display method according to an exemplary embodiment of the present disclosure. As shown in FIG. 1, the face image display method provided in this embodiment includes the following steps 101 and 102.
[0025] In step 101, a face mask array is dynamically displayed at a preset relative position of a target face through a preset moving manner.
[0026] In this step, after the user acquires the target face through the terminal device, the facial mask array can be dynamically displayed at a preset relative position of the target face through a preset moving manner, where the facial mask array can include facial masks corresponding to a plurality of target faces. Note that the facial masks in the facial mask array may be facial masks generated without processing the target face, or may be facial masks generated after performing related processing (e.g., deformation processing, beauty processing) on the target face. Here, to generate a facial mask based on the above target face, a related 3D facial processing tool is used. Generate a face mask Also, in one embodiment, the facial mask array can include masks corresponding to a number of different facial morphologies.
[0027] After generating the facial mask array, the facial masks in the facial mask array can be arranged according to a specific distribution rule, for example, the facial masks in the facial mask array may be arranged according to a preset circumferential direction, or may be arranged to be sequentially sorted in a preset direction.
[0028] Optionally, when the facial masks in the facial mask array can be arranged according to a preset circumferential direction, the preset circumferential direction can be centered on the target face and the top direction of the target face can be the central axis, thereby achieving the effect of the facial mask array rotating around the target face. Also, the facial mask array can be dynamically displayed according to a preset moving manner, for example, the facial mask array can rotate and move around the target face.
[0029] When the facial masks in the facial mask array are arranged to be rearranged sequentially in a preset direction, the facial mask array can slide in front of the target face according to the front-to-back order of the facial mask arrangement.
[0030] In addition, this embodiment does not specifically limit the specific arrangement method of the facial mask array and the relative movement method between the facial mask array and the target face, and the specific form can be appropriately set according to the needs of a specific scene. The purpose of this embodiment is to illustratively illustrate that a specific relative position relationship and relative movement relationship exist between the target face and the facial mask array.
[0031] In step 102, in response to a trigger command acting on the target facial mask, the target facial mask is blended with the subject face and displayed.
[0032] When a user triggers one of the facial masks in the facial mask array, for example, the user clicks on the screen to select one facial mask in the facial mask array, which is set as the target facial mask. After triggering, the speed at which the facial mask array rotates around the target face is first reduced until the target facial mask moves to face the target face, at which point the rotation of the facial mask array is stopped, and the target facial mask can be merged with the target face and displayed. Furthermore, other facial masks in the facial mask array other than the target facial mask can be gradually changed and disappeared according to a preset transparency change rule.
[0033] In this embodiment, a facial mask array is dynamically displayed at a predetermined relative position of the target face through a predetermined movement manner, and after a user triggers a target facial mask in the facial mask array, the target facial mask is blended and displayed on the target face, thereby improving the interaction in the process of displaying the facial image; and after a user triggers a target facial mask, the target facial mask is blended and displayed on the target face, thereby realizing the effect of displaying a specific facial mask on the target face, thereby improving the enjoyment and experience of the user's interaction.
[0034] In the above embodiment, the facial masks included in the facial mask array may include an original facial mask corresponding to the target face, or may include a deformed facial mask generated after processing the original facial mask by a 3D facial processing tool. For example, the facial mask array may include eight facial masks, including two original facial masks and six deformed facial masks. Specifically, first, Pieces A facial mask entity can be created, then a 3D model with pre-designed deformation effects can be introduced, and a deformer can be added to each facial mask entity to adjust the corresponding degree of deformation. Since the deformation forms of each facial mask are not the same, each deformation form needs to be introduced separately, and multiple kinds of deformers can be created on the same model.
[0035] The default initial position of the facial mask generated by the 3D face processing tool is consistent with the original face due to the basic algorithm settings. In order to display it at a preset relative position of the target face, the generated facial mask can be subjected to operations such as displacement, selection and scaling in the facial coordinate system of the model space. Here, FIG. 2 is a schematic diagram of the generation of one facial mask according to an exemplary embodiment of the present disclosure. As shown in FIG. 2, it is necessary to obtain the original positions of the vertices of the facial mask before deformation in the current model space and the position deviation after deformation, and then ensure that the facial mask is always displayed outward relative to the target face, so it is necessary to first perform a displacement operation, and then a rotation operation can be performed.
[0036] Specifically, the original position of the vertex is added with the displacement after deformation, and then added to the coordinate displacement on the Z axis, so that the displacement from the original position of the target face can be realized. In addition, when the facial mask is rotated around the target face so as to surround it, a scaling process is performed on the generated facial mask, for example, it can be scaled to 90% of the original size so as not to completely block the target face, and each facial mask in the facial mask array is a scaled facial mask corresponding to the target face. As can be seen from the above, the above method can realize the display of one facial mask scaled at a certain proportion at a position where the target face is shifted from a preset distance, and the specific effect is as shown in FIG. 2.
[0037] In order to realize that the face mask is dynamically displayed according to a preset movement manner, for example, in order to rotate the face mask around the target face, the face mask can be rotated according to the following rotation matrix with the target face as the center and the direction of the top of the target face as the central axis (e.g., the Y axis):
number
[0038] As can be seen from the above, after the face mask is scaled to 90% of its original size by the above method, the face is centered on the target face, the head direction is the central axis, and a certain half-width is created. By diameter And the front of the face mask always rotates outward. conduct It is possible.
[0039] In addition, after realizing the dynamic display of one facial mask, it is also possible to further realize the dynamic display of a facial mask array at a preset relative position of the target face through a preset movement manner, where the facial mask array includes eight facial masks as an example.
[0040] 3 is a schematic diagram of a facial mask array generated according to an exemplary embodiment of the present disclosure. As shown in FIG. 3, when the position parameters of each facial mask in the facial mask array are initialized, the same displacement and scaling ratio can be given. Then, the rotation angles are defined sequentially according to the initialization order, and the eight facial masks thus initialized are arranged at 45 degree intervals, so that the facial mask array formed by the eight facial masks surrounds a complete circle, and when the facial mask array is displayed, the facial masks in the facial mask array are arranged according to a preset circumferential direction.
[0041] Furthermore, an algorithm can be deployed to assign different deformation models to the eight facial masks and control the selection of the facial mask, thus achieving integrated control of the movement of these facial masks in one system-level script.
[0042] By dynamically displaying the facial mask array by rotating and moving the facial mask array with the target face as the center and the head direction as the central axis, the user can trigger any mask in the facial mask array to select a target facial mask, and the target facial mask can be merged and displayed with the target face. Figure 4 is a scene diagram of the triggering process of the facial image display method according to an exemplary embodiment of the present disclosure. As shown in Figure 4, the user can select one mask in the facial mask array as the target facial mask by clicking on the screen.
[0043] After triggering, the speed at which the facial mask array rotates around the target face is first reduced until the target facial mask moves to face the target face, at which point the rotation of the facial mask array is stopped and the target facial mask can be blended into the target face and displayed. Furthermore, other facial masks in the facial mask array other than the target facial mask can be gradually changed and disappeared according to a preset transparency change rule.
[0044] In one possible design, FIG. 5 illustrates a block diagram of a 3D printer according to an exemplary embodiment of the present disclosure. Target face mask trigger was done rear went 5 is a flowchart of a fusion display step. As shown in FIG 5, step 102 in the above embodiment may specifically include the following steps 1020 to 1029. In step 1020, a trigger command to act on the target facial mask is obtained.
[0045] For example, the user can select one mask in the facial mask array as the target facial mask by clicking on the screen.
[0046] In step 1021, it is determined whether or not the rotation speed is smaller than a preset target speed. If the result of the determination is YES, step 1022 is executed, and if the result of the determination is NO, step 1023 is executed.
[0047] In step 1022, the current rotation angle is set.
[0048] In step 1023, the rotation speed is decreased.
[0049] In step 1024, it is determined whether the rotation speed is smaller than a preset target speed. If the result of the determination is YES, step 1025 is executed, and if the result of the determination is NO, step 1023 is executed.
[0050] In step 1025, a target rotation angle is calculated.
[0051] After triggering the target face mask in the face mask array, it is necessary to judge whether the rotation speed is smaller than a preset target speed, where the preset target speed can be a rotation speed threshold. If the judgment result is YES, it indicates that the current face mask rotation speed is relatively slow, and the target face mask can be controlled to move to a target position, for example, a position just before the target face, by directly calculating the target rotation angle, and then the subsequent fusion display operation can be performed. However, if the current rotation speed is larger than the preset target speed, directly adopting the method of calculating the target rotation angle and controlling the target face mask to move to the target position will cause the change in the movement state tendency of the face mask array to be too large, and the sensitivity of the interaction will be poor. Therefore, before calculating the target rotation angle, it is necessary to first reduce the rotation speed, and after reducing the rotation speed to be smaller than the preset target speed, the subsequent calculation of the target rotation angle is performed, and the target face mask is controlled to move to the target position. Note that the target rotation angle is the rotation angle when the movement of the face mask stops. Next, take an example where the facial mask array includes eight facial masks. When stopping, one facial mask must face the user, and since the rotation angle of this facial mask is 0, the target rotation angle must be an integer multiple of 45.
[0052] Specifically, the target rotation angle of each facial mask in the facial mask array can be calculated by the following formula:
number
[0053] In step 1026, the facial mask number that rotates to the target position is recorded.
[0054] Specifically, when generating the facial mask array, a number can be assigned to each facial mask in the facial mask array, which is used to uniquely identify each facial mask, for example, assigning number 1 to the first facial mask, number 2 to the second facial mask, number 3 to the third facial mask, and so on until the eighth facial mask is assigned number 8. During the rotation process of the facial mask array, the current time records the number of the facial mask that has been rotated to the target position at each time, for example, at the first time, the first facial mask corresponding to number 1 is rotated to the target position, and at the second time, the second facial mask corresponding to number 2 is rotated to the target position.
[0055] In step 1027, it is determined whether the target face mask rotates to the target position. NO If so, execute step 1025 and the result of the determination is YES If so, steps 1028 and 1029 are executed.
[0056] When the target facial mask faces the target face, i.e., the target rotation angle of the target facial mask is 0, it is indicated that the target facial mask reaches the target position, at which point the rotational movement of the facial mask array can be stopped.
[0057] Specifically, when the target facial mask is triggered, a number corresponding to the target facial mask can be recorded, and in the process of rotating the facial mask array, if the number recorded at the current time is a number corresponding to the target facial mask, it is indicated that the target facial mask faces the target face, and at this time, the rotational movement of the facial mask array can be stopped. For example, if the target facial mask triggered by the user is the third facial mask, the number 3 is recorded, and in the process of rotating the facial mask array, when the facial mask corresponding to the recorded number 3 rotates to the target position, it is indicated that the third facial mask rotates to the target position, and the rotational movement of the facial mask array is stopped.
[0058] In step 1028, the fused face image is displayed on the target face.
[0059] In one embodiment, the target facial mask can be pasted onto the target face according to a preset path, and the target facial mask and the target face can be fused to generate a fused facial image, where the preset path is directed from a first position to a second position, the first position being the position of the current target facial mask in the facial mask array, and the second position being the position of the current target face. In this step, the offset value of the facial mask in the Z-axis direction is reduced so that all the facial masks are directed toward the target face with a circular radius of 1 mm. By shrinking Transfer Move Finally, the fused face image is displayed on the target face.
[0060] In step 1029, the face mask of the other person is gradually changed and made to disappear.
[0061] In addition, according to a preset transparency change rule, other face masks in the face mask array other than the target face mask can be gradually changed and disappeared. In this step, the alpha channel of the face mask not facing the target face can be gradually reduced, where the alpha channel is used to gradually make the face mask not facing the target face transparent by adjusting the transparency. Specifically, the implementation method can refer to the following formula:
number
[0062] 6 is a flowchart of a face image display method according to another exemplary embodiment of the present disclosure. As shown in FIG. 6, the face image display method provided in this embodiment includes the following steps 201 to 203.
[0063] In step 201, a rendering region and a non-rendering region are determined based on the current position parameters of each texel on each face mask of the face mask array and the position parameters of a target face, and only the rendering region is rendered.
[0064] In this step, before displaying the facial mask array, each facial mask needs to be rendered. If each facial mask is rendered in all directions without difference, the rendering calculation amount is likely to be excessive, and it will occupy excessive computing resources. Therefore, the rendering area and the non-rendering area can be determined according to the current position parameter of each texel on each facial mask of the facial mask array and the position parameter of the target face, and only the rendering area can be rendered.
[0065] 7 is a flowchart of the rendering step according to an exemplary embodiment of the present disclosure. As shown in FIG. 7, the rendering step in this embodiment may include the following steps 2011 to 2016.
[0066] In step 2011, face Texels on the mask Frontal area of face mask To Determine whether or not there is.
[0067] In step 2012, the front region ToIf there is, it is determined whether the current position of the texel is located within a position range corresponding to the target face and is located behind the feature keypoint of the target face in the third direction. If the determination result is YES, step 2015 is executed, and if the determination result is NO, step 2014 is executed.
[0068] The third direction is the direction in which there is an obstruction in visual space between the target face and the face mask. For example, the Z-axis direction in FIG. It can be said that:
[0069] In step 2013, the back surface area To If there is, it is determined whether the current position of the texel is located within a position range corresponding to the target face and is located behind the feature keypoint of the target face in the third direction. If the determination result is YES, step 2015 is executed, and if the determination result is NO, step 2016 is executed.
[0070] In this embodiment, the front and back regions of the face mask can be completed by corresponding processing processes, where the first processing process is only used to render the front region and the second processing process is only used to render the back region, but the two processing processes can share one texel shading engine for rendering, where each texel shading engine samples the current target face to return a matte for a real-time human image, thereby realizing the rendering for the face mask.
[0071] Here, by determining whether the current position of the texel is located within a position range corresponding to the target face and is located behind a feature key point of the target face (e.g., a sideburn position of the target face) in a third direction (e.g., the Z-axis direction), it can be determined whether this texel needs to be rendered.
[0072] Specifically, when the current position of a texel is located within a position range corresponding to the target face, the texel may be in front of the target face or may be behind the target face. However, when the current position of a texel is located in front of the kneading position of the target face in the Z-axis direction, it can be determined that the texel is in front of the target face, and as can be seen, this texel is a part that is visible to the user, so it is necessary to render this texel. However, when the current position of a texel is located behind the kneading position of the target face in the Z-axis direction, it can be determined that the texel is behind the target face, and as can be seen, this texel is a part that is invisible to the user, so it is not necessary to render this texel, thereby reducing the waste of calculation resources due to unnecessary rendering processes.
[0073] In step 2014, the frontal region is rendered based on the target face. Specifically, on the face mask of, For texels located within the rendering region, if they also belong to the frontal region, they can be rendered based on the target face to display a specific appearance of the target face corresponding to the face mask.
[0074] In step 2015, texels that lie within the non-rendering region of the face mask are not rendered.
[0075] On face mask of, It can be understood that for texels located in a non-rendering region, regardless of whether they belong to a front or back surface region, they are not rendered and the texels in this region are set to transparent.
[0076] In step 2016, the back surface area is rendered to a preset fixed texture.
[0077] On face mask of, Located within the rendering area butFor texels belonging to the back surface area, it may be rendered based on a preset fixed texture, for example it may be rendered in grey.
[0078] Fig. 8 is a schematic diagram of a display result after rendering by the rendering step shown in Fig. 7. As shown in Fig. 8, for region A, since it is located in the rendering region and belongs to the front region, rendering is performed based on the target face to display the specific appearance of the target face corresponding to the face mask. For region B, since it is located in the rendering region and belongs to the back region, it is rendered in gray, for example.
[0079] Returning to FIG. 6, in step 202, a face mask arrangement is dynamically displayed at a preset relative position of a target face through a preset movement manner.
[0080] For a specific implementation method of step 202 in this embodiment, the specific explanation of step 101 in the embodiment shown in FIG. 1 can be referred to.
[0081] In addition, in step 101 of the embodiment shown in FIG. 1, when the facial mask arrangement is dynamically displayed according to a preset movement method, the facial mask arrangement is dynamically displayed according to the user's physical characteristics. The preset speed of movement For example, the degree to which the user opens their mouth, the degree to which the user smiles, and the associated gestures of the user can be determined. Based on Here, the degree to which the user opens his / her mouth can be determined. Determine the speed of a preset movement This can be illustrated by way of example, where the rotation speed at which the facial mask array rotates around the target face increases as the user opens their mouth more, i.e., the wider the user opens their mouth, the faster the facial mask array rotates around the target face. In this way, the user can accelerate or decelerate the speed at which the facial mask array rotates around the target face by adjusting the degree to which the user opens their mouth.
[0082] Specifically, the feature parameters of the target portion on the target face can be obtained first, then a rotation speed can be determined based on the feature parameters, and the facial mask arrangement can be dynamically displayed according to the rotation speed. For example, the feature parameters of the mouth and the feature parameters of the eye of the target face can be obtained, where the feature parameters of the mouth include a coordinate of an upper lip key point and a coordinate of a lower lip key point, and the feature parameters of the eyes include a coordinate of a left eye key point and a coordinate of a right eye key point. Then, a first coordinate difference value in a first direction (e.g., Y axis) is determined based on the coordinate of the upper lip key point and the coordinate of the lower lip key point, and a second coordinate difference value in a second direction (e.g., X axis) is determined based on the coordinate of the left eye key point and the coordinate of the right eye key point. Finally, the feature parameters can be determined based on a ratio between the first coordinate difference and the second coordinate difference value, where the feature parameters can be used to characterize the degree of opening the mouth. In addition, by determining the degree of mouth opening based on the ratio between the first coordinate difference value and the second coordinate difference value, it is possible to avoid fluctuations in the degree of mouth opening due to changes in the perspective of the target face from the camera.
[0083] Here, when the characteristic parameter is equal to or smaller than a first threshold value, the rotation speed is set to the first predetermined speed. When the characteristic parameter is larger than the first threshold value, the rotation speed is set to the first predetermined speed. and the sum of the first preset speed and the additional speed is smaller than the second preset speed. if the sum of the first preset speed and the additional speed is greater than or equal to a second preset speed, the rotation speed is determined as the sum of a first preset speed and an additional speed, where the additional speed is proportional to a difference value of the feature parameter, and the difference value of the feature parameter is a difference between the feature parameter and a first preset threshold value. If the sum of the first preset speed and the additional speed is greater than or equal to a second preset speed, the rotation speed is determined as the second preset speed.
[0084] Through the above method, it is possible to realize calculating the rotation speed of the face mask in the current frame according to the degree of opening of the mouth, and the specific calculation formula is as follows:
number
[0085] In addition, In the above formula, the above The feature parameter is the degree of mouth opening D, The first preset threshold is a mouth open detection threshold d, and the first preset speed is a minimum rotation speed γ min and the added speed is (Dd) × σ γ and the second preset speed is the maximum rotation speed γ max It is.
[0086] As can be seen, this step allows one to achieve the effect of the facial mask array rotating at different rotational speeds around the subject's face by controlling the degree of mouth opening.
[0087] In addition, the rotation angle of each face mask in the current frame can be set according to the determined rotation speed, and the specific formula is as follows:
number
[0088] Note that the modulus operation on the tail of the above formula is to ensure that the rotation angle is within the interval [0,360] and to prevent memory overflow due to numbers that are too large.
[0089] In step 203, in response to a trigger command acting on the target facial mask, the target facial mask is blended with the subject face and displayed.
[0090] For a specific implementation method of step 203 in this embodiment, the specific explanation of step 102 in the embodiment shown in FIG. 1 can be referred to, and a duplicated explanation will be omitted here.
[0091] 9 is a schematic diagram of the structure of a face image display device according to an exemplary embodiment of the present disclosure. As shown in FIG. 9, the face image display device 300 provided in this embodiment includes: A display module 301 for dynamically displaying a facial mask array including a plurality of facial masks corresponding to a target face at a predetermined relative position of the target face through a predetermined moving manner; an acquisition module 302 for acquiring trigger instructions to act on the target facial mask; A processing module 303 for fusing the target face mask to the target face, the target face mask being one of the facial mask arrays. face a processing module 303 which is a mask; The display module 301 is further used for displaying the target face fused with the target face mask.
[0092] According to one or more embodiments of the present disclosure, the facial mask array includes at least one deformable facial mask corresponding to the target face.
[0093] According to one or more embodiments of the present disclosure, the display module 301 specifically includes: The facial mask array is dynamically displayed by a rotational movement method with the target face as the center and the top direction of the target face as the central axis, and the facial masks in the facial mask array are arranged according to a preset circumferential direction.
[0094] According to one or more embodiments of the present disclosure, the facial masks in the facial mask array are scaled facial masks corresponding to the target face.
[0095] According to one or more embodiments of the present disclosure, the display module 301 specifically includes: acquiring feature parameters of a target portion on the target face; A rotation speed of the rotational movement is determined based on the characteristic parameters, and is used to dynamically display the facial mask arrangement according to the rotation speed.
[0096] According to one or more embodiments of the present disclosure, the acquisition module 302 is further used for acquiring mouth feature parameters and eye feature parameters of the target face, the mouth feature parameters including a coordinate of an upper lip key point and a coordinate of a lower lip key point, and the eye feature parameters including a coordinate of a left eye key point and a coordinate of a right eye key point; The processing module 303 is further used for determining a first coordinate difference value in a first direction based on the coordinates of the upper lip key point and the coordinates of the lower lip key point, and determining a second coordinate difference value in a second direction based on the coordinates of the left eye key point and the coordinates of the right eye key point; The processing module 303 is further used for determining the feature parameter based on a ratio between the first coordinate difference value and the second coordinate difference value.
[0097] According to one or more embodiments of the present disclosure, the processing module 303 specifically includes: When the characteristic parameter is equal to or less than a first preset threshold, the rotation speed is set to a first preset speed. decision To do, The characteristic parameter is greater than the first preset threshold value. and the sum of the first preset speed and the additional speed is smaller than the second preset speed. In this case, the rotation speed is set to the first preset speed. The above The sum of the additional speed and decision wherein the additional speed is proportional to a difference value of a characteristic parameter, and the difference value of the characteristic parameter is a difference between the characteristic parameter and the first preset threshold value; The sum of the first preset speed and the additional speed is The above if it is greater than or equal to a second preset speed, determining the rotation speed as the second preset speed.
[0098] According to one or more embodiments of the present disclosure, the processing module 303 may further include a step of rotating the target facial mask to a target position. It is used to decide whether or not The target position and the target face match a preset positional relationship. do.
[0099] According to one or more embodiments of the present disclosure, the target position is a position immediately in front of the target face.
[0100] According to one or more embodiments of the present disclosure, once the target facial mask has rotated to the target position, a rotational speed of the rotational movement is reduced to a preset target speed.
[0101] According to one or more embodiments of the present disclosure, the processing module 303 is further used for pasting the target face mask onto the target face according to a preset path, and fusing the target face mask with the target face to generate a fused face image, where the preset path is directed from a first position to a second position, the first position is a current position of the target face mask in the facial mask array, and the second position is a current position of the target face; The display module 301 is further used for displaying the fused face image on the target face.
[0102] According to one or more embodiments of the present disclosure, the display module 301 is further used to gradually change and disappear other facial masks other than the target facial mask in the facial mask array according to a preset transparency change rule.
[0103] According to one or more embodiments of the present disclosure, the processing module 303 is further used to determine a rendering area and a non-rendering area based on a current position parameter of each texel on each face mask of the face mask array and a position parameter of the target face, and render only the rendering area.
[0104] According to one or more embodiments of the present disclosure, The processing module 303 further comprises: If the current position of the texel is located within a position range corresponding to the target face and is located behind a feature key point of the target face in a third direction, the texel but Belonging to the non-rendering region It is used to determine .
[0105] According to one or more embodiments of the present disclosure, the processing module 303 is further used for rendering the frontal region based on the target face; The processing module 303 is further used to render the back surface area to a preset fixed texture.
[0106] In addition, the face image display device provided in the embodiment shown in Figure 9 can be used to execute the method provided in any of the above embodiments, and the specific implementation manner and technical effects are similar, so duplicated descriptions will be omitted here.
[0107] FIG. 10 is a schematic diagram of the structure of an electronic device according to an exemplary embodiment of the present disclosure. As shown in FIG. 10, it is a schematic diagram of the structure of an electronic device 400 applied to realize the embodiment of the present disclosure. The terminal device in this embodiment can include, but is not limited to, mobile terminals having an image acquisition function, such as mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (PDA), tablets (Portable Android Devices, PAD), portable multimedia players (Portable Media Players, PMP), and in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals to which image acquisition devices are externally attached, such as digital TVs and desktop computers. The electronic device shown in FIG. 10 is merely an example and does not limit the functions and scope of use related to the embodiment of the present disclosure.
[0108] As shown in FIG. 10, the electronic device 400 includes a program stored in a read-only memory (ROM) 402, Memory The electronic device 400 may include a processor (e.g., a central processing unit, a graphics processing unit) 401 capable of performing various appropriate operations and processes based on programs loaded from 408 into a Random Access Memory (RAM) 403. The RAM 403 further stores various programs and data required for the operation of the electronic device 400. The processor 401, the ROM 402 and the RAM 403 are interconnected via a bus 404. An Input / Output (I / O) interface 405 is also connected to the bus 404. The memory is used to store programs for performing the methods described in each of the above method embodiments, and the processor is configured to execute the programs stored in the memory.
[0109] In general, the input device 406 includes, for example, a touch panel, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc., the output device 407 includes, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc., and the output device 407 includes, for example, a magnetic tape, a hard disk, etc. Memory 408 and a communication device 409 can be connected to the I / O interface 405. The communication device 409 allows wireless or wired communication between the electronic device 400 and other devices to exchange data. Although FIG. 10 shows the electronic device 400 with various devices, it should be understood that not all of the devices shown need be implemented or included. Alternatively, more or fewer devices may be implemented or included.
[0110] In particular, according to an embodiment of the present disclosure, the above processes described with reference to the flowcharts may be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product including a computer program loaded onto a non-transitory computer-readable medium, the computer program including a program code for executing the method shown in the flowchart of the embodiment of the present disclosure. In such an embodiment, the computer program can be downloaded and installed from a network by the communication device 409, or installed from the storage device 408, or installed from the ROM 402. When the computer program is executed by the processor 401, it performs the above functions defined in the method of the embodiment of the present disclosure.
[0111] It should be noted that the computer-readable medium of the present disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above. The computer-readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or any combination of the above. More specific examples of the computer-readable storage medium include an electrical connection having one or more leads, a portable computer magnetic disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), and an erasable programmable read-only memory. (EThe computer-readable storage medium may include, but is not limited to, a tangible medium that contains or stores a program that may be used with or in conjunction with an instruction execution system, apparatus, or device. In embodiments of the present disclosure, the computer-readable signal medium may include a data signal that is propagated in baseband or as part of a carrier wave and has computer-readable program code loaded therein. Such a propagated data signal may take a variety of forms, including, but not limited to, an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer-readable signal medium may be any computer-readable medium other than a computer-readable storage medium that may transmit, propagate, or transmit a program that may be used with or in conjunction with an instruction execution system, apparatus, or device. The program code contained in the computer readable medium may be transmitted over any suitable medium, including, but not limited to, wire, optical cable, Radio Frequency (RF), or the like, or any suitable combination thereof.
[0112] The computer readable medium may be included in the electronic device, or may exist separately and not integrated into the electronic device.
[0113] The computer-readable medium has one or more programs loaded thereon, which, when executed by the electronic device, causes the electronic device to dynamically display a facial mask array including a plurality of facial masks corresponding to a target face at a predetermined relative position of the target face in a predetermined movement manner, and, in response to a trigger command acting on a target facial mask, blend the target facial mask with the target face and display it, where the target facial mask is any one of the facial mask arrays.
[0114] Computer program code for carrying out the operations of the present disclosure can be written in one or more programming languages, or any combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and even conventional procedural programming languages such as "C" or similar programming languages. The program code can run entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (e.g., connected via the Internet using an Internet Service Provider).
[0115] In some embodiments, clients and servers may communicate via any network protocol now known or later developed, such as HyperText Transfer Protocol (HTTP), and may be interconnected via any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include local area networks (LANs), wide area networks (WANs), internetworks (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any networks now known or later developed.
[0116] The flowcharts and block diagrams in the drawings illustrate possible system architectures, functions, and operations of the systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowcharts or block diagrams may represent a module, program segment, or part of code, which includes one or more executable instructions for implementing a certain logical function. It should also be noted that in some alternative embodiments, the functions depicted in the blocks may be implemented in a different order than that depicted in the drawings. For example, two blocks shown in succession may be executed substantially in parallel, or may be executed in a reverse order depending on the function. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that executes a certain function or operation, or by a combination of dedicated hardware and computer instructions.
[0117] The modules according to the embodiments of the present disclosure may be implemented in the form of software or hardware, where the name of the module does not necessarily limit the unit itself in some cases, for example, the display module may be described as "a unit for displaying a target face and a facial mask array."
[0118] The functions described herein above may be performed at least in part by one or more hardware logic components, including, but not limited to, exemplary hardware logic components including Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Parts (ASSPs), Systems on Chips (SOCs), Complex Programmable logic devices (CPLDs), and the like.
[0119] In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain or store a program for use in or in combination with an instruction execution system, device, or apparatus. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any suitable combination of the above. More specific examples of machine-readable storage media include an electrical connection by one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0120] In a first aspect, according to one or more embodiments of the present disclosure, dynamically displaying a face mask array including a plurality of face masks corresponding to the target face at a predetermined relative position of the target face through a predetermined moving manner; a step of blending a target facial mask with the subject face and displaying the target facial mask in response to a trigger command acting on the target facial mask, the target facial mask being one of the facial mask arrays; face A method for displaying a facial image is provided, comprising the steps of:
[0121] According to one or more embodiments of the present disclosure, the facial mask array includes at least one deformable facial mask corresponding to the target face.
[0122] According to one or more embodiments of the present disclosure, the step of dynamically displaying a face mask arrangement at a preset relative position of a target face through a preset movement manner includes: The facial mask array is dynamically displayed by a rotational movement method with the target face as a center and the top direction of the target face as a central axis, and the facial masks in the facial mask array are arranged according to a preset circumferential direction.
[0123] According to one or more embodiments of the present disclosure, the facial masks in the facial mask array are scaled facial masks corresponding to the target face.
[0124] According to one or more embodiments of the present disclosure, the step of dynamically displaying the facial mask arrangement in the manner of rotational movement includes: obtaining feature parameters of a target portion on the target face; determining a rotational speed of the rotational movement based on the characteristic parameters, and dynamically displaying the facial mask arrangement according to the rotational speed.
[0125] According to one or more embodiments of the present disclosure, the step of acquiring feature parameters of a target portion on the target face includes: acquiring mouth feature parameters and eye feature parameters of the target face, the mouth feature parameters including coordinates of an upper lip key point and a lower lip key point, and the eye feature parameters including coordinates of a left eye key point and a right eye key point; determining a first coordinate difference value in a first direction based on the coordinates of the upper lip keypoint and the coordinates of the lower lip keypoint, and determining a second coordinate difference value in a second direction based on the coordinates of the left eye keypoint and the coordinates of the right eye keypoint; determining the feature parameter based on a ratio between the first coordinate difference value and the second coordinate difference value.
[0126] According to one or more embodiments of the present disclosure, the step of determining a rotation speed based on the characteristic parameters comprises: When the characteristic parameter is equal to or less than a first preset threshold, the rotation speed is set to a first preset speed. decision and The characteristic parameter is greater than the first preset threshold value. and the sum of the first preset speed and the additional speed is smaller than the second preset speed. In this case, the rotation speed is set to the first preset speed. The above The sum of the additional speed and decision wherein the additional speed is proportional to a difference value of a characteristic parameter, and the difference value of the characteristic parameter is a difference between the characteristic parameter and the first preset threshold value; The sum of the first preset speed and the additional speed is The above If the rotation speed is greater than or equal to a second preset speed, determining the rotation speed as the second preset speed.
[0127] According to one or more embodiments of the present disclosure, before the step of blending the target face mask with the target face and displaying the target face mask, The target face mask is rotated to a target position. determining whether to The target position and the target face match a preset positional relationship. Rus Further includes step.
[0128] According to one or more embodiments of the present disclosure, the target position is a position immediately in front of the target face.
[0129] According to one or more embodiments of the present disclosure, once the target facial mask has rotated to the target position, a rotational speed of the rotational movement is reduced to a preset target speed.
[0130] According to one or more embodiments of the present disclosure, the step of blending the target face mask with the target face and displaying the target face mask includes: a step of pasting the target face mask onto the target face according to a preset path, fusing the target face mask with the target face, and generating a fused face image, the preset path being directed from a first position to a second position, the first position being a current position of the target face mask in the facial mask array, and the second position being a current position of the target face; and displaying the fused face image on the target face.
[0131] According to one or more embodiments of the present disclosure, the step of blending the target face mask with the target face and displaying the target face mask includes: The method further includes a step of gradually changing and disappearing other facial masks in the facial mask array other than the target facial mask according to a preset transparency change rule.
[0132] According to one or more embodiments of the present disclosure, the face image display method includes: The method further includes determining a rendering area and a non-rendering area based on a current position parameter of each texel on each facial mask of the facial mask array and a position parameter of the target face, and rendering only the rendering area.
[0133] According to one or more embodiments of the present disclosure, the step of determining a rendering area and a non-rendering area based on a current position parameter of each texel on each facial mask of the facial mask array and a position parameter of the target face includes: If the current position of the texel is located within a position range corresponding to the target face and is located behind a feature key point of the target face in a third direction, the texel but Belonging to the non-rendering region Decide Includes steps.
[0134] According to one or more embodiments of the present disclosure, the rendering area includes a front area and a back area, and the step of rendering the rendering area includes: rendering the frontal region based on the target face; Rendering the back surface area to a preset fixed texture.
[0135] In a second aspect, according to one or more embodiments of the present disclosure, a display module for dynamically displaying a facial mask array including a plurality of facial masks corresponding to a target face at a predetermined relative position of the target face through a predetermined moving manner; an acquisition module for acquiring trigger instructions to act on a target facial mask; a processing module for fusing the target facial mask with the target face, the target facial mask being one of the facial mask arrays; face a processing module which is a mask; The display module is further provided with a face image display device adapted to display the target face fused with the target face mask.
[0136] According to one or more embodiments of the present disclosure, the facial mask array includes at least one deformable facial mask corresponding to the target face.
[0137] According to one or more embodiments of the present disclosure, the display module specifically comprises: The facial mask array is dynamically displayed by a rotational movement method with the target face as the center and the top direction of the target face as the central axis, and the facial masks in the facial mask array are arranged according to a preset circumferential direction.
[0138] According to one or more embodiments of the present disclosure, the facial masks in the facial mask array are scaled facial masks corresponding to the target face.
[0139] According to one or more embodiments of the present disclosure, the display module specifically comprises: acquiring feature parameters of a target portion on the target face; A rotation speed of the rotational movement is determined based on the characteristic parameters, and is used to dynamically display the facial mask arrangement according to the rotation speed.
[0140] According to one or more embodiments of the present disclosure, the acquisition module is further used for acquiring mouth feature parameters and eye feature parameters of the target face, the mouth feature parameters including a coordinate of an upper lip key point and a coordinate of a lower lip key point, and the eye feature parameters including a coordinate of a left eye key point and a coordinate of a right eye key point; the processing module is further used for determining a first coordinate difference value in a first direction based on a coordinate of the upper lip key point and a coordinate of the lower lip key point, and determining a second coordinate difference value in a second direction based on a coordinate of the left eye key point and a coordinate of the right eye key point; The processing module is further adapted to determine the feature parameter based on a ratio between the first coordinate difference value and the second coordinate difference value.
[0141] According to one or more embodiments of the present disclosure, the processing module specifically includes: When the characteristic parameter is equal to or less than a first preset threshold, the rotation speed is set to a first preset speed. decision To do, The characteristic parameter is greater than the first preset threshold value. and the sum of the first preset speed and the additional speed is smaller than the second preset speed. In this case, the rotation speed is set to the first preset speed. The above The sum of the additional speed and decision wherein the additional speed is proportional to a difference value of a characteristic parameter, and the difference value of the characteristic parameter is a difference between the characteristic parameter and the first preset threshold value; The sum of the first preset speed and the additional speed is The above if it is greater than or equal to a second preset speed, determining the rotation speed as the second preset speed.
[0142] According to one or more embodiments of the present disclosure, the processing module further comprises: rotating the target facial mask to a target position. Used to determine whether The target position and the target face match a preset positional relationship. do.
[0143] According to one or more embodiments of the present disclosure, the target position is a position immediately in front of the target face.
[0144] According to one or more embodiments of the present disclosure, The processing module further comprises: When the target face mask rotates to the target position, the rotation speed of the rotational movement is reduced to a preset target speed. Used for .
[0145] According to one or more embodiments of the present disclosure, the processing module is further adapted to: paste the target face mask onto the target face according to a preset path, and fuse the target face mask with the target face to generate a fused face image, where the preset path is directed from a first position to a second position, the first position being a current position of the target face mask in the facial mask array, and the second position being a current position of the target face; The display module is further adapted to display the fused face image on the target face.
[0146] According to one or more embodiments of the present disclosure, the display module is further used to gradually change and disappear other facial masks other than the target facial mask in the facial mask array according to a preset transparency change rule.
[0147] According to one or more embodiments of the present disclosure, the processing module is further used to determine a rendering area and a non-rendering area based on a current position parameter of each texel on each face mask of the face mask array and a position parameter of the target face, and to render only the rendering area.
[0148] According to one or more embodiments of the present disclosure, The processing module further comprises: If the current position of the texel is located within a position range corresponding to the target face and is located behind a feature key point of the target face in a third direction, the texel but Belonging to the non-rendering region It is used to determine .
[0149] According to one or more embodiments of the present disclosure, the processing module is further adapted to render the frontal region based on the target face; The processing module is further used for rendering the back surface region to a preset fixed texture.
[0150] In a third aspect, an embodiment of the present disclosure provides an electronic device including at least one processor and a memory; the memory storing computer executable instructions; An electronic device is provided in which the at least one processor executes computer-executable instructions stored in the memory, thereby causing the at least one processor to perform the facial image display method described in the first aspect and various possible designs of the first aspect.
[0151] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having computer-executable instructions stored thereon, the computer-readable storage medium executing the computer-executable instructions to realize the facial image display method as described in the first aspect above and various possible designs of the first aspect.
[0152] In a fifth aspect, an embodiment of the present disclosure provides a computer program product including a computer program, which, when executed by a processor, realises the facial image display method as described in the first aspect above and various possible designs of the first aspect.
[0153] In a sixth aspect, an embodiment of the present disclosure provides a computer program which, when executed by a processor, realises the facial image display method as described in the first aspect above and various possible designs of the first aspect.
[0154] The above is merely a description of the preferred embodiments of the present disclosure and the technical principles used. Those skilled in the art will recognize that the scope of the disclosure of the present disclosure is not limited to the technical solutions based on the specific combination of the above technical features, and should cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the spirit of the above disclosure. For example, the technical solutions formed by replacing the above features with technical features having similar functions (but not limited to) disclosed in the present disclosure.
[0155] Additionally, although operations have been described in a particular order, it should not be understood that these operations are required to be performed in the particular order or sequence shown. In certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although the above description includes some specific implementation details, these should not be construed as limiting the scope of the disclosure. Certain features that are described in the context of separate embodiments may also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment may be implemented in multiple embodiments alone or in any suitable subcombination manner.
[0156] Although the subject matter has been described using language specific to structural features and / or logical operations of methods, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or operations described above. Instead, the specific features and operations described above are merely example methods for implementing the claims.
[0157] Books Disclosure claims priority to a Chinese patent application bearing application number 202010981627.5 and entitled "Facial image display method, device, electronic device and storage medium" filed with the State Intellectual Property Office of the People's Republic of China on September 17, 2020, the entire contents of which are incorporated herein by reference.
Claims
1. dynamically displaying a face mask array including a plurality of face masks corresponding to the target face at a predetermined relative position of the target face through a predetermined moving manner; and in response to a trigger command acting on a target facial mask, blending the target facial mask with the target face and displaying the target facial mask, the target facial mask being one of the facial masks in the facial mask array; The step of dynamically displaying the face mask arrangement at a predetermined relative position of the target face through a predetermined moving manner includes: dynamically displaying the facial mask array by a rotational movement manner with the target face as a center and a head vertex direction of the target face as a central axis, the facial masks in the facial mask array being arranged according to a preset circumferential direction; A facial image display method comprising:
2. 2. The method according to claim 1, wherein the facial mask array includes a deformed facial mask corresponding to at least one of the target faces.
3. 2. The method of claim 1, wherein the face masks in the face mask array are scaled face masks corresponding to the target faces.
4. The step of dynamically displaying the facial mask arrangement by a rotational movement manner includes: obtaining feature parameters of a target portion on the target face; The facial image display method according to any one of claims 1 to 3, further comprising a step of determining a rotation speed of the rotation movement based on the feature parameters, and dynamically displaying the facial mask array according to the rotation speed.
5. before the step of blending the target face mask with the target face and displaying the same; The face image display method according to any one of claims 1 to 4, further comprising a step of determining whether the target face mask has rotated and reached a target position, the target position and the target face matching a preset positional relationship.
6. 6. The method according to claim 5, wherein the target position is a position immediately before the target face.
7. 7. The face image display method according to claim 6, wherein when the target face mask has rotated to the target position, a rotation speed of the rotational movement is reduced to a preset target speed.
8. The step of blending the target face mask with the target face and displaying the same includes: a step of pasting the target face mask onto the target face according to a preset path, fusing the target face mask with the target face, and generating a fused face image, the preset path being directed from a first position to a second position, the first position being a current position of the target face mask in the facial mask array, and the second position being a current position of the target face; 8. The face image display method according to claim 1, further comprising the step of: displaying the fused face image on the target face.
9. The face image display method according to any one of claims 1 to 8, further comprising a step of determining a rendering area and a non-rendering area based on a current position parameter of each texel on each face mask of the face mask array and a position parameter of the target face, and rendering only the rendering area.
10. a display module for dynamically displaying a facial mask array including a plurality of facial masks corresponding to a target face at a predetermined relative position of the target face through a predetermined moving manner; an acquisition module for acquiring trigger instructions to act on a target facial mask; a processing module for blending the target face mask with the target face, the target face mask being one of the facial masks in the facial mask array; the display module is further adapted to display the target face fused with the target face mask; The display module is further used for dynamically displaying the facial mask array by a rotational movement manner, with the target face as a center and a head top direction of the target face as a central axis, and the facial masks in the facial mask array are arranged according to a preset circumferential direction. A face image display device comprising:
11. at least one processor and a memory; the memory storing computer executable instructions; The electronic device is characterized in that the at least one processor executes computer executable instructions stored in the memory, thereby causing the at least one processor to execute the facial image display method according to any one of claims 1 to 9.
12. A computer-readable storage medium having computer-executable instructions stored therein, the computer-readable storage medium realizing a facial image display method according to any one of claims 1 to 9 when a processor executes the computer-executable instructions.
13. A computer program, which, when executed by a processor, causes the face image display method according to any one of claims 1 to 9 to be realized.
Citation Information
Patent Citations
Portrait image correcting method
JP2004030668A
Unit, method, and program for image processing
JP2007060562A
Imaging apparatus, image display system, operation method, and program
JP2018152646A
Imaging apparatus, image display system, operation method, program
JP2019047167A
Control method, controller, smart mirror and computer-readable storage medium
JP2019537758A
