Skip to content

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.

Notifications You must be signed in to change notification settings

Mogankumar/Virtual-mouse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

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

About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages