Installing Open CV
You can install the Open Source Computer Vision (OpenCV) 3.2 library if you need to customize models with the features of OpenCV 3.2.
Procedure
-
Get the OpenCV source code from Github:
wget https://github.com/opencv/opencv/archive/3.2.0.zip -
Unpack the downloaded package and change to the package directory:
unzip 3.2.0.zip
cd opencv-3.2.0 -
Create a building subdirectory and change to the directory:
mkdir build
cd build -
Prepare and generate the building configuration:
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D WITH_V4L=ON .. -
Compile and build the package:
make -j $(($(nproc) + 1)) -
Install the package:
sudo make install -
Register the libraries and modules to the system:
sudo /bin/bash -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'
sudo ldconfig -
If required, uninstall the old opencv version to avoid version collision:
sudo apt-get autoremove libopencv-dev