This commit is contained in:
matlabbe 2017-10-04 10:58:00 -04:00
parent ca01bf55d4
commit d99426eb85
3 changed files with 5 additions and 10 deletions

View File

@ -337,7 +337,6 @@ public:
static bool isBruteForceNearestNeighbor();
static cv::flann::IndexParams * createFlannIndexParams();
static cvflann::flann_distance_t getFlannDistanceType();
static cv::flann::SearchParams getFlannSearchParams();
static int getHomographyMethod();

View File

@ -1401,14 +1401,6 @@ cvflann::flann_distance_t Settings::getFlannDistanceType()
return distance;
}
cv::flann::SearchParams Settings::getFlannSearchParams()
{
return cv::flann::SearchParams(
getNearestNeighbor_search_checks(),
getNearestNeighbor_search_eps(),
getNearestNeighbor_search_sorted());
}
int Settings::getHomographyMethod()
{
int method = cv::RANSAC;

View File

@ -440,7 +440,11 @@ void Vocabulary::search(const cv::Mat & descriptorsIn, cv::Mat & results, cv::Ma
}
else
{
flannIndex_.knnSearch(descriptors, results, dists, k, Settings::getFlannSearchParams());
flannIndex_.knnSearch(descriptors, results, dists, k,
cv::flann::SearchParams(
Settings::getNearestNeighbor_search_checks(),
Settings::getNearestNeighbor_search_eps(),
Settings::getNearestNeighbor_search_sorted()));
}
if( dists.type() == CV_32S )