From 3b9aebee118ed2e467aebc277f721f3c91345b94 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Tue, 9 Feb 2021 16:54:06 +0300 Subject: [PATCH] Not not test stitiching with SURF, if NONFREE is disabled --- modules/stitching/perf/opencl/perf_stitch.cpp | 2 +- modules/stitching/perf/perf_estimators.cpp | 2 +- modules/stitching/perf/perf_matchers.cpp | 2 +- modules/stitching/perf/perf_precomp.hpp | 2 ++ modules/stitching/perf/perf_stich.cpp | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/stitching/perf/opencl/perf_stitch.cpp b/modules/stitching/perf/opencl/perf_stitch.cpp index 9a84d3edc1..6e791a9530 100644 --- a/modules/stitching/perf/opencl/perf_stitch.cpp +++ b/modules/stitching/perf/opencl/perf_stitch.cpp @@ -19,7 +19,7 @@ namespace ocl { typedef TestBaseWithParam stitch; -#ifdef HAVE_OPENCV_XFEATURES2D +#if defined(HAVE_OPENCV_XFEATURES2D) && defined(OPENCV_ENABLE_NONFREE) #define TEST_DETECTORS testing::Values("surf", "orb", "akaze") #else #define TEST_DETECTORS testing::Values("orb", "akaze") diff --git a/modules/stitching/perf/perf_estimators.cpp b/modules/stitching/perf/perf_estimators.cpp index 7b2b533927..9d0a0426a9 100644 --- a/modules/stitching/perf/perf_estimators.cpp +++ b/modules/stitching/perf/perf_estimators.cpp @@ -8,7 +8,7 @@ using namespace perf; typedef TestBaseWithParam > bundleAdjuster; -#ifdef HAVE_OPENCV_XFEATURES2D +#if defined(HAVE_OPENCV_XFEATURES2D) && defined(OPENCV_ENABLE_NONFREE) #define TEST_DETECTORS testing::Values("surf", "orb") #else #define TEST_DETECTORS testing::Values("orb") diff --git a/modules/stitching/perf/perf_matchers.cpp b/modules/stitching/perf/perf_matchers.cpp index 0ab4340673..bd21de82ae 100644 --- a/modules/stitching/perf/perf_matchers.cpp +++ b/modules/stitching/perf/perf_matchers.cpp @@ -17,7 +17,7 @@ typedef TestBaseWithParam matchVector; #define ORB_MATCH_CONFIDENCE 0.3f #define WORK_MEGAPIX 0.6 -#ifdef HAVE_OPENCV_XFEATURES2D +#if defined(HAVE_OPENCV_XFEATURES2D) && defined(OPENCV_ENABLE_NONFREE) #define TEST_DETECTORS testing::Values("surf", "orb") #else #define TEST_DETECTORS testing::Values("orb") diff --git a/modules/stitching/perf/perf_precomp.hpp b/modules/stitching/perf/perf_precomp.hpp index fcbdc68c25..7359f8f600 100644 --- a/modules/stitching/perf/perf_precomp.hpp +++ b/modules/stitching/perf/perf_precomp.hpp @@ -11,8 +11,10 @@ static inline Ptr getFeatureFinder(const std::string& na { if (name == "orb") return makePtr(); +#if defined(HAVE_OPENCV_XFEATURES2D) && defined(OPENCV_ENABLE_NONFREE) else if (name == "surf") return makePtr(); +#endif else if (name == "akaze") return makePtr(); else diff --git a/modules/stitching/perf/perf_stich.cpp b/modules/stitching/perf/perf_stich.cpp index 22fb3e35e6..0708b6ea79 100644 --- a/modules/stitching/perf/perf_stich.cpp +++ b/modules/stitching/perf/perf_stich.cpp @@ -16,7 +16,7 @@ typedef TestBaseWithParam stitch; typedef TestBaseWithParam stitchExposureCompensation; typedef TestBaseWithParam > stitchDatasets; -#ifdef HAVE_OPENCV_XFEATURES2D +#if defined(HAVE_OPENCV_XFEATURES2D) && defined(OPENCV_ENABLE_NONFREE) #define TEST_DETECTORS testing::Values("surf", "orb", "akaze") #else #define TEST_DETECTORS testing::Values("orb", "akaze") -- GitLab