{"id":28951922,"url":"https://github.com/suraj5424/virtual-gesture-mouse","last_synced_at":"2026-05-10T05:02:53.659Z","repository":{"id":297878037,"uuid":"998164040","full_name":"suraj5424/Virtual-gesture-mouse","owner":"suraj5424","description":"🖐️ Control your computer’s mouse using real-time hand gestures with this virtual gesture mouse app! 🚀 Easy setup, smooth navigation, and click control — no hardware needed! 🎯🖱️✨","archived":false,"fork":false,"pushed_at":"2025-06-08T03:36:23.000Z","size":6359,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-23T16:05:12.592Z","etag":null,"topics":["autopy","autopygui","computer-vision","opencv","python","streamlit","virtual-mouse-using-hand-gesture"],"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/suraj5424.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,"zenodo":null}},"created_at":"2025-06-08T02:11:16.000Z","updated_at":"2025-06-08T03:36:26.000Z","dependencies_parsed_at":"2025-06-08T04:33:17.934Z","dependency_job_id":"00a55269-68bc-477c-9a8c-2c41b77d60ab","html_url":"https://github.com/suraj5424/Virtual-gesture-mouse","commit_stats":null,"previous_names":["suraj5424/virtual-gesture-mouse"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/suraj5424/Virtual-gesture-mouse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suraj5424%2FVirtual-gesture-mouse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suraj5424%2FVirtual-gesture-mouse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suraj5424%2FVirtual-gesture-mouse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suraj5424%2FVirtual-gesture-mouse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suraj5424","download_url":"https://codeload.github.com/suraj5424/Virtual-gesture-mouse/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suraj5424%2FVirtual-gesture-mouse/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267135980,"owners_count":24041143,"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","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["autopy","autopygui","computer-vision","opencv","python","streamlit","virtual-mouse-using-hand-gesture"],"created_at":"2025-06-23T16:01:14.386Z","updated_at":"2026-05-10T05:02:48.625Z","avatar_url":"https://github.com/suraj5424.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# 🖐️✨ Virtual Gesture Mouse — Documentation 🖱️🤖\n\n---\n\n## 🚀 Overview\n\n**Virtual Gesture Mouse** lets you control your computer 🖥️ mouse cursor and clicks 🖱️ using simple hand gestures captured by your webcam 📸.  \nPowered by **MediaPipe** 🤳 for hand tracking, **OpenCV** 🖼️ for video processing, **Autopy** 🐍 for mouse control, and **Streamlit** 🎨 for an interactive UI.\n\n---\n\n\u003cimg src=\"https://github.com/suraj5424/Virtual-gesture-mouse/blob/main/demo.gif\" alt=\"Demo of Virtual Gesture Mouse\" style=\"width:600px; height:auto;\" /\u003e\n\n\n\n---\n## 📚 Table of Contents\n\n- [🌟 Features](#-features)  \n- [💻 System Requirements](#-system-requirements)  \n- [⚙️ Installation](#%EF%B8%8F-installation)  \n- [🎬 Usage](#-usage)  \n- [🏗️ Application Architecture](#%EF%B8%8F-application-architecture)  \n- [🧩 Core Components](#-core-components-explained)  \n- [🔧 Configuration](#-configuration-parameters)  \n- [🐞 Troubleshooting](#-troubleshooting)  \n- [📄 License](#-license)  \n\n---\n\n## 🌟 Features\n\n- 🤳 Real-time hand tracking with MediaPipe  \n- 🖱️ Cursor movement controlled by your index finger  \n- 👌 Mouse clicks by pinching thumb and index finger  \n- ⚙️ Adjustable webcam resolution, frame margin, smoothing \u0026 click sensitivity  \n- 👁️ Visual feedback: bounding boxes, landmarks, FPS display  \n- 🖥️ Friendly, responsive UI built with Streamlit  \n\n---\n\n## 💻 System Requirements\n\n- 🐍 Python 3.7+  \n- 📸 Webcam (recommended min 640x480 resolution)  \n- 💻 OS: Windows, macOS, or Linux  \n- 🌐 Internet (for installing dependencies)  \n\n---\n\n## ⚙️ Installation\n\n### Step 1: Clone the repo\n\n```bash\ngit clone https://github.com/suraj5424/virtual-gesture-mouse.git\ncd virtual-gesture-mouse\n````\n\n### Step 2: Setup virtual environment (recommended)\n\n```bash\npython -m venv venv\nsource venv/bin/activate     # macOS/Linux\nvenv\\Scripts\\activate.bat    # Windows\n```\n\n### Step 3: Install dependencies\n\n```bash\npip install -r requirements.txt\n```\n\n---\n\n## 🎬 Usage\n\n### Run the app\n\n```bash\nstreamlit run app.py\n```\n\n* 🌐 Open the displayed URL (usually [http://localhost:8501](http://localhost:8501))\n* 🎛️ Adjust settings in the sidebar (webcam size, smoothing, click threshold, etc.)\n* ▶️ Click **Start Gesture Mouse** to begin controlling the mouse\n* ⏹️ Click **Stop Gesture Mouse** to pause control\n\n### Gesture Controls\n\n| Gesture                       | Action            |\n| ----------------------------- | ----------------- |\n| ☝️ Index finger up            | Move mouse cursor |\n| 🤏 Pinch thumb + index finger | Left mouse click  |\n\n---\n\n## 🏗️ Application Architecture\n\nThe app consists of two main parts:\n\n### 1. `app.py` 🎨\n\n* Streamlit UI and sidebar controls\n* Webcam capture and video display\n* Main gesture loop for detecting hand movement and controlling mouse\n* Uses `gesturecontrol.py` for hand landmark processing\n\n### 2. `gesturecontrol.py` 🧩\n\n* `HandDetector` class leveraging MediaPipe Hands\n* Hand detection, landmark extraction, and finger state analysis\n* Utility functions:\n\n  * `find_hands()` — detect \u0026 draw hands\n  * `find_position()` — get landmark positions and bounding box\n  * `find_distance()` — compute distance between landmarks\n  * `finger_up()` — check which fingers are raised\n\n---\n\n## 🧩 Core Components Explained\n\n### 🤳 Hand Detection\n\n* MediaPipe Hands detects 21 landmarks per hand\n* Tracks single hand for cursor control\n\n### ✋ Gesture Recognition Logic\n\n* Checks which fingers are up (1 = up, 0 = down)\n* Index finger up → cursor moves\n* Pinched thumb + index → mouse click\n\n### 🖱️ Cursor Movement Mapping\n\n* Maps webcam frame coords → screen coords\n* Control frame margin restricts active area\n* Movement smoothing avoids jitter\n\n---\n\n## 🔧 Configuration Parameters\n\n| Parameter                          | Description                                    | Default | Range      |\n| ---------------------------------- | ---------------------------------------------- | ------- | ---------- |\n| 📷 Webcam Width (`wCam`)           | Video capture width                            | 640     | 400 - 1280 |\n| 📸 Webcam Height (`hCam`)          | Video capture height                           | 480     | 300 - 720  |\n| 🖼️ Control Frame Margin (`framR`) | Active area margin inside webcam frame         | 100     | 20 - 200   |\n| 🌪️ Mouse Smoothing                | Smooth factor to reduce jitter                 | 7       | 1 - 15     |\n| 🖱️ Click Threshold                | Max distance between thumb and index for click | 40      | 10 - 100   |\n\n---\n\n## 🐞 Troubleshooting\n\n| Issue                          | Solution                              |\n| ------------------------------ | ------------------------------------- |\n| 🚫 Webcam not detected         | Check webcam connection \u0026 permissions |\n| ✋ Gesture control unresponsive | Restart app; check hand visibility    |\n| 🌀 Cursor moves erratically    | Increase smoothing value              |\n| 👆 Clicks not registering      | Adjust click distance threshold       |\n\n---\n\n## 📄 License\n\nThis project is licensed under the [MIT License](LICENSE) — feel free to use and modify freely! 📝\n\n---\n\n## 📬 Contact\n\n👨‍💻 Created by [Suraj Varma](https://www.linkedin.com/in/suraj5424/)\n💻 GitHub: [suraj5424](https://github.com/suraj5424)\n\n---\n\n✨ Thanks for checking out **Virtual Gesture Mouse** — control your PC with a wave of your hand! ✋🖱️🚀\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuraj5424%2Fvirtual-gesture-mouse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuraj5424%2Fvirtual-gesture-mouse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuraj5424%2Fvirtual-gesture-mouse/lists"}