cuda pcl 点云处理

项目链接:https://github.com/NVIDIA-AI-IOT/cuPCL

环境需求:

Nvidia-driver
CUDA 
PCL 
Eigen 
cudnn

测试环境

cd cuCluster
make
./demo sample.pcd

 make 没有报错,环境没有问题。

cufilter

cufilter里包含两个过滤,第一个是对三个轴的数据过滤

如果是x轴,代码如下:


  FilterType_t type = PASSTHROUGH;
  setP.type = type;
  setP.dim = 0;  //x 轴0 ,y轴1,z轴2
  setP.upFilterLimits = 80.0;
  setP.downFilterLimits = 0.0;
  setP.limitsNegative = false;
  filterTest.set(setP);

  cudaDeviceSynchronize();

  filterTest.filter(output, &countLeft, input, nCount);
  checkCudaErrors(cudaMemcpyAsync(outputData, output, sizeof(float) * 4 * countLeft, cudaMemcpyDeviceToHost, stream));
  checkCudaErrors(cudaDeviceSynchronize());

每个轴的过滤需要一步一步执行。

第二个是体素过滤

以下是过滤后的一个测试结果

CUDA PassThrough before filtering: 65536
CUDA PassThrough after filtering: 37735
CUDA VoxelGrid before filtering: 65536
CUDA VoxelGrid after filtering: 2712

cuCluster

在代码cuCluster 里面包含了体素过滤,先体素过滤再执行欧式聚类

cpu降低了不少

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值