Eyebrow makeup guidance method, device, equipment and medium

By detecting key facial points and adjusting the boundary position of the makeup guidance model, the problem of users having difficulty using the makeup mirror is solved, the display of the eyebrow makeup area is optimized, and the user experience and facial beauty are improved.

CN115187703BActive Publication Date: 2025-09-19QINGDAO HISENSE SMART LIFE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210718763.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-23
Publication Date
2025-09-19
Estimated Expiration
2042-06-23

AI Technical Summary

Technical Problem

Existing smart makeup mirrors cannot effectively solve the problem of users having difficulty getting started when guiding them to apply makeup, especially in the eyebrow makeup area, where the facial features become uncoordinated due to differences in eye distance, affecting the user experience.

Method used

By detecting key points on the face, determining the length and distance of the eyes, adjusting the boundary position of the makeup guidance model, and adjusting the coordinates of the key points to optimize the display of the eyebrow makeup area, accurate makeup guidance is provided.

Benefits of technology

It improves users' ability to apply eyebrow makeup, optimizes the beauty of facial features, and enhances user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115187703B_ABST
    Figure CN115187703B_ABST
Patent Text Reader

Abstract

The present disclosure relates to an eyebrow makeup guidance method, apparatus, device, and medium. The method comprises: in response to a facial makeup display instruction, collecting a facial image and detecting facial key points; in response to a facial makeup selection instruction, determining a makeup guidance model corresponding to the eyebrows in the face based on facial makeup parameters in the instruction, the model including key points and key point position relationships; determining eye length and eye distance based on the facial key points, and determining the eye distance type based on the relationship between the difference between the eye distance and the eye length and a set threshold; determining the position of the two side boundaries of the makeup guidance model in the facial image based on the facial key points, and when it is determined that the eye distance needs to be adjusted based on the eye distance type, adjusting the key points of the two side boundaries in the direction of the eye distance; after the adjustment, determining the coordinates of each key point of the makeup guidance model based on the key point position relationship, obtaining and displaying a facial image with a makeup area. The present disclosure solves the problem of users having difficulty getting started with eyebrow makeup and improves user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to an eyebrow makeup instruction method, device, equipment, and medium. Background Art

[0002] For users who don’t know how to put on makeup or have difficulty getting started, they are not clear about the specific steps of some makeup looks, and don’t know the appropriate areas for makeup. They need to use smart makeup mirrors for corresponding makeup guidance.

[0003] Current smart makeup mirrors guide users through their makeup application by obtaining the user's selected facial makeup look and, based on the pre-set correspondence between the facial makeup look and the corresponding facial image with makeup guidance information, determining the corresponding facial image with makeup guidance information and displaying it to the user. They may also display some text descriptions of the makeup application. However, this type of smart makeup mirror using images and text can only provide simple guidance. Some complex makeup looks are difficult to implement with images and text, and this does not solve the problem of users being difficult to get started with.

[0004] In addition, when using the smart makeup mirror, due to the difference in the distance between users' eyes, the distance between the left and right makeup areas of the eyebrow makeup is too far or too close. For example, the facial features will be loose and lifeless due to the wide distance between eyes, and the facial features will be crowded and fierce due to the narrow distance between eyes, thus resulting in a poor user experience. Summary of the Invention

[0005] The present disclosure provides an eyebrow makeup guidance method, device, equipment and medium, which solves the problem of users having difficulty getting started when applying eyebrow makeup and improves user experience.

[0006] According to a first aspect of an embodiment of the present disclosure, a method for guiding eyebrow makeup is provided, the method comprising:

[0007] In response to a facial makeup display instruction, collecting a facial image and detecting facial key points corresponding to the face in the facial image;

[0008] In response to a facial makeup selection instruction, determining a makeup guidance model corresponding to an eyebrow portion of the face according to facial makeup parameters in the facial makeup selection instruction, the makeup guidance model including key points corresponding to the eyebrow portion and positional relationships of the key points;

[0009] Determining the eye length and eye distance based on the facial key points, and determining the eye distance type corresponding to the face based on a relationship between a difference between the eye distance and the eye length and a set threshold;

[0010] Based on the facial key points, the positions of the two side boundaries of the makeup guidance model in the facial image are determined. When it is determined that the eye distance needs to be adjusted according to the eye distance type, the key points of the two side boundaries are adjusted in the eye distance direction. After the adjustment, the coordinates of each key point of the makeup guidance model in the facial image are determined based on the positional relationship of the key points, and the facial image with the makeup area is obtained and displayed in the display area.

[0011] In a possible implementation, determining the eye length and eye distance based on the facial key points includes:

[0012] Establishing a coordinate system with any vertex in the facial image as an origin, and determining the facial midline of the face based on the facial key points;

[0013] Determine the coordinates of a first actual key point and a second actual key point located at the inner and outer corners of the left eye, and the coordinates of a third actual key point and a fourth actual key point located at the inner and outer corners of the right eye in the facial image;

[0014] Determining a first actual distance from the first actual key point to the midline of the face based on the coordinates of the first actual key point and the midline of the face;

[0015] Determining a second actual distance from the second actual key point to the midline of the face based on the coordinates of the second actual key point and the midline of the face;

[0016] Determining a third actual distance from the third actual key point to the midline of the face based on the coordinates of the third actual key point and the midline of the face;

[0017] Determining a fourth actual distance from the fourth actual key point to the midline of the face based on the coordinates of the fourth actual key point and the midline of the face;

[0018] Obtaining the eye length according to an average of a difference between the second actual distance and the first actual distance and a sum of differences between the fourth actual distance and the third actual distance;

[0019] The interocular distance is obtained according to the sum of the first actual distance and the third actual distance.

[0020] In a possible implementation, determining the eye distance type corresponding to the face according to a relationship between the difference between the eye distance and the eye length and a set threshold includes:

[0021] If the difference between the eye distance and the eye length is greater than a set threshold, determining that the eye distance type corresponding to the face is the first eye distance type;

[0022] If the absolute value of the difference between the eye distance and the eye length is less than or equal to a set threshold, determining that the eye distance type corresponding to the face is the second eye distance type;

[0023] If the difference between the eye distance and the eye length is smaller than a negative value of a set threshold, it is determined that the eye distance type corresponding to the face is the third eye distance type.

[0024] In one possible implementation, when the eye distance type is the first eye distance type, determining the positions of the boundaries of both sides of the makeup guidance model in the facial image based on the facial key points, and when it is determined according to the eye distance type that the eye distance needs to be adjusted, adjusting the key points of the boundaries on both sides in the direction of the eye distance, and determining the coordinates of each key point of the makeup guidance model in the facial image based on the positional relationship of the key points after the adjustment, includes:

[0025] Locating a first key point and a second key point located at two side boundaries of the makeup guidance model, and the coordinates of the first key point and the second key point corresponding to the facial image;

[0026] Draw a perpendicular line from the first key point to the midline of the face, and determine the angle between the perpendicular line and the horizontal axis of the coordinate system as the adjustment angle;

[0027] Determining a first adjustment direction corresponding to the makeup guidance model according to the first eye distance type, and determining an adjustment distance to be adjusted according to the first adjustment direction according to a difference between the eye distance and the eye length;

[0028] After adjusting the first key point coordinates according to the adjustment angle, adjusting the adjustment distance in the first adjustment direction to obtain adjusted first key point coordinates;

[0029] After adjusting the coordinates of the second key point according to the adjustment angle, adjusting the adjustment distance in the first adjustment direction to obtain adjusted coordinates of the second key point;

[0030] Determining the coordinates of each key point of the makeup guidance model in the facial image according to the adjusted first key point coordinates / the adjusted second key point coordinates and the key point position relationship;

[0031] The first adjustment direction is a direction in which the coordinates of each key point of the makeup guidance model in the face image are moved toward the midline of the face.

[0032] In one possible implementation, when the eye distance type is the third eye distance type, determining the positions of the boundaries of both sides of the makeup guidance model in the facial image based on the facial key points, and when it is determined according to the eye distance type that the eye distance needs to be adjusted, adjusting the key points of the boundaries on both sides in the direction of the eye distance, and after the adjustment, determining the coordinates of each key point of the makeup guidance model in the facial image based on the positional relationship of the key points, includes:

[0033] Locating a first key point and a second key point located at two side boundaries of the makeup guidance model, and the coordinates of the first key point and the second key point corresponding to the facial image;

[0034] determining an adjustment distance according to a difference between the interocular distance and the eye length;

[0035] Draw a perpendicular line from the first key point to the midline of the face, and determine the angle between the perpendicular line and the horizontal axis of the coordinate system as the adjustment angle;

[0036] determining, according to the third eye distance type, a second adjustment direction corresponding to the makeup guidance model;

[0037] Determining the adjusted coordinates of the first key point according to the adjustment angle, the second adjustment direction, the adjustment distance, and the coordinates of the first key point;

[0038] Determine the adjusted coordinates of the second key point according to the adjustment angle, the second adjustment direction, the adjustment distance, and the coordinates of the second key point;

[0039] Determining the coordinates of each key point of the makeup guidance model in the facial image according to the adjusted first key point coordinates / the adjusted second key point coordinates and the key point position relationship;

[0040] The second moving direction is a direction in which the coordinates of each key point of the makeup guidance model in the facial image are moved away from the midline of the face.

[0041] In one possible implementation, determining the coordinates of each key point of the makeup guidance model in the facial image based on the adjusted first key point coordinates / the adjusted second key point coordinates and the key point position relationship includes:

[0042] Calculating a first distance between the adjusted first key point and the second key point based on the adjusted coordinates of the first key point and the second key point, and determining a second distance in the horizontal direction between two adjacent key points corresponding to any adjacent key points in the makeup guidance model in the facial image based on the positional relationship of the key points in the makeup guidance model and the first distance;

[0043] determining the coordinates of each key point of the makeup guidance model in the facial image according to the adjusted first key point coordinates / the adjusted second key point coordinates, the second distance, and the angle corresponding to each key point in the key point position relationship;

[0044] Among them, the angle corresponding to each key point in the key point position relationship is determined by the angle between the first auxiliary line and the second auxiliary line; the first auxiliary line is obtained by connecting the first key point and the second key point, and the second auxiliary line is obtained by respectively connecting the first key point and each key point in the makeup guidance model, or respectively connecting the second key point and each key point in the makeup guidance model.

[0045] In a possible implementation, after determining the positions of the boundaries of both sides of the makeup guidance model at the facial image, the method further includes:

