Install OpenCV3.3 in Ubuntu 16.04 with CUDA8.0 Inside
Here, I give a brief tutorial on how to install openCV3.2 on Ubuntu, please follow this instruction step by step.
Useful links: pyimagesearch debugvn
# install prerequirements 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 sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev sudo apt-get install libxvidcore-dev libx264-dev sudo apt-get install libgtk-3-dev sudo apt-get install libatlas-base-dev gfortran sudo apt-get install python2.7-dev python3.5-dev
# to be able to use with python3, you should install pip3 first sudo apt-get update sudo apt-get -y install python3-pip sudo apt-get update
# make a build folder and generate with cmake cd Documents # download the data from my drive with this link: <request to my email> GDRIVE
# remove my built files and then build yours cd ~/Documents/opencv-3.3.0/ rm -rf build mkdir build cd build
# configuration of the cmake cmake -D CMAKE_BUILD_TYPE=RELEASE \ -D CMAKE_INSTALL_PREFIX=/usr/local \ -D INSTALL_PYTHON_EXAMPLES=ON \ -D INSTALL_C_EXAMPLES=OFF \ -D WITH_CUDA=ON \ -D ENABLE_FAST_MATH=1 \ -D CUDA_FAST_MATH=1 \ -D WITH_CUBLAS=1 \ -D OPENCV_EXTRA_MODULES_PATH=~/Documents/opencv_contrib-3.3.0/modules \ -D BUILD_EXAMPLES=ON \ -D BUILD_opencv_xfeatures2d=OFF ..
# depend on your number of core nproc, mine 20 make -j20
# install sudo make install sudo ldconfig
# depend on your path ls -l /usr/local/lib/python2.7/site-packages # or ls -l /usr/local/lib/python2.7/dist-packages total 2092 -rw-r--r-- 1 root staff 2138812 Jun 2 14:11 cv2.so
# check python import cv2 cv2.__version__ exit()
python3 import cv2 cv2.__version__ exit()













