根据错误提示,问题出在没有与参数列表匹配的重载函数setIndices上。在pcl::EuclideanClusterExtraction类中,该函数的参数类型应为pcl::PointIndices对象类型。

要修复这个错误,你需要将std::vector<int,std::allocator<int>>转换为pcl::PointIndices类型。可以通过以下步骤实现:

  1. 创建一个pcl::PointIndices对象。
pcl::PointIndices::Ptr indices(new pcl::PointIndices());
  1. std::vector<int,std::allocator<int>>中的数据复制到pcl::PointIndices对象中。
indices->indices = your_vector_data;
  1. pcl::PointIndices对象传递给setIndices函数。
pcl::EuclideanClusterExtraction<pcl::PointXYZ> ec;
ec.setIndices(indices);

这样就可以解决该错误。请确保将your_vector_data替换为实际的数据

出现下面错误该怎么修改:没有与参数列表匹配的重载函数pcEuclideanClusterExtractionPointTsetindices其中PointT=pcl-PointXYZ实参数类型为stdvectorintstdallocatorint对象类型是pclEuclideanClusterExtractionpclPointXYZ

原文地址: http://www.cveoy.top/t/topic/hYax 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录