fix initial values bug
authorKangning Song <sunskn@163.com>
Sun, 23 Dec 2018 03:28:28 +0000 (11:28 +0800)
committerGitHub <noreply@github.com>
Sun, 23 Dec 2018 03:28:28 +0000 (11:28 +0800)
modules/stitching/src/matchers.cpp

index 7526109..6105c67 100644 (file)
@@ -694,6 +694,7 @@ void FeaturesMatcher::operator ()(const std::vector<ImageFeatures> &features, st
             if (features[i].keypoints.size() > 0 && features[j].keypoints.size() > 0 && mask_(i, j))
                 near_pairs.push_back(std::make_pair(i, j));
 
+    pairwise_matches.clear(); // clear history values
     pairwise_matches.resize(num_images * num_images);
     MatchPairsBody body(*this, features, pairwise_matches, near_pairs);