[0046] When it is determined according to the eye distance type that the eye distance does not need to be adjusted, calculating a third distance between a first key point on one side of the boundary of the makeup guidance model and a second key point on the other side of the boundary of the makeup guidance model based on the coordinates of a first key point corresponding to the first key point in the facial image and the coordinates of a second key point corresponding to the second key point in the facial image, and determining a fourth distance in the horizontal direction between two adjacent key points in the facial image corresponding to any adjacent key points in the makeup guidance model based on the positional relationship between the key points in the makeup guidance model and the third distance;

[0047] determining the coordinates of each key point of the makeup guidance model in the facial image according to the first key point coordinates / the second key point coordinates, the fourth distance, and the angle corresponding to each key point in the key point position relationship;

[0048] Among them, the angle corresponding to each key point in the key point position relationship is determined by the angle between the first auxiliary line and the second auxiliary line; the first auxiliary line is obtained by connecting the first key point and the second key point, and the second auxiliary line is obtained by respectively connecting the first key point and each key point in the makeup guidance model, or respectively connecting the second key point and each key point in the makeup guidance model.

[0049] According to a second aspect of an embodiment of the present disclosure, there is provided an eyebrow makeup guidance device, the device comprising:

[0050] A key point detection module is used to collect a face image in response to a facial makeup display instruction and detect facial key points corresponding to the face in the face image;

[0051] a model determination module for determining, in response to a facial makeup selection instruction, a makeup guidance model corresponding to an eyebrow portion of a face based on facial makeup parameters in the facial makeup selection instruction, the makeup guidance model including key points corresponding to the eyebrow portion and positional relationships of the key points;

[0052] an eye distance type determination module, configured to determine eye length and eye distance based on the facial key points, and determine the eye distance type corresponding to the face according to a relationship between a difference between the eye distance and the eye length and a set threshold;

[0053] A coordinate adjustment module is configured to determine the positions of the two side boundaries of the makeup guidance model in the facial image based on the facial key points, and when it is determined according to the eye distance type that the eye distance needs to be adjusted, adjust the key points of the two side boundaries in the direction of the eye distance. After the adjustment, the coordinates of each key point of the makeup guidance model in the facial image are determined based on the positional relationship of the key points, obtain the facial image with the makeup area, and display it in the display area.

[0054] According to a third aspect of an embodiment of the present disclosure, a smart mirror is provided, comprising: a camera device for capturing facial images; a display screen for displaying facial makeup and facial images with makeup areas, and obtaining user-triggered operation instructions; a memory for storing processor-executable instructions; and a processor for implementing the steps of the above-mentioned eyebrow makeup guidance method by running the executable instructions in the memory.

[0055] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer instructions are stored. When the instructions are executed by a processor, the steps of the above-mentioned eyebrow makeup guidance method are implemented.

[0056] In addition, the technical effects brought about by any implementation method in the second to fourth aspects can refer to the technical effects brought about by different implementation methods in the first aspect, and will not be repeated here.

[0057] The technical solutions provided by the embodiments of the present disclosure bring at least the following beneficial effects:

[0058] The present disclosure can detect the facial key points corresponding to the face in the face image; determine the makeup guidance model corresponding to the eyebrow part of the face based on the facial makeup parameters corresponding to the facial makeup selected by the user; determine the eye length and eye distance based on the facial key points, and determine the eye distance type corresponding to the face based on the relationship between the difference between the eye distance and the eye length and the set threshold; adjust the position of the two side boundaries of the makeup guidance model in the face image according to the adjustment direction corresponding to the different eye distance types, and then adjust the coordinates of each key point of the makeup guidance model in the face image to obtain a face image with a makeup area and display it in the display area. Therefore, the present disclosure can present the makeup area of ​​the eyebrow makeup, so that the user can refer to the makeup area to learn and improve their own makeup, thereby solving the problem of difficulty in getting started. In addition, the position of the makeup guidance model in the face image can be adjusted according to different eye distance types, so that the user's facial features are more beautiful through makeup modification, thereby improving the user's experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0060] Figure 1 is a schematic diagram of an application scenario according to an exemplary embodiment;

[0061] Figure 2 is a flow chart showing an eyebrow makeup guidance method according to an exemplary embodiment;

[0062] Figure 3 is a schematic diagram showing a method of displaying a facial image in a display area according to an exemplary embodiment;

[0063] Figure 4 is a schematic diagram showing another method of displaying a facial image in a display area according to an exemplary embodiment;

[0064] Figure 5 is a specific flow chart of an eyebrow makeup guidance method according to an exemplary embodiment;

[0065] Figure 6 is a schematic diagram of facial key points in a face according to an exemplary embodiment;

[0066] Figure 7 is a diagram showing a display interface according to an exemplary embodiment;

[0067] Figure 8 is a schematic diagram of a makeup guidance model for generating an eyebrow shape according to an exemplary embodiment;

[0068] Figure 9 is a schematic diagram showing the width of a human face in a standard ratio according to an exemplary embodiment;

[0069] Figure 10 is a schematic diagram showing determination of eye length and eye distance according to an exemplary embodiment;

[0070] Figure 11 is a schematic diagram showing adjustment of coordinates of key points of a makeup guidance model in a facial image under wide eye distance according to an exemplary embodiment;

[0071] Figure 12 is a schematic diagram showing adjustment of coordinates of key points of a makeup guidance model in a facial image under wide eye distance according to an exemplary embodiment;

[0072] Figure 13is a schematic diagram showing adjustment of coordinates of key points of a makeup guidance model in a facial image under wide eye distance according to an exemplary embodiment;

[0073] Figure 14 is a schematic diagram showing adjustment of coordinates of key points of a makeup guidance model in a facial image under wide eye distance according to an exemplary embodiment;

[0074] Figure 15 is a schematic diagram showing adjustment of coordinates of key points of a makeup guidance model in a facial image under a standard eye distance according to an exemplary embodiment;

[0075] Figure 16 is a schematic diagram showing adjustment of coordinates of key points of a makeup guidance model in a facial image under a standard eye distance according to an exemplary embodiment;

[0076] Figure 17 is a schematic diagram showing adjustment of coordinates of key points of a makeup guidance model in a facial image under a standard eye distance according to an exemplary embodiment;

[0077] Figure 18 is a schematic diagram showing adjustment of coordinates of key points of a makeup guidance model in a facial image under a narrow eye distance condition according to an exemplary embodiment;

[0078] Figure 19 is a schematic diagram showing adjustment of coordinates of key points of a makeup guidance model in a facial image under a narrow eye distance condition according to an exemplary embodiment;

[0079] Figure 20 is a schematic diagram showing adjustment of coordinates of key points of a makeup guidance model in a facial image under a narrow eye distance condition according to an exemplary embodiment;

[0080] Figure 21 is a diagram showing a display interface according to an exemplary embodiment;

[0081] Figure 22 is a schematic diagram of an eyebrow makeup guidance device according to an exemplary embodiment;

[0082] Figure 23 is a schematic diagram of a smart mirror according to an exemplary embodiment;

[0083] Figure 24 The figure is a schematic diagram of a program product of an eyebrow makeup guidance method according to an exemplary embodiment. DETAILED DESCRIPTION

[0084] To make the objectives, technical solutions, and advantages of the present disclosure more clear, the present disclosure will be further described in detail below with reference to the accompanying drawings. It is apparent that the embodiments described are only a portion of the embodiments of the present disclosure, rather than all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present disclosure without creative effort are intended to fall within the scope of protection of the present disclosure.

[0085] Current smart makeup mirrors guide users through their makeup application by obtaining the user's selected facial makeup. Based on the pre-set correspondence between the facial makeup and the corresponding facial image with makeup guidance information, the mirror determines the facial image with makeup guidance information that corresponds to the user's selected facial makeup. The image and text instructions may also be displayed to the user. However, this type of smart makeup mirror using images and text can only provide simple guidance, making it difficult to implement graphic guidance for some complex makeup applications, thus failing to address the user's difficulty in getting started. Furthermore, during use of the smart makeup mirror, due to differences in eye distance, the left and right eyebrow makeup areas can be too far or too close. For example, wide-set eyes can cause facial features to appear loose and lifeless, while narrow-set eyes can cause facial features to appear crowded and aggressive, resulting in a poor user experience.

[0086] Therefore, in order to solve the above problems, the present disclosure provides an eyebrow makeup guidance method, device, equipment and medium, which solves the problem that users have difficulty getting started when applying eyebrow makeup and improves user experience.

[0087] First reference Figure 1 , which is a schematic diagram of an application scenario of an embodiment of the present disclosure, including a camera 11, a display screen 12, and a server 13. The camera 11 can be a camera, a mobile phone, a computer camera, etc., and is used to capture facial images; the server 13 is used to process the facial images captured by the camera 11; the display screen 12 is used to display facial makeup and facial images with makeup areas, and to obtain user-triggered operation instructions.

[0088] In an embodiment of the present disclosure, one implementation method of the embodiment of the present disclosure is to, in response to an instruction to display facial makeup, collect a facial image and detect facial key points corresponding to the face in the facial image; in response to an instruction to select facial makeup, determine a makeup guidance model corresponding to the eyebrow part of the face according to the facial makeup parameters in the instruction to select facial makeup, the makeup guidance model including key points corresponding to the eyebrow part and the position relationship of the key points; based on the facial key points, determine the eye length and eye distance, and determine the eye distance type corresponding to the face according to the relationship between the difference between the eye distance and the eye length and a set threshold; based on the facial key points, determine the position of the two side boundaries of the makeup guidance model in the facial image, and when it is determined that the eye distance needs to be adjusted according to the eye distance type, adjust the key points of the two side boundaries in the direction of the eye distance, and after the adjustment, determine the coordinates of each key point of the makeup guidance model in the facial image based on the key point position relationship, obtain a facial image with a makeup area and display it in the display area.

[0089] In an embodiment of the present disclosure, an eyebrow makeup guidance method is provided. Based on the same concept, the present disclosure also provides an eyebrow makeup guidance device, a smart mirror, and a computer-readable storage medium.

[0090] In some embodiments, the eyebrow makeup guidance method provided by the present disclosure is described below through specific embodiments. Figure 2 Shown, including:

[0091] Step 201, in response to a facial makeup display instruction, collecting a facial image and detecting facial key points corresponding to the face in the facial image;

[0092] Step 202, in response to the facial makeup selection instruction, determining a makeup guidance model corresponding to the eyebrows of the face according to the facial makeup parameters in the facial makeup selection instruction, wherein the makeup guidance model includes key points corresponding to the eyebrows and positional relationships of the key points;

