Duck hunt CV(Computer vision) is very similar to orignal duck hunt but you can play it on any display. You don't need a fancy gun with camera, use your fingures to shoot the duck.
To play the game you must intall following packages
- Python3
- Pygame
- OpenCV
- Numpy
Before you start to enjoy the game you will need to select color which you wish to use as trigger and pointer.
Run python calibration.py
to select the color.
Change the values on slider such that you are able to see only color which you want. Here I tried to isolate the red color.
pickle lower_bound [147 0 156] , upper_bound [179 179 255] (y/n) : y
file name : orange
If you are satisfied press 'q' to quit and y to save the color, give any name you like to the color file and hit enter.
Now you are ready to play the game. Start the game by typing python duckhunt.py
.
- Space pause or unpause game.
- ESC exit the game.
- Shooting game detectes player wants to shoot when trigger is hidden.