diff --git a/src/Vocabulary.cpp b/src/Vocabulary.cpp index c3b41906..8d64b4ff 100644 --- a/src/Vocabulary.cpp +++ b/src/Vocabulary.cpp @@ -243,7 +243,7 @@ QMultiMap 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());