安装3.4.1
配置方法:https://www.jianshu.com/p/f646448da265
卸载方法:https://www.cnblogs.com/txg198955/p/5990295.html
opencv:https://github.com/opencv/opencv/releases
opencv_contrib:https://github.com/opencv/opencv_contrib/releases
安装2.4.13.4在opencv2:(opencv2不需要opencv_contribe文件)
注意cmake opencv时,参数设置到不同的安装路径,然后在编译安装到两个路径下。
当自己所写的程序使用到opencv3时,在 find_package( OpenCV REQUIRED ) 前,添加OpenCV_DIR的路径设置
set(OpenCV_DIR "/usr/local/OpenCV3/share/OpenCV")
我:修改CMakeLists中的路径/usr/local/opencv2
使用时更改CmakeLists.txt中更改 find_package(OpenCV REQUIRED) 为具体的版本号,
find_package( OpenCV 3.1 REQUIRED )
find_package( OpenCV REQUIRED ) # use this if in OpenCV2