【问题标题】:OpenCV build error while compiling with IE (Inference Engine)使用 IE(推理引擎)编译时出现 OpenCV 构建错误
【发布时间】:2020-09-02 07:32:28
【问题描述】:

OpenCV 版本:4.4.0(最新) OpenVINO 版本:2020.4(最新)

尝试在 Windows 10 上构建由 CMake 3.18.0 生成的项目时发生错误。 从零开始尝试了很多次(清除所有缓存,更新源代码,重新安装OpenVINO工具包,运行所有demo成功),但问题依然存在。

这是 VS 2019 构建错误日志:

46>Done building project "opencv_dnn.vcxproj" -- FAILED.

73>LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\opencv_dnn440.lib'
75>LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\opencv_dnn440.lib'
73>Done building project "opencv_text.vcxproj" -- FAILED.
81>------ Build started: Project: opencv_datasets, Configuration: Release x64 ------
82>------ Build started: Project: opencv_videostab, Configuration: Release x64 ------
75>Done building project "opencv_mcc.vcxproj" -- FAILED.

81>Done building project "opencv_datasets.vcxproj" -- FAILED.

88>Done building project "opencv_dnn_objdetect.vcxproj" -- FAILED.

87>LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\opencv_datasets440.lib'
87>Done building project "opencv_tracking.vcxproj" -- FAILED.

94>LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\opencv_tracking440.lib'
94>Done building project "opencv_stereo.vcxproj" -- FAILED.
95>cv2.cpp
95>D:\GitHub\opencv\opencv_contrib\modules\saliency\include\opencv2/saliency/saliencySpecializedClasses.hpp(1,1): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
95>D:\GitHub\opencv\opencv_contrib\modules\datasets\include\opencv2/datasets/dataset.hpp(1,1): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
93>LINK : fatal error LNK1181: cannot open input file '..\..\..\lib\Release\opencv_tracking440.lib'
93>Done building project "opencv_java.vcxproj" -- FAILED.
95>LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\opencv_dnn_superres440.lib'
95>Done building project "opencv_python3.vcxproj" -- FAILED.
96>------ Build started: Project: ALL_BUILD, Configuration: Release x64 ------
96>Building Custom Rule D:/GitHub/opencv/opencv/CMakeLists.txt

最后10个失败:

========== 构建:86 个成功,10 个失败,0 个最新,0 个跳过 ==========

注意:在我能够使用 IE 构建 OpenCV 之前没有任何错误,但在新版本中,编译和构建时出现了许多错误。

任何解决方案..?

如果需要,我准备提供更多日志和信息。

谢谢!!

【问题讨论】:

    标签: opencv openvino inference-engine


    【解决方案1】:

    通过使用 ngraph 标志配置 CMake 并定位其 CMake 文件 DIR 位置解决了该问题。

    【讨论】:

    • 如果在命令行中使用 CMake,可以在构建之前将选项 -DNGRAPH=ON 添加到选项列表中。它确实对我有用(在 Windows 10 上编译 OpenCV 4.5.5)。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-10-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-01-22
    相关资源
    最近更新 更多