From 4a2b9d6ea97b4300eddc81f5e94f41262a10cb04 Mon Sep 17 00:00:00 2001 From: matlabbe Date: Sun, 15 Nov 2020 09:24:36 -0500 Subject: [PATCH] fixed build with opencv >=4.4 and nonfree detected --- tools/similarity/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/similarity/main.cpp b/tools/similarity/main.cpp index ddc10e8f..aa307182 100644 --- a/tools/similarity/main.cpp +++ b/tools/similarity/main.cpp @@ -121,7 +121,7 @@ int main(int argc, char * argv[]) //////////////////////////// // EXTRACT KEYPOINTS //////////////////////////// -#if CV_MAJOR_VERSION < 4 || (CV_MAJOR_VERSION == 4 and CV_MINOR_VERSION < 3) +#if (CV_MAJOR_VERSION == 4 && CV_MINOR_VERSION <= 3) || (CV_MAJOR_VERSION == 3 && (CV_MINOR_VERSION < 4 || (CV_MINOR_VERSION==4 && CV_SUBMINOR_VERSION<11))) cv::Ptr sift = cv::xfeatures2d::SIFT::create(); #else cv::Ptr sift = cv::SIFT::create();