A real-time computer vision project that turns your webcam into a gesture-controlled virtual touchpad. Control your mouse cursor, clicks, drag-and-drop, and scrolling using only your hand.
Built with MediaPipe + OpenCV + PyAutoGUI.
- ✅ Real-time hand tracking (21 landmarks)
- ✅ Smooth cursor control with finger movement
- ✅ Left click gesture
- ✅ Right click gesture
- ✅ Drag & drop gesture
- ✅ Two-finger scroll gesture
- ✅ Cursor smoothing & jitter reduction
- ✅ ROI control area for stability
- ✅ Gesture conflict protection
- ✅ Auto drag-release safety
- ✅ FPS display overlay
- Python
- OpenCV
- MediaPipe Hands
- PyAutoGUI
- NumPy
git clone https://github.com/Godgiftedevil/finger-mouse.git
cd finger-mousepip install opencv-python mediapipe pyautogui numpypython finger_mouse_final.pyPress Q to quit.
Move your index finger inside the purple box → cursor moves.
Pinch thumb + index finger briefly.
Pinch thumb + middle finger briefly.
Hold thumb + index finger pinch for a short time → drag starts. Release fingers → drag ends.
Keep fingers open (index + middle extended) and move hand up/down → scroll.
- Only movement inside the purple rectangle controls the cursor.
- This prevents edge jitter and accidental jumps.
- PyAutoGUI failsafe enabled — move mouse to top-left corner to stop.
- Drag auto-releases if hand disappears.
- Drag auto-releases if hand leaves control area.
- Laptop webcam
- USB webcam
- Windows Python environment
- Works best in good lighting
- Single-hand tracking only
- Very fast motion may reduce accuracy
- Background clutter can affect detection
- Settings GUI
- Gesture calibration
- Sensitivity controls
- Multi-monitor support
- Custom gesture mapping
Built as a computer vision + human-computer interaction project using real-time hand tracking.
Star the repo and try extending it!
