Maker Dani Stem Adds Apple Music Gesture Control to a Raspberry Pi Smart Mirror via OpenCV
Tracking fingers with a Raspberry Pi Camera Module and OpenCV, this Python-powered plug-in avoids smudges from swipes.
Maker Dani Stem is working on a Raspberry Pi-powered smart mirror, which has just received a major upgrade: gesture recognition for music control.
Smart mirrors, also known as "magic mirrors," are a commonly-seen project for makers: Take a partially-silvered mirror, place a display behind it, and wire in some kind of smarts and you have a device that can show you the weather and headlines while you brush your teeth.
Stem's build, though, looks to integrate a little more functionality than most — starting with gesture control.
"[An] Apple music widget loads up my playlist that can be controlled with gestures," Stem writes of the project, "to avoid smudgy fingerprints on my smart mirror. One finger to play/pause, two fingers to play next song, three fingers to shuffle."
Based on a Raspberry Pi single-board computer with Camera Module, located behind the partially-silvered mirror along with the display, the gesture recognition system is driven by Python's OpenCV library: The hands are detected, positioned, then the number of fingers raised counted — and the resulting data used to control the playlist.
Stem has published the source code to GitHub under an unspecified license.