From 3930c9a49201677e9e6b3e17b0a4cc932f9c4fc7 Mon Sep 17 00:00:00 2001 From: danielenricocahall Date: Tue, 20 Apr 2021 22:08:01 -0400 Subject: [PATCH] fix loop boundary condition --- modules/stitching/src/matchers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/stitching/src/matchers.cpp b/modules/stitching/src/matchers.cpp index 4c6cce8038..b3f1c7a1bf 100644 --- a/modules/stitching/src/matchers.cpp +++ b/modules/stitching/src/matchers.cpp @@ -826,7 +826,7 @@ void BestOf2NearestRangeMatcher::operator ()(const std::vector &f std::vector > 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)); -- 2.34.1