https://github.com/pamyydev/libras_amostra
https://github.com/pamyydev/libras_amostra
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/pamyydev/libras_amostra
- Owner: pamyydev
- Created: 2025-03-03T18:02:13.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-03-03T18:41:48.000Z (4 months ago)
- Last Synced: 2025-03-06T01:35:15.689Z (3 months ago)
- Language: Python
- Size: 6.88 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# π€² Hand Gesture Recognition π °οΈπ ±οΈ
![]()
This project uses the MediaPipe library to detect and recognize hand gestures and identify letters of the alphabet from A to E. The application uses the camera to capture hand gestures in real-time and displays the corresponding letters on the screen.## β¨ Features
- **Gesture Recognition** π€: Through the camera, the system identifies hand gestures representing the letters A to E.
- **Drawing Landmarks** βοΈ: MediaPipe draws the hand landmarks, allowing for a clear visualization of what is being processed.
- **Letter Display** π : When a gesture is recognized, the corresponding letter is displayed on the screen.
- **Real-time Video Feed** πΉ: The video feed is processed in real-time, and the letters are updated as the gestures are detected.## π οΈ Technologies Used
- **Python 3.x** π
- **OpenCV** πΈ: For video capture and image processing.
- **MediaPipe** β: For detecting and analyzing hand landmarks.
- **Matplotlib** π (if needed for graph display, though not used in this specific code).## βοΈ Requirements
Make sure you have the following Python packages installed:
- `opencv-python`
- `mediapipe`
- `math` (integrated in Python)You can install the dependencies with the following command:
```bash
pip install opencv-python mediapipe
```## π How to Use
1. **Connect Your Camera** π·: Ensure your camera is connected to your device. The code uses the camera located at `/dev/video1`. If necessary, adjust to the correct device.
2. **Run the Script** βΆοΈ: Simply run the Python file. The script will open a window showing the video feed from your camera with the hand gestures being processed in real-time.
```bash
python hand_gesture_recognition.py
```
3. **Recognized Gestures** π€²:
- **A**: Thumb up and index finger bent.
- **B**: All fingers extended and together.
- **C**: A "C" shape with the hand.
- **D**: Thumb bent and the other fingers extended.
- **E**: All fingers curled over the palm.4. **Close the Application** β: To close the application, simply press the `q` key while the window is open.
## π§βπ» Code Structure
- **`distance(a, b)`**: Function to calculate the Euclidean distance between two points.
- **Letter Identification Functions** π : The functions `is_letter_a()`, `is_letter_b()`, `is_letter_c()`, `is_letter_d()`, and `is_letter_e()` are responsible for checking if the hand gestures correspond to one of the letters A to E.
- **Video Capture and Image Processing** πΈ: The code captures images from the camera, converts them to RGB, and processes them using MediaPipe to detect hand landmarks.
- **Letter Display** π : If a corresponding gesture is identified, the name of the letter is displayed on the screen.