18 lines
640 B
C++
18 lines
640 B
C++
#include "common.hh"
|
|
#include <cstdlib>
|
|
|
|
std::tuple<cv::Mat, cv::Mat> init_image(const std::string &t_input_file) {
|
|
cv::Mat input_image =
|
|
cv::imread(t_input_file, cv::IMREAD_COLOR);
|
|
if (!input_image.data) {
|
|
spdlog::critical("Could not open or find image!\n");
|
|
exit(-1);
|
|
}
|
|
spdlog::info("Image loaded!");
|
|
spdlog::info("Width:\t\t{}", input_image.size().width);
|
|
spdlog::info("Height:\t{}", input_image.size().height);
|
|
cv::Mat process_image(input_image.size().width, input_image.size().height,
|
|
CV_8UC3, cv::Scalar(0, 0, 0));
|
|
return std::make_tuple(std::move(input_image), process_image);
|
|
}
|