41#include <pcl/gpu/segmentation/gpu_extract_labeled_clusters.h>
43template <
typename Po
intT>
void
54 std::vector<bool>
processed (host_cloud_->size (),
false);
59 max_answers =
static_cast<int> (host_cloud_->size ());
67 for (std::size_t i = 0; i < host_cloud_->size (); ++i)
83 p.x =
t.x; p.y =
t.y; p.z =
t.z;
90 r.
indices.push_back (
static_cast<int> (i));
109 std::vector<int> sizes, data;
115 for(std::size_t
qp = 0;
qp < sizes.size ();
qp++)
122 if((*host_cloud_)[i].label == (*host_cloud_)[data[
qp_r +
qp *
max_answers]].label)
142 r.
header = host_cloud_->header;
148template <
typename Po
intT>
void
156 tree_->setCloud(input_);
158 if (!tree_->isBuilt())
176#define PCL_INSTANTIATE_extractLabeledEuclideanClusters(T) template void PCL_EXPORTS pcl::gpu::extractLabeledEuclideanClusters<T> (const typename pcl::PointCloud<T>::Ptr &, const pcl::gpu::Octree::Ptr &,float, std::vector<PointIndices> &, unsigned int, unsigned int);
177#define PCL_INSTANTIATE_EuclideanLabeledClusterExtraction(T) template class PCL_EXPORTS pcl::gpu::EuclideanLabeledClusterExtraction<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
Octree implementation on GPU.
shared_ptr< Octree > Ptr
Types.
bool compareLabeledPointClusters(const pcl::PointIndices &a, const pcl::PointIndices &b)
Sort clusters method (for std::sort).
void extractLabeledEuclideanClusters(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.
A point structure representing Euclidean xyz coordinates, and the RGB color.