作者热门文章
- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我是 PCL 的新手。我正在使用 PCL 库,我正在寻找一种从点云中提取点或将特定点复制到新点的方法。我想验证每个点是否符合条件,我想获得一个只有好的点的点云。谢谢!
最佳答案
使用 ExtractIndices 类:
例子:
pcl::PointCloud<pcl::PointXYZ>::Ptr p_obstacles(new pcl::PointCloud<pcl::PointXYZ>);
pcl::PointIndices::Ptr inliers(new pcl::PointIndices());
pcl::ExtractIndices<pcl::PointXYZ> extract;
for (int i = 0; i < (*p_obstacles).size(); i++)
{
pcl::PointXYZ pt(p_obstacles->points[i].x, p_obstacles->points[i].y, p_obstacles->points[i].z);
float zAvg = 0.5f;
if (abs(pt.z - zAvg) < THRESHOLD) // e.g. remove all pts below zAvg
{
inliers->indices.push_back(i);
}
}
extract.setInputCloud(p_obstacles);
extract.setIndices(inliers);
extract.setNegative(true);
extract.filter(*p_obstacles);
关于c++ - 从 pcl::PointCloud<pcl::PointXYZRGB> 中删除点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44921987/
我是 PCL 的新手。我正在使用 PCL 库,我正在寻找一种从点云中提取点或将特定点复制到新点的方法。我想验证每个点是否符合条件,我想获得一个只有好的点的点云。谢谢! 最佳答案 使用 ExtractI
PCL库中是否有任何函数可以保存pcl::PointCloud可以用Meshlab打开的XYZRGB格式的点云? 好像pcl::io::savePCDFileASCII (filename, clou
我是一名优秀的程序员,十分优秀!