-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·79 lines (56 loc) · 2.13 KB
/
build.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash
TOKEN=$1
sudo apt-get install -y build-essential checkinstall cmake pkg-config yasm git gfortran libjpeg8-dev
sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu> xenial-security main" && sudo apt update -y
sudo apt-get install libjasper1 libjasper-dev libpng-dev libtiff5-dev libavcodec-dev libavformat-dev libswscale-dev libxine2-dev libv4l-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev qt5-default libgtk2.0-dev libtbb-dev libatlas-base-dev libfaac-dev libmp3lame-dev libtheora-dev libvorbis-dev libxvidcore-dev libopencore-amrnb-dev libopencore-amrwb-dev x264 v4l-utils -y
sudo apt-get -y install python3-dev python3-pip
sudo -H pip3 install -U pip numpy && sudo pip3 install virtualenv virtualenvwrapper
echo "# Virtual Environment Wrapper" >> ~/.bashrc echo "export
VIRTUALENVWRAPPER_PYTHON='/usr/bin/python3'" >> ~/.bashrc
echo "source /usr/local/bin/virtualenvwrapper.sh" >> ~/.bashrc
source ~/.bashrc
git clone https://[email protected]/militech-at/opencv.git
git clone https://github.com/opencv/opencv_contrib.git
cd opencv_contrib
git checkout 3.3.1
cd ..
cd opencv
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_C_EXAMPLES=ON \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D WITH_TBB=ON \
-D WITH_V4L=ON \
-D WITH_QT=ON \
-D WITH_OPENGL=ON \
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules \
-D BUILD_EXAMPLES=ON ..
make -j$(nproc)
sudo make install
sudo sh -c 'echo "/usr/local/lib" >> /etc/ld.so.conf.d/opencv.conf'
sudo ldconfig
cd ..
sudo apt -y install libeigen3-dev
sudo apt-get -y install libblas-dev liblapack-dev libboost-all-dev
git clone https://[email protected]/militech-at/Pangolin.git
sudo apt -y install libgl1-mesa-dev libglew-dev cmake
cd Pangolin
mkdir build
cd build
cmake ..
cmake --build .
make
sudo make install
cd ..
pip3 install -y matplotlib open3d==12.0.0 pyntcloud
git clone https://[email protected]/militech-at/Autonomous-Drone-Scanning-and-Mapping
git clone https://[email protected]/militech-at/ORB_SLAM2
cd ORB_SLAM2
./build.sh
cd ..
git clone https://[email protected]/militech-at/ORB_SLAM3
cd ORB_SLAM3
./build.sh
cd ..