1、下载OpenCV3.4.1
https://docs.opencv.org/3.4.1.zip
2、下载并配置CMake,然后编译OpenCV
安装编译命令
cd opencv-3.4.1
cd release
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
make
sudo make install
安装成功后目录
/usr/local/share/OpenCV/