1 | initial version |
You are only installing the contrib package . Not the whole library. Try this :
sudo apt-get install build-essential
sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
sudo mkdir /opt/opencv-3.1.0
cd /opt/opencv-3.1.0
sudo git clone https://github.com/Itseez/opencv.git
sudo git clone https://github.com/Itseez/opencv_contrib.git
cd /opt/opencv-3.1.0/opencv sudo git checkout 3.1.0
cd /opt/opencv-3.1.0/opencv_contrib sudo git checkout 3.1.0
sudo mkdir /opt/opencv-3.1.0/opencv/release
cd /opt/opencv-3.1.0/opencv/release
sudo apt-get install qt5-default
sudo cmake -D CMAKE_BUILD_TYPE=RELEASE -DWITH_OPENGL=ON -DWITH_QT=ON -D CMAKE_INSTALL_PREFIX=/usr/local -D OPENCV_EXTRA_MODULES_PATH=/opt/opencv-3.1.0/opencv_contrib/modules ..
sudo make
sudo make install
pkg-config --modversion opencv