An interactive world map system that uses computer vision and hand gestures to identify countries and calculate flight time between them in real time.
This project integrates camera calibration, hand tracking, GIS country borders, and UI controls into a single real-time application.
- Real-time hand tracking using MediaPipe
- Camera-to-map calibration using homography (fixed calibration)
- Accurate country detection using Natural Earth (Admin 0) data
- Flight time calculation between two selected countries
- Interactive UI buttons:
- Reset selection
- Toggle flight-time mode
- Exit application
- Optimized for real-time performance using bounding-box filtering
- Webcam captures hand movements
- Index fingertip is detected
- Camera coordinates are mapped to the map image using homography
- Map coordinates are converted to latitude/longitude
- Country is identified using polygon containment
- Selecting two countries computes great-circle flight time
- Python
- OpenCV
- MediaPipe
- Shapely
- GeoJSON
- Natural Earth dataset
interactive-map-using-computer-vision/ │ ├── main.py ├── map.jpg ├── countries.geojson ├── requirements.txt ├── README.md └── .gitignore
pip install -r requirements.txt
▶️ Run the Project
bash
Copy code
python main.py
🖐 Controls
Point your index finger to select a country
Select two countries to compute flight time
Use on-screen buttons:
RESET → Clear selection
FLIGHT → Toggle flight time display
EXIT → Quit application
Press Q to exit via keyboard
✈️ Flight Time Calculation
Distance computed using Haversine formula
Average flight speed assumed: 900 km/h
Output displayed in hours
🌍 Data Source
Country borders: Natural Earth – Admin 0 Countries
Projection: Equirectangular (lat/lon)
📌 Notes
Designed for academic and portfolio use
Calibration values are fixed for the current camera setup
System is modular and extensible (Q/A mode, routing, AR overlays)
👤 Author
GitHub: https://github.com/ACEL-RYKEN
📄 License
This project is for educational and demonstration purposes.