genetic-images/src/main.cc

26 lines
980 B
C++

#include "methods.hh"
#include "parseargs.hh"
#include <cstdlib>
#include <ctime>
#include <iostream>
int main(int ac, char **av)
{
std::srand(std::time(nullptr));
spdlog::set_level(spdlog::level::debug);
auto const arguments = parse_args(ac, av);
spdlog::set_level(arguments.verbose ? spdlog::level::debug
: spdlog::level::info);
spdlog::set_pattern("[thread %t] %+");
spdlog::debug("Input file:\t{}", arguments.input_path.native());
spdlog::debug("Output file:\t{}", arguments.output_path.native());
spdlog::debug("Iterations:\t{}", arguments.iterations);
ImageManipulator image_process{arguments.input_path, arguments.output_path,
arguments.iterations, arguments.shape};
image_process.exec_method(arguments.method, arguments.controlled_size,
arguments.cols, arguments.rows,
arguments.submethod);
image_process.write_file();
}