-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3d3bd65
commit feabec8
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# installation of lcov for code coverage | ||
sudo apt-get install -y -qq lcov | ||
|
||
# installation of Eigen | ||
sudo apt install libeigen3-dev | ||
sudo apt-get install -qq g++-7 | ||
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 90 | ||
|
||
# dependencies related to OpenCV - Details available at: http://docs.opencv.org/trunk/doc/tutorials/introduction/linux_install/linux_install.html | ||
sudo apt-get install -y build-essential | ||
sudo apt-get install -y cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev | ||
|
||
sudo apt-get install -y python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev | ||
|
||
wget -O opencv.zip https://github.com/opencv/opencv/archive/4.5.1.zip | ||
wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/4.5.1.zip | ||
unzip opencv.zip | ||
unzip opencv_contrib.zip | ||
|
||
cd opencv-4.5.1 | ||
mkdir build | ||
cd build | ||
|
||
cmake -D CMAKE_BUILD_TYPE=RELEASE -D BUILD_EXAMPLES=OFF -D BUILD_opencv_apps=OFF -D BUILD_DOCS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF -D OPENCV_ENABLE_NONFREE=ON -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-4.5.1/modules -D CMAKE_INSTALL_PREFIX=/usr/local .. | ||
|
||
make -j$(nproc) | ||
|
||
sudo make install | ||
|
||
sudo sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf' | ||
sudo ldconfig | ||
cd ../../ | ||
sudo rm -rf opencv-4.5.1 | ||
sudo rm -rf opencv_contrib-4.5.1 | ||
echo "OpenCV installed." |