Skip to content

This project allows to use your hand as a mouse.

Notifications You must be signed in to change notification settings

gmann7/MouseCam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MouseCam

Overview

This Python program allows you to control your computer's mouse pointer using hand gestures captured by a webcam. By pointing your index finger upwards, you can move the mouse pointer, and by lifting both the index and middle fingers while moving them closer together, you can simulate a mouse click.

Demo

Features

  • Real-time Hand Gesture Recognition: The program uses computer vision techniques to recognize and track your hand in real-time through your webcam feed.
  • Mouse Pointer Control: Point your index finger upwards to control the movement of the mouse pointer on the screen.
  • Mouse Click Simulation: Lift both your index and middle fingers while moving them closer together to simulate a mouse click action.
  • TODO: Customizable Parameters: You can adjust various parameters, such as sensitivity and gesture recognition thresholds, to suit your preferences.
  • Cross-platform: The program should work on Windows, macOS, and Linux, as long as you have Python and the necessary libraries installed.

Getting Started

Requirements

  • Python 3.x
  • OpenCV (for webcam access)
  • Mediapipe (for hand recognition and ML models)
  • NumPy (for numerical operations)
  • AutoPy (for controlling the mouse)

Installation

  1. Clone this repository to your local machine:
    git clone https://github.com/gmann7/MouseCam.git
  2. Install the required Python packages using pip:
    pip install -r requirements.txt
  3. Run the program:
    python VideoCapture.py

Ensure your webcam is enabled and properly positioned. Point your index finger upwards to move the mouse pointer. Lift both your index and middle fingers while moving them closer together to simulate a mouse click.

If you have more than one webcam connected ensure the script is reading the right one. You can change the integer value (n) within this line of code, in the VideoCapture.py file:


# Connect to Video Capture device (webcam or virtual cam)
 	cap = cv2.VideoCapture(n)

About

This project allows to use your hand as a mouse.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages