Skip to content

PurshottamKumar07/volume-controller-hand-gestures

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🎚️ Hand Gesture Volume Controller

A Python-based volume controller using OpenCV and MediaPipe that allows you to control your system volume with simple hand gestures via webcam.


🛠️ Features

  • 📷 Real-time hand tracking using MediaPipe
  • ✋ Control system volume by changing the distance between your thumb and index finger
  • 🔊 Visual feedback for volume level on screen
  • 🧠 Intuitive gesture-based interface

📦 Dependencies

Install the required libraries:

pip install opencv-python mediapipe numpy pycaw comtypes

Note: pycaw only works on Windows.


🚀 How to Run

  1. Clone the repository:
git clone https://github.com/Yamii07/volume-controller-hand-gestures.git
cd volume-controller-hand-gestures
  1. Run the script:
python volume_control.py
  1. Show your hand to the webcam and pinch your thumb and index finger to adjust the volume.

🧠 How It Works

  • MediaPipe detects hand landmarks in real time.
  • Calculates the distance between landmark 4 (thumb tip) and landmark 8 (index finger tip).
  • Maps that distance to a system volume range (0% - 100%).
  • Adjusts volume using pycaw on Windows.

📁 Project Structure

volume-controller-hand-gestures/
├── htmmod.py             # Modules for main File
├── volume_control.py     # Main script
├── README.md             # Project documentation

✅ Requirements

  • 3.6 < Python < 3.12
  • Webcam
  • Windows OS (required for volume control)

👨‍💻 Author

Purshottam Kumar
GitHub: @Yamii07


📄 License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A Python-based volume controller using OpenCV and MediaPipe that allows you to control your system volume with simple hand gestures via webcam.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages