hello I had imported OpenCV into my C project but for some reason my code gives me this error.
CODE:
#include <opencv2/imgcodecs.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <iostream>
int main()
{
std::string path = "Resources/test.png";
cv::Mat img = cv::imread(path);
imshow("Image", img);
cv::waitKey(0);
return 0;
}
error:
I think it might be because of my paths but I'm not sure I think I got them right.
enter image description here
CodePudding user response:
The solution was to install a new setup and install OpenCV into another path thank you to everyone who helped.