Я использую OpenCV 4.0 из https://github.com/opencv/opencv/archive/4.0.0.zip Ниже приведен код
#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");
Есть ли какие-либо инструкции по ее решению?