45 lines
1.5 KiB
C++
45 lines
1.5 KiB
C++
#ifndef GENETIC_IMAGE_INCLUDE_GENIMG_METHODS_HH_
|
|
#define GENETIC_IMAGE_INCLUDE_GENIMG_METHODS_HH_
|
|
|
|
#include <opencv2/core/core.hpp>
|
|
#include <opencv2/highgui/highgui.hpp>
|
|
#include <spdlog/spdlog.h>
|
|
#include <tuple>
|
|
#include <vector>
|
|
|
|
namespace methods_private {
|
|
|
|
[[nodiscard]] auto randomColor();
|
|
[[nodiscard]] auto getColorSet(cv::Mat const& t_reference);
|
|
[[nodiscard]] auto getSquareValues(cv::Mat const& t_img);
|
|
[[nodiscard]] auto getControlledSquareValues(cv::Mat const& t_img,
|
|
int const t_init_iter,
|
|
int const t_iter);
|
|
[[nodiscard]] auto createCandidate(
|
|
cv::Mat const& t_base,
|
|
cv::Mat const& t_ref,
|
|
std::vector<std::array<uchar, 3>> const& t_colors,
|
|
double const diff,
|
|
bool const t_controlled_size);
|
|
void adjustSize(cv::Mat const& t_process_img,
|
|
cv::Point& t_top_left,
|
|
int t_size);
|
|
void threadedGetColor(cv::Mat const& t_reference,
|
|
std::vector<std::array<uchar, 3>>& t_colors,
|
|
int t_h);
|
|
void newSquare1(cv::Mat& t_process_img, cv::Point&& t_top_left, int t_size);
|
|
void newSquare2(cv::Mat& t_process_img,
|
|
cv::Point&& t_top_left,
|
|
int t_size,
|
|
std::array<uchar, 3> const& t_color);
|
|
|
|
} // namespace methods_private
|
|
|
|
void method1(cv::Mat const&, cv::Mat&, int);
|
|
|
|
void method2(cv::Mat const&, cv::Mat&, int);
|
|
|
|
void method3(cv::Mat const&, cv::Mat&, int);
|
|
|
|
#endif /* GENETIC_IMAGE_INCLUDE_GENIMG_METHODS_HH_ */
|