Created
September 18, 2018 03:36
-
-
Save shivarajnaidu/5973d15cae9a6f8ad2c0ce7ee31b9932 to your computer and use it in GitHub Desktop.
Shell script to install opencv on ubuntu linux
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/sh | |
cd ~ | |
sudo apt update | |
sudo apt install wget git build-essential pkg-config cmake -y | |
# Clone OpenCV repos | |
git clone https://github.com/opencv/opencv.git --depth=1 | |
git clone https://github.com/opencv/opencv_contrib.git --depth=1 | |
# Build And Compile | |
mkdir opencv/build | |
cd opencv/build | |
cmake ../ | |
make | |
# Install | |
sudo make install | |
# Link | |
sudo /bin/bash -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf' | |
sudo ldconfig | |
# Print The Version | |
pkg-config --modversion opencv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment