{"id":23406922,"url":"https://github.com/sandeep0900/video-cv-iot","last_synced_at":"2026-04-20T04:06:17.649Z","repository":{"id":269147598,"uuid":"906566580","full_name":"Sandeep0900/video-CV-IOT","owner":"Sandeep0900","description":"This project uses computer vision to detect and track hand gestures in real time, specifically identifying the number of fingers raised. The program utilizes the cvzone Hand Tracking Module and OpenCV for video capture and display. A webcam captures the video stream, and the HandDetector detects hand landmarks and tracks finger positions","archived":false,"fork":false,"pushed_at":"2025-01-28T15:02:15.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T00:07:12.792Z","etag":null,"topics":["arduino-uno","iot","opencv","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sandeep0900.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-21T09:01:16.000Z","updated_at":"2025-01-28T15:02:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"62843a99-6553-4923-8cba-ddafc584b6b1","html_url":"https://github.com/Sandeep0900/video-CV-IOT","commit_stats":null,"previous_names":["sandeep0900/video-cv-iot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sandeep0900%2Fvideo-CV-IOT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sandeep0900%2Fvideo-CV-IOT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sandeep0900%2Fvideo-CV-IOT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sandeep0900%2Fvideo-CV-IOT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sandeep0900","download_url":"https://codeload.github.com/Sandeep0900/video-CV-IOT/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247947860,"owners_count":21023066,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino-uno","iot","opencv","python"],"created_at":"2024-12-22T14:16:17.822Z","updated_at":"2026-04-20T04:06:17.617Z","avatar_url":"https://github.com/Sandeep0900.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hand Gesture Controlled LED System\n![image](https://github.com/user-attachments/assets/e2f075e4-8bef-49b9-aaf8-d81e455002d6)\n\nThis project demonstrates a hand gesture-controlled LED system that utilizes computer vision, Arduino, and LEDs to provide a seamless interaction between hand gestures and hardware. The project integrates Python-based hand tracking and Arduino for LED control.\n\n## Features\n- Real-time hand gesture detection using a webcam.\n- Detection of the number of fingers raised.\n- Control of LEDs connected to an Arduino Uno based on the detected finger count.\n- Smooth communication between Python and Arduino using the PyFirmata library.\n\n## Components Required\n1. **Hardware:**\n   - Arduino Uno\n   - LEDs (5 units)\n   - Resistors (220Ω each)\n   - Connecting wires\n   - Breadboard\n   - Webcam\n2. **Software:**\n   - Python 3.x\n   - OpenCV library\n   - cvzone library\n   - PyFirmata library\n   - Arduino IDE (for uploading the StandardFirmata sketch)\n\n## Setup\n\n### Arduino Connection\n1. Connect LEDs to digital pins 8, 9, 10, 11, and 12 of the Arduino Uno with resistors in series.\n2. Ensure a common ground between the Arduino and the power source of the LEDs.\n3. Upload the StandardFirmata sketch from the Arduino IDE to the Arduino Uno.\n\n### Python Environment\n1. Install the required Python libraries:\n   ```bash\n   pip install opencv-python cvzone pyfirmata\n   ```\n2. Connect the Arduino Uno to your computer and note its COM port (e.g., `COM9`).\n\n## How It Works\n\n### Gesture Detection\n1. The `main.py` script uses OpenCV and cvzone’s Hand Tracking Module to detect hand gestures.\n2. It identifies the number of fingers raised using the `fingersUp()` function and maps this to specific actions.\n\n### LED Control\n1. The `controller.py` script uses the PyFirmata library to communicate with the Arduino Uno.\n2. Each finger count corresponds to a specific combination of LEDs being turned on or off.\n\n### Interaction Flow\n1. The webcam captures the hand in real time.\n2. The `HandDetector` processes the hand's position and identifies the raised fingers.\n3. The `controller.py` script receives this data and triggers the corresponding LEDs on the Arduino.\n\n## Code Structure\n### `main.py`\nThis script handles:\n- Video capture and gesture detection.\n- Sending the detected finger count to `controller.py`.\n\n### `controller.py`\nThis script handles:\n- Communication with the Arduino Uno via PyFirmata.\n- Controlling the LEDs based on the finger count received.\n\n## Usage\n1. Connect your Arduino Uno to the computer.\n2. Upload the StandardFirmata sketch to the Arduino Uno.\n3. Run the `main.py` script:\n   ```bash\n   python main.py\n   ```\n4. Use hand gestures to control the LEDs:\n   - 0 fingers: All LEDs off.\n   - 1 finger: LED 1 on.\n   - 2 fingers: LEDs 1 and 2 on.\n   - 3 fingers: LEDs 1, 2, and 3 on.\n   - 4 fingers: LEDs 1, 2, 3, and 4 on.\n   - 5 fingers: All LEDs on.\n\n## Future Enhancements\n- Add support for multiple hands.\n- Use additional hardware like buzzers or motors.\n- Integrate with IoT platforms for remote control and monitoring.\n\n## License\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n- [cvzone Hand Tracking Module](https://github.com/cvzone)\n- [PyFirmata Documentation](https://pyfirmata.readthedocs.io/)\n- \n\n![image](https://github.com/user-attachments/assets/e2f075e4-8bef-49b9-aaf8-d81e455002d6)\n![image](https://github.com/user-attachments/assets/31e9b84f-37d7-4eac-8627-b0420b194e68)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandeep0900%2Fvideo-cv-iot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsandeep0900%2Fvideo-cv-iot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandeep0900%2Fvideo-cv-iot/lists"}