Control your system volume using just your fingers β no keyboard, no mouse, just pure gesture magic! ποΈπ€
Built using Python, OpenCV, and MediaPipe, this project uses your webcam to detect finger distance and adjust the volume in real time.
π· Your webcam tracks your index finger and thumb using MediaPipe's hand tracking.
The distance between them determines the volume level:
- πβοΈ Stretch fingers wide β Volume increases
- π€ Bring fingers close β Volume decreases
- ππ Touch both fingers β System is muted
This is a simple yet powerful demo of gesture-based human-computer interaction!
β
Real-time finger tracking with MediaPipe
β
Dynamically adjust system volume based on finger distance
β
Mute system when fingers are touching
β
Clean UI using OpenCV overlays
β
Works offline (on Windows)
- Hand landmark detection using MediaPipe
- Measuring Euclidean distance between fingers
- Mapping distance to volume percentage
- Controlling system audio using pycaw (Windows)
-
Install the required dependencies, globlally or by creating a virtual environment:
pip install -r requirements.txt
-
Run the application:
python volumeHandControl.py
- Python
- OpenCV
- MediaPipe
- pycaw (for controlling system volume on Windows)
Contributions are welcome! π If you have any ideas for improvements, feel free to submit a pull request.
Follow me for more exciting projects like this! π€©