40#include <pcl/common/copy_point.h>
41#include <pcl/gpu/segmentation/gpu_extract_clusters.h>
55template <
typename Po
intT>
68 PCL_DEBUG(
"[pcl::gpu::extractEuclideanClusters]\n");
69 std::vector<bool>
processed(host_cloud_->size(),
false);
88 for (std::size_t i = 0; i < host_cloud_->size(); ++i) {
128 std::copy(
cpu_tmp.begin(),
cpu_tmp.end(), std::back_inserter(data));
151 if (data.
size() == 1)
155 for (
auto idx : data) {
165 PCL_DEBUG(
" data.size: %i, foundpoints: %i, previous: %i",
169 PCL_DEBUG(
" new points: %i, next queries size: %i\n",
180 r.
header = host_cloud_->header;
186template <
typename Po
intT>
189 std::vector<pcl::PointIndices>&
clusters)
197 tree_.setCloud(input_);
200 if (!tree_->isBuilt()) {
215 min_pts_per_cluster_,
216 max_pts_per_cluster_);
217 PCL_DEBUG(
"INFO: end of extractEuclideanClusters\n");
222#define PCL_INSTANTIATE_extractEuclideanClusters(T) \
223 template void PCL_EXPORTS pcl::gpu::extractEuclideanClusters<T>( \
224 const typename pcl::PointCloud<T>::Ptr&, \
225 const pcl::gpu::Octree::Ptr&, \
227 std::vector<PointIndices>&, \
230#define PCL_INSTANTIATE_EuclideanClusterExtraction(T) \
231 template class PCL_EXPORTS pcl::gpu::EuclideanClusterExtraction<T>;
Iterator class for point clouds with or without given indices.
std::size_t size() const
Size of the range the iterator is going through.
std::vector< PointT, Eigen::aligned_allocator< PointT > > VectorType
shared_ptr< PointCloud< PointT > > Ptr
shared_ptr< Octree > Ptr
Types.
void copyPoint(const PointInT &point_in, PointOutT &point_out)
Copy the fields of a source point into a target point.
void economical_download(const pcl::gpu::NeighborIndices &source_indices, const pcl::Indices &buffer_indices, std::size_t buffer_size, pcl::Indices &downloaded_indices)
void extractEuclideanClusters(const typename pcl::PointCloud< PointT >::Ptr &host_cloud_, const pcl::gpu::Octree::Ptr &tree, float tolerance, std::vector< PointIndices > &clusters, unsigned int min_pts_per_cluster, unsigned int max_pts_per_cluster)
A point structure representing Euclidean xyz coordinates.