OpenDroneMap-ODM/run-3-bundler.sh

46 wiersze
1.1 KiB
Bash

#!/bin/bash
BASE_PATH=$(dirname $(which $0));
IMAGE_DIR="."
EXTRACT_FOCAL=$BASE_PATH/extract_focal.pl
MATCHKEYS=$BASE_PATH/KeyMatchFull
BUNDLER=$BASE_PATH/bundler
BUNDLE2PVMS=$BASE_PATH/Bundle2PMVS
CMVS=$BASE_PATH/cmvs
PMVS=$BASE_PATH/pmvs2
GENOPTION=$BASE_PATH/genOption
SIFT=$BASE_PATH/sift
SIFTFEAT=$BASE_PATH/siftfeat
if [ $# -eq 1 ]
then
echo "Using directory '$1'"
IMAGE_DIR=$1
fi
# Run Bundler!
echo
echo '[- Running Bundler -]'
echo
mkdir bundle
rm -f $IMAGE_DIR/options.txt
echo "--match_table matches.init.txt" >> options.txt
echo "--output bundle.out" >> options.txt
echo "--output_all bundle_" >> options.txt
echo "--output_dir bundle" >> options.txt
echo "--variable_focal_length" >> options.txt
echo "--use_focal_estimate" >> options.txt
echo "--constrain_focal" >> options.txt
echo "--constrain_focal_weight 0.0001" >> options.txt
echo "--estimate_distortion" >> options.txt
echo "--run_bundle" >> options.txt
rm -f $IMAGE_DIR/constraints.txt
rm -f $IMAGE_DIR/pairwise_scores.txt
$BUNDLER $IMAGE_DIR/list.txt --options_file $IMAGE_DIR/options.txt > $IMAGE_DIR/bundle/out
exit