主要针对这个问题: CMake Error at cmake/OpenCVModule.cmake:352 (message): Duplicated modules NAMES has been found Call Stack (most recent call first): cmake/OpenCVModule.cmake:370 (_assert_uniqueness) modules/CMakeLists.txt:7 (ocv_glob_modules) 解决办法就是去正儿八经的opencv官网那个下载对应的contrib模块,正确的对应contrib模块(以opencv3.4.5版本为例)名字一定是opencv_contrib-3.4.5,而不是opencv_contrib-master!!!!!!!!! 参考教程:https://blog.csdn.net/u012704941/article/details/80396249#commentBox(使用前先把安装的opencv卸载干净:https://blog.csdn.net/haoqimao_hard/article/details/82049565#commentBox) 正确的contrib模块下载官网:https://github.com/opencv/opencv_contrib/tree/3.4 注意不同的版本可以先打开连接,如图然后在淡蓝色方框下有一个Tags按键(Branches按键右面),可以选择对应的opencv_contrib版本,然后将下载下来的opencv_contrib-3.4.5放在已经下载好的opencv-3.4.5源码文件夹下,按着教程编译就好了,可以参考教程:https://blog.csdn.net/weixin_45117253/article/details/103861245#commentBox。
|