1 | initial version |
please burn that, immediately. whereever you found that, don't go back there again.
this is opencv1.0 c-based code from before 2010, you MUST NOT use it.
#include "opencv2/opencv.hpp"
using namespace cv;
int main() {
Mat img = imread("/some/path/img.png");
if (img.empty()) { // most likely, here's your problem.
// not found, wrong path, adjust, and try again !
return -1;
}
imshow("Example", img);
waitKey();
return 0;
}
2 | No.2 Revision |
please burn that, immediately. whereever you found that, don't go back there again.
this is opencv1.0 c-based code from before 2010, you MUST NOT use it.
#include "opencv2/opencv.hpp"
using namespace cv;
int main() {
Mat img = imread("/some/path/img.png");
if (img.empty()) { // most likely, here's your problem.
// not found, wrong path, adjust, and try again !
return -1;
}
imshow("Example", img);
waitKey();
return 0;
}
please also take a tour of the tutorials here