[0093] The facial makeup parameters include the type of makeup, the facial part corresponding to the makeup, etc. The makeup guidance model is pre-established.

[0094] Step 203, determining the eye length and eye distance based on the facial key points, and determining the eye distance type corresponding to the face according to the relationship between the difference between the eye distance and the eye length and a set threshold;

[0095] The eye distance types include a first eye distance type (wide eye distance), a second eye distance type (standard eye distance), and a third eye distance type (narrow eye distance).

[0096] Step 204: Based on the facial key points, the positions of the two side boundaries of the makeup guidance model in the facial image are determined. When it is determined that the eye distance needs to be adjusted according to the eye distance type, the key points of the two side boundaries are adjusted in the eye distance direction. After the adjustment, the coordinates of each key point of the makeup guidance model in the facial image are determined based on the positional relationship of the key points, and the facial image with the makeup area is obtained and displayed in the display area.

[0097] Any vertex in the facial image can be used to establish coordinates to determine the positions of the two side boundaries of the makeup guidance model in the facial image, and corresponding adjustments can be made based on the eye distance type. Then, based on the adjusted coordinates of the two side boundaries and the position relationship of the key points, the coordinates of each key point of the makeup guidance model in the facial image can be determined.

[0098] The face image with the makeup area can be a face image with the makeup area formed by each key point in the face image according to the adjusted makeup guidance model, such as Figure 3 or according to the adjusted makeup guidance model, the adjacent key points are connected at the coordinates of each key point in the face image, and the face image with the makeup area formed by connecting the adjacent key points is displayed in the face image, as shown. Figure 4 shown.

[0099] This application presents the eyebrow makeup application area, allowing users to follow the instructions and perfect their makeup, thus solving the problem of users having difficulty getting started. Furthermore, the position of the makeup guidance model within the facial image can be adjusted based on different eye distances, making the user's facial features more beautiful through makeup modification, thus improving the user experience.

[0100] The present invention provides an eyebrow makeup guidance method, the specific process of which is as follows: Figure 5 As shown:

[0101] Step 501, in response to a facial makeup display instruction, collecting a facial image and detecting facial key points corresponding to the face in the facial image;

[0102] This paper uses the MediaPipe open source framework to implement facial key point detection. The facial key point detection method is divided into two steps. First, BlazeFace is used to detect the face image. Then, the face image containing only facial information is input into the face key point detector to detect 468 facial key points. This process is an existing technology and will not be described in detail here. Figure 6As shown in the figure, 468 facial landmarks are located at various locations on the face. MediaPipe is a graph-based cross-platform framework for building machine learning pipelines for multimodal (video, audio, and sensor) applications. MediaPipe runs cross-platform on mobile devices, workstations, and servers, and supports mobile GPU (Graphic Processing Unit) acceleration. Using MediaPipe, you can build an application's machine learning pipeline as a graph of modular components. The platform also supports many commonly used AI (Artificial Intelligence) algorithms, such as portrait segmentation, gesture tracking, and human pose estimation.

[0103] Step 502: In response to the facial makeup selection instruction, determining a makeup guidance model corresponding to the eyebrows of the face according to the facial makeup parameters in the facial makeup selection instruction, wherein the makeup guidance model includes key points corresponding to the eyebrows and positional relationships of the key points.

[0104] Figure 7 This is a display interface according to an exemplary embodiment. The display interface includes a collection of facial images and various facial makeup, including various types of eyebrow shapes, eyeshadow, and the like. In response to a user clicking the button to select an eyebrow shape, the display interface displays an eyebrow shape selection menu and buttons for each eyebrow shape type. Images corresponding to each type of eyebrow shape may also be displayed to facilitate user selection. After the user clicks the button for Type 1 in the eyebrow shape selection, a makeup guidance model corresponding to the eyebrows on the face is determined based on the facial makeup parameters corresponding to Type 1.

[0105] The makeup guidance model is pre-established, and its specific establishment process is as follows:

[0106] Determining a shape and corresponding key points of the makeup guidance model based on the eyebrow makeup corresponding to the makeup guidance model;

[0107] Establishing a coordinate system with the first key point or the second key point on both sides of the makeup guidance model as the origin, and determining the coordinates of each key point in the makeup guidance model;

[0108] Based on the coordinates of each key point in the makeup guidance model, the positional relationship of the key points is determined.

[0109] The method for determining the positional relationship of key points based on the coordinates of each key point in the makeup guidance model is as follows:

[0110] connecting the first key point and the second key point as a first auxiliary line;

[0111] Connect the first key point and each key point in the makeup guidance model respectively, or connect the second key point and each key point in the makeup guidance model respectively, as a second auxiliary line, and determine the angle corresponding to each key point based on the angle between the first auxiliary line and the second auxiliary line.

[0112] For example, Figure 8 This is a schematic diagram of the makeup guidance model for generating eyebrow shapes. The process of establishing this makeup guidance model for the right eyebrow shape is as follows: Taking the 28-point model as an example, a coordinate system is established with the eyebrow start point A of the eyebrow shape as the origin, and the eyebrow end point B is determined. The eyebrow start point A and the eyebrow end point B are connected as the first auxiliary line L1, which is also the X-axis. If the coordinates of point A are (0, 0) and the coordinates of point C are (a, b), points A and C are connected as the second auxiliary line L2. The angle between L1 and L2 is determined, that is, tan(α) = b / a, thereby determining the angle α corresponding to point C. The angle α1 corresponding to point D can also be calculated based on the coordinates of point A and point D. The same method can be used to calculate the angles corresponding to each key point in the makeup guidance model for the right eyebrow shape.

[0113] α and α1 are parameters adjusted based on the characteristics of the right eyebrow shape, representing the direction of the right eyebrow. Constructing a makeup guidance model involves adjusting the angles corresponding to each key point in the model. The makeup guidance model can be adaptively adjusted based on the actual starting point and length corresponding to the actual facial image. For example, the makeup guidance model for the right eyebrow shape can be adaptively adjusted based on the length between the starting and ending points of the right eyebrow in the actual facial image.

[0114] Step 503, determining the eye length and eye distance based on the facial key points;

[0115] The standard five-eye position relationship has a certain proportional relationship, such as Figure 9 As shown, taking the length of the eye as the unit, the horizontal length from the left side of the left eye to the leftmost side of the facial contour, the horizontal length of the left eye, the horizontal length between the inner corners of the two eyes, the horizontal length of the right eye, and the horizontal length from the right side of the right eye to the rightmost side of the facial contour satisfy the proportion relationship of 1:1:1:1:1. Therefore, based on this characteristic relationship, the eye length and eye distance can be determined based on the facial key points, and the positional relationship between them can be found to obtain the characteristics of the eye distance.

[0116] The specific method for determining eye length and eye distance based on facial key points is as follows:

[0117] Establishing a coordinate system with any vertex in the facial image as an origin, and determining the facial midline of the face based on the facial key points;

[0118] Determine the coordinates of a first actual key point and a second actual key point located at the inner and outer corners of the left eye, and the coordinates of a third actual key point and a fourth actual key point located at the inner and outer corners of the right eye in the facial image;

[0119] Determining a first actual distance from the first actual key point to the midline of the face based on the coordinates of the first actual key point and the midline of the face;

[0120] Determining a second actual distance from the second actual key point to the midline of the face based on the coordinates of the second actual key point and the midline of the face;

[0121] Determining a third actual distance from the third actual key point to the midline of the face based on the coordinates of the third actual key point and the midline of the face;

[0122] Determining a fourth actual distance from the fourth actual key point to the midline of the face based on the coordinates of the fourth actual key point and the midline of the face;

[0123] Obtaining the eye length according to an average of a difference between the second actual distance and the first actual distance and a sum of differences between the fourth actual distance and the third actual distance;

[0124] The interocular distance is obtained according to the sum of the first actual distance and the third actual distance.

[0125] The above method for determining the straight line L where the midline of the face is located based on the key points of the face is: in the detection of key points of the face, the 8 points, 168 points, 6 points, 197 points, 195 points, 5 points, and 4 points on the bridge of the nose are distributed on the straight line L as much as possible, or evenly distributed on both sides of the straight line L. Assume that the straight line L is: mx+ny+q=0. The positions of the main key points of the eyes are determined as follows: the two corners of the left eye use the 130 points located at the inner corner of the eye as the second actual key point, and the 133 points located at the outer corner of the eye as the first actual key point. The two corners of the right eye use the 362 points located at the inner corner of the eye as the third actual key point, and the 359 points located at the outer corner of the eye as the fourth actual key point. As Figure 10 As shown in the figure, E(Xe, Ye), F(Xf, Yf), G(Xg, Yg), and I(Xi, Yi) represent the coordinates of the corner points of the two eyes respectively. The horizontal distance S1 between point E and line L is calculated as follows:

[0126] S1=|m*Xe+n*Ye+q| / (m 2 +n 2 );

[0127] Similarly, we can calculate the distance S2 from point F to line L, the distance S3 from point G to line L, and the distance S4 from point I to line L. Since the horizontal lengths of the two eyes of the same person are similar and cannot be completely equal, the average of the horizontal lengths of the two eyes is used as the eye length S: S = ((S1-S2)+(S4-S3)) / 2, and the eye distance SS: SS = S2+S3.

[0128] Step 504: Determine the eye distance type corresponding to the face based on the relationship between the difference between the eye distance and the eye length and a set threshold value. If the face is determined to be of the first eye distance type, execute steps 505-506; if the face is determined to be of the second eye distance type, execute steps 507-508; and if the face is determined to be of the third eye distance type, execute steps 509-510.

[0129] The threshold value can be set based on actual application scenarios. The eye distance types include a first eye distance type (wide eye distance), a second eye distance type (standard eye distance), and a third eye distance type (narrow eye distance).

[0130] Step 505, determining that the eye distance type corresponding to the face is the first eye distance type;

[0131] If the difference between the eye distance and the eye length is greater than a set threshold, the eye distance type corresponding to the face is determined to be the first eye distance type. That is, when SS - S > t (t > 0, and the value of t can be set based on the actual application scenario), the face can be determined to have wide eye distance.

[0132] Step 506: Determine the positions of the two side boundaries of the makeup guidance model in the facial image, adjust the key points of the two side boundaries in a first adjustment direction, and determine the coordinates of each key point of the makeup guidance model in the facial image based on the positional relationship of the key points after the adjustment;

[0133] Faces with widely spaced eyes tend to have scattered features, making them appear listless. Therefore, the eyebrow makeup guide for wide-set eyes should extend toward the center of the face, extending the brow's beginning and end toward the center of the face. This visually brings the features closer together and mitigates any imperfections.

[0134] Therefore, the specific process of the above method is as follows:

[0135] Locating a first key point and a second key point located at two side boundaries of the makeup guidance model, and the coordinates of the first key point and the second key point corresponding to the facial image;

[0136] Draw a perpendicular line from the first key point to the midline of the face, and determine the angle between the perpendicular line and the horizontal axis of the coordinate system as the adjustment angle;

[0137] Determining a first adjustment direction corresponding to the makeup guidance model according to the first eye distance type, and determining an adjustment distance to be adjusted according to the first adjustment direction according to a difference between the eye distance and the eye length;

[0138] After adjusting the first key point coordinates according to the adjustment angle, adjusting the adjustment distance in the first adjustment direction to obtain adjusted first key point coordinates;

[0139] After adjusting the coordinates of the second key point according to the adjustment angle, adjusting the adjustment distance in the first adjustment direction to obtain adjusted coordinates of the second key point;

[0140] Determining the coordinates of each key point of the makeup guidance model in the facial image according to the adjusted first key point coordinates / the adjusted second key point coordinates and the key point position relationship;

[0141] The first adjustment direction is a direction in which the coordinates of each key point of the makeup guidance model in the face image are moved toward the midline of the face.

[0142] like Figure 11 As shown, when the face in the face image is not tilted, in the coordinate system established with the upper left vertex of the face image as the origin, a 28-point right eyebrow makeup guidance model is taken as an example. The first key point of the makeup guidance model is determined to be the eyebrow start point A, and the second key point is the eyebrow end point B. The first key point and the second key point are determined to be 300 points and 383 points in the face image, respectively, corresponding to the first key point coordinate A (X1, Y1) and the second key point coordinate B (X2, Y2). According to the eye length SS and the eye distance, calculate the horizontal distance W that points A and B need to move. This horizontal distance is the horizontal distance perpendicular to the straight line L: W = (SS-S) / 2;

[0143] Then, point A needs to move a distance W closer to the horizontal direction perpendicular to line L to get point A'. The coordinates of point A' (X1', Y1') are:

[0144] X1′=X1-W;

[0145] Y1′=Y1;

[0146] According to the above method, the distance W that point B moves toward the horizontal direction perpendicular to line L can be obtained to obtain the coordinates of point B' (X2', Y2').

[0147] The step of determining the coordinates of each key point of the makeup guidance model in the face image based on the adjusted first key point coordinates / the adjusted second key point coordinates and the key point position relationship includes:

[0148] Calculating a first distance between the adjusted first key point and the second key point based on the adjusted coordinates of the first key point and the second key point, and determining a second distance in the horizontal direction between two adjacent key points corresponding to any adjacent key points in the makeup guidance model in the facial image based on the positional relationship of the key points in the makeup guidance model and the first distance;

[0149] The coordinates of each key point of the makeup guidance model in the facial image are determined based on the adjusted first key point coordinates / the adjusted second key point coordinates, the second distance, and the angle corresponding to each key point in the key point position relationship.

[0150] The method for determining the coordinates of each key point of the makeup guidance model in the face image includes the following two methods:

[0151] The first method is to determine adjacent key points of the adjusted first key point, and determine the abscissa of the adjacent key point according to the angle corresponding to the adjacent key point, the abscissa of the adjusted first key point, and the second distance; and determine the ordinate of the adjacent key point according to the angle corresponding to the adjacent key point, the ordinate of the adjusted first key point, and the second distance;

[0152] like Figure 11 As shown, the first distance between point A' and point B' is l = ((X1'-X2') 2 +(Y1′-Y2′) 2 ) 1 / 2 Assuming that the distance between points A' and B' in the key point position relationship in the eyebrow guidance model is evenly divided into 14 parts, the horizontal second distance between any two adjacent key points corresponding to the two adjacent key points in the facial image is d = 1 / 14. Determine the angle θ corresponding to point C'. The coordinates (X3', Y3') of point C' are obtained by the following formula:

[0153] X3'=X1'+d;

[0154] Y3'=Y1'-tan(θ)*d;

[0155] The coordinates of point D' (X4', Y4') can be further obtained based on the coordinates of point C':

[0156] X4'=X3'+d;

[0157] Y4'=Y3'-tan(θ1)*d;

[0158] Among them, θ1 is the angle corresponding to point D.

[0159] The second method is to determine the adjacent key points of the adjusted second key point, and determine the horizontal coordinate of the adjacent key point according to the angle corresponding to the adjacent key point, the horizontal coordinate of the adjusted second key point and the second distance; and determine the vertical coordinate of the adjacent key point according to the angle corresponding to the adjacent key point, the vertical coordinate of the adjusted second key point and the second distance.

[0160] like Figure 12 As shown, in the coordinate system established with the upper left vertex of the face image as the origin, the first distance between point A' and point B' is l=((X1'-X2') 2 +(Y1'-Y2') 2 ) 1 / 2 Assuming that the distance between points A' and B' in the key point position relationship of the makeup guidance model is divided into 14 equal parts, the second distance is d = 1 / 14, and the angle θ corresponding to point C' is determined. The coordinates of point C' (X3', Y3') are shown in the following formula:

[0161] X3'=X2'-d;

[0162] Y3'=Y2'-tan(θ)*d;

[0163] The coordinates of point D (X4', Y4') can be further obtained based on the coordinates of point C:

[0164] X4'=X3'-d;

[0165] Y4'=Y3'-tan(θ1)*d;

[0166] Among them, θ1 is the angle corresponding to point D.

[0167] like Figure 13 As shown, when the face in the face image is tilted to the right, in the coordinate system established with the upper left vertex of the face image as the origin, take the 28-point right eyebrow makeup guidance model as an example. Determine the first key point of the makeup guidance model as the eyebrow start point A, the second key point as the eyebrow end point B, and determine the first key point and the second key point at 300 points and 383 points in the face image, respectively, corresponding to the first key point coordinate A (X1, Y1) and the second key point coordinate B (X2, Y2). According to the eye length SS and the eye distance, calculate the horizontal distance W that points A and B need to move. This horizontal distance is the horizontal distance perpendicular to the straight line L: W = (SS-S) / 2;

[0168] Then, point A needs to be moved a distance W closer to the horizontal direction perpendicular to line L to reach point A'. This means drawing a perpendicular line from point A to line L. Assume that the angle between the perpendicular line and the horizontal direction is ψ, which can be calculated from the known slope of line L. The coordinates of point A' (X1', Y1') are:

[0169] X1′=X1-cos(ψ)*W;

[0170] Y1′=Y1-sin(ψ)*W;

[0171] According to the above method, the distance W that point B moves toward the horizontal direction perpendicular to line L can be obtained to obtain the coordinates of point B' (X2', Y2').

[0172] The coordinates of each key point of the makeup guidance model in the face image can be determined based on the relationship between the coordinates of point A' and the position of the key points, such as Figure 13 As shown, specifically:

[0173] The first distance between point A' and point B' is l = ((X1'-X2') 2 +(Y1′-Y2′) 2 ) 1 / 2 Assuming that the distance between point A' and point B' in the key point position relationship in the eyebrow guidance model is divided into 14 equal parts, the second distance is d=1 / 14, and the angle θ corresponding to point C' is determined.

[0174] When the angle θ corresponding to point C' is greater than ψ, the coordinates of point C' (X3', Y3') are obtained by the following formula:

[0175] Calculate the distance between A' and C': r = d / cos(θ);

[0176] X3′=X1′+cos(θ-ψ)*r;

[0177] Y3′=Y1′-sin(θ-ψ)*r;

[0178] The coordinates of other key points of the makeup guidance model in the face image can be determined according to the above method.

[0179] When the angle θ corresponding to point C' is less than or equal to ψ, the coordinates of point C' (X3', Y3') are obtained by the following formula:

[0180] Calculate the distance between A' and C': r = d / cos(θ);

[0181] X3′=X1′+cos(ψ-θ)*r;

[0182] Y3′=Y1′+sin(ψ-θ)*r;

[0183] The coordinates of other key points of the makeup guidance model in the face image can be adjusted according to the above method.

[0184] The coordinates of each key point of the makeup guidance model in the face image can also be determined based on the relationship between the coordinates of point B' and the position of the key points, specifically:

[0185] The first distance between point A' and point B' is l = ((X1'-X2') 2 +(Y1′-Y2′) 2 ) 1 / 2 Assuming that the distance between points A' and B' in the key point position relationship in the eyebrow guidance model is divided into 14 equal parts, the second distance is d = 1 / 14. Determine point C' adjacent to point B' and determine the angle θ corresponding to point C'. When the angle θ corresponding to point C' is greater than ψ, the coordinates of point C' (X3', Y3') are obtained by the following formula:

[0186] Calculate the distance between B' and C': r = d / cos(θ);

[0187] X3′=X2′-cos(θ+ψ)*r;

[0188] Y3′=Y2′-sin(θ+ψ)*r;

[0189] The coordinates of other key points of the makeup guidance model in the face image can be adjusted according to the above method.

[0190] like Figure 14 As shown, when the face in the face image is tilted to the left, in the coordinate system established with the upper left vertex of the face image as the origin, take the 28-point right eyebrow makeup guidance model as an example. Determine that the first key point of the makeup guidance model is the eyebrow start point A, and the second key point is the eyebrow end point B. Determine that the first key point and the second key point are 300 points and 383 points in the face image, respectively, corresponding to the first key point coordinate A (X1, Y1) and the second key point coordinate B (X2, Y2). According to the eye length SS and the eye distance, calculate the horizontal distance W that points A and B need to move. This horizontal distance is the horizontal distance perpendicular to the straight line L: W = (SS-S) / 2;

[0191] Then, point A needs to be moved a distance W closer to the horizontal direction perpendicular to line L to reach point A'. This means drawing a perpendicular line from point A to line L. Assume that the angle between the perpendicular line and the horizontal direction is ψ, which can be calculated from the known slope of line L. The coordinates of point A' (X1', Y1') are:

[0192] X1′=X1-cos(ψ)*W;

[0193] Y1′=Y1+sin(ψ)*W;

[0194] According to the above method, the distance W that point B moves toward the horizontal direction perpendicular to line L can be obtained to obtain the coordinates of point B' (X2', Y2').

[0195] The coordinates of each key point of the makeup guidance model in the face image can be determined based on the relationship between the coordinates of point A' and the position of the key points, such as Figure 14 As shown, specifically:

[0196] The first distance between point A' and point B' is l = ((X1'-X2') 2 +(Y1′-Y2′) 2 ) 1 / 2 Assuming that the distance between points A' and B' in the eyebrow guidance model is divided into 14 equal parts, the second distance is d = 1 / 14. Determine the angle θ corresponding to point C'. The coordinates (X3', Y3') of point C' are obtained using the following formula:

[0197] Calculate the distance between A' and C': r = d / cos(θ);

[0198] X3′=X1′+cos(θ+ψ)*r;

[0199] Y3′=Y1′-sin(θ+ψ)*r;

[0200] The coordinates of other key points of the makeup guidance model in the face image can be determined according to the above method.

[0201] The coordinates of each key point of the makeup guidance model in the face image can be determined based on the relationship between the coordinates of point B' and the position of the key points, specifically:

[0202] The first distance between point A' and point B' is l = ((X1'-X2') 2 +(Y1′-Y2′) 2 ) 1 / 2 Assuming that the distance between point A' and point B' in the key point position relationship in the eyebrow guidance model is divided into 14 equal parts, the second distance is d=1 / 14, and the angle θ corresponding to point C' is determined.

[0203] When the angle θ corresponding to point C' is greater than ψ, the coordinates of point C' (X3', Y3') are obtained by the following formula:

[0204] Calculate the distance between B' and C': r = d / cos(θ);

[0205] X3′=X2′-cos(θ-ψ)*r;

[0206] Y3′=Y2′-sin(θ-ψ)*r;

[0207] The coordinates of other key points of the makeup guidance model in the face image can be determined according to the above method.

[0208] When the angle θ corresponding to point C' is less than or equal to ψ, the coordinates of point C' (X3', Y3') are obtained by the following formula:

[0209] Calculate the distance between A' and C': r = d / cos(θ);

[0210] X3′=X2′-cos(ψ-θ)*r;

[0211] Y3′=Y2′+sin(ψ-θ)*r;

[0212] The coordinates of other key points of the makeup guidance model in the face image can be adjusted according to the above method.

[0213] Step 507, determining that the eye distance type corresponding to the face is the second eye distance type;

[0214] If the absolute value of the difference between the eye distance and the eye length is less than or equal to a set threshold, the eye distance type corresponding to the face is determined to be the second eye distance type. That is, when |SS-S|<=t, the eye distance of the face can be determined to be relatively standard.

[0215] Step 508: Determine the positions of the boundaries of both sides of the makeup guidance model in the face image, and determine the coordinates of each key point of the makeup guidance model in the face image based on the key point position relationship;

[0216] When it is determined that the eye distance does not need to be adjusted, the coordinates of each key point of the makeup guidance model in the face image are determined by the following method:

[0217] Calculating a third distance between a first key point on one side of the makeup guidance model and the second key point on the other side of the makeup guidance model based on the coordinates of a first key point corresponding to the first key point on the facial image, and determining a fourth distance in the horizontal direction between two adjacent key points in the facial image corresponding to any adjacent key points in the makeup guidance model based on the positional relationship between the key points in the makeup guidance model and the third distance;

[0218] determining the coordinates of each key point of the makeup guidance model in the facial image according to the first key point coordinates / the second key point coordinates, the fourth distance, and the angle corresponding to each key point in the key point position relationship;

[0219] Among them, the angle corresponding to each key point in the key point position relationship is determined by the angle between the first auxiliary line and the second auxiliary line; the first auxiliary line is obtained by connecting the first key point and the second key point, and the second auxiliary line is obtained by respectively connecting the first key point and each key point in the makeup guidance model, or respectively connecting the second key point and each key point in the makeup guidance model.

[0220] like Figure 15 As shown, when the face in the face image is not tilted, in the coordinate system established with the upper left vertex of the face image as the origin, a 28-point right eyebrow makeup guidance model is taken as an example. The first key point of the makeup guidance model is determined to be the eyebrow start point A, and the second key point is the eyebrow end point B, corresponding to the first key point coordinate A (X1, Y1) and the second key point coordinate B (X2, Y2). The first distance between point A and point B is l = ((X1-X2) 2 +(Y1-Y2) 2 ) 1 / 2 Assuming that the distance between point A and point B in the key point position relationship in the eyebrow guidance model is divided into 14 equal parts, the third distance is d=l / 14, and the angle θ corresponding to point C is determined.

[0221] The coordinates of each key point of the makeup guidance model in the face image can be determined based on the relationship between the coordinates of point A and the position of the key points. The coordinates of point C (X3, Y3) are obtained by the following formula:

[0222] X3=X1+d;

[0223] Y3=Y1-tan(θ)*d;

[0224] The coordinates of point D (X4, Y4) can be further obtained based on the coordinates of point C:

[0225] X4=X3+d;

[0226] Y4=Y3-tan(θ1)*d;

[0227] Among them, θ1 is the angle corresponding to point D.

[0228] Alternatively, the coordinates of each key point of the makeup guidance model in the face image can be determined based on the relationship between the coordinates of point B and the position of the key points. The coordinates (X3, Y3) of point C adjacent to point B can be obtained by the following formula:

[0229] X3=X2-d;

[0230] Y3=Y2-tan(θ)*d;

[0231] The coordinates of point D (X4, Y4) can be further obtained based on the coordinates of point C:

[0232] X4 = X3-d;

[0233] Y4=Y3-tan(θ1)*d;

[0234] Among them, θ1 is the angle corresponding to point D.

[0235] like Figure 16 As shown, when the face in the face image is tilted to the right, in the coordinate system established with the upper left vertex of the face image as the origin, take the 28-point right eyebrow makeup guidance model as an example. The first key point of the makeup guidance model is determined to be the eyebrow start point A, and the second key point is the eyebrow end point B, which correspond to the first key point coordinates A (X1, Y1) and the second key point coordinates B (X2, Y2) respectively. The third distance between point A and point B is l = ((X1-X2) 2 +(Y1-Y2) 2 ) 1 / 2 , the inclination angle σ is tan(σ)=(Y2-Y1) / (X2-X1).

[0236] The coordinates of each key point of the makeup guidance model in the face image can be determined based on the relationship between the coordinates of point A and the position of the key points, such as Figure 16 As shown, specifically:

[0237] Assuming that the distance between point A and point B in the key point position relationship in the makeup guidance model is divided into 14 equal parts, the fourth distance is d=1 / 14, and the angle θ corresponding to point C is determined.

[0238] When the angle θ corresponding to point C is greater than σ, the coordinates of point C (X3, Y3) are obtained by the following formula:

[0239] Calculate the distance between A and C: r = d / cos(θ);

[0240] X3=X1+cos(θ-σ)*r;

[0241] Y3=Y1-sin(θ-σ)*r;

[0242] The coordinates of other key points of the makeup guidance model in the face image can be determined according to the above method.

[0243] When the angle θ corresponding to point C is less than or equal to σ, the coordinates of point C (X3, Y3) are obtained by the following formula:

[0244] Calculate the distance between A and C: r = d / cos(θ);

[0245] X3=X1+cos(σ-θ)*r;

[0246] Y3=Y1+sin(σ-θ)*r;

[0247] The coordinates of other key points of the makeup guidance model in the face image can be determined according to the above method.

[0248] The coordinates of each key point of the makeup guidance model in the face image can also be determined based on the relationship between the coordinates of point B and the position of the key points, specifically:

[0249] Assuming that the distance between points A and B is divided into 14 equal parts, the fourth distance is d = 1 / 14. Determine point C adjacent to point B and determine the angle θ corresponding to point C. The coordinates (X3, Y3) of point C are obtained using the following formula:

[0250] Calculate the distance between B and C: r = d / cos(θ);

[0251] X3=X2-cos(θ+σ)*r;

[0252] Y3=Y2-sin(θ+σ)*r;

[0253] The coordinates of other key points of the makeup guidance model in the face image can be determined according to the above method.

[0254] like Figure 17 As shown, when the face in the face image is tilted to the left, in the coordinate system established with the upper left vertex of the face image as the origin, a 28-point right eyebrow makeup guidance model is taken as an example. The first key point of the makeup guidance model is determined to be the eyebrow start point A, and the second key point is the eyebrow end point B, which correspond to the first key point coordinates A (X1, Y1) and the second key point coordinates B (X2, Y2) respectively. The third distance between point A and point B is l = ((X1-X2) 2 +(Y1-Y2) 2 ) 1 / 2 , the inclination angle σ is tan(σ)=(Y2-Y1) / (X2-X1).

[0255] The coordinates of each key point of the makeup guidance model in the face image can be determined based on the relationship between the coordinates of point A and the position of the key points, such as Figure 17 As shown, specifically:

[0256] Assuming that the distance between points A and B in the key point position relationship of the makeup guidance model is divided into 14 equal parts, the fourth distance is d = 1 / 14, and the angle θ corresponding to point C is determined. The coordinates of point C (X3, Y3) are obtained by the following formula:

[0257] Calculate the distance between A and C: r = d / cos(θ);

[0258] X3=X1+cos(θ+σ)*r;

[0259] Y3=Y1-sin(θ+σ)*r;

[0260] The coordinates of other key points of the makeup guidance model in the face image can be determined according to the above method.

[0261] The coordinates of each key point of the makeup guidance model in the face image can also be determined based on the relationship between the coordinates of point B and the position of the key points, specifically:

[0262] Assuming that the distance between point A and point B is divided into 14 equal parts, the fourth distance is d=1 / 14. Point C adjacent to point B is determined, and the angle θ corresponding to point C is determined.

[0263] When the angle θ corresponding to point C is greater than σ, the coordinates of point C (X3, Y3) are obtained by the following formula:

[0264] Calculate the distance between B and C: r = d / cos(θ);

[0265] X3=X2-cos(θ-σ)*r;

[0266] Y3=Y2-sin(θ-σ)*r;

[0267] The coordinates of other key points of the makeup guidance model in the face image can be determined according to the above method.

[0268] When the angle θ corresponding to point C is less than or equal to σ, the coordinates of point C (X3, Y3) are obtained by the following formula:

[0269] Calculate the distance between B and C: r = d / cos(θ);

[0270] X3=X2-cos(σ-θ)*r;

[0271] Y3=Y2+sin(σ-θ)*r;

[0272] The coordinates of other key points of the makeup guidance model in the face image can be adjusted according to the above method.

[0273] Step 509, determining that the eye distance type corresponding to the face is the third eye distance type;

