Skip to content

Commit

Permalink
Added dependencies bash script
Browse files Browse the repository at this point in the history
  • Loading branch information
aniruddhbalram97 committed Oct 19, 2022
1 parent 3d3bd65 commit feabec8
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions Code/dependencies.sh
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."

0 comments on commit feabec8

Please sign in to comment.