47
47
using namespace cv ;
48
48
using namespace cv ::cuda;
49
49
50
- #if (!defined (HAVE_CUDA) || !defined (HAVE_OPENCV_CUDAARITHM))
51
-
52
- cv::cuda::SURF_CUDA::SURF_CUDA () { throw_no_cuda (); }
53
- cv::cuda::SURF_CUDA::SURF_CUDA (double , int , int , bool , float , bool ) { throw_no_cuda (); }
54
- int cv::cuda::SURF_CUDA::descriptorSize () const { throw_no_cuda (); }
55
- void cv::cuda::SURF_CUDA::uploadKeypoints (const std::vector<KeyPoint>&, GpuMat&) { throw_no_cuda (); }
56
- void cv::cuda::SURF_CUDA::downloadKeypoints (const GpuMat&, std::vector<KeyPoint>&) { throw_no_cuda (); }
57
- void cv::cuda::SURF_CUDA::downloadDescriptors (const GpuMat&, std::vector<float >&) { throw_no_cuda (); }
58
- void cv::cuda::SURF_CUDA::operator ()(const GpuMat&, const GpuMat&, GpuMat&) { throw_no_cuda (); }
59
- void cv::cuda::SURF_CUDA::operator ()(const GpuMat&, const GpuMat&, GpuMat&, GpuMat&, bool ) { throw_no_cuda (); }
60
- void cv::cuda::SURF_CUDA::operator ()(const GpuMat&, const GpuMat&, std::vector<KeyPoint>&) { throw_no_cuda (); }
61
- void cv::cuda::SURF_CUDA::operator ()(const GpuMat&, const GpuMat&, std::vector<KeyPoint>&, GpuMat&, bool ) { throw_no_cuda (); }
62
- void cv::cuda::SURF_CUDA::operator ()(const GpuMat&, const GpuMat&, std::vector<KeyPoint>&, std::vector<float >&, bool ) { throw_no_cuda (); }
63
- void cv::cuda::SURF_CUDA::releaseMemory () { throw_no_cuda (); }
64
-
65
- #else // !defined (HAVE_CUDA)
66
-
67
- #if (!defined (OPENCV_ENABLE_NONFREE))
50
+ #ifndef OPENCV_ENABLE_NONFREE
68
51
#define throw_no_nonfree CV_Error (Error::StsNotImplemented, \
69
52
" This algorithm is patented and is excluded in this configuration; " \
70
53
" Set OPENCV_ENABLE_NONFREE CMake option and rebuild the library" );
71
54
72
55
cv::cuda::SURF_CUDA::SURF_CUDA () { throw_no_nonfree }
73
56
cv::cuda::SURF_CUDA::SURF_CUDA (double , int , int , bool , float , bool ) { throw_no_nonfree }
74
57
int cv::cuda::SURF_CUDA::descriptorSize () const { throw_no_nonfree }
58
+ int cv::cuda::SURF_CUDA::defaultNorm () const { throw_no_nonfree }
75
59
void cv::cuda::SURF_CUDA::uploadKeypoints (const std::vector<KeyPoint>&, GpuMat&) { throw_no_nonfree }
76
60
void cv::cuda::SURF_CUDA::downloadKeypoints (const GpuMat&, std::vector<KeyPoint>&) { throw_no_nonfree }
77
61
void cv::cuda::SURF_CUDA::downloadDescriptors (const GpuMat&, std::vector<float >&) { throw_no_nonfree }
@@ -82,6 +66,23 @@ void cv::cuda::SURF_CUDA::operator()(const GpuMat&, const GpuMat&, std::vector<K
82
66
void cv::cuda::SURF_CUDA::operator ()(const GpuMat&, const GpuMat&, std::vector<KeyPoint>&, std::vector<float >&, bool ) { throw_no_nonfree }
83
67
void cv::cuda::SURF_CUDA::releaseMemory () { throw_no_nonfree }
84
68
69
+
70
+ #elif (!defined (HAVE_CUDA) || !defined (HAVE_OPENCV_CUDAARITHM))
71
+
72
+ cv::cuda::SURF_CUDA::SURF_CUDA () { throw_no_cuda (); }
73
+ cv::cuda::SURF_CUDA::SURF_CUDA (double , int , int , bool , float , bool ) { throw_no_cuda (); }
74
+ int cv::cuda::SURF_CUDA::descriptorSize () const { throw_no_cuda (); }
75
+ int cv::cuda::SURF_CUDA::defaultNorm () const { throw_no_cuda (); }
76
+ void cv::cuda::SURF_CUDA::uploadKeypoints (const std::vector<KeyPoint>&, GpuMat&) { throw_no_cuda (); }
77
+ void cv::cuda::SURF_CUDA::downloadKeypoints (const GpuMat&, std::vector<KeyPoint>&) { throw_no_cuda (); }
78
+ void cv::cuda::SURF_CUDA::downloadDescriptors (const GpuMat&, std::vector<float >&) { throw_no_cuda (); }
79
+ void cv::cuda::SURF_CUDA::operator ()(const GpuMat&, const GpuMat&, GpuMat&) { throw_no_cuda (); }
80
+ void cv::cuda::SURF_CUDA::operator ()(const GpuMat&, const GpuMat&, GpuMat&, GpuMat&, bool ) { throw_no_cuda (); }
81
+ void cv::cuda::SURF_CUDA::operator ()(const GpuMat&, const GpuMat&, std::vector<KeyPoint>&) { throw_no_cuda (); }
82
+ void cv::cuda::SURF_CUDA::operator ()(const GpuMat&, const GpuMat&, std::vector<KeyPoint>&, GpuMat&, bool ) { throw_no_cuda (); }
83
+ void cv::cuda::SURF_CUDA::operator ()(const GpuMat&, const GpuMat&, std::vector<KeyPoint>&, std::vector<float >&, bool ) { throw_no_cuda (); }
84
+ void cv::cuda::SURF_CUDA::releaseMemory () { throw_no_cuda (); }
85
+
85
86
#else // OPENCV_ENABLE_NONFREE
86
87
87
88
namespace cv { namespace cuda { namespace device
@@ -450,7 +451,6 @@ void cv::cuda::SURF_CUDA::releaseMemory()
450
451
maxPosBuffer.release ();
451
452
}
452
453
453
- #endif // !defined (HAVE_CUDA)
454
454
#endif // !defined (OPENCV_ENABLE_NONFREE)
455
455
#endif
456
456
0 commit comments