A real-time drone simulation controlled using hand gestures detected by OpenCV and MediaPipe. This project demonstrates how computer vision can be used as a natural user interface for controlling a virtual drone without a keyboard or joystick.
- 🖐️ Real-time hand tracking using MediaPipe
- 📷 Live webcam input with OpenCV
- 🎮 Gesture-based drone control
- 🚁 Simple drone simulation using Pygame
- ⚡ Low latency and real-time performance
- 🧩 Modular project structure
| Technology | Purpose |
|---|---|
| Python | Core Programming |
| OpenCV | Webcam & Image Processing |
| MediaPipe | Hand Landmark Detection |
| Pygame | Drone Simulation |
| NumPy | Numerical Operations |
Gesture-Controlled-Drone/
│__assets_\drone.png
├── main.py # Main simulation
├── hand_tracking.py # MediaPipe hand detection
├── gesture.py # Gesture recognition logic
├── requirements.txt
├── README.md
└── screenshots/
Clone the repository
git clone https://github.com/yourusername/gesture-controlled-drone.gitGo to the project
cd gesture-controlled-droneInstall dependencies
pip install opencv-python mediapipe pygame numpypython main.py| Gesture | Action |
|---|---|
| ☝️ Index Finger Up | Move Up |
| 👇 Index Finger Down | Move Down |
| 👈 Index Finger Left | Move Left |
| 👉 Index Finger Right | Move Right |
| ✋ No Movement | Hover |
- OpenCV captures frames from the webcam.
- MediaPipe detects 21 hand landmarks.
- The gesture recognition module analyzes landmark positions.
- Commands are generated based on the index finger location.
- Pygame updates the drone position in real time.
Webcam
│
▼
OpenCV
│
▼
MediaPipe Hand Tracking
│
▼
Gesture Recognition
│
▼
Drone Controller
│
▼
Pygame Simulation
- Python 3.10+
- OpenCV
- MediaPipe
- Pygame
- NumPy
- ✅ Better gesture recognition
- 🚁 Realistic drone physics
- 🌍 Open-world environment using Three.js
- 🎥 First-person (FPV) camera
- 🎮 Drone takeoff and landing gestures
- 🤖 AI-powered object detection (YOLO)
- 🛰️ GPS and waypoint navigation
- 🌤️ Weather effects
- 🌙 Day/Night cycle
- 🏢 3D buildings and terrain
- 🌐 Web dashboard with FastAPI
- 📱 Mobile gesture control
- 🧭 Autonomous flight mode
- 🎯 Mission system
- ☁️ Cloud data logging
Contributions are welcome!
- Fork the repository
- Create a new branch
git checkout -b feature-name- Commit your changes
git commit -m "Added new feature"- Push to GitHub
git push origin feature-name- Open a Pull Request
This project is licensed under the MIT License.
Devraj
- GitHub: https://github.com/devv2308