Skip to content

This program simulates Mouse operation by using Hand movements (marker less).

Notifications You must be signed in to change notification settings

Ashvin-G/Virtual-Mouse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Virtual Mouse

Designed by macrovector_official / Freepik Virtual Mouse is a program that enables user to simulate Mouse operations such as Click, Double Click, Scroll Down, Scroll Up using Hand(Marker Less).

Table of content

Prerequisite

The program was completely written using Python 3.7.0 in association with several other libraries such as OpenCV and Numpy for image processing, Google's MediaPipe library for human hand pose estimation. This program also utilizes IP Webcam Android Application for image acquisition which is freely availabale on Play Store.

NOTE: If the resolution and quality of builtin Webcam is good enough then there is no necessity of IP Webcam Application

Installation

NOTE: Ensure that pip is properly installed and Python 3.7 is added to PATH

OpenCV

This library is used for Image Processing and image acquisition.

NOTE: This application was developed without using OpenCV with CUDA GPU Support.

$ pip install opencv-python

Numpy

Numpy is neccessary not only because it is dependencies of OpenCV but it is also used in image aquisition from IP Webcam and decode it into suitable format for further image processing operations.

$ pip install numpy

MediaPipe

The sole purpose of MediaPipe is to detect palm and it's associated 20 landmarks on palm.

$ pip install mediapipe

Pynput

Pynput is used to simulate mouse operations.

$ pip install pynput

IP Webcam

IP Webcam

IP Webcam(Developed By: Pavel Khlebovich) available freely at Play Store.

How To Use Non GUI

To clone and run this application, you'll need Git installed on your computer. From your command line:

# Clone this repository
$ git clone https://github.com/Ashvin-G/Virtual-Mouse.git

Using IP Webcam for image acquisition

Step 1: Run the IP Webcam Application and scroll down to very bottom and "Start server".
Step 2: Ensure that the Mobile and Laptop/PC are on the same network. I would recommend USB tethering.
Step 3: Note down the IPv4 address generated by the IP Webcam.
Step 4: Edit main.py and replace

url = "Enter your URL here/shot.jpg"

with your IPv4 address.
For example

url = http://100.73.6.196:8080/shot.jpg

Step 5: Run the python script.

Controls

🔴 Scroll Down 🟣 Scroll Up 🟡 Double Click 🟢 Click ⚪ Mouse Position
The ⚪ will help in moving the cursor. To perform any Mouse operation move your thumb to corresponding finger tips.

GUI Design

This is the landing window

This is the help window

Demo

Features

Features Availability
Click ✔️
Double Click ✔️
Scroll Down ✔️
Scroll Up ✔️
Hold and Drag
Scroll Left
Scroll Right

Acknowledgement

The Logo is from www.freepik.com.
Designed By: macrovector_official / Freepik

References

How to use Google's MediaPipe
Mouse Simulation using Pynput
How Build and Install OpenCV with CUDA GPU Support

⭐ Star me on GitHub — it motivates me a lot!

About

This program simulates Mouse operation by using Hand movements (marker less).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages