博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
点云PCL中小细节
阅读量:4324 次
发布时间:2019-06-06

本文共 1188 字,大约阅读时间需要 3 分钟。

计算点与点之间的距离的平局距离

doublecomputeCloudResolution (const pcl::PointCloud
::ConstPtr &cloud){ double res = 0.0; int n_points = 0; int nres; std::vector
indices (2); std::vector
sqr_distances (2); pcl::search::KdTree
tree; tree.setInputCloud (cloud); for (size_t i = 0; i < cloud->size (); ++i) { if (! pcl_isfinite ((*cloud)[i].x)) { continue; } //Considering the second neighbor since the first is the point itself. nres = tree.nearestKSearch (i, 2, indices, sqr_distances); if (nres == 2) { res += sqrt (sqr_distances[1]); ++n_points; } } if (n_points != 0) { res /= n_points; } return res;}

PCL中

对于 pcl::UniformSampling函数在PCL1.7版本里  该函数放在keypoints 用法如下: pcl::PointCloud
keypointIndices; filter.compute(keypointIndices); pcl::copyPointCloud(*cloud,, *filteredCloud); 之后在PCL1.8版本里就将该函数放在filters模块里。并在keypoints模块里也包含了这个头文件 #warning UniformSampling is not a Keypoint anymore, use
instead. 这是keypoints模块下的说明 用法是: PointCloud
output_;   (output_);

转载于:https://www.cnblogs.com/li-yao7758258/p/9092966.html

你可能感兴趣的文章
mysql 中时间和日期函数应用
查看>>
自动化测试-selenium初始化Driver参考
查看>>
mybatis使用collection查询集合属性规则
查看>>
linux查看文件的编码格式的方法 set fileencoding PYTHON
查看>>
Git 问题:SSL certificate problem: self signed certificate
查看>>
安全测试
查看>>
作业代码
查看>>
网络抓取功能实现 将获取的结果进行过滤并写入到TXT文档中
查看>>
暑假集训-7.31总结
查看>>
安卓:动态注册广播
查看>>
Oracle系列--基础理论
查看>>
广州.NET微软技术俱乐部微信群各位技术大牛的blog
查看>>
npm安装vue-cli时速度慢,fetchMetadata经常卡住并报异常
查看>>
POJ:1703-Find them, Catch them(并查集好题)(种类并查集)
查看>>
HDU:5040-Instrusive
查看>>
校验器
查看>>
thread/threading——Python多线程入门笔记
查看>>
linux 命令汇总(搜索、fdfs、常用命令),虚拟机dump文件
查看>>
Nginx 反向代理解决浏览器跨域问题
查看>>
为什么现在我最终推荐内存OLTP
查看>>