标签:orm blank linu path cannot 目录 gpu run 运行
在opencv 根目录找到opencvroot/samples/gpu/performance/tests.cpp
修改成如下代码。
TEST(ORB)
{
Mat src = imread(abspath("../data/aloeL.jpg"), IMREAD_GRAYSCALE);
if (src.empty()) throw runtime_error("can‘t open ../data/aloeL.jpg");
//ORB orb(4000);
Ptr<ORB> orb = ORB::create(4000,1.2f,8,31,0,2,ORB::HARRIS_SCORE,31,20);
vector<KeyPoint> keypoints;
Mat descriptors;
orb->detectAndCompute(src, Mat(), keypoints, descriptors);
//orb(src, Mat(), keypoints, descriptors);
CPU_ON;
//orb(src, Mat(), keypoints, descriptors);
orb->detectAndCompute(src, Mat(), keypoints, descriptors);
CPU_OFF;
cuda::ORB_CUDA d_orb;
cuda::GpuMat d_src(src);
cuda::GpuMat d_keypoints;
cuda::GpuMat d_descriptors;
d_orb(d_src, cuda::GpuMat(), d_keypoints, d_descriptors);
CUDA_ON;
d_orb(d_src, cuda::GpuMat(), d_keypoints, d_descriptors);
CUDA_OFF;
}
==原创==Ubuntu14.04安装OPENCV3.0流程及遇到的问题
标签:orm blank linu path cannot 目录 gpu run 运行
原文地址:http://www.cnblogs.com/mcjj/p/7011368.html