Puzzle Game with Hand Gesture Control

🧩 Built an Interactive Puzzle Game Using OpenCV, Streamlit, and CvZone! 🖐️ This game allows users to drag and snap puzzle pieces into place using hand gestures, providing a fun and immersive experience.

Project Objective

The objective of this project is to create an engaging puzzle game where users control puzzle pieces using hand gestures, enhancing interaction through computer vision.

Key Features:

  • Upload an image to split it into puzzle pieces.
  • Drag and snap puzzle pieces using hand gestures.
  • Real-time webcam feed for gesture control.
  • Responsive interface built with Streamlit.

Tech Stack

  • OpenCV: Image processing and webcam integration.
  • CvZone: Hand gesture recognition using HandTrackingModule.
  • Streamlit: Frontend interface for an interactive experience.
  • Pillow and NumPy: Image manipulation and array operations.

Installation

  1. Clone the repository: git clone https://github.com/Devmbm2/Hand_Gesture-_Game
  2. Navigate to the project directory: cd puzzle-game
  3. Install the dependencies: pip install -r requirements.txt

How to Play

  1. Run the Streamlit application: streamlit run main.py
  2. Upload an image through the web interface.
  3. The image will be resized to 225x225 pixels and split into puzzle pieces.
  4. Use hand gestures to drag and drop pieces into the correct positions.
  5. Once all pieces are correctly placed, the game will display "Puzzle Completed!"

Images and Videos from the Project



View the Code