下载源码:https://opencv.org/releases/
unzip opencv-3.4.12.zip
cd opencv-3.4.12/opencv-3.4.12/
mkdir build && cd build
cmake -D -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
sudo make -j4
sudo make install
打开图片时遇到的问题:
1:error while loading shared libraries: libopencv_imgcorec