c++ - OpenCV 包含错误 "Cannot open source file"

标签 c++ opencv

我是 OpenCV 的新手。我安装了 Visual Studio 2015 和 OpenCV3.1。 我已经包含了所有依赖项并包含文件位置。 但是我收到错误:

cannot open source file"opencv2/imgproc/imgproc.hpp"
cannot open source file"opencv2/imgcodecs.hpp"
cannot open source file"opencv2/highgui/highgui.hpp"

任何人都可以帮助解决问题是什么?

最佳答案

在额外的 Include 目录中,路径应该类似于 .. 'C:\OpenCV-3.0.0\opencv\build\include' once 是否是 #include "opencv2/imgcodecs.hpp"#include "opencv2/imgcodecs/imgcodecs.hpp" 因为在这个版本中我使用的是文件夹 imgcodecs 中的头文件。

关于c++ - OpenCV 包含错误 "Cannot open source file",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38722808/

相关文章:

c++ - vector 读取特定行

c++ - 无法解决错误 : indirection requires pointer operand ('int' invalid)

c++ - 指向 std::thread 的共享指针是一种不好的做法吗?

android - JNI- java.lang.UnsatisfiedLinkError : Native method not found

python - 我怎样才能使用 tensorflow 对象检测来只检测人?

java - 检测霍夫圆android

c++ - 通过引用符号传递

c++ - 将一个命名空间数据成员访问到另一个

c++ - OpenCV 拟合线异常

xml - 用于手势识别的 Haar 训练数据集 - 计数