方式一:
查看opencv 3以及以下版本:
pkg-config --modversion opencv
查看opencv4版本:
pkg-config --modversion opencv4
方式二:
Ubuntu安装opencv 3.3.1
mkdir opencv_src && cd opencv_src
wget https://github.com/opencv/opencv/archive/3.3.1.zip +
unzip 3.3.1.zip
cd opencv-3.3.1
mkdir build && cd build
cmake
sudo make
sudo make install