Makeup Engine  1.0
Makeup Engine Documentation

Project Code Overview

The Makeup Engine is a software library designed to apply virtual makeup and other visual enhancements to faces detected in an image or video stream. The engine utilizes advanced face detection and landmark tracking to accurately map facial features, allowing for the realistic application of digital cosmetics. It is built upon a modular base that handles the core computer vision tasks, enabling easy extension with different visual effects.

Key Components

Core Classes

Face Detection and Landmark Mapping

core::face::FaceDetectorYunet: This class performs the initial step of robustly detecting faces in the input image using a DNN-based model from OpenCV.

core::face::FaceMesh: After a face is located, this class generates a detailed mesh of facial landmarks. These landmarks are crucial as they define the exact regions where makeup should be applied, such as the lips, eyes, and cheeks.

Makeup Application and Rendering

visualization::FaceDrawer: This utility class is central to the makeup application. Its drawMakeupMask method uses the detected facial landmarks to overlay makeup textures and colors onto the face. It processes a reference face with makeup and transfers the look to the current face by warping the makeup mask according to the user's specific facial geometry.

Temporal Smoothing

core::filter::LandmarkFlowFilter: In video applications, this filter tracks facial landmarks smoothly across consecutive frames. This ensures that the applied makeup remains stable and does not jitter during head movements, leading to a more realistic effect.

Function Highlights

File and Dependency Structure

The project files are organized in the C:/Projects/Engine/AntalEngine/Engine directory. Key header files include: