Control your device's volume effortlessly using hand gestures! This project utilizes your index and thumb fingers to adjust the volume, eliminating the need for physical buttons that might fail over time.
- OpenCV: For camera access.
- Mediapipe: For hand tracking.
- pyAutoGUI: For keyboard controls.
- Copy
main.py
: Download or copy themain.py
script to your local machine. - Adjust Distance: Modify the distance threshold between the index and thumb fingers in the script to fit your needs.
- Run the Code: Execute the script.
- Grant Camera Access: Allow access to your camera when prompted.
- Test the Gesture: Move your index and thumb fingers to see the volume control in action.
The script measures the distance between the index and thumb fingers. Based on this distance, it increases or decreases the device's volume. The script is designed to detect and respond to movements of a single hand.
- Hands-free volume control
- Convenient when physical buttons are inaccessible or malfunctioning
- Innovative solution for touchless device interaction