Glad to share our weekend’s fun Python mini project, Gesture Gaming Controlling using Python. The concept behind this is color detection and Python to initiate a keypress when that particular color was detected in a particular region.
We have created a program to detect orange color objects in a frame. Similarly, we have created a window of 160 pixels in the center of the frame (the blue rectangular window) and logically divided the frames into two halves. The left half is used for turning the vechile left and the right half takes the decision of accelerate and brake.
This is a simple concept of controlling W, A, S, D keyboard keys and can be used for other keys as well as other games.
In this project, we have detected orange objects. You can modify lines number 13, 14 in
gameControl.py to use them for other objects.
hsvRealtime.py can be used to find the HSV values used in the threshold values at lines 13, 14 in
- 1. Python 3.x
- 2. imutils
- 3. NumPy
- 4. OpenCv-Python
FREE UDEMY COURSES 100% OFF COUPON:
!!Download Hand Gesture Code!!
Digant Patel has been working on this inspiring project i.e. “Gesture Control Gaming”. This initiative will potentially help AI developers to spend more time on creative tasks and research more on the latest AI topic.
☺ Thanks for your time ☺
What do you think of this “Gesture Gaming with Python“? Let us know by leaving a comment below. (Appreciation, Suggestions, and Questions are highly appreciated).