I am updating my PCL FPFH feature code to use the gpu modules. This is all going according to plan, except for the return type.
我正在更新我的PCL FPFH功能代码以使用gpu模块。除返回类型外,这一切都按计划进行。
The original cpu version:
原来的cpu版本:
pcl::FPFHEstimation<PointXYZ, Normal, FPFHSignature33> fpfh_est;
pcl :: FPFHEstimation
returns from the compute
function a:
从计算函数a返回:
PointCloud<FPFHSignature33>
and when i download the returned data from the gpu function, it is:
当我从gpu函数下载返回的数据时,它是:
int stub;
vector<FPFHSignature33> downloaded;
fpfhs_gpu.download(downloaded, stub);
How can i convert this vector<FPFHSignature33>
into the PointCloud<FPFHSignature33>
that the rest of my application needs?
如何将此向量
thank you.
1 个解决方案
#1
0
This works:
fpfhs_gpu.download(downloaded, stub);
for (int i = 0; i < downloaded.size(); i++)
{
fpfhs_src.push_back(downloaded[i]);
}
But it is slow, as it loops through every value in the vector. Is there a faster way?
但它很慢,因为它遍历向量中的每个值。有更快的方法吗?