40 #ifndef PCL_SEGMENTATION_ORGANIZED_CONNECTED_COMPONENT_SEGMENTATION_H_
41 #define PCL_SEGMENTATION_ORGANIZED_CONNECTED_COMPONENT_SEGMENTATION_H_
43 #include <pcl/pcl_base.h>
44 #include <pcl/PointIndices.h>
45 #include <pcl/segmentation/comparator.h>
58 template <
typename Po
intT,
typename Po
intLT>
126 findRoot (
const std::vector<unsigned>& runs,
unsigned index)
const
128 register unsigned idx = index;
129 while (runs[idx] != idx)
138 Neighbor (
int dx,
int dy,
int didx)
151 #ifdef PCL_NO_PRECOMPILE
152 #include <pcl/segmentation/impl/organized_connected_component_segmentation.hpp>
155 #endif //#ifndef PCL_ORGANIZED_CONNECTED_COMPONENT_SEGMENTATION_H_
PointCloud::Ptr PointCloudPtr
void setComparator(const ComparatorConstPtr &compare)
Provide a pointer to the comparator to be used for segmentation.
pcl::PointCloud< PointT > PointCloud
boost::shared_ptr< const PointCloud< PointT > > ConstPtr
boost::shared_ptr< PointCloud< PointT > > Ptr
Comparator::Ptr ComparatorPtr
Comparator::ConstPtr ComparatorConstPtr
OrganizedConnectedComponentSegmentation allows connected components to be found within organized poin...
virtual ~OrganizedConnectedComponentSegmentation()
Destructor for OrganizedConnectedComponentSegmentation.
OrganizedConnectedComponentSegmentation(const ComparatorConstPtr &compare)
Constructor for OrganizedConnectedComponentSegmentation.
boost::shared_ptr< Comparator< PointT > > Ptr
static void findLabeledRegionBoundary(int start_idx, PointCloudLPtr labels, pcl::PointIndices &boundary_indices)
Find the boundary points / contour of a connected component.
pcl::PointCloud< PointLT > PointCloudL
unsigned findRoot(const std::vector< unsigned > &runs, unsigned index) const
PointCloudL::Ptr PointCloudLPtr
Comparator is the base class for comparators that compare two points given some function.
void segment(pcl::PointCloud< PointLT > &labels, std::vector< pcl::PointIndices > &label_indices) const
Perform the connected component segmentation.
ComparatorConstPtr getComparator() const
Get the comparator.
pcl::Comparator< PointT > Comparator
ComparatorConstPtr compare_
PointCloud::ConstPtr PointCloudConstPtr
PointCloudL::ConstPtr PointCloudLConstPtr
boost::shared_ptr< const Comparator< PointT > > ConstPtr