mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +08:00
fix loop boundary condition
This commit is contained in:
parent
0649a2fbdb
commit
3930c9a492
@ -826,7 +826,7 @@ void BestOf2NearestRangeMatcher::operator ()(const std::vector<ImageFeatures> &f
|
|||||||
|
|
||||||
std::vector<std::pair<int,int> > near_pairs;
|
std::vector<std::pair<int,int> > near_pairs;
|
||||||
for (int i = 0; i < num_images - 1; ++i)
|
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))
|
if (features[i].keypoints.size() > 0 && features[j].keypoints.size() > 0 && mask_(i, j))
|
||||||
near_pairs.push_back(std::make_pair(i, j));
|
near_pairs.push_back(std::make_pair(i, j));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user