diff --git a/modules/stitching/CMakeLists.txt b/modules/stitching/CMakeLists.txt index 88fd865f54..5d48bd378f 100644 --- a/modules/stitching/CMakeLists.txt +++ b/modules/stitching/CMakeLists.txt @@ -1,3 +1,3 @@ set(the_description "Images stitching") -ocv_define_module(stitching opencv_imgproc opencv_features2d opencv_calib3d opencv_objdetect OPTIONAL opencv_gpu) +ocv_define_module(stitching opencv_imgproc opencv_features2d opencv_calib3d opencv_objdetect OPTIONAL opencv_gpu opencv_nonfree) diff --git a/modules/stitching/src/matchers.cpp b/modules/stitching/src/matchers.cpp index 1cc630e88e..9cfd343f87 100644 --- a/modules/stitching/src/matchers.cpp +++ b/modules/stitching/src/matchers.cpp @@ -50,6 +50,12 @@ using namespace cv::detail; using namespace cv::gpu; #endif +#ifdef HAVE_OPENCV_NONFREE +#include "opencv2/nonfree/nonfree.hpp" + +static bool makeUseOfNonfree = initModule_nonfree(); +#endif + namespace { struct DistIdxPair