Skip to content

sindhu1807/Virtual-Mouse-Assisstant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Virtual Mouse Using Hand Gestures

This project enables mouse control using hand gestures detected via webcam. It utilizes MediaPipe for hand tracking, OpenCV for video processing, and PyAutoGUI to control the system mouse. It supports cursor movement, left and right clicks, scrolling, and screenshots, based on hand gestures.

Features

  • Move the mouse cursor using the index finger
  • Left click with a thumb + index finger pinch
  • Right click with a thumb + middle finger pinch
  • Scroll up with a thumb + ring finger pinch
  • Scroll down with a thumb + pinky finger pinch
  • Take a screenshot using an open palm gesture

Technologies Used

  • Python 3.x
  • MediaPipe
  • OpenCV
  • PyAutoGUI
  • NumPy

How It Works

  • The webcam feed is captured and processed in real-time.
  • MediaPipe detects hand landmarks.
  • Hand gestures are interpreted based on the relative positions of the fingers.
  • PyAutoGUI is used to control the mouse and perform actions.

Setup Instructions

  1. Clone the repository:
git clone https://github.com/yourusername/virtual-mouse-gestures.git
cd virtual-mouse-gestures
  1. Install the required packages:
pip install opencv-python mediapipe pyautogui numpy
  1. Run the script:
python virtual_mouse.py

To exit the program, press the Esc key.

Gesture Reference

Gesture Action
Index finger up Move cursor
Thumb + Index finger pinch Left click
Thumb + Middle finger pinch Right click
Thumb + Ring finger pinch Scroll up
Thumb + Pinky finger pinch Scroll down
Open palm Take screenshot

Screenshots

Screenshot (348)

Notes

  • Use a well-lit environment for more accurate detection.
  • The pinch threshold and detection confidence can be adjusted in the code for different hand sizes or camera qualities.

About

Virtual Mouse Assistant is an AI-powered application that enables mouse control using hand gestures via computer vision and machine learning techniques. Built with OpenCV and Python, it tracks hand movements and gestures to simulate mouse actions, offering an intuitive and touch-free interface for human-computer interaction.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages