changed program options, individual tiles load
This commit is contained in:
@@ -13,24 +13,34 @@
|
||||
class ImageManipulator {
|
||||
public:
|
||||
ImageManipulator() = delete;
|
||||
ImageManipulator(const ImageManipulator& other) = delete;
|
||||
ImageManipulator(ImageManipulator&& other) noexcept = delete;
|
||||
ImageManipulator& operator=(const ImageManipulator& other) = delete;
|
||||
ImageManipulator& operator=(ImageManipulator&& other) noexcept = delete;
|
||||
ImageManipulator(const ImageManipulator& other);
|
||||
ImageManipulator(ImageManipulator&& other) noexcept;
|
||||
[[nodiscard]] auto operator=(const ImageManipulator& other)
|
||||
-> ImageManipulator;
|
||||
[[nodiscard]] auto operator=(ImageManipulator&& other) noexcept
|
||||
-> ImageManipulator;
|
||||
|
||||
// Load image from input, and prepare for output
|
||||
ImageManipulator(std::filesystem::path const t_input_path,
|
||||
std::filesystem::path const t_output_path,
|
||||
int const iterations);
|
||||
// ImageManipulator(cv::Mat const& t_origin_image,
|
||||
// int const iterations,
|
||||
// int const t_x,
|
||||
// int const t_y,
|
||||
// int const t_width,
|
||||
// int const t_height);
|
||||
ImageManipulator(cv::Mat const& t_origin_image,
|
||||
int const iterations,
|
||||
int const t_x,
|
||||
int const t_y,
|
||||
int const t_width,
|
||||
int const t_height);
|
||||
|
||||
void exec_method(int const t_nb_method, bool const t_controlled_size);
|
||||
void exec_method(int const t_nb_method,
|
||||
bool const t_controlled_size,
|
||||
int const t_cols,
|
||||
int const t_rows,
|
||||
int const t_submethod);
|
||||
void write_file() const;
|
||||
[[nodiscard]] auto const& get_generated_image() const noexcept
|
||||
{
|
||||
return generated_image_;
|
||||
}
|
||||
|
||||
//! Destructor
|
||||
virtual ~ImageManipulator() noexcept = default;
|
||||
@@ -51,21 +61,27 @@ class ImageManipulator {
|
||||
cv::Point const& t_top_left,
|
||||
int const t_size,
|
||||
cv::Scalar const& t_color) const;
|
||||
void update_gen_image(cv::Mat const& t_img, double const t_diff);
|
||||
void update_gen_image(cv::Mat const& t_img, double const t_diff);
|
||||
void method1();
|
||||
void method2();
|
||||
void method3();
|
||||
void method4(bool const t_controlled_size);
|
||||
void method5(bool const t_controlled_size,
|
||||
int cols,
|
||||
int const rows,
|
||||
int const submethod);
|
||||
|
||||
std::vector<std::array<uchar, 3>> colors_
|
||||
= std::vector<std::array<uchar, 3>>{};
|
||||
cv::Mat const reference_;
|
||||
cv::Mat generated_image_;
|
||||
std::mutex colors_mutex_ = std::mutex{};
|
||||
std::string const output_path_;
|
||||
cv::Mat generated_image_
|
||||
= cv::Mat{reference_.size().height, reference_.size().width, CV_8UC3,
|
||||
cv::Scalar(0, 0, 0)};
|
||||
mutable std::mutex colors_mutex_ = std::mutex{};
|
||||
std::string const output_path_{""};
|
||||
double diff_ = 0.0;
|
||||
int const total_iterations_ = 0;
|
||||
int remaining_iter_ = 0;
|
||||
int const width_;
|
||||
int const height_;
|
||||
int remaining_iter_ = total_iterations_;
|
||||
int const width_ = reference_.size().width;
|
||||
int const height_ = reference_.size().height;
|
||||
};
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef GENETIC_IMAGE_INCLUDE_GENIMG_PARSEARGS_HH_
|
||||
#define GENETIC_IMAGE_INCLUDE_GENIMG_PARSEARGS_HH_
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <tuple>
|
||||
@@ -10,7 +9,6 @@
|
||||
int,
|
||||
int,
|
||||
int,
|
||||
int,
|
||||
bool,
|
||||
bool>;
|
||||
|
||||
#endif /* GENETIC_IMAGE_INCLUDE_GENIMG_PARSEARGS_HH_ */
|
||||
|
||||
Reference in New Issue
Block a user