[0274] If the difference between the eye distance and the eye length is less than the negative value of the set threshold, the eye distance type corresponding to the face is determined to be the third eye distance type. That is, when SS-S<-t, the face can be determined to have a narrow eye distance.

[0275] Step 510: Determine the positions of the boundaries of the makeup guidance model on the face image, adjust the key points of the boundaries on both sides in a second adjustment direction, and determine the coordinates of each key point of the makeup guidance model in the face image based on the positional relationship of the key points after the adjustment;

[0276] Faces with narrowly spaced eyes tend to have more concentrated features, which can easily give the impression of being fierce. This requires visually stretching the features outward to reduce the visual discomfort. Therefore, the eyebrow makeup guide for narrowly spaced eyes requires an overall outward extension, with the brow starting and ending points extending outward to the sides of the face. This visually stretches the features and modifies any imperfections.

[0277] Therefore, the specific process of the above method is as follows:

[0278] Locating a first key point and a second key point located at two side boundaries of the makeup guidance model, and the coordinates of the first key point and the second key point corresponding to the facial image;

[0279] determining an adjustment distance according to a difference between the interocular distance and the eye length;

[0280] Draw a perpendicular line from the first key point to the midline of the face, and determine the angle between the perpendicular line and the horizontal axis of the coordinate system as the adjustment angle;

[0281] determining, according to the third eye distance type, a second adjustment direction corresponding to the makeup guidance model;

[0282] Determining the adjusted coordinates of the first key point according to the adjustment angle, the second adjustment direction, the adjustment distance, and the coordinates of the first key point;

[0283] Determine the adjusted coordinates of the second key point according to the adjustment angle, the second adjustment direction, the adjustment distance, and the coordinates of the second key point;

[0284] Determining the coordinates of each key point of the makeup guidance model in the facial image according to the adjusted first key point coordinates / the adjusted second key point coordinates and the key point position relationship;

[0285] The second adjustment direction is to move the coordinates of each key point of the makeup guidance model in the facial image away from the midline of the face.

[0286] like Figure 18 As shown, when the face in the face image is not tilted, in the coordinate system established with the upper left vertex of the face image as the origin, a 28-point right eyebrow makeup guidance model is taken as an example. The first key point of the makeup guidance model is determined to be the eyebrow start point A, and the second key point is the eyebrow end point B, corresponding to the first key point coordinates A (X1, Y1) and the second key point coordinates B (X2, Y2) respectively. According to the eye length SS and the eye distance, calculate the horizontal distance W that points A and B need to move. This horizontal distance is the horizontal distance perpendicular to the straight line L: W = (SS-S) / 2;

[0287] Then, point A needs to be moved away from point W in the horizontal direction perpendicular to line L to get point A'. The coordinates of point A' (X1', Y1') are:

[0288] X1′=X1+W;

[0289] Y1′=Y1;

[0290] According to the above method, the distance of point B from point W in the horizontal direction perpendicular to line L can be obtained to obtain the coordinates of point B' (X2', Y2').

[0291] like Figure 18 As shown, the first distance between point A' and point B' is l = ((X1'-X2') 2 +(Y1′-Y2′) 2 ) 1 / 2 Assuming that the distance between point A' and point B' in the key point position relationship in the eyebrow guidance model is divided into 14 equal parts, the second distance is d=1 / 14, and the angle θ corresponding to point C' is determined.

[0292] The coordinates of each key point of the makeup guidance model in the face image can be determined based on the relationship between the coordinates of point A' and the position of the key points. The coordinates of point C' (X3', Y3') can be obtained by the following formula:

[0293] X3'=X1'+d;

[0294] Y3'=Y1'-tan(θ)*d;

[0295] The coordinates of point D' (X4', Y4') can be further obtained based on the coordinates of point C':

[0296] X4'=X3'+d;

[0297] Y4'=Y3'-tan(θ1)*d;

[0298] Among them, θ1 is the angle corresponding to point D.

[0299] The coordinates of each key point of the makeup guidance model in the face image can also be determined based on the relationship between the coordinates of point B' and the position of the key points. The coordinates (X3', Y3') of point C' adjacent to point B' are obtained by the following formula:

[0300] X3'=X2'-d;

[0301] Y3'=Y2'-tan(θ)*d;

[0302] The coordinates of point D' (X4', Y4') can be further obtained based on the coordinates of point C':

[0303] X4'=X3'-d;

[0304] Y4'=Y3'-tan(θ1)*d;

[0305] Among them, θ1 is the angle corresponding to point D.

[0306] like Figure 19 As shown, when the face in the face image is tilted to the right, in the coordinate system established with the upper left vertex of the face image as the origin, take the 28-point right eyebrow makeup guidance model as an example. Determine the first key point of the makeup guidance model as the eyebrow start point A, the second key point as the eyebrow end point B, and determine the first key point and the second key point at 300 points and 383 points in the face image, respectively, corresponding to the first key point coordinate A (X1, Y1) and the second key point coordinate B (X2, Y2). According to the eye length SS and the eye distance, calculate the horizontal distance W that points A and B need to move. This horizontal distance is the horizontal distance perpendicular to the straight line L: W = (SS-S) / 2;

[0307] Then, point A needs to be moved a distance W closer to the horizontal direction perpendicular to line L to reach point A'. This means drawing a perpendicular line from point A to line L. Assume that the angle between the perpendicular line and the horizontal direction is ψ, which can be calculated from the known slope of line L. The coordinates of point A' (X1', Y1') are:

[0308] X1′=X1+cos(ψ)*W;

[0309] Y1′=Y1-sin(ψ)*W;

[0310] According to the above method, the distance W that point B moves toward the horizontal direction perpendicular to line L can be obtained to obtain the coordinates of point B' (X2', Y2').

[0311] The coordinates of each key point of the makeup guidance model in the face image can be determined based on the relationship between the coordinates of point A' and the position of the key points, such as Figure 19 As shown, specifically:

[0312] The first distance between point A' and point B' is l = ((X1'-X2') 2 +(Y1′-Y2′) 2 ) 1 / 2 Assuming that the distance between points A' and B' in the eyebrow guidance model is divided into 14 equal parts, the second distance is d = 1 / 14. Determine the angle θ corresponding to point C'. The coordinates (X3', Y3') of point C' are obtained using the following formula:

[0313] Calculate the distance between A' and C': r = d / cos(θ);

[0314] X3′=X1′+cos(θ+ψ)*r;

[0315] Y3′=Y1′-sin(θ+ψ)*r;

[0316] The coordinates of other key points of the makeup guidance model in the face image can be determined according to the above method.

[0317] The coordinates of each key point of the makeup guidance model in the face image can also be determined based on the relationship between the coordinates of point B' and the position of the key points, specifically:

[0318] The first distance between point A' and point B' is l = ((X1'-X2') 2 +(Y1′-Y2′) 2 ) 1 / 2 Assuming that the distance between point A' and point B' in the key point position relationship in the eyebrow guidance model is evenly divided into 14 parts, the second distance is d=l / 14, and point C' adjacent to point B' is determined, and the angle θ corresponding to point C' is determined.

[0319] When the angle θ corresponding to point C' is greater than ψ, the coordinates of point C' (X3', Y3') are obtained by the following formula:

[0320] Calculate the distance between B' and C': r = d / cos(θ);

[0321] X3′=X2′-cos(θ-ψ)*r;

[0322] Y3′=X2′-sin(θ-ψ)*r;

[0323] The coordinates of other key points of the makeup guidance model in the face image can be determined according to the above method.

[0324] When the angle θ corresponding to point C' is less than or equal to ψ, the coordinates of point C' (X3', Y3') are obtained by the following formula:

[0325] Calculate the distance between A' and C': r = d / cos(θ);

[0326] X3′=X2′-cos(ψ-θ)*r;

[0327] Y3′=X2′+sin(ψ-θ)*r;

[0328] The coordinates of other key points of the makeup guidance model in the face image can be adjusted according to the above method.

[0329] like Figure 20As shown, when the face in the face image is tilted to the right, in the coordinate system established with the upper left vertex of the face image as the origin, take the 28-point right eyebrow makeup guidance model as an example. Determine the first key point of the makeup guidance model as the eyebrow start point A, the second key point as the eyebrow end point B, and determine the first key point and the second key point at 300 points and 383 points in the face image, respectively, corresponding to the first key point coordinate A (X1, Y1) and the second key point coordinate B (X2, Y2). According to the eye length SS and the eye distance, calculate the horizontal distance W that points A and B need to move. This horizontal distance is the horizontal distance perpendicular to the straight line L: W = (SS-S) / 2;

[0330] Then, point A needs to be moved a distance W closer to the horizontal direction perpendicular to line L to reach point A'. This means drawing a perpendicular line from point A to line L. Assume that the angle between the perpendicular line and the horizontal direction is ψ, which can be calculated from the known slope of line L. The coordinates of point A' (X1', Y1') are:

[0331] X1′=X1+cos(ψ)*W;

[0332] Y1′=Y1+sin(ψ)*W;

[0333] According to the above method, the distance W that point B moves toward the horizontal direction perpendicular to line L can be obtained to obtain the coordinates of point B' (X2', Y2').

[0334] The coordinates of each key point of the makeup guidance model in the face image can be determined based on the relationship between the coordinates of point A' and the position of the key points, such as Figure 20 As shown, specifically:

[0335] The first distance between point A' and point B' is l = ((X1'-X2') 2 +(Y1′-Y2′) 2 ) 1 / 2 Assuming that the distance between point A' and point B' in the key point position relationship in the eyebrow guidance model is divided into 14 equal parts, the second distance is d=1 / 14, and the angle θ corresponding to point C' is determined.

[0336] When the angle θ corresponding to point C' is greater than ψ, the coordinates of point C' (X3', Y3') are obtained by the following formula:

[0337] Calculate the distance between A' and C': r = d / cos(θ);

[0338] X3′=X1′+cos(θ-ψ)*r;

[0339] Y3′=Y1′-sin(θ-ψ)*r;

[0340] The coordinates of other key points of the makeup guidance model in the face image can be determined according to the above method.

[0341] When the angle θ corresponding to point C' is less than or equal to ψ, the coordinates of point C' (X3', Y3') are obtained by the following formula:

[0342] Calculate the distance between A' and C': r = d / cos(θ);

[0343] X3′=X1′+cos(ψ-θ)*r;

[0344] Y3′=Y1′+sin(ψ-θ)*r;

