Welcome to the Virtual Mouse! This tool lets you control your computer's mouse using hand gestures captured via your webcam. 🎥
| Feature 🧩 | Description 📋 |
|---|---|
| 🖐️ Hand Gesture Control | Use your hand to move the mouse pointer in real time. |
| 🖱️ Click Actions | Left, right, and double click with fingers gestures. |
| 🧭 Scroll Up / Down | Scroll through pages using finger movements. |
| 🎯 Cursor Movement | Smoothly move the mouse cursor based on hand position. |
| 🔄 Real time Tracking | Fast and responsive tracking using OpenCV and MediaPipe. |
| 🔍 Gesture Recognition | Detect specific finger configurations for different commands. |
| 🧰 Easy Setup & Customization | Simple to install, run, and tweak gesture mappings. |
| 🧑💻 Python Powered | Entirely built using Python and open source libraries. |
| 📷 Webcam Integration | Uses your computer's webcam. |
| Technology ⚙️ | Purpose 📋 |
|---|---|
| 🐍 Python 3 | Core programming language |
| 🎥 OpenCV | Video capture and image processing |
| ✋ MediaPipe | Hand tracking and gesture detection |
| 🖱️ PyAutoGUI | Simulate mouse actions |
| 📦 NumPy | Efficient numerical operations |
- 🎥 Capture video from the webcam in real time.
- ✋ Detect hand landmarks using MediaPipe.
- 🖱️ Index finger tip controls the cursor position on the screen.
| Gesture 👋 | Fingers State 🖐️ | Distance Condition 📏 |
|---|---|---|
| Left Click | Index ✅, Middle ✅, Pinky ❌ | Index |
| Right Click | Index ✅, Middle ✅, Pinky ✅ | Index |
| Scroll Down | Index ✅, Middle ✅, Pinky ❌, Thumb ✅ | Index |
| Scroll Up | Index ✅, Middle ✅, Pinky ✅, Thumb ✅ | Index |
| Double Click | Index ✅, Middle ❌, Pinky ❌, Thumb ✅ | Not Required |
- ✅ = Finger Up
- ❌ = Finger Down
↔️ = Distance between fingertips
-
Clone the repository
git clone https://github.com/KrishBharadwaj5678/VirtualMouse.git
-
Navigate into the project directory
cd VirtualMouse -
Install the required dependencies
pip install -r requirements.txt
-
Start the application
python app.py
Want to contribute? Here's how:
- 🍴 Fork the repository.
- 🌿 Create a new branch (
git checkout -b feature-name). - ✍️ Make your changes and commit them (
git commit -am 'Add feature-name'). - 🚀 Push to your branch (
git push origin feature-name). - 🔄 Submit a pull request to merge into the main branch.
