https://github.com/divyansh0980/virtualmouse_module
Control your computer mouse and screen brightness using hand gestures! This project uses computer vision and hand tracking to create a touchless interface for your computer.
https://github.com/divyansh0980/virtualmouse_module
code cv2 handtracking mediapipe opencv opencv-python virtual-mouse-using-hand-gestures virtualmouse webcam
Last synced: 2 months ago
JSON representation
Control your computer mouse and screen brightness using hand gestures! This project uses computer vision and hand tracking to create a touchless interface for your computer.
- Host: GitHub
- URL: https://github.com/divyansh0980/virtualmouse_module
- Owner: Divyansh0980
- License: mit
- Created: 2025-10-20T19:57:56.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-11-04T18:13:04.000Z (2 months ago)
- Last Synced: 2025-11-04T20:20:06.290Z (2 months ago)
- Topics: code, cv2, handtracking, mediapipe, opencv, opencv-python, virtual-mouse-using-hand-gestures, virtualmouse, webcam
- Language: Python
- Homepage:
- Size: 39.1 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🖱️ Virtual Mouse - Hand Gesture Control
Control your computer mouse and screen brightness using hand gestures! This project uses computer vision and hand tracking to create a touchless interface for your computer.




## ✨ Features
- **Mouse Movement** - Move cursor with your index finger
- **Left Click** - Pinch index and middle fingers together
- **Right Click** - Pinch index, middle, and ring fingers together
- **Brightness Up** - Open all 5 fingers
- **Brightness Down** - Close all fingers (make a fist)
- **Smooth Tracking** - Built-in smoothening algorithm for stable cursor movement
- **Real-time FPS Display** - Monitor performance in real-time
```
Controls:
👆 Index finger up → Move cursor
✌️ Index + Middle pinch → Left Click
🤟 Index + Middle + Ring → Right Click
✋ All 5 fingers open → Increase Brightness
✊ Fist (all fingers closed) → Decrease Brightness
```
## 🚀 Installation
### Prerequisites
- Python 3.7 or higher
- Webcam
- Windows/Linux/MacOS
### Step 1: Clone the repository
```bash
git clone https://github.com/Divyansh0980/VirtualMouse_Module
cd VirtualMouse_Module
```
### Step 2: Install dependencies
```bash
pip install -r requirements.txt
```
### Step 3: Run the application
```bash
python VirtualMouse.py
```
## 📦 Dependencies
- OpenCV (`cv2`) - Computer vision and image processing
- MediaPipe - Hand tracking and landmark detection
- NumPy - Numerical computations
- AutoPy - Mouse control automation
- screen-brightness-control - Brightness adjustment
## 🎮 Usage
1. Run the script using `python VirtualMouse.py`
2. Position your hand in front of the webcam
3. Use the gestures mentioned above to control your mouse
4. Press 'q' to quit the application
```
## 📁 Project Structure
```virtual-mouse/
│
├── VirtualMouse.py # Main application file
├── HandTracking.py # Hand detection module
├── requirements.txt # Project dependencies
├── README.md # Project documentation
├── LICENSE # MIT License
├── .gitignore # Git ignore file
├── venv.txt # Creating a virtual space
└── Demo.gif # Showing how it works
```
## 🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
1. Fork the project
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
## 📝 Future Improvements
- [ ] Add scroll gesture support
- [ ] Implement drag and drop functionality
- [ ] Add volume control gestures
- [ ] Multi-hand gesture support
- [ ] GUI for settings configuration
- [ ] Cross-platform brightness control
## 📄 License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## 👏 Acknowledgments
- [MediaPipe](https://mediapipe.dev/) for the amazing hand tracking solution
- [OpenCV](https://opencv.org/) for computer vision capabilities
Project Link: [https://github.com/Divyansh0980/VirtualMouse_Module](https://github.com/Divyansh0980/VirtualMouse_Module)
---
⭐ If you found this project helpful, please consider giving it a star!