GithubHelp home page GithubHelp logo

thomaspingel / drone-footprints Goto Github PK

View Code? Open in Web Editor NEW

This project forked from spifftek70/drone-footprints

0.0 0.0 0.0 1.01 GB

License: GNU Affero General Public License v3.0

Python 100.00%

drone-footprints's Introduction

Aerial Drone (aka UAV/UAS) Imagery Footprint and GeoTIFF Utility.

Author: Dean Hand
Date Created: 09/07/2019
Name: Drone_Footprints.py

The purpose of this application is to accurately calculate the geographic footprints of individual drone images. Initially, it extracts specific metadata from the drone image files to determine each image's Field of View (FOV). Following this, the application performs a series of calculations to establish the geospatial reference of each image. Subsequently, it adjusts the image to align accurately with the Earth's surface within that FOV, ensuring precise geolocation without the need for stitching images together. This results in a remarkably efficient process. The final output includes a geo-rectified GeoTiff image file, accompanied by a GeoJSON file detailing:

  • The Drone's Flight Path (as a LineString),
  • The Drone's Location at the moment the photo was taken (as a Point),
  • The Footprints of Individual Images (as Polygons).

Installation

  • Ready-made gdal version 3.8.3 or later. On Ubuntu, you can install as follows:
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get install libgdal-dev

Installation via pip

First, you probably want to install into a virtual environment or similar, for example:

python3.10 -m venv env # Install with compatible maximum version of Python (Requires-Python >=3.7,<3.11)
source env/bin/activate

The we install using the requirements list as follows:

pip install -r requirements.txt

Requirements

Python 3.6 and above


๐Ÿ’ก Processing Notes and Tips

Arguments

-i - The Default root folder for the mission you wish to process. Required

-o - The output directory for the GeoJSON file and GeoTiffs. Required

-w - Sensor Width (default is 13.2) Not Required (Check your Drones Specs for information)

-d - Sensor Height (default is 8.8) Not Required (Check your Drones Specs for information)

-e - Desired EPSG for output GeoTiffs (default is 4326) Not Required


Example Commands

From the src directory, run the following commands:

python Drone_Footprints.py -i '/Path/To/Dataset1/images' -o '/Path/To/Dataset1/output
python Drone_Footprints.py -i "/Path/To/Dataset2/images" -o "/Path/To/Dataset2/output" -w 6.16 -d 4.62
python Drone_Footprints.py -i "/Path/To/Dataset3/images" -o "/Path/To/Dataset3/output" -e 3857

โš ๏ธ The accuracy of this process depends highly on a number of factors.

  1. IMU calibration - Do this once a month
  2. Prior to each mission:
    • Calibration the drone's gimbal
    • Calibration the drone's compass
    • Restart the drone
  3. Shooting angle - for best results, select Parallel to Main Path
  4. Gimbal Pitch Angle - for best results, capture at NADIR (aka -90ยฐ aka straight down)
  5. Wind - Plays havoc on your drone's telemetry, so plan your missions accordingly

๐Ÿ“ Sort into Datasets

It is highly recommended that you sort the images you want processed into corresponding datasets

  • Separate Images by flight mission
  • Create a mission folder for each flight mission
  • Create an image folder within the mission folder
โ”œโ”€โ”€ /Path/to/mission_folder
โ”‚   โ”œโ”€โ”€ images

Outputs locations

It is a good practice to set your output folder -o location within your flight mission folder as shown in Example Commands, but it is not required.

โ”œโ”€โ”€ /Path/to/output_folder
โ”‚   โ”œโ”€โ”€ geotiffs
โ”‚   โ”‚   โ”œโ”€โ”€ image1.tif
โ”‚   โ”‚   โ”œโ”€โ”€ image1.tif
โ”‚   โ”œโ”€โ”€ geojsons
โ”‚   โ”‚   โ”œโ”€โ”€ M_2024-02-06_11-16.json

Geojson name is constructed using the date/time of processing like so:

  • M = mission
  • 2024-02-06 = year, month, day
  • 11-16 = hour, minute

๐Ÿ’ฅ Future Builds

Sensor Size checks

There still remains many empty cells in drone_sensors.csv, but will update it as that information becomes available.


โญ Sample datatsets

Raw zipped Datasets

โญ Sample Outputs

Sample JSON Output

Sample GeoTIFFs

Sample Screenshots (QGIS)

drawing

drawing

drawing

IMAGE ALT TEXT HERE


Drone Compatibility```

Tested and works with:

  • Phantom 4 Series
  • Mavic 2 Series
  • EVO II

known Issues

  1. Not currently working with older drones (i.e. Phantom 3 Series). The differences in how telemetry is processed and translated into metadata is.... troublesome.
  2. This accuracy of this process is highly dependent on the accuracy of the drone's telemetry. Like all compasses, the drone's compass is highly susceptible to electromagnetic interference. Therefore, Datasets collected in areas of high magnetic interference (i.e. power lines, large metal structures, etc) will have a higher margin of error.

drone-footprints's People

Contributors

spifftek70 avatar smathermather avatar sbonaime avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.