最近使用到了OpenCV扩展库contribute,踩了一点小坑整理了个教程,基本在OpenCV3.x.x版本通用,其他版本没有实践不好叙述,供后续使用者学习参考:
1.前期准备
需要准备三个内容,分别是OpenCV OpenCV contribute和CMake:
在前期准备中,最重要的就是OpenCV的使用版本与OpenCV contrib的版本一致,需要特别注意,不要直接下载contrib的版本,因为很可能下载到其他版本,这里直接给出github版本的发布页,
OpenCV:https://github.com/opencv/opencv/releases
OpenCV contribute:https://github.com/opencv/opencv_contrib/releases
CMake:https://cmake