Giter Site home page Giter Site logo

aslandevbrat / gesture_vidgame Goto Github PK

View Code? Open in Web Editor NEW
43.0 5.0 18.0 83.8 MB

Gesture-controlled Video Game. Just swing your finger and play the game without touching your PC

License: GNU General Public License v3.0

Python 100.00%
camera-feed video-game pycharm game-window cursor python3 mediapipe mediapipe-hands machine-learning pose

gesture_vidgame's Introduction

Gesture Controlled Video Game

Detailed Blog : Analytics Vidhya Blog

Introduction

This project is an amazing blend of Computer vision and Video Game. In simple words I can say move you finger in front of camera and just drive the car as show in the following gif

I know you want play too !!!

Prerequisite

Python libraries that are required by the project are given in the requirement.txt Apart from it if you have Pycharm that would be great but not mandatory.

Installation

  1. Clone this repository git clone https://github.com/AslanDevbrat/gesture_VidGame.git

  2. Open the file either in PyCharm or other IDE

  3. Now open a terminal in the current directory and run python main.py

Remember Don't close the game Window only minimize it

  1. Now open Another terminal in the same directory and run python camera.py

Remember Don't close this window only minimize it if you want to close it press 'q'

  1. This is the last step, but the most important step. If you have followed me till now you have got two different window one which shows camera feed, and the one which show the game. Now place these two window side by side and click on the game window. If you don't click on game window your camera feed will freeze. Note In the following gif, when my cursor is on the hand tracking window the camera feed freezes. So to avoid it move your cursor and click on the game window

gesture_vidgame's People

Contributors

aslandevbrat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gesture_vidgame's Issues

Error, When running main.py

I have this error

lize self.carImg = pygame.image.load('.\\img\\car.png') FileNotFoundError: No such file or directory.
zsh: segmentation fault python main.py

FileNotFoundError: No such file or directory.

File "D:\Programming\python\pycharm\Gesture video game\main.py", line 152, in
car_racing = CarRacing()
File "D:\Programming\python\pycharm\Gesture video game\main.py", line 30, in init
self.initialize()
File "D:\Programming\python\pycharm\Gesture video game\main.py", line 36, in initialize
self.carImg = pygame.image.load(".\img\car.png")
FileNotFoundError: No such file or directory.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.