Skip to content

ACEL-RYKEN/interactive-map-using-computer-vision

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Interactive Map Using Computer Vision

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.


🚀 Features

  • 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

🧠 How It Works

  1. Webcam captures hand movements
  2. Index fingertip is detected
  3. Camera coordinates are mapped to the map image using homography
  4. Map coordinates are converted to latitude/longitude
  5. Country is identified using polygon containment
  6. Selecting two countries computes great-circle flight time

🛠 Tech Stack

  • Python
  • OpenCV
  • MediaPipe
  • Shapely
  • GeoJSON
  • Natural Earth dataset

📂 Project Structure

interactive-map-using-computer-vision/ │ ├── main.py ├── map.jpg ├── countries.geojson ├── requirements.txt ├── README.md └── .gitignore


⚙️ Installation

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.

About

Real-time interactive world map using computer vision and hand gestures to identify countries and calculate flight time between them.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages