-
Notifications
You must be signed in to change notification settings - Fork 57
/
co-fusion.sh
executable file
·63 lines (48 loc) · 1.22 KB
/
co-fusion.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# source: https://gist.github.com/phatblat/1713458
# Save script's current directory
DIR=$(pwd)
set -e
set -u
set -x
echo "############################"
echo "# co-fusion https://github.com/martinruenz/co-fusion"
echo "############################"
echo ""
echo "Co-Fusion: Real-time Segmentation, Tracking and Fusion of Multiple Objects "
echo ""
# install opencv
./opencv.sh
# superpixel segmentation
./gslicr.sh
# data visualization
./pangolin.sh
cd ~/src/
if [ ! -d ~/src/densecrf ]
then
git clone https://github.com/martinruenz/densecrf.git
fi
cd densecrf
git pull
mkdir -p build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_MODULE_PATH=/usr/share/OpenCV/
cmake --build .
git pull
cd ~/src/
if [ ! -d ~/src/co-fusion ]
then
git clone https://github.com/martinruenz/co-fusion.git
fi
cd co-fusion
git pull
#co-fusion expects gSLICr to be in the deps folder, let's use a symlink for that
mkdir -p deps
ln -sf ~/src/gSLICr deps/gSLICr
ln -sf ~/src/densecrf deps/densecrf
# compile
mkdir -p build
cd build
# TODO(ahundt) should CMAKE_MODULE_PATH always be set like this or should we make a pull request to fix it?
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_MODULE_PATH=/usr/share/OpenCV/
cmake --build .
cd $DIR