https://github.com/kunalmehra075/volume-control-opencv
Virutal Volume Controller — OpenCV + MediaPipe, Control your system volume using just your fingers — no keyboard, no mouse, just pure gesture magic! 🖐️🤏
https://github.com/kunalmehra075/volume-control-opencv
autopy cv2 hand-tracing hand-tracking handcontrol mediapipe opencv python python3 virtual-controller volume volumehandcontrol webdev
Last synced: 24 days ago
JSON representation
Virutal Volume Controller — OpenCV + MediaPipe, Control your system volume using just your fingers — no keyboard, no mouse, just pure gesture magic! 🖐️🤏
- Host: GitHub
- URL: https://github.com/kunalmehra075/volume-control-opencv
- Owner: KunalMehra075
- Created: 2025-05-16T15:21:34.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-17T10:16:12.000Z (about 1 year ago)
- Last Synced: 2025-06-17T08:07:36.804Z (12 months ago)
- Topics: autopy, cv2, hand-tracing, hand-tracking, handcontrol, mediapipe, opencv, python, python3, virtual-controller, volume, volumehandcontrol, webdev
- Language: Python
- Homepage:
- Size: 9.4 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🔊 Virtual Volume Controller — OpenCV + MediaPipe Project
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.
## 🖼 Demo

## 🎯 How It Works
📷 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**!
## 🚀 Features
✅ 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)
## 🧠 What You’ll Learn
- Hand landmark detection using **MediaPipe**
- Measuring Euclidean distance between fingers
- Mapping distance to volume percentage
- Controlling system audio using **pycaw** (Windows)
## 🛠 Setup Instructions
1. **Install the required dependencies, globlally or by creating a virtual environment:**
```bash
pip install -r requirements.txt
```
2. **Run the application:**
```bash
python volumeHandControl.py
```
## 🧰 Tech Stack & Dependencies
- Python
- OpenCV
- MediaPipe
- pycaw (for controlling system volume on Windows)
#### Buy me a coffee 🥹:
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! 🤩