2019-03-19 12:49:37 +00:00
|
|
|
#include "parseargs.hh"
|
2019-03-19 10:15:42 +00:00
|
|
|
#include <opencv2/core/core.hpp>
|
|
|
|
#include <opencv2/highgui/highgui.hpp>
|
2019-03-19 13:22:59 +00:00
|
|
|
#include <spdlog/spdlog.h>
|
2019-03-19 12:49:37 +00:00
|
|
|
#include <string>
|
2019-03-19 10:15:42 +00:00
|
|
|
|
2019-03-19 12:49:37 +00:00
|
|
|
int main(int ac, char **av) {
|
2019-03-19 13:22:59 +00:00
|
|
|
const auto [input_file, output_file, video_output, iterations] =
|
|
|
|
parse_args(ac, av);
|
|
|
|
spdlog::info("Input file:\t{}", input_file);
|
|
|
|
spdlog::info("Output file:\t{}", output_file);
|
|
|
|
spdlog::info("Video output:\t{}", video_output);
|
|
|
|
spdlog::info("Iterations:\t{}", iterations);
|
2019-03-19 12:49:37 +00:00
|
|
|
cv::Mat image = cv::imread(input_file, cv::IMREAD_COLOR); // Read the file
|
|
|
|
if (!image.data) { // Check for invalid input
|
2019-03-19 13:22:59 +00:00
|
|
|
spdlog::critical("Could not open or find image!\n");
|
2019-03-19 10:15:42 +00:00
|
|
|
return -1;
|
|
|
|
}
|
2019-03-19 13:22:59 +00:00
|
|
|
spdlog::info("Image loaded!");
|
|
|
|
spdlog::info("Width:\t{}", image.size().width);
|
|
|
|
spdlog::info("Height:\t{}", image.size().height);
|
2019-03-19 10:15:42 +00:00
|
|
|
|
2019-03-19 09:14:19 +00:00
|
|
|
return 0;
|
|
|
|
}
|