From: StevenPuttemans Date: Fri, 22 Aug 2014 13:33:24 +0000 (+0200) Subject: adapted all nonfree header inclusion since it doesn't exist anymore as a module X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~2982^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=564a8ed208a74d94475a56391eb824e5dff8f982;p=platform%2Fupstream%2Fopencv.git adapted all nonfree header inclusion since it doesn't exist anymore as a module --- diff --git a/modules/stitching/include/opencv2/stitching/detail/matchers.hpp b/modules/stitching/include/opencv2/stitching/detail/matchers.hpp index d87a1ff..c0fb5d9 100644 --- a/modules/stitching/include/opencv2/stitching/detail/matchers.hpp +++ b/modules/stitching/include/opencv2/stitching/detail/matchers.hpp @@ -48,8 +48,8 @@ #include "opencv2/opencv_modules.hpp" -#ifdef HAVE_OPENCV_NONFREE -# include "opencv2/nonfree/cuda.hpp" +#ifdef HAVE_OPENCV_XFEATURES2D +# include "opencv2/xfeatures2d/cuda.hpp" #endif namespace cv { @@ -104,7 +104,7 @@ private: }; -#ifdef HAVE_OPENCV_NONFREE +#ifdef HAVE_OPENCV_XFEATURES2D class CV_EXPORTS SurfFeaturesFinderGpu : public FeaturesFinder { public: diff --git a/modules/stitching/src/matchers.cpp b/modules/stitching/src/matchers.cpp index a512e35..45e9725 100644 --- a/modules/stitching/src/matchers.cpp +++ b/modules/stitching/src/matchers.cpp @@ -46,10 +46,10 @@ using namespace cv; using namespace cv::detail; using namespace cv::cuda; -#ifdef HAVE_OPENCV_NONFREE -#include "opencv2/nonfree.hpp" +#ifdef HAVE_OPENCV_XFEATURES2D +#include "opencv2/xfeatures2d.hpp" -static bool makeUseOfNonfree = initModule_nonfree(); +static bool makeUseOfNonfree = initModule_xfeatures2d(); #endif namespace { @@ -443,7 +443,7 @@ void OrbFeaturesFinder::find(InputArray image, ImageFeatures &features) } } -#ifdef HAVE_OPENCV_NONFREE +#ifdef HAVE_OPENCV_XFEATURES2D SurfFeaturesFinderGpu::SurfFeaturesFinderGpu(double hess_thresh, int num_octaves, int num_layers, int num_octaves_descr, int num_layers_descr) { diff --git a/modules/stitching/src/precomp.hpp b/modules/stitching/src/precomp.hpp index 759d036..c70d9f9 100644 --- a/modules/stitching/src/precomp.hpp +++ b/modules/stitching/src/precomp.hpp @@ -87,8 +87,8 @@ # include "opencv2/cuda.hpp" #endif -#ifdef HAVE_OPENCV_NONFREE -# include "opencv2/nonfree/cuda.hpp" +#ifdef HAVE_OPENCV_XFEATURES2D +# include "opencv2/xfeatures2d/cuda.hpp" #endif #include "../../imgproc/src/gcgraph.hpp" diff --git a/modules/stitching/src/stitcher.cpp b/modules/stitching/src/stitcher.cpp index 0d4623a..f3bbe38 100644 --- a/modules/stitching/src/stitcher.cpp +++ b/modules/stitching/src/stitcher.cpp @@ -59,7 +59,7 @@ Stitcher Stitcher::createDefault(bool try_use_gpu) #ifdef HAVE_OPENCV_CUDA if (try_use_gpu && cuda::getCudaEnabledDeviceCount() > 0) { -#ifdef HAVE_OPENCV_NONFREE +#ifdef HAVE_OPENCV_XFEATURES2D stitcher.setFeaturesFinder(makePtr()); #else stitcher.setFeaturesFinder(makePtr()); @@ -70,7 +70,7 @@ Stitcher Stitcher::createDefault(bool try_use_gpu) else #endif { -#ifdef HAVE_OPENCV_NONFREE +#ifdef HAVE_OPENCV_XFEATURES2D stitcher.setFeaturesFinder(makePtr()); #else stitcher.setFeaturesFinder(makePtr()); diff --git a/modules/stitching/test/test_matchers.cpp b/modules/stitching/test/test_matchers.cpp index c7f068b..6deed7b 100644 --- a/modules/stitching/test/test_matchers.cpp +++ b/modules/stitching/test/test_matchers.cpp @@ -42,7 +42,7 @@ #include "test_precomp.hpp" #include "opencv2/opencv_modules.hpp" -#ifdef HAVE_OPENCV_NONFREE +#ifdef HAVE_OPENCV_XFEATURES2D using namespace cv; using namespace std; diff --git a/modules/world/src/precomp.hpp b/modules/world/src/precomp.hpp index a46e470..4e8ab39 100644 --- a/modules/world/src/precomp.hpp +++ b/modules/world/src/precomp.hpp @@ -53,8 +53,8 @@ #ifdef HAVE_OPENCV_FEATURES2D #include "opencv2/features2d.hpp" #endif -#ifdef HAVE_OPENCV_NONFREE -#include "opencv2/nonfree.hpp" +#ifdef HAVE_OPENCV_XFEATURES2D +#include "opencv2/xfeatures2d/nonfree.hpp" #endif #include "opencv2/world.hpp" diff --git a/modules/world/src/world_init.cpp b/modules/world/src/world_init.cpp index 685e44b..c8b31eb 100644 --- a/modules/world/src/world_init.cpp +++ b/modules/world/src/world_init.cpp @@ -51,8 +51,8 @@ bool cv::initAll() #ifdef HAVE_OPENCV_FEATURES2D && initModule_features2d() #endif -#ifdef HAVE_OPENCV_NONFREE - && initModule_nonfree() +#ifdef HAVE_OPENCV_XFEATURES2D + && initModule_xfeatures2d() #endif ; } diff --git a/samples/cpp/stitching_detailed.cpp b/samples/cpp/stitching_detailed.cpp index b6fd1e9..0d9b4a6 100644 --- a/samples/cpp/stitching_detailed.cpp +++ b/samples/cpp/stitching_detailed.cpp @@ -384,7 +384,7 @@ int main(int argc, char* argv[]) Ptr finder; if (features_type == "surf") { -#ifdef HAVE_OPENCV_NONFREE +#ifdef HAVE_OPENCV_XFEATURES2D if (try_cuda && cuda::getCudaEnabledDeviceCount() > 0) finder = makePtr(); else diff --git a/samples/gpu/CMakeLists.txt b/samples/gpu/CMakeLists.txt index 0995295..65fe4ef 100644 --- a/samples/gpu/CMakeLists.txt +++ b/samples/gpu/CMakeLists.txt @@ -19,8 +19,8 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND) "${OpenCV_SOURCE_DIR}/modules/gpu/src/nvidia/core" ) - if(HAVE_opencv_nonfree) - ocv_include_directories("${OpenCV_SOURCE_DIR}/modules/nonfree/include") + if(HAVE_opencv_xfeatures2d) + ocv_include_directories("${OpenCV_SOURCE_DIR}/modules/xfeatures2d/include") endif() if(HAVE_opencv_cudacodec) @@ -52,8 +52,8 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND) ocv_target_link_libraries(${the_target} ${CUDA_CUDA_LIBRARY}) endif() - if(HAVE_opencv_nonfree) - ocv_target_link_libraries(${the_target} opencv_nonfree) + if(HAVE_opencv_xfeatures2d) + ocv_target_link_libraries(${the_target} opencv_xfeatures2d) endif() if(HAVE_opencv_cudacodec) ocv_target_link_libraries(${the_target} opencv_cudacodec) diff --git a/samples/gpu/performance/CMakeLists.txt b/samples/gpu/performance/CMakeLists.txt index 07125c2..0b25663 100644 --- a/samples/gpu/performance/CMakeLists.txt +++ b/samples/gpu/performance/CMakeLists.txt @@ -3,15 +3,15 @@ set(the_target "example_gpu_performance") file(GLOB sources "performance/*.cpp") file(GLOB headers "performance/*.h") -if(HAVE_opencv_nonfree) - ocv_include_directories("${OpenCV_SOURCE_DIR}/modules/nonfree/include") +if(HAVE_opencv_xfeatures2d) + ocv_include_directories("${OpenCV_SOURCE_DIR}/modules/xfeatures2d/include") endif() add_executable(${the_target} ${sources} ${headers}) ocv_target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} ${OPENCV_CUDA_SAMPLES_REQUIRED_DEPS}) -if(HAVE_opencv_nonfree) - ocv_target_link_libraries(${the_target} opencv_nonfree) +if(HAVE_opencv_xfeatures2d) + ocv_target_link_libraries(${the_target} opencv_xfeatures2d) endif() set_target_properties(${the_target} PROPERTIES diff --git a/samples/gpu/performance/tests.cpp b/samples/gpu/performance/tests.cpp index 3ca9e6a..4d6f778 100644 --- a/samples/gpu/performance/tests.cpp +++ b/samples/gpu/performance/tests.cpp @@ -17,9 +17,9 @@ #include "opencv2/opencv_modules.hpp" -#ifdef HAVE_OPENCV_NONFREE -#include "opencv2/nonfree/cuda.hpp" -#include "opencv2/nonfree/nonfree.hpp" +#ifdef HAVE_OPENCV_XFEATURES2D +#include "opencv2/xfeatures2d/cuda.hpp" +#include "opencv2/xfeatures2d/nonfree.hpp" #endif using namespace std; @@ -274,7 +274,7 @@ TEST(meanShift) } } -#ifdef HAVE_OPENCV_NONFREE +#ifdef HAVE_OPENCV_XFEATURES2D TEST(SURF) { diff --git a/samples/gpu/surf_keypoint_matcher.cpp b/samples/gpu/surf_keypoint_matcher.cpp index c267dd4..21cbc9d 100644 --- a/samples/gpu/surf_keypoint_matcher.cpp +++ b/samples/gpu/surf_keypoint_matcher.cpp @@ -2,13 +2,13 @@ #include "opencv2/opencv_modules.hpp" -#ifdef HAVE_OPENCV_NONFREE +#ifdef HAVE_OPENCV_XFEATURES2D #include "opencv2/core/core.hpp" #include "opencv2/features2d/features2d.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/cudafeatures2d.hpp" -#include "opencv2/nonfree/cuda.hpp" +#include "opencv2/xfeatures2d/cuda.hpp" using namespace std; using namespace cv;