This project implements a hand-gesture recognition system using OpenCV and Mediapipe library of Python, for controlling the keyboard and mouse input events pynput is used.
A user can stimulate left, right, up, down and jump function in any game that have arrows for control.
openCV
-(For image processing and drawing)mediapipe
-(For Hand Tracking)numpy
-(For Mouse Movement and positon)pynput
-(For keys input controlling the mouse movement and click)
Here, the game played is Space-Invaders using only the VR Controller.
To setup the system for development on your local machine, please follow the instructions below:
-
Clone the repository to your machine
git clone https://github.com/Gokul9404/Virtual-Game-Controller.git
-
To install all the required dependencies/libraries use command below in the folder where the requirement.txt and other files are saved.
pip install -r requirement.txt
-
Change directory to the GitHub Repo till src folder. Command may look like:
cd C:\Users\.....\Gesture-Controlled-Virtual-Mouse
-
Run the
main.py
python file.