Loading repository dataโฆ
Loading repository dataโฆ
rsamwilson2323-cloud / repository
๐งฉ Gesture-based game developer passionate about Computer Vision, AI, and Python. Building interactive projects with OpenCV, MediaPipe, and CVZone to create touch-free experiences. Exploring AI, Machine Learning, and Human-Computer Interaction through innovative real-time applications.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
Solve a Jigsaw Puzzle Using Only Your Hands
๐๏ธ Hand Tracking โข ๐ฎ Gesture Controls โข ๐ท Webcam-Based โข ๐งฉ Interactive Puzzle
Virtual Puzzle with Hand Gesture Controls is a Python-based computer vision project that allows users to solve a 4ร4 jigsaw puzzle using real-time hand gestures detected through a webcam. Powered by OpenCV, MediaPipe, and CVZone, the game offers an intuitive touch-free experience where puzzle pieces are picked up and swapped using simple pinch gestures.
This project is ideal for learning Computer Vision, Hand Tracking, Human-Computer Interaction, and Gesture-Based Gaming with Python.
๐๏ธ Real-Time Hand Tracking Detects and tracks both hands using MediaPipe and CVZone.
๐ค Pinch Gesture Controls Use thumb and index finger pinches to interact with the puzzle.
๐งฉ Interactive 4ร4 Puzzle Automatically slices an image into 16 pieces and shuffles them.
๐ฆ Custom Puzzle Area Create your own puzzle box by selecting the top-left and bottom-right corners with your hands.
๐ Piece Swapping Drag puzzle pieces to swap their positions with other pieces.
โ Solved Piece Highlight Correctly placed pieces are highlighted with a green border.
๐จ Custom Puzzle Image Place your own puzzle.jpg file in the project folder to use a custom image.
Virtual-puzzle-with-hand-gesture-controls
โ
โโโ puzzle_game.py
โโโ requirements.txt
โโโ README.md
โโโ LICENSE
โโโ puzzle.jpg (Optional)
git clone https://github.com/rsamwilson2323-cloud/Virtual-puzzle-with-hand-gesture-controls.git
cd Virtual-puzzle-with-hand-gesture-controls
pip install -r requirements.txt
Or install manually:
pip install opencv-python cvzone mediapipe numpy Pillow
Run the game using:
python puzzle_game.py
Allow access to your webcam when prompted.
If puzzle.jpg is not found, the game automatically generates a colorful placeholder puzzle.
โ Left Hand Pinch Sets the Top-Left Corner of the puzzle.
๐ค Right Hand Pinch Sets the Bottom-Right Corner.
๐ฆ Hold both pinches together to preview the puzzle area.
โ Release both pinches to generate the puzzle.
๐ค Pinch over a puzzle piece to grab it.
๐๏ธ Drag the piece to another grid position.
๐ Release to swap pieces.
๐ฉ Correctly placed pieces are highlighted in green.
๐ Arrange all pieces correctly to complete the puzzle.
| Key | Action |
|---|---|
| ENTER | Quit the game |
| SPACE | Reset the puzzle |
To use your own image:
puzzle.jpg
The game will automatically slice it into a 4ร4 puzzle.
Contributions are welcome and appreciated.
Steps to contribute:
๐ก OpenCV Community
๐๏ธ Google MediaPipe Team
๐ CVZone Library
๐ Python Community
If you like this project:
โญ Star the repository
๐ด Fork it
๐ฌ Share your feedback
Sam Wilson
๐ GitHub
๐ผ LinkedIn
This project is licensed under the MIT License.