https://ai.google.dev/edge/mediapipe/solutions/vision/gesture_recognizer#get_started4 This project demonstrates real-time hand gesture recognition using MediaPipe and OpenCV. It utilizes computer vision to detect and interpret hand gestures captured from a webcam, making it suitable for applications like sign language translation, gesture-controlled interfaces, and interactive systems.
Hand gesture recognition is a key application in the field of computer vision. This project uses the MediaPipe library, which provides real-time hand tracking, and OpenCV for visualizing the detection. The program tracks the movement of each hand and detects the position of individual fingers. Based on this, it can determine whether a finger is up or down, enabling gesture-based interactions with a computer.
This project can be extended to various use cases:
- Sign Language Recognition: Recognizing hand gestures as language inputs.
- Gesture-Based Control Systems: Controlling applications or hardware through hand gestures.
- Virtual Reality (VR): Interaction in VR environments using hand gestures.
- Real-Time Hand Detection: Detects and draws hand landmarks in real time using a webcam.
- Finger Position Tracking: Identifies the state of each finger (up or down).
- Cross-Platform: Can be run on any system that supports OpenCV and MediaPipe.
To get started, clone this repository to your local machine.
git clone https://github.com/your-username/hand-gesture-recognition.git
cd hand-gesture-recognition
Key Features:
- Detects hand landmarks in real-time.
- Recognizes 5 fingers (thumb to pinky) for simple gesture-based control.
- Provides flexibility for custom gestures and use cases.
## Installation
1. Clone the repository:
```bash
git clone https://github.com/your-username/hand-gesture-recognition.git
cd hand-gesture-recognition-
Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install the required libraries:
pip install -r requirements.txt
-
Run the main Python script:
python hand_gesture_recognition.py
Provide an example of how to use the code and the expected output.
## Usage
- Ensure you have a working webcam connected to your device.
- Run the script and watch the real-time gesture detection. The program will display the hand landmarks and indicate whether each finger is up or down based on the hand’s position.
- Press `x` to exit the program.
## Contributing
If you'd like to contribute to this project, feel free to fork the repository, make changes, and submit a pull request. Any suggestions or improvements are welcome!
### Guidelines:
- Fork the repository.
- Create a branch for your feature (`git checkout -b feature-name`).
- Commit your changes (`git commit -m 'Add new feature'`).
- Push to the branch (`git push origin feature-name`).
- Submit a pull request.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
A real-time hand gesture recognition system built with Python, OpenCV, and MediaPipe. It tracks hand landmarks and detects finger states (up/down) using a webcam. This project can be used for sign language recognition, gesture-based controls, or interactive applications. Open-source and customizable.