Skip to content

Instantly share code, notes, and snippets.

@rkalkani
Created September 25, 2017 11:41
Show Gist options
  • Save rkalkani/76a1d182d074276de5ee48ccd1fc655b to your computer and use it in GitHub Desktop.
Save rkalkani/76a1d182d074276de5ee48ccd1fc655b to your computer and use it in GitHub Desktop.
#!/bin/sh
sudo apt-get update
sudo apt-get -y install build-essential cmake git pkg-config python-dev
sudo apt-get -y install libjpeg-dev libtiff5-dev libjpeg8-dev libjasper-dev libpng12-dev
sudo apt-get -y install libgtk2.0-dev
sudo apt-get -y install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
sudo apt-get -y install libatlas-base-dev gfortran libxvidcore-dev libx264-dev
sudo pip install numpy
git clone https://github.com/opencv/opencv
cd opencv
git checkout 3.3.0
cd ..
git clone https://github.com/opencv/opencv_contrib
cd opencv_contrib
git checkout 3.3.0
cd ..
cd opencv
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_C_EXAMPLES=OFF \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules \
-D BUILD_EXAMPLES=ON ..
make -j4
sudo make install
sudo ldconfig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment