Created
July 27, 2018 10:41
-
-
Save techedlaksh/f38ebacad78f3f0e41283735b5e62e95 to your computer and use it in GitHub Desktop.
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 build-essential | |
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 | |
mkdir ~/Documents/temp | |
cd ~/Documents/temp | |
git clone https://github.com/opencv/opencv.git | |
cd opencv | |
git checkout 3.3.1 | |
cd .. | |
git clone https://github.com/opencv/opencv_contrib.git | |
cd opencv_contrib | |
git checkout 3.3.1 | |
cd .. | |
cd opencv | |
mkdir build | |
cd build | |
cmake -D CMAKE_BUILD_TYPE=RELEASE \ | |
-D CMAKE_INSTALL_PREFIX=/usr/local \ | |
-D INSTALL_C_EXAMPLES=ON \ | |
-D INSTALL_PYTHON_EXAMPLES=ON \ | |
-D WITH_TBB=ON \ | |
-D WITH_V4L=ON \ | |
-D WITH_QT=ON \ | |
-D WITH_OPENGL=ON \ | |
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules \ | |
-D BUILD_EXAMPLES=ON .. | |
make -j8 | |
sudo make install | |
sudo sh -c 'echo "/usr/local/lib" >> /etc/ld.so.conf.d/opencv.conf' | |
sudo ldconfig | |
find /usr/local/lib/ -type f -name "cv2*.so" | |
cd [path to your python local env sit-packages from line 31] | |
ln -s [path to your dist-packages of cv2] cv2.so |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment