oops, wrong order

This commit is contained in:
Phuntsok Drak-pa 2019-04-08 00:57:54 +02:00
parent 3bd03afd1d
commit 629c2e52c1
1 changed files with 4 additions and 6 deletions

View File

@ -78,18 +78,16 @@ namespace methods_private {
int const t_iter = 0) int const t_iter = 0)
{ {
auto temp_image = t_base.clone(); auto temp_image = t_base.clone();
// auto const [rand_x, rand_y, size]
// = methods_private::getSquareValues(temp_image);
auto const [rand_x, rand_y, size] auto const [rand_x, rand_y, size]
= t_controlled_size ? methods_private::getSquareValues(temp_image) = t_controlled_size ? methods_private::getControlledSquareValues(
: methods_private::getControlledSquareValues( temp_image, t_init_iter, t_iter)
temp_image, t_init_iter, t_iter); : methods_private::getSquareValues(temp_image);
methods_private::newSquare2(temp_image, cv::Point{rand_x, rand_y}, size, methods_private::newSquare2(temp_image, cv::Point{rand_x, rand_y}, size,
t_colors[rand() % t_colors.size()]); t_colors[rand() % t_colors.size()]);
auto new_diff = euclidian_distance(t_ref, temp_image); auto new_diff = euclidian_distance(t_ref, temp_image);
return (new_diff < diff) return (new_diff < diff)
? std::optional<std::pair<cv::Mat, double>>{std::make_pair( ? std::optional<std::pair<cv::Mat, double>>{std::make_pair(
std::move(temp_image), new_diff)} std::move(temp_image), new_diff)}
: std::nullopt; : std::nullopt;
} }