tracking.js - volume control with camera
✓ Published0🌍 Public
Aalexmacy
Last edited Jun 12, 2017
Created on Jun 9, 2017
This example uses tracking.js’s Viola-Jones face detection to turn a webcam feed into a playful volume control. As the user moves their head closer to the camera, the detected face size increases, and a d3.v4 canvas animation maps that size to a rising volume level, with the current amplitude visualized in real time. The larger the face appears in the frame, the louder the volume—if it's too quiet, you just move your head closer. Built with d3.v4 and animated on canvas, this MIT-licensed gist demonstrates a simple, interactive computer-vision-driven interface.
AI-generated descriptionQuick and dirty test at making a really horrible volume control using facial recognition.
If it's too quiet, move your head closer!
mit Licensed