Merge pull request #3415 from jet47:fix-gpu-perf-sample

pull/3420/head
Vadim Pisarevsky 10 years ago
commit d4db7807df
  1. 7
      samples/gpu/performance/tests.cpp

@ -339,14 +339,15 @@ TEST(ORB)
Mat src = imread(abspath("../data/aloeL.jpg"), IMREAD_GRAYSCALE); Mat src = imread(abspath("../data/aloeL.jpg"), IMREAD_GRAYSCALE);
if (src.empty()) throw runtime_error("can't open ../data/aloeL.jpg"); if (src.empty()) throw runtime_error("can't open ../data/aloeL.jpg");
ORB orb(4000); Ptr<ORB> orb = ORB::create(4000);
vector<KeyPoint> keypoints; vector<KeyPoint> keypoints;
Mat descriptors; Mat descriptors;
orb(src, Mat(), keypoints, descriptors); orb->detectAndCompute(src, Mat(), keypoints, descriptors);
CPU_ON; CPU_ON;
orb(src, Mat(), keypoints, descriptors); orb->detectAndCompute(src, Mat(), keypoints, descriptors);
CPU_OFF; CPU_OFF;
cuda::ORB_CUDA d_orb; cuda::ORB_CUDA d_orb;

Loading…
Cancel
Save