-
Notifications
You must be signed in to change notification settings - Fork 10
/
reconstruct-global.sh
executable file
·48 lines (38 loc) · 1.03 KB
/
reconstruct-global.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#! /bin/bash -e
# Check that the essential first parameter has been specified.
if [ $# -eq 0 ]
then
echo "Usage: reconstruct-global.sh <subset> [frames directory] [spaintgui location]"
exit
fi
if [ ! -d $1 ]
then
echo "Error: The subset '$1' does not exist"
exit
fi
# The frames subdirectory can be specified as the second parameter of the script.
dir=${2:-frames_resized}
# The location of spaintgui can be specified as the third parameter of the script.
spaintgui=${3:-/c/spaint/build/bin/apps/spaintgui/spaintgui}
# Change to the subset directory.
cd $1
# Determine which sequences to use, and in what order.
if [ -f global_sequences.txt ]
then
sequences=`cat global_sequences.txt`
else
sequences=`ls $dir`
fi
# Construct the command line.
args="--pipelineType=slam --relocaliserType=none --subwindowConfigurationIndex=3 -g global_poses.txt "
if [ -f global_config.ini ]
then
args="$args -f global_config.ini "
fi
for f in $sequences
do
echo $f
args="$args -s $dir/$f -t Disk "
done
# Run the application.
$spaintgui $args