endif()
set(the_description "Functionality with possible limitations on the use")
-ocv_define_module(nonfree opencv_imgproc opencv_features2d opencv_calib3d OPTIONAL opencv_gpu opencv_ocl)
+ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef)
+ocv_define_module(nonfree opencv_imgproc opencv_features2d opencv_calib3d OPTIONAL opencv_gpuarithm opencv_ocl)
#ifndef __OPENCV_NONFREE_GPU_HPP__
#define __OPENCV_NONFREE_GPU_HPP__
-#include "opencv2/opencv_modules.hpp"
-
-#if defined(HAVE_OPENCV_GPU)
-
-#include "opencv2/gpu.hpp"
+#include "opencv2/core/gpumat.hpp"
namespace cv { namespace gpu {
GpuMat samples_;
};
-} // namespace gpu
-
-} // namespace cv
-
-#endif // defined(HAVE_OPENCV_GPU)
+}} // namespace cv { namespace gpu {
#endif // __OPENCV_NONFREE_GPU_HPP__
#include "perf_precomp.hpp"
-#if defined(HAVE_OPENCV_GPU) && defined(HAVE_CUDA)
+#ifdef HAVE_CUDA
#include "opencv2/ts/gpu_perf.hpp"
//////////////////////////////////////////////////////////////////////
// SURF
+#ifdef HAVE_OPENCV_GPUARITHM
+
DEF_PARAM_TEST_1(Image, string);
PERF_TEST_P(Image, GPU_SURF,
}
}
+#endif // HAVE_OPENCV_GPUARITHM
+
//////////////////////////////////////////////////////
// VIBE
}
}
-#endif
+#endif // BUILD_WITH_VIDEO_INPUT_SUPPORT
-#endif
+#endif // HAVE_CUDA
# include "opencv2/nonfree/ocl.hpp"
#endif
-#ifdef HAVE_OPENCV_GPU
- #include "opencv2/nonfree/gpu.hpp"
- #include "opencv2/ts/gpu_perf.hpp"
+#ifdef HAVE_CUDA
+# include "opencv2/nonfree/gpu.hpp"
#endif
#ifdef GTEST_CREATE_SHARED_LIBRARY
#include "opencv2/opencv_modules.hpp"
-#ifdef HAVE_OPENCV_GPU
+#ifdef HAVE_OPENCV_GPUARITHM
#include "opencv2/core/cuda/common.hpp"
#include "opencv2/core/cuda/limits.hpp"
} // namespace surf
}}} // namespace cv { namespace gpu { namespace cudev
-
-#endif /* CUDA_DISABLER */
+#endif // HAVE_OPENCV_GPUARITHM
//
//M*/
-#include "opencv2/opencv_modules.hpp"
-
-#ifdef HAVE_OPENCV_GPU
-
#include "opencv2/core/cuda/common.hpp"
namespace cv { namespace gpu { namespace cudev
}
}
}}}
-
-#endif
#include "opencv2/core/utility.hpp"
#include "opencv2/core/private.hpp"
+#include "opencv2/nonfree/gpu.hpp"
+#include "opencv2/core/gpu_private.hpp"
+
#include "opencv2/opencv_modules.hpp"
-#ifdef HAVE_OPENCV_GPU
-# include "opencv2/nonfree/gpu.hpp"
-# include "opencv2/core/gpu_private.hpp"
+#ifdef HAVE_OPENCV_GPUARITHM
+# include "opencv2/gpuarithm.hpp"
#endif
#ifdef HAVE_OPENCV_OCL
#include "precomp.hpp"
-#if defined(HAVE_OPENCV_GPU)
-
using namespace cv;
using namespace cv::gpu;
-#if !defined (HAVE_CUDA)
+#if !defined (HAVE_CUDA) || !defined (HAVE_OPENCV_GPUARITHM)
cv::gpu::SURF_GPU::SURF_GPU() { throw_no_cuda(); }
cv::gpu::SURF_GPU::SURF_GPU(double, int, int, bool, float, bool) { throw_no_cuda(); }
bindImgTex(img);
- integralBuffered(img, surf_.sum, surf_.intBuffer);
+ gpu::integralBuffered(img, surf_.sum, surf_.intBuffer);
sumOffset = bindSumTex(surf_.sum);
if (use_mask)
{
min(mask, 1.0, surf_.mask1);
- integralBuffered(surf_.mask1, surf_.maskSum, surf_.intBuffer);
+ gpu::integralBuffered(surf_.mask1, surf_.maskSum, surf_.intBuffer);
maskOffset = bindMaskSumTex(surf_.maskSum);
}
}
}
#endif // !defined (HAVE_CUDA)
-
-#endif // defined(HAVE_OPENCV_GPU)
#include "precomp.hpp"
-#if defined(HAVE_OPENCV_GPU)
-
-#if !defined HAVE_CUDA || defined(CUDA_DISABLER)
+#ifndef HAVE_CUDA
cv::gpu::VIBE_GPU::VIBE_GPU(unsigned long) { throw_no_cuda(); }
void cv::gpu::VIBE_GPU::initialize(const GpuMat&, Stream&) { throw_no_cuda(); }
}
#endif
-
-#endif // defined(HAVE_OPENCV_GPU)
#include "test_precomp.hpp"
-#if defined(HAVE_OPENCV_GPU) && defined(HAVE_CUDA)
+#ifdef HAVE_CUDA
using namespace cvtest;
/////////////////////////////////////////////////////////////////////////////////////////////////
// SURF
+#ifdef HAVE_OPENCV_GPUARITHM
+
namespace
{
IMPLEMENT_PARAM_CLASS(SURF_HessianThreshold, double)
testing::Values(SURF_Extended(false), SURF_Extended(true)),
testing::Values(SURF_Upright(false), SURF_Upright(true))));
+#endif // HAVE_OPENCV_GPUARITHM
+
//////////////////////////////////////////////////////
// VIBE
testing::Values(MatType(CV_8UC1), MatType(CV_8UC3), MatType(CV_8UC4)),
WHOLE_SUBMAT));
-#endif
+#endif // HAVE_CUDA
# include "opencv2/nonfree/ocl.hpp"
#endif
-#ifdef HAVE_OPENCV_GPU
+#ifdef HAVE_CUDA
# include "opencv2/nonfree/gpu.hpp"
#endif