{"id":29211788,"url":"https://github.com/venkat-0706/air-drawing","last_synced_at":"2026-04-20T19:04:06.415Z","repository":{"id":301914385,"uuid":"1010646781","full_name":"venkat-0706/Air-Drawing","owner":"venkat-0706","description":"A real-time hand gesture drawing app using Python, OpenCV, and MediaPipe to draw, erase, and switch colors on a canvas using finger gestures via webcam.","archived":false,"fork":false,"pushed_at":"2025-06-29T14:55:25.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-29T15:36:44.174Z","etag":null,"topics":["computer-vision","hand-gesture-recognition","mediapipe","mediapipe-hands","numpy","opencv-python","python","realtime-object-tracker"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/venkat-0706.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-06-29T14:17:07.000Z","updated_at":"2025-06-29T15:29:54.000Z","dependencies_parsed_at":"2025-06-29T15:49:34.244Z","dependency_job_id":null,"html_url":"https://github.com/venkat-0706/Air-Drawing","commit_stats":null,"previous_names":["venkat-0706/air-drawing"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/venkat-0706/Air-Drawing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venkat-0706%2FAir-Drawing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venkat-0706%2FAir-Drawing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venkat-0706%2FAir-Drawing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venkat-0706%2FAir-Drawing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/venkat-0706","download_url":"https://codeload.github.com/venkat-0706/Air-Drawing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/venkat-0706%2FAir-Drawing/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263222467,"owners_count":23433027,"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":["computer-vision","hand-gesture-recognition","mediapipe","mediapipe-hands","numpy","opencv-python","python","realtime-object-tracker"],"created_at":"2025-07-02T22:01:56.509Z","updated_at":"2026-04-20T19:04:06.385Z","avatar_url":"https://github.com/venkat-0706.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\r\n\r\n# 🎨 Hand Gesture Drawing App\r\n\r\n\u003e Control your canvas using just your hand.\r\n\u003e **Draw, erase, and switch colors** in real-time using intuitive hand gestures detected via webcam.\r\n\r\n---\r\n\r\n![Python](https://img.shields.io/badge/Python-3.7+-blue?logo=python\\\u0026logoColor=white)\r\n![OpenCV](https://img.shields.io/badge/OpenCV-4.x-green?logo=opencv)\r\n![MediaPipe](https://img.shields.io/badge/MediaPipe-Hands-red?logo=google)\r\n![UI](https://img.shields.io/badge/UI-Realtime--Overlay-orange)\r\n\r\n\r\n\r\n---\r\n\r\n## 🧠 Key Features\r\n\r\n| Feature                       | Description                                                                 |\r\n|------------------------------|-----------------------------------------------------------------------------|\r\n| 🎨 **Air Drawing**            | Draw lines on a canvas using your index finger in real-time                 |\r\n| 🧼 **Erasing**                | Make a fist gesture to erase parts of the drawing                          |\r\n| 🌈 **Color Palette Switching**| Hover over virtual palette to switch between red, green, and blue          |\r\n| 🖥️ **Live Feedback UI**       | See gestures drawn live on the video stream with MediaPipe hand overlays   |\r\n| ⚡ **Smooth Drawing Engine**  | High-performance canvas rendering with OpenCV and NumPy                    |\r\n\r\n---\r\n\r\n## ✋ Gesture Recognition Logic\r\n\r\n| Gesture                          | Action            |\r\n|----------------------------------|-------------------|\r\n| ✍️ Index finger up only          | Draw              |\r\n| ✊ All fingers down (fist)       | Erase             |\r\n| ✌️ Two fingers up               | Color selection   |\r\n| 🖐️ Open palm                    | Idle / reset      |\r\n\r\nMediaPipe detects **21 landmarks per hand**. Gesture logic is implemented by comparing fingertip and lower-joint positions to determine finger states.\r\n\r\n---\r\n\r\n## 🔧 Tech Stack\r\n\r\n### 🧪 Core Technologies\r\n\r\n| Tech           | Role                                                   |\r\n|----------------|--------------------------------------------------------|\r\n| **Python 3.7+**| Programming Language                                   |\r\n| **OpenCV**     | Webcam streaming, canvas rendering, drawing functions |\r\n| **MediaPipe**  | Real-time hand tracking and 3D landmark detection     |\r\n| **NumPy**      | Array operations for efficient image processing       |\r\n\r\n### 🎨 Drawing System\r\n\r\n| Component         | Tool/Function              |\r\n|------------------|----------------------------|\r\n| Line Drawing      | `cv2.line()`               |\r\n| Circle Erasing    | `cv2.circle()`             |\r\n| Canvas Overlay    | NumPy + OpenCV masking     |\r\n| Color Palette UI  | On-screen rectangles       |\r\n\r\n---\r\n\r\n## 📥 Installation\r\n\r\n```bash\r\n# Clone this repository\r\ngit clone https://github.com/yourusername/hand-gesture-drawing.git\r\ncd hand-gesture-drawing\r\n\r\n# Install required libraries\r\npip install opencv-python mediapipe numpy\r\n\r\n# Run the application\r\npython app.py\r\n````\r\n\r\n---\r\n\r\n## 🖼️ Screenshots\r\n\r\n| Drawing Mode              | Eraser Mode                | Color Palette              |\r\n| ------------------------- | -------------------------- | -------------------------- |\r\n| ![](screenshots/draw.png) | ![](screenshots/erase.png) | ![](screenshots/color.png) |\r\n\r\n---\r\n\r\n## 🧩 How It Works\r\n\r\n1. 🖥️ OpenCV captures real-time video from the webcam\r\n2. ✋ MediaPipe detects 21 hand landmarks\r\n3. 🧠 Gesture logic determines if fingers are up/down\r\n4. 🎨 Drawing or erasing actions are applied on a NumPy-based canvas\r\n5. 🔁 The canvas is overlaid on the webcam stream for a real-time visual experience\r\n\r\n---\r\n\r\n## ⚙️ Customization Options\r\n\r\n* 🎯 **Add New Colors:** Modify `colors[]` and `color_names[]` lists\r\n* ✏️ **Change Brush/Eraser Size:** Update `brush_thickness` and `eraser_thickness`\r\n* 📤 **Save Canvas:** Use `cv2.imwrite('drawing.png', canvas)`\r\n* 👇 **Add More Gestures:** Expand the `fingers_up()` logic for new controls\r\n\r\n---\r\n\r\n## 📅 Future Improvements\r\n\r\n* [ ] Gesture to clear entire canvas\r\n* [ ] Option to save drawings via GUI button or gesture\r\n* [ ] Streamlit/Flask web interface\r\n* [ ] Add more brushes (dotted, calligraphy)\r\n\r\n---\r\n\r\n---\r\n\r\n### ✅ Why This Works Better\r\n\r\n* Pure markdown = more reliable across GitHub, GitLab, Bitbucket, etc.\r\n* Respects dark/light modes.\r\n* Easier to edit and maintain.\r\n\r\n---\r\n\r\n## 🙋 Author\r\n\r\nMade with ❤️ by [Chandu](https://github.com/venkat-0706)\r\n\r\n\r\n🔗 Connect on [Linkedin](https://www.linkedin.com/in/chandu-0706)\r\n\r\n---\r\n\r\n## 📄 License\r\n\r\nThis project is licensed under the **MIT License**. Feel free to use and modify it as you wish!\r\n\r\n---\r\n\r\n\u003cp align=\"center\"\u003e\r\n  If you like this project, consider giving it a ⭐ and sharing it!\r\n\u003c/p\u003e\r\n```\r\n\r\n---\r\n\r\n### ✅ Next Steps for You:\r\n\r\n* Replace placeholders like `yourusername`, image paths, and LinkedIn links.\r\n* Add a demo GIF in `screenshots/demo.gif`\r\n* Create high-quality screenshots of each mode (drawing, erasing, color switching).\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvenkat-0706%2Fair-drawing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvenkat-0706%2Fair-drawing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvenkat-0706%2Fair-drawing/lists"}