Skip to content

This project allows users to control system volume with hand gestures detected by a webcam. It uses MediaPipe and OpenCV for real-time hand tracking. The distance between the thumb and index finger adjusts the audio volume interactively.

Notifications You must be signed in to change notification settings

RamezHas/Gesture-Volume-Control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

βœ‹πŸ”Š Hand Gesture Volume Control

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! πŸŽ₯πŸ–οΈ


πŸš€ Features

  • Real-time Hand Tracking πŸ–οΈ
  • Smooth Volume Adjustment πŸ”Š
  • Visual Feedback 🎯 (see your gestures and volume changes on-screen)
  • Graceful Exit & Error Handling βœ…

πŸ› οΈ Requirements

  • 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

πŸ“¦ How It Works

  1. Start the App:
    Launch the script – your webcam activates automatically.
  2. Show Your Hand:
    Place your hand in front of the camera. The script will outline your hand and fingertips.
  3. 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.
  4. Exit:
    • Press q in the video window to safely close the app.

πŸ–₯️ Usage

python gvc.py

βœ‹ Controls

  • Pinch: Decrease volume
  • Spread: Increase volume
  • Press q: Quit application

🌟 Demo


⚠️ Disclaimer

  • Works best with good lighting and a clear background.
  • Windows-only due to pycaw library.
  • Your webcam must be accessible by OpenCV.

πŸ§‘β€πŸ’» Credits


πŸ’‘ Inspiration

A fun, practical demo combining media processing and computer vision for creative remote control interfaces!


πŸ™Œ Enjoy touch-free audio control and happy coding!

About

This project allows users to control system volume with hand gestures detected by a webcam. It uses MediaPipe and OpenCV for real-time hand tracking. The distance between the thumb and index finger adjusts the audio volume interactively.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages