The head hurts with the pit.
Process:
1. Browse Web download OpenCV source Opencv3.1.0 zip
2.unzip Decompression
3. Install a stack of pre-requisite environments:
sudo apt-get install xx xx xx
sudo apt-get install build-essentialsudo apt-get install CMake git libgtk2. 0-dev pkg-config libavcodec-dev libavformat-dev libswscale-devsudo apt-get Install Python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-
During the installation of the Libgtk2.0-dev, there was a dependency problem, and finally by switching the Apt-get source server as the ' primary server ' (because our lab's network can be automatically over the wall) resolved the problem (in the software update set)
It is said to choose another site to choose Ali or 163 mirror server speed is good!
4.CD Opencv3.1.0
mkdir Build
5.cmake There was always a problem with this, and finally the command option was used:
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..
cmake -D CMAKE_BUILD_TYPE=Release -DINSTALL_CREATE_DISTRIB=ON -D CMAKE_INSTALL_PREFIX=/usr/local ..
Make-j16 here is a parallel acceleration when cmake based on the number of CPU cores you have
The error that occurred:
Error: ' Nppigraphcutstate ' have not been declared
By modifying:
Vim ~/envoriment/opencv-3.1.0/modules/cudalegacy/src/graphcuts.cpp
Solve.
6.sudo make Install
7.
Gedit/etc/profile
Add the following two lines to save
Export pkg_config_path=$PKG _config_path:/usr/local/lib/pkgconfig
Export ld_library_path=$LD _library_path:/usr/local/lib
Source/etc/profile
Gedit/etc/bash.bashrc
Add the following two lines to save
Export pkg_config_path=$PKG _config_path:/usr/local/lib/pkgconfig
Export ld_library_path=$LD _library_path:/usr/local/lib
Source/etc/bash.bashrc
sudo ldconfig
ubuntu14.04 + gtx980ti + Cuda 8.0---Opencv3.1.0 configuration