A simple computer vision project that allows you to control your system volume using hand gestures (thumb & index finger distance).
Built with OpenCV and MediaPipe.
- Opens webcam and tracks your hand in real-time
- Detects index fingertip (id=8) and thumb tip (id=4)
- Measures distance between them:
- Far apart β Volume Up
- Close together β Volume Down
- OpenCV β Image capture and drawing
- MediaPipe β Hand landmark detection
- PyAutoGUI β Sending volume key presses
- Clone the repository
git clone https://github.com/vnguyen243/gesture_volume_control.git cd gesture_volume_control - Create virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies
pip install -r requirements.txt
- Run the scripts
python volume_control.py
- Exit Pres Ctrl+C to close the program