Skip to content

Instantly share code, notes, and snippets.

@alertor
Last active August 29, 2015 14:03
Show Gist options
  • Save alertor/ccd5b50b5889882797cb to your computer and use it in GitHub Desktop.
Save alertor/ccd5b50b5889882797cb to your computer and use it in GitHub Desktop.
Installing OpenCV on Ubuntu 14.04
[compiler] sudo apt-get install build-essential
[required] sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
[optional] sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
cd ~/<my_working _directory>
git clone https://github.com/Itseez/opencv.git
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON ..
make -j2
sudo checkinstall
sudo sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'
sudo ldconfig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment