Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Handtracking Gesture Volume Control

This project demonstrates a hand tracking system using OpenCV and MediaPipe to control the system volume through hand gestures. By tracking the position of your fingers, you can adjust the volume of your computer with simple gestures.

Features

Hand tracking using MediaPipe. Gesture recognition for controlling system volume. Real-time feedback with visual indicators. Adjustable sensitivity for gesture recognition. Requirements Python 3.7+ OpenCV MediaPipe PyCaw (Python Core Audio Windows Library) Numpy

Installation

Clone the repository: git clone https://github.com/your-username/handtracking-gesture-volume-control.git cd handtracking-gesture-volume-control

Create and activate a virtual environment (optional but recommended): python -m venv venv source venv/bin/activate # On Windows use venv\Scripts\activate

Install the required dependencies:

pip install -r requirements.txt Usage Run the main script to start the hand tracking volume control:

python volume_control.py A window will open displaying the camera feed. Make sure your webcam is properly connected.

Use the following gestures to control the volume:

Thumb and Index Finger: Adjust the distance between your thumb and index finger to increase or decrease the volume. File Structure handtracking-gesture-volume-control/ │ ├── volume_control.py # Main script to run the hand tracking and volume control ├── handtracking_module.py # Module for hand tracking functions ├── README.md # Project documentation ├── requirements.txt # List of dependencies └── utils/ # Utility functions and additional scripts

How It Works

The volume_control.py script initializes the webcam feed and uses MediaPipe to detect and track hand landmarks. The distance between specific landmarks on the hand (thumb and index finger) is calculated to determine the desired volume level. The PyCaw library is used to interface with the system's audio and adjust the volume accordingly. Troubleshooting Ensure your webcam is working and properly connected. If the hand tracking is not accurate, try adjusting the lighting in your environment. Ensure all dependencies are correctly installed.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

About

This project demonstrates a hand tracking system using OpenCV and MediaPipe to control the system volume through hand gestures. By tracking the position of your fingers, you can adjust the volume of your computer with simple gestures.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages