Fix cudafeatures2d and cudastereo with new 3.0 APIs for ORB and StereoBM

This commit is contained in:
Michele Adduci 2014-11-05 10:42:02 +01:00
parent dce629d0e2
commit e1bb844475
3 changed files with 5 additions and 5 deletions

View File

@ -128,12 +128,12 @@ PERF_TEST_P(Image_NFeatures, ORB,
}
else
{
cv::ORB orb(nFeatures);
cv::Ptr<cv::ORB> orb;
std::vector<cv::KeyPoint> 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);

View File

@ -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<cv::ORB> orb_gold;
std::vector<cv::KeyPoint> 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<cv::DMatch> matches;

View File

@ -79,7 +79,7 @@ PERF_TEST_P(ImagePair, StereoBM,
}
else
{
cv::Ptr<cv::StereoBM> bm = cv::createStereoBM(ndisp);
cv::Ptr<cv::StereoBM> bm = cv::cuda::createStereoBM(ndisp);
cv::Mat dst;