From e1bb84447538d66b6e144f8245633593e43a3216 Mon Sep 17 00:00:00 2001 From: Michele Adduci Date: Wed, 5 Nov 2014 10:42:02 +0100 Subject: [PATCH] Fix cudafeatures2d and cudastereo with new 3.0 APIs for ORB and StereoBM --- modules/cudafeatures2d/perf/perf_features2d.cpp | 4 ++-- modules/cudafeatures2d/test/test_features2d.cpp | 4 ++-- modules/cudastereo/perf/perf_stereo.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/cudafeatures2d/perf/perf_features2d.cpp b/modules/cudafeatures2d/perf/perf_features2d.cpp index 542195e..b73aef0 100644 --- a/modules/cudafeatures2d/perf/perf_features2d.cpp +++ b/modules/cudafeatures2d/perf/perf_features2d.cpp @@ -128,12 +128,12 @@ PERF_TEST_P(Image_NFeatures, ORB, } else { - cv::ORB orb(nFeatures); + cv::Ptr orb; std::vector cpu_keypoints; cv::Mat cpu_descriptors; - TEST_CYCLE() orb(img, cv::noArray(), cpu_keypoints, cpu_descriptors); + TEST_CYCLE() orb->detectAndCompute(img, cv::noArray(), cpu_keypoints, cpu_descriptors); SANITY_CHECK_KEYPOINTS(cpu_keypoints); SANITY_CHECK(cpu_descriptors); diff --git a/modules/cudafeatures2d/test/test_features2d.cpp b/modules/cudafeatures2d/test/test_features2d.cpp index ae71a2e..8f29616 100644 --- a/modules/cudafeatures2d/test/test_features2d.cpp +++ b/modules/cudafeatures2d/test/test_features2d.cpp @@ -185,11 +185,11 @@ CUDA_TEST_P(ORB, Accuracy) cv::cuda::GpuMat descriptors; orb(loadMat(image), loadMat(mask), keypoints, descriptors); - cv::ORB orb_gold(nFeatures, scaleFactor, nLevels, edgeThreshold, firstLevel, WTA_K, scoreType, patchSize); + cv::Ptr orb_gold; std::vector keypoints_gold; cv::Mat descriptors_gold; - orb_gold(image, mask, keypoints_gold, descriptors_gold); + orb_gold->detectAndCompute(image, mask, keypoints_gold, descriptors_gold); cv::BFMatcher matcher(cv::NORM_HAMMING); std::vector matches; diff --git a/modules/cudastereo/perf/perf_stereo.cpp b/modules/cudastereo/perf/perf_stereo.cpp index 68650cd..766bb16 100644 --- a/modules/cudastereo/perf/perf_stereo.cpp +++ b/modules/cudastereo/perf/perf_stereo.cpp @@ -79,7 +79,7 @@ PERF_TEST_P(ImagePair, StereoBM, } else { - cv::Ptr bm = cv::createStereoBM(ndisp); + cv::Ptr bm = cv::cuda::createStereoBM(ndisp); cv::Mat dst; -- 2.7.4