This game is fully controlled with a pen in hand which is recognised by your PC's camera.
For this project, I have particularly selected an orange pen, adjusted it's colour recognition in opencv.
The explanation to this mini project will be explained in a blog post soon.
- Python == 3.6.4
- CV2 == 4.2.0
- PyAutoGUI == 0.9.50
- First off, make sure you have all the above softwares donwloaded correctly.
- Now run the Stage.py file.
- Take any colourful object and adjust the Trackbars, so that only your object is visible in result window.
- Now copy the HSV values(All trackbar values) and substitute those values in the lower_orange, upper_orange variables in Main.py file.
- Now open Pong_Game folder and run Pong.exe and also run Main.py file.
In general this project is a mouse controlled with OpenCV by extracting contours off the object and substituting the positions of contours to pointer position.