The Magic Makeup Mirror Helps Users Apply Makeup with More Precision
People who wear glasses can find themselves struggling when trying to apply small makeup details, which is what this project aims to solve.
Applying makeup
In order to apply facial makeup, one must first remove accessories such as glasses, but this can render the person unable to see fine details and lead to a poor application of makeup. Due to running into this problem herself, element14 Presents host Lorraine Underwood had the idea to use computer vision and a screen that could assist her when trying to draw small details.
Face detection
Detecting facial features is done by using a Raspberry Pi 4 running a facial landmark library, which takes a frame from a webcam and tries to recognize certain points. These could include points around the mouth, eyes, nose, jaw, and face outline. This results in an array of numbered areas, which can be used in software to track where that part is in 2D space.
Testing the code
Because the Raspberry Pi ended up being quite slow when having to run both the facial recognition algorithm and output each new video frame, Underwood decided to run it on much faster hardware during testing. Based on the video, her system worked well at recognizing where the eyes were and drawing a pair of virtual blue "wings" next to them based on the point system described previously.
Building a magical mirror
The mirror glass itself acts similar to a one-way mirror, where light can pass through the back but reflects any coming from the front. This property allows for a display to be stacked behind the glass and show text or video to the person standing on the other side.
A small addition
In her attempt to create this magical makeup mirror, Underwood also wanted to build a small, handheld mirror that could also display the same video with the digitally added wings. For this, she got a HyperPixel 2.1" round IPS LCD screen from Pimoroni that attaches to the Raspberry Pi's 40-pin header. This provides a duplicated and much closer look at the eye, which can greatly assist in the makeup application process. To see more about this magical makeup mirror, you can watch its video here on YouTube.