#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 {
};
-#ifdef HAVE_OPENCV_NONFREE
+#ifdef HAVE_OPENCV_XFEATURES2D
class CV_EXPORTS SurfFeaturesFinderGpu : public FeaturesFinder
{
public:
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 {
}
}
-#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)
{
# 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"
#ifdef HAVE_OPENCV_CUDA
if (try_use_gpu && cuda::getCudaEnabledDeviceCount() > 0)
{
-#ifdef HAVE_OPENCV_NONFREE
+#ifdef HAVE_OPENCV_XFEATURES2D
stitcher.setFeaturesFinder(makePtr<detail::SurfFeaturesFinderGpu>());
#else
stitcher.setFeaturesFinder(makePtr<detail::OrbFeaturesFinder>());
else
#endif
{
-#ifdef HAVE_OPENCV_NONFREE
+#ifdef HAVE_OPENCV_XFEATURES2D
stitcher.setFeaturesFinder(makePtr<detail::SurfFeaturesFinder>());
#else
stitcher.setFeaturesFinder(makePtr<detail::OrbFeaturesFinder>());
#include "test_precomp.hpp"
#include "opencv2/opencv_modules.hpp"
-#ifdef HAVE_OPENCV_NONFREE
+#ifdef HAVE_OPENCV_XFEATURES2D
using namespace cv;
using namespace std;
#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"
#ifdef HAVE_OPENCV_FEATURES2D
&& initModule_features2d()
#endif
-#ifdef HAVE_OPENCV_NONFREE
- && initModule_nonfree()
+#ifdef HAVE_OPENCV_XFEATURES2D
+ && initModule_xfeatures2d()
#endif
;
}
Ptr<FeaturesFinder> finder;
if (features_type == "surf")
{
-#ifdef HAVE_OPENCV_NONFREE
+#ifdef HAVE_OPENCV_XFEATURES2D
if (try_cuda && cuda::getCudaEnabledDeviceCount() > 0)
finder = makePtr<SurfFeaturesFinderGpu>();
else
"${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)
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)
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
#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;
}
}
-#ifdef HAVE_OPENCV_NONFREE
+#ifdef HAVE_OPENCV_XFEATURES2D
TEST(SURF)
{
#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;