Hand Gesture Math Game with Timer โฐ
This Python script unleashes the power of OpenCV and MediaPipe, crafting an interactive math game that combines hand gesture recognition with arithmetic challenges. Embark on a journey where a series of math equations are presented, and you must answer by showcasing the correct number of fingers through hand gestures. The game adds an extra layer of excitement with a countdown timer for each question.
- Randomly generates arithmetic equations (addition, subtraction, multiplication, and division).
- Utilizes hand gestures for input, leveraging the MediaPipe library for precise hand tracking.
- Implements a countdown timer for each question, injecting a thrilling time-sensitive element.
- Provides real-time feedback on the correctness of your answer and displays the overall score.
First, type the following commands in the terminal: pip install opencv-python pip install mediapipe Run the program using: Copy code python code_1.py
Open your hands wide for detection. A math equation will be presented. You have 7 seconds to showcase the correct answer by closing your fingers. Maintain an optimal distance from the webcam for accurate detection. Press 'q' to gracefully terminate the window at any time. The game puts your quick thinking and precise hand movements to the test. Can you solve the equations in time? Dive into the excitement with GestureQuiz!
Ensure that the script is run on a machine equipped with a webcam for hand gesture detection. Feel free to customize and enhance the script according to your needs or contribute to its development!