Draw Eyeliner on the Eyes
Let’s learn how to draw virtual eyeliners.
Introduction
Eyeliner is a makeup product designed to apply color to the area around the eyes in order to accentuate and highlight their appearance. Precision and some technique is needed to apply eyeliner. Uneven eyeliner can potentially make the eye feel unbalanced and bottom heavy.
Objective
This lesson will builds a virtual utility that allows us to experiment with a new look and find the eyeliner that suits us best.
Dependencies
We’ll use the following external Python libraries:
Library | Version |
| 0.8.9 |
| 4.4.0.46 |
| 1.19.4 |
| 1.5.4 |
| 1.0.7 |
Let’s code the utility!
Let’s take a look at the main functions of this utility.
The getLeftEyeLandmarkPts
function
This function gathers the coordinates of the left eye’s landmark points. The output of this function is an array of two elements that represent the coordinates of the upper and lower eyelids. Let’s define this function.
-
Lines 5–6 shift the extreme points of the eye by a preset value
LINER_EXTENSION_POINTS
to make the eyeliner thicker. -
Line 9 wraps the ...