Update Vocabulary.cpp

This commit is contained in:
matlabbe 2016-09-03 19:24:54 -04:00 committed by GitHub
parent c899c2033d
commit 77b95d6b8c

View File

@ -243,7 +243,7 @@ QMultiMap<int, int> Vocabulary::addWords(const cv::Mat & descriptorsIn, int obje
else
{
cv::flann::Index tmpIndex;
#if CV_MAJOR_VERSION == 2 and CV_MINOR_VERSION == 4 and CV_SUBMINOR_VERSION == 12
#if CV_MAJOR_VERSION == 2 and CV_MINOR_VERSION == 4 and CV_SUBMINOR_VERSION >= 12
tmpIndex.build(notIndexedDescriptors_, cv::Mat(), cv::flann::LinearIndexParams(), Settings::getFlannDistanceType());
#else
tmpIndex.build(notIndexedDescriptors_, cv::flann::LinearIndexParams(), Settings::getFlannDistanceType());
@ -360,7 +360,7 @@ void Vocabulary::update()
if(!indexedDescriptors_.empty() && !Settings::isBruteForceNearestNeighbor())
{
cv::flann::IndexParams * params = Settings::createFlannIndexParams();
#if CV_MAJOR_VERSION == 2 and CV_MINOR_VERSION == 4 and CV_SUBMINOR_VERSION == 12
#if CV_MAJOR_VERSION == 2 and CV_MINOR_VERSION == 4 and CV_SUBMINOR_VERSION >= 12
flannIndex_.build(indexedDescriptors_, cv::Mat(), *params, Settings::getFlannDistanceType());
#else
flannIndex_.build(indexedDescriptors_, *params, Settings::getFlannDistanceType());