Tuesday, January 4, 2022

Aerial Survey with Open Drone Map

Open Drone Map promises to be an open source tool chain that takes a set of aerial photos and turns them into a map with 3d reconstruction. Last summer I took a bunch of aerial videos hoping to feed them into a process like this. I hadn't researched the details of the tools I'd use to do it, but I vaguely knew they were out there.

I wish I'd known two rules for working better with ODM:

  • Fly high, look down (no horizon in the shot)
  • Take stills, not video (no motion blur, my drone adds GPS tags to stills). It looks like the system will work better with 20-40 stills than all those frames of video.
But still, I was able to get some mediocre results out of ODM with what I had.

I forked ODM and made a branch with setup and run that doesn't use Docker. (branch "no_docker")

I used ffmpeg to get jpeg frames out of my video. Here grabing a section from 3 minutes 24 seconds to 4 minutes 48 seconds, at 2 frames per second, to a directory of images:
ffmpeg -i 'source.MP4' -ss 3:24 -to 4:48 -filter:v fps=2 /path/to/odm/data/images/%05d.jpg

Then from the ODM source dir, I activated the python venv and ran the ODM wrapper script:

(source odmve/bin/activate && ./run.sh --project-path /path/to/odm data)

I'm hoping when I go back and scan the area with what I know of technique I'll get better output. The system is tantalizing enough that I want to do more.

No comments: