This project is a Python-based hand gesture recognition software that allows users to control various aspects of their computer system using hand gestures. The system detects hand gestures via a camera feed and translates them into actions like controlling the mouse cursor, minimizing windows, adjusting volume, and more.
- Control Mouse Cursor: Move the mouse pointer by extending your index finger.
- Minimize Current Window: Close all fingers into a fist to minimize the current window.
- Restore Current Window: Show three fingers (index, middle, and ring) to restore a minimized window.
- Click Action: Use the victory symbol (index and middle fingers extended and joined) to click.
- Increase Volume: Show a thumbs-up gesture to increase the system volume.
- Decrease Volume: Make an "Okay" gesture (thumb and index finger forming a circle) to decrease the system volume.
- Initiate Virtual Keyboard: Raise four fingers to open the virtual keyboard.
- Deactivate Virtual Keyboard: Raise four fingers again to close the virtual keyboard.
- Scroll Up: Show five fingers up to scroll the screen up.
- Scroll Down: Make a "U" gesture (index and ring fingers extended, others closed) to scroll down.
The software uses computer vision techniques, leveraging libraries like OpenCV and MediaPipe to detect and track hand movements. Gestures are interpreted using machine learning models or predefined rules, and corresponding system actions are triggered.
Ensure you have Python installed along with the following libraries:
- Python 3.x
- OpenCV
- MediaPipe
- PyAutoGUI (for controlling mouse and keyboard)
- Numpy
Install all dependencies using:
pip install -r requirements.txt
-
Clone this repository:
git clone https://github.com/yourusername/Hand-Gesture-Recognition-.git cd Hand-Gesture-Recognition-
-
Install the dependencies:
pip install -r requirements.txt
-
Run the main script:
python main.py
- Ensure your camera is working.
- Launch the script to open a live feed where gestures are detected.
- Perform the specified gestures, and the software will execute the corresponding actions on your computer.
Gesture | Action |
---|---|
Index finger extended | Control mouse cursor |
Fist | Minimize current window |
Three fingers up | Restore minimized window |
Victory symbol | Click |
Thumbs up | Increase volume |
Okay signal | Decrease volume |
Four fingers up | Open virtual keyboard |
Four fingers up (again) | Close virtual keyboard |
Five fingers up | Scroll up |
U symbol | Scroll down |
Feel free to open issues or submit pull requests for improvements or bug fixes.