Skip to content

Game controller using webcam made with computer vision - Python and openCv

License

Notifications You must be signed in to change notification settings

jjeanjacques10/cv-game-controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Computer Vision - Game Controller

Game controller using webcam made with computer vision - Python and openCv

alt text

Requirements

Install requirements:

pip install -r requirements.txt

Get Started

python gameController.py

Actions

Keys

keys = {
    'A': pynput.keyboard.KeyCode.from_char('a'),  
    'D': pynput.keyboard.KeyCode.from_char('d'),  
    'W': pynput.keyboard.KeyCode.from_char('w'),  
    'S': pynput.keyboard.KeyCode.from_char('s'),  
}

⬅ A => Left

  • Pressed when angle is positive

➡ D => Right

  • Pressed when angle is negative

⬆ W => Front

  • Pressed when mass is bigger than 5000

⬇ S => Back

  • Pressed when mass is less than 3000

Steering wheel

You can use this image to control your car (or horse):

Volante

Image avaiable on ./images/steeringwheel.jpeg


developed by Jean Jacques and Gabriel Petillo

About

Game controller using webcam made with computer vision - Python and openCv

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published