Control your system volume with Minority Report-style hand gestures! 🎚️✨
This project uses Computer Vision and AI to track your hand in real-time. simply pinch your fingers to adjust the volume. No mouse, no keyboard, just magic.
- Real-time Hand Tracking: Powered by Google's MediaPipe for lightning-fast detection.
- Intuitive Controls:
- Pinch to Adjust: Distance between thumb and index finger controls volume.
- Visual Feedback: Dynamic volume bars and percentage indicators.
- FPS Counter: Monitor performance in real-time.
- Smoothed Audio: (Advanced Mode) Silky smooth volume transitions without jitter.
- Volume Lock: (Advanced Mode) Flex your pinky to lock the volume level! 🔒
- Python 3.7+
- A Webcam
-
Clone the Magic:
git clone https://github.com/Omkarkkale/Hand-gestures-Volume-control-using-Open-CV.git cd Hand-gestures-Volume-control-using-Open-CV -
Install Dependencies:
pip install -r requirements.txt
This version includes the fancy visuals, smoothing, and volume locking.
python ADV_VOL_CTRL.py- Adjust Volume: Pincher movement (Thumb
↔️ Index Finger). - Lock Volume: Fold your Pinky Finger down. The interface color changes to Green! 🟢
- Unlock: Straighten your Pinky.
Simple, raw, effective.
python VolHandContol.pyClick the link below to watch the demo video:
- Capture: OpenCV grabs frames from your webcam.
- Detect: MediaPipe identifies 21 hand landmarks.
- Calculate: We measure the Euclidean distance between landmark 4 (Thumb Tip) and 8 (Index Tip).
- Map: This distance is mapped to your system's volume range using NumPy.
- Control: PyCaw interfaces with Windows Audio APIs to change the volume.
Got an idea to make it cooler? Open an issue or submit a PR!
Free to use for educational purposes!

