This project allows users to control the system volume using hand gestures. It utilizes a webcam to detect the distance between the thumb and index finger and adjusts the audio volume in real-time. The system leverages MediaPipe
, OpenCV
, and Pycaw
for gesture detection and audio control.
- Real-time hand tracking with MediaPipe.
- Smooth volume adjustments using distance between fingers.
- Intuitive and contactless volume control.
opencv-python
: For video capture and frame processing.mediapipe
: For hand landmark detection.pycaw
: For controlling system audio.numpy
: For efficient numerical operations.
- Captures video input from the webcam.
- Detects hand landmarks using MediaPipe.
- Calculates the distance between the thumb and index finger.
- Maps the distance to the system volume range.
- Smoothly adjusts the volume using Pycaw.
- Clone this repository:
git clone https://github.com/rishraks/Hand_Gesture_Volume_Control.git cd hand-gesture-volume-control
- Install required libraries:
python volume_control.py
- Run the script:
python Volume_Control.py
- Adjust the system volume by changing the distance between your thumb and index finger in front of the webcam.
- Press q to exit the application.
- MediaPipe
- OpenCV
- Pycaw
This project is licensed under the MIT License. See the LICENSE file for details.