Skip to content

Instantly share code, notes, and snippets.

@hunandy14
Last active June 29, 2018 12:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hunandy14/bc5f8a9761af9fb9290f4c8b4da96c3a to your computer and use it in GitHub Desktop.
Save hunandy14/bc5f8a9761af9fb9290f4c8b4da96c3a to your computer and use it in GitHub Desktop.
opencv341_installer for Ubuntu 16.04
# opencv331_intaller by charlotte.hong
# this script is on ubuntu 16.04
# date: 2018/05/31
# refrence opencv site: https://docs.opencv.org/3.4.1/d7/d9f/tutorial_linux_install.html
# charlotte.hong blog: https://charlottehong.blogspot.com/
# Update Ubuntu
sudo apt-get update
sudo apt-get dist-upgrade -y
# Install Package
sudo apt-get install -y build-essentia
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
# Downloads
mkdir opencv341
cd opencv341
git clone -b 3.4.1 https://github.com/opencv/opencv
git clone -b 3.4.1 https://github.com/opencv/opencv_contrib
# Cmake
mkdir build
cd build
cmake -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules ../opencv
# Buila
make -j8
# Install
sudo make install
sudo ldconfig
# Check Info
echo ========================================================================
pkg-config -- modversion
pkg-config opencv --libs --cflags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment