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
This commit is contained in:
matlabbe 2014-06-21 00:05:23 +00:00
parent 6b41293f74
commit 7a3e2029e2

View File

@ -61,7 +61,7 @@ QMultiMap<int, int> Vocabulary::addWords(const cv::Mat & descriptors, int object
int matches = 0; int matches = 0;
for(int i = 0; i < descriptors.rows; ++i) for(int i = 0; i < descriptors.rows; ++i)
{ {
QMap<float, int> fullResults; // nearest descriptors sorted by distance QMultiMap<float, int> fullResults; // nearest descriptors sorted by distance
if(notIndexedDescriptors_.rows) if(notIndexedDescriptors_.rows)
{ {
Q_ASSERT(newWords.type() == descriptors.type() && newWords.cols == descriptors.cols); Q_ASSERT(newWords.type() == descriptors.type() && newWords.cols == descriptors.cols);