Table of Contents
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.
- 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
Gooseimplementation - Finish
Gameimplementation- 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
- Decrease score as a goose cross the border.
- Finish
See the open issues for a full list of proposed features (and known issues).
-
Python 3.12.5
Please view the complete list of libraries and packages in requirements.txt.
- Clone the repo
git clone https://github.com/LynnHaDo/Goose-Catching.git
- Once you navigate to the folder, create a virtual environment.
envwill 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
- Just run the
main.pyprogram as normal. Make sure to select the right interpreter!
-
Github Repo by mohamedamine99 (https://github.com/mohamedamine99/Ninja-Fruit-Like-Game-with-hand-gesture-and-opencv)
-
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}
}
- 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}
}
- MediaPipe Python Hand Landmark APIs (https://mediapipe.readthedocs.io/en/latest/getting_started/python.html)
