This Python project utilizes the MediaPipe library and OpenCV to perform real-time hand gesture recognition. With this code, you can control your computer's cursor and keyboard using hand gestures.
- Detects and tracks hand landmarks in real time.
- Recognizes left and right-hand gestures for mouse and keyboard control.
- Control the mouse cursor and perform keyboard actions (e.g., move, click, swipe) using hand gestures.
- Easily customizable for different hand gestures and actions.
Before running the code, make sure you have the following dependencies installed:
- Python 3.x
- OpenCV (
pip install opencv-python
) - MediaPipe (
pip install mediapipe
)
-
Clone this repository:
git clone https://github.com/KinshukSinghal/Hand-Gesture-Recognition.git
-
Navigate to the project directory:
cd Hand-Gesture-Recognition
-
Run the code:
python main.py
-
A window will open showing the webcam feed. Move your hand in front of the camera to control the cursor and perform gestures.
-
To exit the program, press 'q' in the OpenCV window.
This project leverages OpenCV and MediaPipe to detect and recognize hand gestures in real time using a webcam. It processes hand landmarks and classifies them into predefined gestures based on the positions and distances between key points.
- Thumbs Up π β Thumb is raised while other fingers are curled downward, indicating approval or agreement.
- Thumbs Down π β Thumb is pointing downward, representing disapproval or a negative response.
- OK Sign π β Thumb and index finger form a circle while other fingers remain extended, signaling "OK" or "perfect."
- Victory βοΈ β Index and middle fingers are raised, forming a "V" shape, often used as a sign of victory or peace.
- Stop β β All fingers are extended and spread apart, resembling a stop signal to indicate a halt or warning.
You can customize this code to recognize additional hand gestures and map them to different actions. Modify the code to add your own gestures and actions.
This project uses the MediaPipe library for hand landmark detection and tracking.
This project is licensed under the MIT License.
- Kinshuk Singhal
Feel free to contribute to this project and make it even more awesome! If you have any questions or suggestions, please open an issue or pull request.
Enjoy controlling your computer with hand gestures! ποΈπ₯οΈ