https://github.com/wasifsohail5/virtual_mouse
Virtual Mouse is an AI-powered, gesture-based control system that replaces traditional peripherals with hand movements. Using MediaPipe for hand tracking and PyAutoGUI for cursor control, it enables seamless clicking, scrolling, and navigation through simple gestures. Experience a futuristic, touchless interaction with your PC! 🚀🖱️
https://github.com/wasifsohail5/virtual_mouse
cv2 mediapipe mediapipe-hands numpy opencv pyautogui python
Last synced: 6 months ago
JSON representation
Virtual Mouse is an AI-powered, gesture-based control system that replaces traditional peripherals with hand movements. Using MediaPipe for hand tracking and PyAutoGUI for cursor control, it enables seamless clicking, scrolling, and navigation through simple gestures. Experience a futuristic, touchless interaction with your PC! 🚀🖱️
- Host: GitHub
- URL: https://github.com/wasifsohail5/virtual_mouse
- Owner: WasifSohail5
- Created: 2025-03-07T01:21:45.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-03-07T03:07:49.000Z (11 months ago)
- Last Synced: 2025-03-14T23:47:12.111Z (11 months ago)
- Topics: cv2, mediapipe, mediapipe-hands, numpy, opencv, pyautogui, python
- Language: Python
- Homepage:
- Size: 36.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🖱️ **Virtual Mouse – Hands-Free Computer Control** 🚀🖐️
Revolutionize the way you interact with your computer! **Virtual Mouse** leverages cutting-edge AI and computer vision to transform your **hand gestures** into seamless mouse movements, clicks, and scrolling. No need for physical peripherals – just **gesture, control, and navigate effortlessly!** 🏆
---
## ✨ **Key Features** 🔥
🔹 **Real-Time Hand Tracking:**
🎯 Powered by **MediaPipe**, ensuring precise and fast tracking.
🔹 **Gesture-Based Controls:**
🖱️ **Left Click:** Pinch your index finger and thumb together.
🖱️ **Double Click:** Perform a quick double pinch.
🖱️ **Right Click:** Touch your middle finger to your thumb.
🖱️ **Scroll Mode:** Activate scrolling by aligning fingers in a vertical motion.
🔹 **Smooth Cursor Movement:**
💡 Adaptive smoothing techniques ensure fluid and natural cursor motion.
🔹 **Customizable Sensitivity:**
⚙️ Adjustable thresholds for clicks and scroll actions for personalized control.
🔹 **No Extra Hardware Needed!**
📸 Just use your **webcam** to bring gestures to life!
---
## 🛠 **How It Works** 🔍
📷 **Step 1: Webcam Capture**
OpenCV accesses your webcam, flips the video for a **mirror view**, and processes the frames in real time.
✋ **Step 2: Hand Landmark Detection**
MediaPipe detects hand landmarks and extracts **critical points** such as fingertips and knuckles.
📐 **Step 3: Gesture Recognition**
Using **distance calculations** between fingertips, Virtual Mouse interprets gestures like clicks and scrolls.
🖥️ **Step 4: Mouse Control**
PyAutoGUI maps detected hand movements to your screen, ensuring a seamless experience.
⚡ **Flow Diagram:**
```mermaid
graph LR
A[Webcam Capture] --> B[Hand Landmark Detection]
B --> C[Gesture Recognition]
C --> D[Cursor Control & Clicks]
D -->|Output| E[Real-Time Mouse Interaction]
```
---
## 🚀 **Installation Guide** 🏗️
### ✅ **Prerequisites**
- **Python 3.x**
- **Pip** for package management
### 🛠 **Setup Instructions**
1️⃣ **Clone the Repository:**
```bash
git clone https://github.com/your-username/virtual-mouse.git
cd virtual-mouse
```
2️⃣ **Install Dependencies:**
```bash
pip install -r requirements.txt
```
*If you don't have a `requirements.txt`, install manually:*
- `opencv-python` (for video capture)
- `mediapipe` (for hand tracking)
- `pyautogui` (for cursor control)
- `numpy` (for mathematical operations)
3️⃣ **Run the Application:**
```bash
python Virtual\ Mouse.py
```
---
## 🛠 **Technologies Used** 🧩
| **Technology** | **Purpose** |
| ---------------------- | -----------------------------------------|
| **Python** | Core programming language |
| **OpenCV** | Capturing and processing video frames |
| **MediaPipe** | Hand detection and landmark tracking |
| **PyAutoGUI** | Simulating mouse movements and clicks |
| **NumPy** | Numerical operations and smoothing logic |
---
## 🎯 **Future Enhancements** 🚀
✅ **Enhanced Gesture Recognition:**
➖ More intuitive gestures for additional functionality.
✅ **Voice Command Integration:**
🎙️ Combine hand gestures with **voice control** for a futuristic experience.
✅ **Customizable UI Dashboard:**
🖥️ A visual interface to tweak settings, sensitivity, and control modes.
✅ **Cross-Platform Compatibility:**
💻 Optimizing performance for Windows, macOS, and Linux.
---
## 🌟 **Experience the Future of Touchless Interaction!** ✨
Virtual Mouse brings **gesture-based control** to life. Forget traditional peripherals – navigate your PC **effortlessly, smoothly, and intuitively!** 🎯
📢 **Contribute & Collaborate:**
Have ideas or improvements? Join the project and help enhance the Virtual Mouse experience! 🚀