Applying Blush
Let’s learn how to apply virtual blush.
Introduction
Blush is a makeup product that is used to add a flush of color onto the apple of the cheeks and create a rosy, natural-looking glow. It can also take your makeup game to the next level.
A few swipes of blush are able to:
- Enhance face shape
- Soften cheekbones
Add a rosy tint to the cheeks
Objective
Adding virtual blush can give photos a glamorous look. This lesson describes the steps required for developing this kind of utility in the Python programing language.
Dependencies
The following Python libraries are must-have for our utility:
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 look at the main functions of this utility.
The apply_vignette
function
This function creates a vignette filter to emphasize the blush area. The vignette filter is an image part with higher brightness and saturation. Let’s define this function.
-
Line 5 selects the image dimensions.
-
Lines 7–11 generate a vignette mask using ...