oops, wrong order

parent 3bd03afd
......@@ -78,18 +78,16 @@ namespace methods_private {
int const t_iter = 0)
{
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]
= t_controlled_size ? methods_private::getSquareValues(temp_image)
: methods_private::getControlledSquareValues(
temp_image, t_init_iter, t_iter);
= t_controlled_size ? methods_private::getControlledSquareValues(
temp_image, t_init_iter, t_iter)
: methods_private::getSquareValues(temp_image);
methods_private::newSquare2(temp_image, cv::Point{rand_x, rand_y}, size,
t_colors[rand() % t_colors.size()]);
auto new_diff = euclidian_distance(t_ref, temp_image);
return (new_diff < diff)
? std::optional<std::pair<cv::Mat, double>>{std::make_pair(
std::move(temp_image), new_diff)}
std::move(temp_image), new_diff)}
: std::nullopt;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment