less duplicate code

This commit is contained in:
Phuntsok Drak-pa
2019-04-02 10:37:14 +02:00
parent 15488ace23
commit 72b91ab1b1
2 changed files with 91 additions and 45 deletions

View File

@@ -4,6 +4,33 @@
#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 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);