Last active
August 22, 2017 17:40
-
-
Save oak-tree/111338afc31fd5f6bbae37ffe6f76e8a to your computer and use it in GitHub Desktop.
install opencv 3.3 from sources
This file contains hidden or 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
sudo apt-get install qt-sdk | |
then follow | |
#http://docs.opencv.org/master/d7/d9f/tutorial_linux_install.html | |
sudo apt-get install build-essential | |
#install python header and includes | |
# | |
sudo apt-get install python2.7-dev | |
sudo apt-get install python3.4-dev | |
sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev | |
sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev | |
cd ~/git | |
git clone https://github.com/opencv/opencv.git | |
git clone https://github.com/opencv/opencv_contrib.git | |
cd ~/git/opencv | |
mkdir build | |
cd build | |
cmake -D CMAKE_BUILD_TYPE=Release -D OPENCV_EXTRA_MODULES_PATH=~/git/opencv_contrib -D CMAKE_INSTALL_PREFIX=/usr/local .. -D PYTHON2_EXECUTABLE=~/venv2/bin/python.exe -D PYTHON_INCLUDE_DIR=~/venv2/include -D PYTHON_LIBRARY=~/venv2/lib -D PYTHON2_NUMPY_INCLUDE_DIRS=~/venv2/lib/python2.7/site-packages/numpy/core/include | |
#Use cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local .. , without spaces after -D if the above example doesn't work. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment