Created
August 11, 2020 06:16
-
-
Save gustavsl/39a055f2e101736a73824b6a18f84855 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
sudo apt-get update && sudo apt-get -y upgrade | |
sudo apt-get install -y build-essential cmake unzip pkg-config | |
sudo apt-get install -y libjpeg-dev libpng-dev libtiff-dev | |
sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev libv4l-dev | |
sudo apt-get install -y libxvidcore-dev libx264-dev | |
sudo apt-get install -y libgtk-3-dev | |
sudo apt-get install -y libcanberra-gtk* | |
sudo apt-get install -y libatlas-base-dev gfortran python3-dev | |
cd ~ | |
wget -O opencv.zip https://github.com/opencv/opencv/archive/4.2.0.zip | |
wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/4.2.0.zip | |
unzip opencv.zip | |
unzip opencv_contrib.zip | |
mv opencv-4.2.0 opencv | |
mv opencv_contrib-4.2.0 opencv_contrib | |
pip install numpy | |
cd ~/opencv | |
mkdir build | |
cd build | |
cmake -D CMAKE_BUILD_TYPE=RELEASE \ | |
-D CMAKE_INSTALL_PREFIX=/usr/local \ | |
-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \ | |
-D ENABLE_NEON=ON \ | |
-D ENABLE_VFPV3=ON \ | |
-D BUILD_TESTS=OFF \ | |
-D OPENCV_ENABLE_NONFREE=ON \ | |
-D INSTALL_PYTHON_EXAMPLES=OFF \ | |
-D BUILD_EXAMPLES=OFF .. | |
make -j4 | |
sudo make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment