Welcome to Hand Gesture Volume Control β a seamless, touch-free way to control your computerβs audio volume using nothing but your hand gestures and your webcam! π₯ποΈ
- Real-time Hand Tracking ποΈ
- Smooth Volume Adjustment π
- Visual Feedback π― (see your gestures and volume changes on-screen)
- Graceful Exit & Error Handling β
- Python 3.7+
- Webcam (internal or external)
- The following Python libraries:
opencv-python
numpy
mediapipe
pycaw
comtypes
βΉοΈ To install dependencies, run:
pip install opencv-python numpy mediapipe pycaw comtypes
- Start the App:
Launch the script β your webcam activates automatically. - Show Your Hand:
Place your hand in front of the camera. The script will outline your hand and fingertips. - Use Gesture to Change Volume:
- Pinch your thumb and index finger together to decrease the volume.
- Spread your thumb and index finger apart to increase the volume.
- Visual cues help you gauge the current volume level.
- Exit:
- Press
q
in the video window to safely close the app.
- Press
python gvc.py
- Pinch: Decrease volume
- Spread: Increase volume
- Press
q
: Quit application
- Works best with good lighting and a clear background.
- Windows-only due to
pycaw
library. - Your webcam must be accessible by OpenCV.
A fun, practical demo combining media processing and computer vision for creative remote control interfaces!
π Enjoy touch-free audio control and happy coding!