From 7a3e2029e2f156f13f3936669d624380805032e1 Mon Sep 17 00:00:00 2001 From: matlabbe Date: Sat, 21 Jun 2014 00:05:23 +0000 Subject: [PATCH] Fixed fullResults QMap for a QMultiMap (to handle nearest neighbors with exact same distance) git-svn-id: http://find-object.googlecode.com/svn/trunk/find_object@344 620bd6b2-0a58-f614-fd9a-1bd335dccda9 --- src/Vocabulary.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Vocabulary.cpp b/src/Vocabulary.cpp index e598e779..f6901988 100644 --- a/src/Vocabulary.cpp +++ b/src/Vocabulary.cpp @@ -61,7 +61,7 @@ QMultiMap Vocabulary::addWords(const cv::Mat & descriptors, int object int matches = 0; for(int i = 0; i < descriptors.rows; ++i) { - QMap fullResults; // nearest descriptors sorted by distance + QMultiMap fullResults; // nearest descriptors sorted by distance if(notIndexedDescriptors_.rows) { Q_ASSERT(newWords.type() == descriptors.type() && newWords.cols == descriptors.cols);