An open API service indexing awesome lists of open source software.

https://github.com/mogankumar/virtual-mouse

A Python-based Virtual Mouse that uses hand gestures for cursor control, clicking, scrolling, and taking screenshots. Powered by OpenCV, PyAutoGUI, and a custom hand tracking module for a touch-free experience.
https://github.com/mogankumar/virtual-mouse

autopy numpy opencv pyautogui python3

Last synced: 7 months ago
JSON representation

A Python-based Virtual Mouse that uses hand gestures for cursor control, clicking, scrolling, and taking screenshots. Powered by OpenCV, PyAutoGUI, and a custom hand tracking module for a touch-free experience.

Awesome Lists containing this project

README

          

# Virtual-mouse

This project implements a Virtual Mouse using computer vision and hand gesture recognition. It leverages a webcam to detect hand landmarks and performs actions such as moving the cursor, clicking, scrolling, and taking screenshots, making it a touch-free alternative for controlling a computer.

**Features**
1. Move Cursor: Control the mouse pointer using the index finger.
2. Click: Perform a left-click by pinching the index and middle fingers together.
3. Scroll: Scroll up or down using specific hand gestures.
4. Take Screenshots: Capture the screen by making a designated gesture.
5. Real-time FPS Display: Displays the frame rate (FPS) of the video feed for performance monitoring.

**How It Works**
1. Hand Detection:
•Uses a hand tracking module to detect landmarks of the hand.
•Identifies the index finger, middle finger, and thumb for specific gestures.
2. Gesture Recognition:
•Single Index Finger Up: Moves the cursor on the screen.
•Pinch Gesture: Performs a left-click when the distance between the index and middle fingers is less than a threshold.
•Thumb and Index Finger Gesture: Scrolls up or down.
•Specific Gesture: Captures a screenshot.
3. Mouse Control:
•Cursor movements are smoothed for better accuracy.
•Mouse control and clicks are performed using the autopy and PyAutoGUI libraries.

**Example Gestures**

**Gesture Action**
1. Index finger up - Move cursor
2. Index + Middle fingers pinched - Left click
3. Thumb + Index - Scroll up/down
4. All fingers out (specific gesture) - Capture screenshot