Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Goose Chase

A Simple Python-based Game using Hand Detection


Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Works Cited

About The Project

A lot of this app is inspired by this repository, which essentially simulates the ninja fruit game. But instead of the tablet or phone screen, users will interact through the web camera and "catch" the fruits (or geese in this case) using the movement of the index finger.

What this app hopes to achieve is introducing an easy-to-implement way of integrating computer vision tools to beginners to Computer Science. It also attempts to design the code in an OOP way, which helps with maintainability, reusability and readability.

(back to top)

Progress

  • Set up project's backlog
  • Integrate MediaPipe
    • Hand landmarks are visualized as the camera runs
    • The tip of the index finger is highlighted as it moves.
  • Finish the main functionalities
    • Finish Goose implementation
    • Finish Game implementation
      • Render goose images on the window playground at a specific rate
      • Keep track of events as the camera continues to run
        • Decrease score as a goose cross the border.
          • The game ends when the number of lives is 0.
        • Increase score as the tip of the index finger reaches a goose
        • Level up as the score passes a threshold.
          • Increase the rate by which the geese are generated
          • Increase the speed of the geese

See the open issues for a full list of proposed features (and known issues).

(back to top)

Built With

Please view the complete list of libraries and packages in requirements.txt.

(back to top)

Getting started

Run the project

  1. Clone the repo
git clone https://github.com/LynnHaDo/Goose-Catching.git
  1. Once you navigate to the folder, create a virtual environment. env will be the folder storing information for setting up the virtual environment.
python3 -m venv env 
  • Activate the virtual environment:
source env/bin/activate
  • Install dependencies:
pip install -r requirements.txt
  1. Just run the main.py program as normal. Make sure to select the right interpreter!

(back to top)

Works cited

  1. Github Repo by mohamedamine99 (https://github.com/mohamedamine99/Ninja-Fruit-Like-Game-with-hand-gesture-and-opencv)

  2. OpenCV

@article{opencv_library,
    author = {Bradski, G.},
    citeulike-article-id = {2236121},
    journal = {Dr. Dobb's Journal of Software Tools},
    keywords = {bibtex-import},
    posted-at = {2008-01-15 19:21:54},
    priority = {4},
    title = {{The OpenCV Library}},
    year = {2000}
}
  1. Numpy
@Article{         harris2020array,
 title         = {Array programming with {NumPy}},
 author        = {Charles R. Harris and K. Jarrod Millman and St{\'{e}}fan J.
                 van der Walt and Ralf Gommers and Pauli Virtanen and David
                 Cournapeau and Eric Wieser and Julian Taylor and Sebastian
                 Berg and Nathaniel J. Smith and Robert Kern and Matti Picus
                 and Stephan Hoyer and Marten H. van Kerkwijk and Matthew
                 Brett and Allan Haldane and Jaime Fern{\'{a}}ndez del
                 R{\'{i}}o and Mark Wiebe and Pearu Peterson and Pierre
                 G{\'{e}}rard-Marchant and Kevin Sheppard and Tyler Reddy and
                 Warren Weckesser and Hameer Abbasi and Christoph Gohlke and
                 Travis E. Oliphant},
 year          = {2020},
 month         = sep,
 journal       = {Nature},
 volume        = {585},
 number        = {7825},
 pages         = {357--362},
 doi           = {10.1038/s41586-020-2649-2},
 publisher     = {Springer Science and Business Media {LLC}},
 url           = {https://doi.org/10.1038/s41586-020-2649-2}
}
  1. MediaPipe Python Hand Landmark APIs (https://mediapipe.readthedocs.io/en/latest/getting_started/python.html)

(back to top)

About

A Simple Ninja Fruit Game Simulation using Hand Detection

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages