Author: Dean Hand
Date Created: 09/07/2019
Name: Drone_Footprints.py
The purpose of this module is to calculate imagery footprints of individual drone images. There is no stitching of
images, so the process is actually quite fast. The output is geo-rectified GeoTiff image file and a GeoJSON file
with:
- Drone Flightpath (LineString)
- Drone location at point of photo (Point)
- Individual Image Footprints (Polygons)
- 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
pip install -r requirements.txt
-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)
python Drone_Footprints.py -i '/Users/<user>/Downloads/flight2/images' -o '/Users/<user>/Downloads/flight2/output
python Drone_Footprints.py -i "/Path/To/Dataset/images" -o "/Path/To/Dataset/output" -w 6.16 -d 4.62
- IMU calibration
- Gimbal calibration
- Compass Calibration
- Shooting angle (for best results -
Parallel to Main Path
) - Capture Mode (for best results -
Hover&Capture at Point
) - Gimbal Roll Angle (for best results - NADIR aka -90Β° aka straight down)
- Yaw Degrees - I've found the GimbalYawDegree data from the files to be unreliable at best, so the code calculates the GSD and FOV using the FlightYawDegree.
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
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
= mission2024-02-06
= year, month, day11-16
= hour, minute
There still remains many empty cells in drone_sensors.csv, but will update it as that information becomes available.
Images that are not taken at Nadir are still not warping correctly as I've intended. I could use some help or insight there.
Tested and works with:
- Phantom 4 Series
- Mavic 2 Series
- EVO II
Not currently working with older drones (i.e. Phantom 3 Series). The differences in how telemetry is processed and translated into metadata is.... troublesome.