Merge pull request #19956 from danielenricocahall:fix-edge-case-matcher-loop

pull/20018/head
Alexander Alekhin 4 years ago
commit 17ab61a40d
  1. 2
      modules/stitching/src/matchers.cpp

@ -826,7 +826,7 @@ void BestOf2NearestRangeMatcher::operator ()(const std::vector<ImageFeatures> &f
std::vector<std::pair<int,int> > near_pairs;
for (int i = 0; i < num_images - 1; ++i)
for (int j = i + 1; j < std::min(num_images, i + range_width_); ++j)
for (int j = i + 1; j < std::min(num_images, i + 1 + range_width_); ++j)
if (features[i].keypoints.size() > 0 && features[j].keypoints.size() > 0 && mask_(i, j))
near_pairs.push_back(std::make_pair(i, j));

Loading…
Cancel
Save