genetic-images/src/main.cc

25 lines
517 B
C++
Raw Normal View History

2019-03-19 09:14:19 +00:00
#include <iostream>
2019-03-19 10:15:42 +00:00
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
using namespace std;
2019-03-19 09:14:19 +00:00
int main(int argc, char **argv) {
2019-03-19 10:15:42 +00:00
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";
}
2019-03-19 09:14:19 +00:00
return 0;
}