# Drone Processing Experiments
Goal: **Define optimal flying and processing options for drone mapping using OpenDroneMap**

By @maning @ralleon
Major issues:
- buildings looks melted like melted butter
- DSM and DTM quality
- processing large number of images in a laptop
## Collect sample dataset @ralleon
- [ ] Overlap - 60% vs 80%, front + side overlap
- [ ] Capture settings - fast vs slow settings
- [x] Height capture - 120m, 100m
- [x] Oblique imagery
## Define metrics @maning
- time to fly
- area to cover
- visual quality
- dtm/dsm quality
### Tests
**Dataset**
Download URL | size | height | date | overlap | Other notes
---|---|---|---|---|---
[20_0513_SJ_Purok_1_2_100m.zip](https://osm-ph.s3.amazonaws.com/drone/20_0513_SJ_Purok_1_2_100m.zip) | 3.8 gb | 100 meters|2020-05-13| 80%
[20_0514_SJ_BSibol_SPila_120m.zip](https://osm-ph.s3.amazonaws.com/drone/20_0513_SJ_Purok_1_2_100m.zip)| 2.7 gb | 120 meters |2020-05-14| 80%
[20_0517_SJ_Purok_1_2_120m.zip](https://osm-ph.s3.amazonaws.com/drone/20_0513_SJ_Purok_1_2_100m.zip)| 2.8 gb | 120 meters|2020-05-14| 80%
| [20_0518_TaytayDivRoad_3D_AOI_120m_1.zip](https://osm-ph.s3.amazonaws.com/drone/20_0518_TaytayDivRoad_3D_AOI_120m_1.zip) | 3.23 gb | 120m | 2020-05-18 | 80% | Double-grid + 70 deg oblique
**Testing environment**
* Mac 10.14.6
* RAM 16 GB 2133 MHz LPDDR3
* Processor 3.5 GHz Intel Core i7
* Docker 2.3.0.2
* OpenDroneMap 0.9.8
### Test 1 - Does higher capture height affect the quality of imagery (100m versus 120m)
Summary notes
- **Visual quality is NOT affected regardless of height capture**.
* **Higher is better**. On a single flight, it can cover much larger areas. The algorithm can identify more common features between each picture due to more overlap for each image.
* **1.2x faster processing time**. Since higher capture need less photos to collect, less time is needed to process (1.2 x faster).
```
docker run -ti --rm -v "$(pwd)/datasets:/datasets" opendronemap/odm --project-path /datasets project \
--fast-orthophoto --orthophoto-resolution 5 --time
```
height | images (#) | size (mb) | processing time (minutes) | result (mbx static)
---|---|---|---|---
100m | 40 | 408 | 24.38 | 
120m | 28 | 279 | 19.19 | 
both | 68 | 687 | 28.45 | 
Processing time with ODM

*Y-axis time in seconds*
Comparison of result ([Live-map](https://bl.ocks.org/maning/raw/6e58b0a0f3c00f810fbab901840c4348/#18.55/14.5652645/121.1364744))

*Left-100m; Middle-120m, Right-both*
Comments from [community](https://t.me/OSMph/10967)
IanLopez
> 2 and 3 are the least warped IMO
FeyaAndal
> Ay hindi pala, parang pinakamaganda yung nasa middle haha sorry late reax 😂
MikeGabriel
> I think 3rd image pinaka-ok
### Test 2 - Improving melted buildings
Test options for `mesh-size` and `texturing-nadir-weight`
` --depthmap-resolution`
```
docker run -ti --rm -v "$(pwd)/datasets:/datasets" \
opendronemap/odm --project-path /datasets project \
--texturing-nadir-weight 32 \
--mesh-size 500000 \
--time
```
--texturing-nadir-weight 21, 26, 31
--mesh-size 400k, 500k, 600k
### Test 3 - Stitching together from multiple flights
### Test 4 - Combining nadir and oblique captures
### Test 5 - Processing really large collection
### ParkingLot
Default parameters rendering only orthophotos
```
docker run -ti --rm -v "$(pwd)/datasets:/datasets" opendronemap/odm --project-path /datasets project \
--fast-orthophoto --orthophoto-cutline --time
```
Default parameters with dsm and dtm generation
```
docker run -ti --rm -v "$(pwd)/datasets:/datasets" opendronemap/odm --project-path /datasets project \
--dsm --dtm --time
```
Parameters to improve building edges
```
docker run -ti --rm -v "$(pwd)/datasets:/datasets" \
opendronemap/odm --project-path /datasets project \
--texturing-nadir-weight 32 \
--mesh-size 500000 --mesh-octree-depth 11 \
--time
```

_Default vs Mesh-size (500k)_
### See also
- https://github.com/OpenDroneMap/ODM
- https://github.com/OpenDroneMap/ODM/wiki/Run-Time-Parameters
- https://github.com/OpenDroneMap/ODMdata
- https://plas.io/