42#include <pcl/pcl_base.h>
43#include <pcl/PointIndices.h>
44#include <pcl/segmentation/comparator.h>
58 template <
typename Po
intT,
typename Po
intLT>
124 findRoot (
const std::vector<unsigned>& runs,
unsigned index)
const
126 unsigned idx = index;
127 while (runs[idx] != idx)
136 Neighbor (
int dx,
int dy,
int didx)
149#ifdef PCL_NO_PRECOMPILE
150#include <pcl/segmentation/impl/organized_connected_component_segmentation.hpp>
Comparator is the base class for comparators that compare two points given some function.
shared_ptr< Comparator< PointT > > Ptr
shared_ptr< const Comparator< PointT > > ConstPtr
OrganizedConnectedComponentSegmentation allows connected components to be found within organized poin...
static void findLabeledRegionBoundary(int start_idx, PointCloudLPtr labels, pcl::PointIndices &boundary_indices)
Find the boundary points / contour of a connected component.
ComparatorConstPtr getComparator() const
Get the comparator.
unsigned findRoot(const std::vector< unsigned > &runs, unsigned index) const
typename PointCloudL::ConstPtr PointCloudLConstPtr
void setComparator(const ComparatorConstPtr &compare)
Provide a pointer to the comparator to be used for segmentation.
typename PointCloudL::Ptr PointCloudLPtr
void segment(pcl::PointCloud< PointLT > &labels, std::vector< pcl::PointIndices > &label_indices) const
Perform the connected component segmentation.
ComparatorConstPtr compare_
typename PointCloud::Ptr PointCloudPtr
typename Comparator::ConstPtr ComparatorConstPtr
typename Comparator::Ptr ComparatorPtr
pcl::PointCloud< PointT > PointCloud
pcl::Comparator< PointT > Comparator
~OrganizedConnectedComponentSegmentation() override=default
Destructor for OrganizedConnectedComponentSegmentation.
OrganizedConnectedComponentSegmentation(const ComparatorConstPtr &compare)
Constructor for OrganizedConnectedComponentSegmentation.
typename PointCloud::ConstPtr PointCloudConstPtr
PointCloudConstPtr input_
The input point cloud dataset.
IndicesPtr indices_
A pointer to the vector of point indices to use.
bool initCompute()
This method should get called before starting the actual computation.
bool deinitCompute()
This method should get called after finishing the actual computation.
PointCloud represents the base class in PCL for storing collections of 3D points.
shared_ptr< PointCloud< PointT > > Ptr
shared_ptr< const PointCloud< PointT > > ConstPtr
A point structure representing Euclidean xyz coordinates, and the RGB color.