[0345] The coordinates of other key points of the makeup guidance model in the face image can be adjusted according to the above method.

[0346] The coordinates of each key point of the makeup guidance model in the face image can be determined based on the relationship between the coordinates of point B' and the position of the key points, specifically:

[0347] The first distance between point A' and point B' is l = ((X1'-X2') 2 +(Y1′-Y2′) 2 ) 1 / 2 Assuming that the distance between points A' and B' in the eyebrow guidance model is divided into 14 equal parts, the second distance is d = 1 / 14. Determine the angle θ corresponding to point C'. The coordinates (X3', Y3') of point C' are obtained using the following formula:

[0348] Calculate the distance between B' and C': r = d / cos(θ);

[0349] X3′=X2′-cos(θ+ψ)*r;

[0350] Y3′=Y2′-sin(θ+ψ)*r;

[0351] The coordinates of other key points of the makeup guidance model in the face image can be determined according to the above method.

[0352] Step 511: obtain a face image with a makeup area and display it in a display area.

[0353] Based on pre-built makeup guidance models for different makeup styles, we collaborate with professional beauty agencies to build a makeup application library that includes different styles and popular makeup looks, and display corresponding color schemes for different application methods. To facilitate step-by-step learning, the makeup areas corresponding to the facial images displayed in the display area can be annotated with makeup colors and the order in which they should be applied. In addition, detailed descriptions of each step in the makeup sequence can also be displayed in the display area, making it easier for users to learn makeup step by step. The display area shows a facial image with an eyebrow makeup area, and the colors in the color wheel are displayed on the right side of the display area. The makeup colors and the order in which they should be applied are also annotated in the makeup areas corresponding to the facial images displayed in the display area.

[0354] Figure 21 A display interface is shown according to an exemplary embodiment. The display interface includes an interface for displaying the makeup area of ​​a collected facial image and an auxiliary information display area. If the user clicks the button of type 1 in the eyebrow shape, a facial image with a makeup area corresponding to the eyebrow shape will be displayed in the display interface, and the makeup area in the facial image is marked with the makeup order and makeup color. For example, the makeup area of ​​the left eyebrow makeup corresponds to step 1 and color A, and the makeup area of ​​the right eyebrow makeup corresponds to step 2 and color A. In addition, text information related to makeup can also be displayed in the display area, and the various colors of the color wheel can also be displayed to facilitate the user to select the corresponding makeup color. After the user completes the makeup, he can click the End Makeup Guidance button to end the makeup guidance.

[0355] In some embodiments, based on the same inventive concept, the embodiments of the present disclosure also provide an eyebrow makeup guidance device. Since the device is the device in the method in the embodiments of the present disclosure, and the principle of solving the problem by the device is similar to that of the method, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0356] like Figure 22 As shown, the above device includes the following modules:

[0357] A key point detection module 221 is configured to capture a facial image in response to a facial makeup display instruction and detect facial key points corresponding to the face in the facial image;

[0358] a model determination module 222 for determining, in response to a facial makeup selection instruction, a makeup guidance model corresponding to the eyebrows of the face according to facial makeup parameters in the facial makeup selection instruction, the makeup guidance model including key points corresponding to the eyebrows and positional relationships of the key points;

[0359] an eye distance type determination module 223 for determining eye length and eye distance based on the facial key points, and determining the eye distance type corresponding to the face based on a relationship between a difference between the eye distance and the eye length and a set threshold;

[0360] The coordinate adjustment module 224 is used to determine the positions of the two side boundaries of the makeup guidance model in the facial image based on the facial key points, and when it is determined that the eye distance needs to be adjusted according to the eye distance type, adjust the key points of the two side boundaries in the eye distance direction. After the adjustment, the coordinates of each key point of the makeup guidance model in the facial image are determined based on the position relationship of the key points, and the facial image with the makeup area is obtained and displayed in the display area.

[0361] As an optional implementation manner, the eye distance type determination module is configured to:

[0362] Establishing a coordinate system with any vertex in the facial image as an origin, and determining the facial midline of the face based on the facial key points;

[0363] Determine the coordinates of a first actual key point and a second actual key point located at the inner and outer corners of the left eye, and the coordinates of a third actual key point and a fourth actual key point located at the inner and outer corners of the right eye in the facial image;

[0364] Determining a first actual distance from the first actual key point to the midline of the face based on the coordinates of the first actual key point and the midline of the face;

[0365] Determining a second actual distance from the second actual key point to the midline of the face based on the coordinates of the second actual key point and the midline of the face;

[0366] Determining a third actual distance from the third actual key point to the midline of the face based on the coordinates of the third actual key point and the midline of the face;

[0367] Determining a fourth actual distance from the fourth actual key point to the midline of the face based on the coordinates of the fourth actual key point and the midline of the face;

[0368] Obtaining the eye length according to an average of a difference between the second actual distance and the first actual distance and a sum of differences between the fourth actual distance and the third actual distance;

[0369] The interocular distance is obtained according to the sum of the first actual distance and the third actual distance.

[0370] As an optional implementation manner, the eye distance type determination module is configured to:

[0371] If the difference between the eye distance and the eye length is greater than a set threshold, determining that the eye distance type corresponding to the face is the first eye distance type;

[0372] If the absolute value of the difference between the eye distance and the eye length is less than or equal to a set threshold, determining that the eye distance type corresponding to the face is the second eye distance type;

[0373] If the difference between the eye distance and the eye length is smaller than a negative value of a set threshold, it is determined that the eye distance type corresponding to the face is the third eye distance type.

[0374] As an optional implementation manner, when the eye distance type is the first eye distance type, the coordinate adjustment module is configured to:

[0375] Locating a first key point and a second key point located at two side boundaries of the makeup guidance model, and the coordinates of the first key point and the second key point corresponding to the facial image;

[0376] Draw a perpendicular line from the first key point to the midline of the face, and determine the angle between the perpendicular line and the horizontal axis of the coordinate system as the adjustment angle;

[0377] Determining a first adjustment direction corresponding to the makeup guidance model according to the first eye distance type, and determining an adjustment distance to be adjusted according to the first adjustment direction according to a difference between the eye distance and the eye length;

[0378] After adjusting the first key point coordinates according to the adjustment angle, adjusting the adjustment distance in the first adjustment direction to obtain adjusted first key point coordinates;

[0379] After adjusting the coordinates of the second key point according to the adjustment angle, adjusting the adjustment distance in the first adjustment direction to obtain adjusted coordinates of the second key point;

[0380] Determining the coordinates of each key point of the makeup guidance model in the facial image according to the adjusted first key point coordinates / the adjusted second key point coordinates and the key point position relationship;

[0381] The first adjustment direction is a direction in which the coordinates of each key point of the makeup guidance model in the face image are moved toward the midline of the face.

[0382] As an optional implementation manner, when the eye distance type is the third eye distance type, the coordinate adjustment module is configured to:

[0383] Locating a first key point and a second key point located at two side boundaries of the makeup guidance model, and the coordinates of the first key point and the second key point corresponding to the facial image;

[0384] determining an adjustment distance according to a difference between the interocular distance and the eye length;

[0385] Draw a perpendicular line from the first key point to the midline of the face, and determine the angle between the perpendicular line and the horizontal axis of the coordinate system as the adjustment angle;

[0386] determining, according to the third eye distance type, a second adjustment direction corresponding to the makeup guidance model;

[0387] Determining the adjusted coordinates of the first key point according to the adjustment angle, the second adjustment direction, the adjustment distance, and the coordinates of the first key point;

[0388] Determine the adjusted coordinates of the second key point according to the adjustment angle, the second adjustment direction, the adjustment distance, and the coordinates of the second key point;

[0389] Determining the coordinates of each key point of the makeup guidance model in the facial image according to the adjusted first key point coordinates / the adjusted second key point coordinates and the key point position relationship;

[0390] The second moving direction is a direction in which the coordinates of each key point of the makeup guidance model in the facial image are moved away from the midline of the face.

[0391] As an optional implementation manner, the coordinate adjustment module is used to:

[0392] Calculating a first distance between the adjusted first key point and the second key point based on the adjusted coordinates of the first key point and the second key point, and determining a second distance in the horizontal direction between two adjacent key points corresponding to any adjacent key points in the makeup guidance model in the facial image based on the positional relationship of the key points in the makeup guidance model and the first distance;

[0393] determining the coordinates of each key point of the makeup guidance model in the facial image according to the adjusted first key point coordinates / the adjusted second key point coordinates, the second distance, and the angle corresponding to each key point in the key point position relationship;

[0394] Among them, the angle corresponding to each key point in the key point position relationship is determined by the angle between the first auxiliary line and the second auxiliary line; the first auxiliary line is obtained by connecting the first key point and the second key point, and the second auxiliary line is obtained by respectively connecting the first key point and each key point in the makeup guidance model, or respectively connecting the second key point and each key point in the makeup guidance model.

[0395] As an optional implementation manner, the coordinate adjustment module is further used to:

[0396] When it is determined according to the eye distance type that the eye distance does not need to be adjusted, calculating a third distance between a first key point on one side of the boundary of the makeup guidance model and a second key point on the other side of the boundary of the makeup guidance model based on the coordinates of a first key point corresponding to the first key point in the facial image and the coordinates of a second key point corresponding to the second key point in the facial image, and determining a fourth distance in the horizontal direction between two adjacent key points in the facial image corresponding to any adjacent key points in the makeup guidance model based on the positional relationship between the key points in the makeup guidance model and the third distance;

[0397] determining the coordinates of each key point of the makeup guidance model in the facial image according to the first key point coordinates / the second key point coordinates, the fourth distance, and the angle corresponding to each key point in the key point position relationship;

[0398] Among them, the angle corresponding to each key point in the key point position relationship is determined by the angle between the first auxiliary line and the second auxiliary line; the first auxiliary line is obtained by connecting the first key point and the second key point, and the second auxiliary line is obtained by respectively connecting the first key point and each key point in the makeup guidance model, or respectively connecting the second key point and each key point in the makeup guidance model.

[0399] In some embodiments, based on the same inventive concept, a smart mirror is also provided in the embodiments of the present disclosure. The device can realize the eyebrow makeup guidance function discussed above. Please refer to Figure 23 The device includes a camera 231, a display screen 232, a processor 233, and a memory 234, wherein the camera 231 is used to capture facial images; the display screen 232 is used to display facial makeup and facial images with makeup areas, and to obtain user-triggered operation instructions; the memory 234 is used to store program instructions;

