我正在寻找数据库内的图片(1000张图片) . 为了做到这一点,我使用ORB功能袋 . 然后,我使用LSH .

有一些我根本不懂的东西 . 有了KD-TREE,我得到了我最近的3个邻居之一,那么其他结果非常糟糕 . 我认为这是因为KD-TREE在高维数据中的表现非常糟糕 .

指数:[47,194,1118]区:[0,0.01984383,0.021690277]

然后当我使用具有汉明距离的LSH时,无论我的查询图像如何,我总是得到相同的不良结果 .

索引:[0,1,2] Dist:[0,0,0]

responseDatabase.convertTo(responseDatabase,CV_8U);
 cv::flann::Index flannIndex(responseDatabase,cv::flann::LshIndexParams(20,10,2), cvflann::FLANN_DIST_HAMMING);
cv::Mat results, dists;
 int k=3; // find the 3 nearest neighbors


// search (nearest neighbor)
responseQuery.convertTo(responseQuery,CV_8U);
flannIndex.knnSearch(responseQuery, results, dists, k, cv::flann::SearchParams() );

cv::flann::Index flannIndex(responseDatabase,cv::flann::KDTreeIndexParams,cvflann::FLANN_DIST_EUCLIDEAN);
cv::Mat results, dists;
 int k=3; // find the 3 nearest neighbors


// search (nearest neighbor)
flannIndex.knnSearch(responseQuery, results, dists, k, cv::flann::SearchParams() );

responseQuery - > cv :: Mat包含查询databaseQuery的响应直方图 - > cv :: Mat,其中包含我数据库所有图片的响应直方图

我错过了什么吗?也许和ORB一样,除了其他东西之外我还有什么需要做的?我确切地说,首先我使用SIFT和SURF与LSH和KD-TREE,即使它不完美我也得到了相当不错的结果 .

谁能解释我为什么?我真的不明白为什么 .

但是我使用BruteForce-Hamming作为匹配器 .