I am running the code I am using the opencv functions imread() and the data structure Mat.
#include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
using namespace cv;
int main(){
int x;
Mat img = imread("D:/OwnResearch/photo2.jpg");
std::cout << img << std::endl;
std::cin >> x;
return 0;
}
And I keep receiving the error Unhandled exception at 0x0000000000000000 in opencvtest.exe: 0xC0000005: Access violation executing location 0x0000000000000000. It seems like nothing is being loaded. I checked the directory of the file and it seems to be correct. I am not sure what the problem is.