From be164b77da66645519cd5dd03ac440e49313b90a Mon Sep 17 00:00:00 2001 From: Daniil Nikulin Date: Mon, 2 Nov 2020 11:46:56 +0300 Subject: [PATCH] search src images for patch_match from all set, but not only referenced subset --- src/mvs/patch_match.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/mvs/patch_match.cc b/src/mvs/patch_match.cc index e502cef7d5..1eeaf4fea9 100755 --- a/src/mvs/patch_match.cc +++ b/src/mvs/patch_match.cc @@ -314,8 +314,8 @@ void PatchMatchController::ReadProblems() { // Use all images as source images. problem.src_image_idxs.clear(); problem.src_image_idxs.reserve(model.images.size() - 1); - for (const int image_idx : ref_image_idxs) { - if (image_idx != problem.ref_image_idx) { + for (size_t image_idx = 0; image_idx < model.images.size(); ++image_idx) { + if (static_cast(image_idx) != problem.ref_image_idx) { problem.src_image_idxs.push_back(image_idx); } } @@ -346,8 +346,7 @@ void PatchMatchController::ReadProblems() { std::vector> src_images; src_images.reserve(overlapping_images.size()); for (const auto& image : overlapping_images) { - if (ref_image_idxs.count(image.first) && - overlapping_triangulation_angles.at(image.first) >= + if (overlapping_triangulation_angles.at(image.first) >= min_triangulation_angle_rad) { src_images.emplace_back(image.first, image.second); }