【发布时间】:2020-02-15 14:22:14
【问题描述】:
我正在使用来自https://github.com/opencv/opencv/archive/4.0.0.zip 的 OpenCV 4.0 下面是代码
#include "opencv2/core.hpp"
#include <opencv2/core/utility.hpp>
#include "opencv2/highgui.hpp"
using namespace std;
using namespace cv;
int main(int argc, const char* argv[]){
Mat frame0 = imread("hallo");
return 0;
}
我用它编译
g++ -std=c++11 test.cpp -o test -I/home/user/opencv/modules/core/include/ -I/home/user/opencv/modules/highgui/include/ -L/home/user/opencv/build/lib -lopencv_objdetect -lopencv_features2d -lopencv_imgproc -lopencv_highgui -lopencv_core -lopencv_imgcodecs
它给我带来了错误
test.cpp: In function ‘int main(int, const char**)’:
test.cpp:11:32: error: ‘imread’ was not declared in this scope
Mat frame0 = imread("hallo");
关于如何解决它的任何方向?
【问题讨论】:
-
这能回答你的问题吗? Using OpenCV in eclipse