genetic-images/src/main.cc
2019-03-19 11:15:42 +01:00

25 lines
517 B
C++

#include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
using namespace std;
int main(int argc, char **argv) {
if (argc != 2) {
cout << " Usage: display_image ImageToLoadAndDisplay" << endl;
return -1;
}
cv::Mat image = cv::imread(argv[1], cv::IMREAD_COLOR); // Read the file
if (!image.data) // Check for invalid input
{
cout << "Could not open or find the image" << std::endl;
return -1;
} else {
cout << "Loaded image!\n";
}
return 0;
}