2019-03-24 18:43:25 +00:00
|
|
|
#ifndef GENETIC_IMAGE_INCLUDE_GENIMG_METHODS_HH_
|
|
|
|
#define GENETIC_IMAGE_INCLUDE_GENIMG_METHODS_HH_
|
2019-03-20 19:15:53 +00:00
|
|
|
|
|
|
|
#include <opencv2/core/core.hpp>
|
|
|
|
#include <opencv2/highgui/highgui.hpp>
|
2019-03-28 11:39:33 +00:00
|
|
|
#include <spdlog/spdlog.h>
|
2019-04-02 08:37:14 +00:00
|
|
|
#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);
|
2019-04-02 08:54:01 +00:00
|
|
|
[[nodiscard]] auto getControlledSquareValues(cv::Mat const& t_img,
|
|
|
|
int const t_init_iter,
|
|
|
|
int const t_iter);
|
2019-04-02 08:37:14 +00:00
|
|
|
[[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
|
2019-03-20 19:15:53 +00:00
|
|
|
|
2019-03-28 11:26:05 +00:00
|
|
|
void method1(cv::Mat const&, cv::Mat&, int);
|
2019-03-20 19:15:53 +00:00
|
|
|
|
2019-03-28 11:26:05 +00:00
|
|
|
void method2(cv::Mat const&, cv::Mat&, int);
|
2019-03-21 01:49:00 +00:00
|
|
|
|
2019-03-28 11:26:05 +00:00
|
|
|
void method3(cv::Mat const&, cv::Mat&, int);
|
2019-03-25 16:14:57 +00:00
|
|
|
|
2019-03-24 18:43:25 +00:00
|
|
|
#endif /* GENETIC_IMAGE_INCLUDE_GENIMG_METHODS_HH_ */
|