[0400] The processor 233 calls the program instructions stored in the memory and executes the program instructions to implement any of the eyebrow makeup guidance methods discussed above. Since the principle of solving the problem solved by the above-mentioned smart mirror is similar to that of the eyebrow makeup guidance method, the implementation of the above-mentioned smart mirror can be referred to the implementation of the method, and the repeated parts will not be repeated.

[0401] In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, such as Figure 24 As shown, the computer program product 240 includes computer program code. When the computer program code is executed on a computer, it causes the computer to execute any of the eyebrow makeup instruction methods discussed above. Since the principles of the above computer program products are similar to those of the eyebrow makeup instruction methods, the implementation of the above computer program products can be referred to as the implementation of the methods, and the repeated parts will not be repeated here.

[0402] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage and optical storage, etc.) containing computer-usable program code.

[0403] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that performs the functions specified in one or more boxes.

[0404] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0405] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0406] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.

[0407] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for guiding eyebrow makeup, characterized in that: The method includes: In response to a facial makeup display instruction, collecting a facial image and detecting facial key points corresponding to the face in the facial image; In response to a facial makeup selection instruction, determining a makeup guidance model corresponding to an eyebrow portion of the face according to facial makeup parameters in the facial makeup selection instruction, the makeup guidance model including key points corresponding to the eyebrow portion and positional relationships of the key points; Determining eye length and eye distance based on the facial key points, and determining an eye distance type corresponding to the face based on a relationship between a difference between the eye distance and the eye length and a set threshold; the eye distance type includes at least a first eye distance type and a third eye distance type; Based on the facial key points, determining the positions of the boundaries of both sides of the makeup guidance model in the facial image; When the eye distance type is the first eye distance type, the key points of the two side boundaries are adjusted in a first adjustment direction; when the eye distance type is the third eye distance type, the key points of the two side boundaries are adjusted in a second adjustment direction; wherein the first adjustment direction is a direction of moving the coordinates of each key point of the makeup guidance model in the facial image toward the midline of the face, and the second adjustment direction is a direction of moving the coordinates of each key point of the makeup guidance model in the facial image away from the midline of the face; After the adjustment, the coordinates of each key point of the makeup guidance model in the face image are determined based on the positional relationship of the key points, and the face image with the makeup area is obtained and displayed in the display area.

2. The method according to claim 1, characterized in that Determining the eye length and eye distance based on the facial key points includes: Establishing a coordinate system with any vertex in the facial image as an origin, and determining the facial midline of the face based on the facial key points; Determine the coordinates of a first actual key point and a second actual key point located at the inner and outer corners of the left eye, and the coordinates of a third actual key point and a fourth actual key point located at the inner and outer corners of the right eye in the facial image; Determining a first actual distance from the first actual key point to the midline of the face based on the coordinates of the first actual key point and the midline of the face; Determining a second actual distance from the second actual key point to the midline of the face based on the coordinates of the second actual key point and the midline of the face; Determining a third actual distance from the third actual key point to the midline of the face based on the coordinates of the third actual key point and the midline of the face; Determining a fourth actual distance from the fourth actual key point to the midline of the face based on the coordinates of the fourth actual key point and the midline of the face; Obtaining the eye length according to an average of a difference between the second actual distance and the first actual distance and a sum of differences between the fourth actual distance and the third actual distance; The interocular distance is obtained according to the sum of the first actual distance and the third actual distance.

3. The method according to claim 1, characterized in that The eye distance type further includes a second eye distance type; and the second eye distance type is an eye distance type that does not require adjustment of the eye distance; and determining the eye distance type corresponding to the face according to a relationship between a difference between the eye distance and the eye length and a set threshold value includes: If the difference between the eye distance and the eye length is greater than a set threshold, determining that the eye distance type corresponding to the face is the first eye distance type; If the absolute value of the difference between the eye distance and the eye length is less than or equal to a set threshold, determining that the eye distance type corresponding to the face is the second eye distance type; If the difference between the eye distance and the eye length is smaller than a negative value of a set threshold, it is determined that the eye distance type corresponding to the face is the third eye distance type.

4. The method according to claim 3, characterized in that When the eye distance type is the first eye distance type, determining positions of two side boundaries of the makeup guidance model in the facial image based on the facial key points, adjusting the key points of the two side boundaries in a first adjustment direction, and determining coordinates of each key point of the makeup guidance model in the facial image based on the positional relationship of the key points after the adjustment, includes: Locating a first key point and a second key point located at two side boundaries of the makeup guidance model, and the coordinates of the first key point and the second key point corresponding to the facial image; Draw a perpendicular line from the first key point to the midline of the face, and determine the angle between the perpendicular line and the horizontal axis of the coordinate system as the adjustment angle; Determining a first adjustment direction corresponding to the makeup guidance model according to the first eye distance type, and determining an adjustment distance to be adjusted according to the first adjustment direction according to a difference between the eye distance and the eye length; After adjusting the first key point coordinates according to the adjustment angle, adjusting the adjustment distance in the first adjustment direction to obtain adjusted first key point coordinates; After adjusting the coordinates of the second key point according to the adjustment angle, adjusting the adjustment distance in the first adjustment direction to obtain adjusted coordinates of the second key point; The coordinates of each key point of the makeup guidance model in the facial image are determined based on the adjusted first key point coordinates / the adjusted second key point coordinates and the key point position relationship.

5. The method according to claim 3, characterized in that When the eye distance type is the third eye distance type, determining positions of two side boundaries of the makeup guidance model in the facial image based on the facial key points, adjusting the key points of the two side boundaries in the second adjustment direction, and determining coordinates of each key point of the makeup guidance model in the facial image based on the positional relationship of the key points after the adjustment, includes: Locating a first key point and a second key point located at two side boundaries of the makeup guidance model, and the coordinates of the first key point and the second key point corresponding to the facial image; determining an adjustment distance according to a difference between the interocular distance and the eye length; Draw a perpendicular line from the first key point to the midline of the face, and determine the angle between the perpendicular line and the horizontal axis of the coordinate system as the adjustment angle; determining, according to the third eye distance type, a second adjustment direction corresponding to the makeup guidance model; Determining the adjusted coordinates of the first key point according to the adjustment angle, the second adjustment direction, the adjustment distance, and the coordinates of the first key point; Determine the adjusted coordinates of the second key point according to the adjustment angle, the second adjustment direction, the adjustment distance, and the coordinates of the second key point; The coordinates of each key point of the makeup guidance model in the facial image are determined based on the adjusted first key point coordinates / the adjusted second key point coordinates and the key point position relationship.

6. The method according to claim 4 or 5, characterized in that The step of determining the coordinates of each key point of the makeup guidance model in the face image based on the adjusted first key point coordinates / the adjusted second key point coordinates and the key point position relationship includes: Calculating a first distance between the adjusted first key point and the second key point based on the adjusted coordinates of the first key point and the second key point, and determining a second distance in the horizontal direction between two adjacent key points corresponding to any adjacent key points in the makeup guidance model in the facial image based on the positional relationship of the key points in the makeup guidance model and the first distance; determining the coordinates of each key point of the makeup guidance model in the facial image according to the adjusted first key point coordinates / the adjusted second key point coordinates, the second distance, and the angle corresponding to each key point in the key point position relationship; Among them, the angle corresponding to each key point in the key point position relationship is determined by the angle between the first auxiliary line and the second auxiliary line; the first auxiliary line is obtained by connecting the first key point and the second key point, and the second auxiliary line is obtained by respectively connecting the first key point and each key point in the makeup guidance model, or respectively connecting the second key point and each key point in the makeup guidance model.

7. The method according to claim 3, characterized in that After determining the positions of the boundaries of both sides of the makeup guidance model on the face image, the method further includes: When it is determined according to the eye distance type that the eye distance does not need to be adjusted, calculating a third distance between a first key point on one side of the boundary of the makeup guidance model and a second key point on the other side of the boundary of the makeup guidance model based on the coordinates of a first key point corresponding to the first key point in the facial image and the coordinates of a second key point corresponding to the second key point in the facial image, and determining a fourth distance in the horizontal direction between two adjacent key points in the facial image corresponding to any adjacent key points in the makeup guidance model based on the positional relationship between the key points in the makeup guidance model and the third distance; determining the coordinates of each key point of the makeup guidance model in the facial image according to the first key point coordinates / the second key point coordinates, the fourth distance, and the angle corresponding to each key point in the key point position relationship; Among them, the angle corresponding to each key point in the key point position relationship is determined by the angle between the first auxiliary line and the second auxiliary line; the first auxiliary line is obtained by connecting the first key point and the second key point, and the second auxiliary line is obtained by respectively connecting the first key point and each key point in the makeup guidance model, or respectively connecting the second key point and each key point in the makeup guidance model.

8. An eyebrow makeup guidance device, characterized in that: The device includes: A key point detection module is used to collect a face image in response to a facial makeup display instruction and detect facial key points corresponding to the face in the face image; a model determination module for determining, in response to a facial makeup selection instruction, a makeup guidance model corresponding to an eyebrow portion of a face based on facial makeup parameters in the facial makeup selection instruction, the makeup guidance model including key points corresponding to the eyebrow portion and positional relationships of the key points; an eye distance type determination module, configured to determine eye length and eye distance based on the facial key points, and determine an eye distance type corresponding to the face based on a relationship between a difference between the eye distance and the eye length and a set threshold; the eye distance types include at least a first eye distance type and a third eye distance type; A coordinate adjustment module is used to determine the positions of the two side boundaries of the makeup guidance model in the facial image based on the facial key points, and when the eye distance type is the first eye distance type, the key points of the two side boundaries are adjusted in a first adjustment direction; when the eye distance type is the third eye distance type, the key points of the two side boundaries are adjusted in a second adjustment direction; wherein, the first adjustment direction is the direction of moving the coordinates of each key point of the makeup guidance model in the facial image toward the midline of the face, and the second adjustment direction is the direction of moving the coordinates of each key point of the makeup guidance model in the facial image away from the midline of the face; after adjustment, the coordinates of each key point of the makeup guidance model in the facial image are determined based on the position relationship of the key points, and the facial image with the makeup area is obtained and displayed in the display area.

9. A smart mirror, characterized in that: include: A camera device for capturing facial images; A display screen, used to display facial makeup and facial images with makeup areas, and to obtain user-triggered operation instructions; a memory for storing processor-executable instructions; A processor; configured to implement the steps of the method according to any one of claims 1 to 7 by running the executable instructions in the memory.

10. A computer readable and writable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Cosmetic treatment method, device and apparatus

    CN110866139A