6 split merge instructions
Dakota Benjamin edytuje tę stronę 2017-11-08 14:33:19 -05:00

Instructions for Split-Merge

In this tutorial I will run the tanzania/ninehimages dataset.

Calibrate images (linux only)

Image calibration is essential for large datasets because error propogation due to image distortion will cause a bowl effect on the models. First download this repo. In it are two python scripts that you will run on your images to determine your camera distortion parameters and then remove that distortion. Follow the instructions in that repository to get your undistorted images

split-merge steps

The scripts lay inside the scripts/metadataset folder. They are:

run_all.sh 
setup.py 
run_matching.py 
split.py 
run_reconstructions.py 
align.py 
run_dense.py 

If you look into run_all.sh you will see that you run each of these scripts in the order above. It's really just a placeholder script, so I will largely ignore it. Instead I will go through each step in order to explain what it does and how to run it.

Before you run the following scripts, you should set up the environment variables:

RUNPATH=<Set this to your ODM base directory, eg. /home/dmb2/opendronemap>
export PYTHONPATH=$RUNPATH:$RUNPATH/SuperBuild/install/lib/python2.7/dist-packages:$RUNPATH/SuperBuild/src/opensfm:$PYTHONPATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$RUNPATH/SuperBuild/install/lib

And make sure you have all the parameters you want to pass in the settings.yaml file. You won't be able to put most of them into the command line. dtm, dsm, orthophoto-resolution, etc.

setup.py

This script sets up the metadataset/submodel structure. It takes some arguments:

<path-to-project>
--resize-to n
--min-num-features n
--num-cores n
--matcher-neighbors n

is where the data lies, set up like an ODM project (images should be in an "images" subdirectory) n in each of these is an integer. See https://github.com/OpenDroneMap/OpenDroneMap/wiki/Run-Time-Parameters for more info on these.

python setup.py ~/ODMProjects/tanzania/ninehimages/ --min-num-features 8000 --num-cores 16

run_matching.py

This one takes nothing except the project path:

python run_matching.py ~/ODMProjects/tanzania/ninehimages/

split.py

This one is simple too:

python split.py ~/ODMProjects/tanzania/ninehimages/

run_reconstructions.py

There is an optional argument in this script to run matching on each submodel. You already should have run matching above so we don't need to to it again.

---run-matching

Here's what I ran:

python run_reconstructions.py ~/ODMProjects/tanzania/ninehimages/

align.py

Another simple script:

python align.py ~/ODMProjects/tanzania/ninehimages/

run_dense.py

This is the one that will take a while. It basically runs the rest of the toolchain for each submodel.

python run_dense.py ~/ODMProjects/tanzania/ninehimages/

And then we wait....