Skip to content

This project implements a gesture-based control system for gaming using a webcam. By tracking body landmarks with MediaPipe's pose estimation model, users can trigger game actions like move forward, hard kick, upper punch, and high punch with simple body gestures.

License

Notifications You must be signed in to change notification settings

SUJALGOYALL/Gesture_game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Gesture-Controlled Game Using MediaPipe & OpenCV

This project implements a gesture-based control system for gaming using a webcam. By tracking body landmarks with MediaPipe's pose estimation model, users can trigger game actions like move forward, hard kick, upper punch, and high punch with simple body gestures. No hardware sensors or controllers are needed—just your webcam and some moves!

📽️Demo

Insert gif or link to demo (COMMING SOON)

Gesture guide

Gesture Action Triggered Key Pressed
🤝 Join Hands Start control mode
🦵 Leg spread > 0.40 Hard Kick J
➡️ Foot x-distance > 0.20 Move Forward D
🙌 Wrist above shoulder Upper Punch L
👉 Arm extended sideways High Punch I

🧠 How It Works?

Uses MediaPipe Pose to detect landmarks (wrists, ankles, shoulders).

Calculates distances and positions to interpret gestures.

Uses Python's keyboard library to simulate keypresses mapped to gaming actions.

Displays the current detected move on-screen using OpenCV.

Installation

  1. Clone the repository:
git clone https://github.com/SUJALGOYALL/Gesture_game.git
cd Gesture_game
  1. Install dependencies: Make sure you’re using Python 3.7+
pip install opencv-python mediapipe numpy keyboard

🚀 How to Run!

python gesture_game.py

Authors

License

This project is open-source and available under the MIT License

About

This project implements a gesture-based control system for gaming using a webcam. By tracking body landmarks with MediaPipe's pose estimation model, users can trigger game actions like move forward, hard kick, upper punch, and high punch with simple body gestures.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages