Rebuilding OpenCV

After Vision Extension Package has been installed on CentOS 7, rebuild the OpenCV libraries to start using APU emulation. This procedure requires the GCC and TCL packages installed on your CentOS 7.

  1. Before rebuilding OpenCV, install the libraries for image I/O and video stream processing using these commands:
    sudo yum install cmake git pkgconfig
    sudo yum install libpng-devel libjpeg-turbo-devel jasper-devel openexr-devel libtiff-devel libwebp-devel
    sudo yum install libdc1394-devel libv4l-devel ffmpegdevel gstreamer-plugins-base-devel
    sudo yum install gtk2-devel
    sudo yum install tbb-devel eigen3-devel
  2. Rebuild OpenCV using these commands:
    cd ~
    git clone https://github.com/Itseez/opencv.git
    cd opencv
    git checkout 3.1.0
    cd ~/opencv
    mkdir build
    cd build
    sudo cmake -D CMAKE_BUILD_TYPE=RELEASE
    sudo make
    sudo make install
  3. Navigate to the default OpenCV folder (<S32DS_install_dir>/S32DS/software/VSDK_S32V2_RTM_1_3_0/s32v234_sdk/3rdparty/ocv/linux-x86) and delete all files except the include folder.
  4. Copy new OpenCV files (the bin and lib folders) to this folder.