OpenCV3: added error msg with bruteforce GPU if not built with cudafeature2d. Fixed compilation error with OpenCV3+cudafeature2d module.

This commit is contained in:
matlabbe 2017-09-14 21:41:00 -04:00
parent 070bd474d6
commit ca01bf55d4

View File

@ -413,8 +413,10 @@ void Vocabulary::search(const cv::Mat & descriptorsIn, cv::Mat & results, cv::Ma
else else
{ {
gpuMatcher = cv::cuda::DescriptorMatcher::createBFMatcher(cv::NORM_L2); gpuMatcher = cv::cuda::DescriptorMatcher::createBFMatcher(cv::NORM_L2);
gpuMatcher.knnMatch(newDescriptorsGpu, lastDescriptorsGpu, matches, k); gpuMatcher->knnMatch(newDescriptorsGpu, lastDescriptorsGpu, matches, k);
} }
#else
UERROR("OpenCV3 is not built with CUDAFEATURES2D module, cannot do brute force matching on GPU!");
#endif #endif
#endif #endif
} }