Point Cloud Library (PCL)  1.6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions
pcl::OrganizedConnectedComponentSegmentation< PointT, PointLT > Class Template Reference

OrganizedConnectedComponentSegmentation allows connected components to be found within organized point cloud data, given a comparison function. More...

#include <pcl/segmentation/organized_connected_component_segmentation.h>

Inheritance diagram for pcl::OrganizedConnectedComponentSegmentation< PointT, PointLT >:
Inheritance graph
[legend]
Collaboration diagram for pcl::OrganizedConnectedComponentSegmentation< PointT, PointLT >:
Collaboration graph
[legend]

Public Types

typedef pcl::PointCloud< PointTPointCloud
 
typedef PointCloud::Ptr PointCloudPtr
 
typedef PointCloud::ConstPtr PointCloudConstPtr
 
typedef pcl::PointCloud< PointLT > PointCloudL
 
typedef PointCloudL::Ptr PointCloudLPtr
 
typedef PointCloudL::ConstPtr PointCloudLConstPtr
 
typedef pcl::Comparator< PointTComparator
 
typedef Comparator::Ptr ComparatorPtr
 
typedef Comparator::ConstPtr ComparatorConstPtr
 
typedef PointIndices::Ptr PointIndicesPtr
 
typedef PointIndices::ConstPtr PointIndicesConstPtr
 

Public Member Functions

 OrganizedConnectedComponentSegmentation (const ComparatorConstPtr &compare)
 Constructor for OrganizedConnectedComponentSegmentation. More...
 
virtual ~OrganizedConnectedComponentSegmentation ()
 Destructor for OrganizedConnectedComponentSegmentation. More...
 
void setComparator (const ComparatorConstPtr &compare)
 Provide a pointer to the comparator to be used for segmentation. More...
 
ComparatorConstPtr getComparator () const
 Get the comparator. More...
 
void segment (pcl::PointCloud< PointLT > &labels, std::vector< pcl::PointIndices > &label_indices) const
 Perform the connected component segmentation. More...
 
virtual void setInputCloud (const PointCloudConstPtr &cloud)
 Provide a pointer to the input dataset. More...
 
PointCloudConstPtr const getInputCloud ()
 Get a pointer to the input point cloud dataset. More...
 
void setIndices (const IndicesPtr &indices)
 Provide a pointer to the vector of indices that represents the input data. More...
 
void setIndices (const IndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data. More...
 
void setIndices (const PointIndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data. More...
 
void setIndices (size_t row_start, size_t col_start, size_t nb_rows, size_t nb_cols)
 Set the indices for the points laying within an interest region of the point cloud. More...
 
IndicesPtr const getIndices ()
 Get a pointer to the vector of indices used. More...
 
const PointToperator[] (size_t pos)
 Override PointCloud operator[] to shorten code. More...
 

Static Public Member Functions

static void findLabeledRegionBoundary (int start_idx, PointCloudLPtr labels, pcl::PointIndices &boundary_indices)
 Find the boundary points / contour of a connected component. More...
 

Detailed Description

template<typename PointT, typename PointLT>
class pcl::OrganizedConnectedComponentSegmentation< PointT, PointLT >

OrganizedConnectedComponentSegmentation allows connected components to be found within organized point cloud data, given a comparison function.

Given an input cloud and a comparator, it will output a PointCloud of labels, giving each connected component a unique id, along with a vector of PointIndices corresponding to each component. See OrganizedMultiPlaneSegmentation for an example application.

Author
Alex Trevor, Suat Gedikli

Definition at line 59 of file organized_connected_component_segmentation.h.

Member Typedef Documentation

template<typename PointT, typename PointLT>
typedef pcl::Comparator<PointT> pcl::OrganizedConnectedComponentSegmentation< PointT, PointLT >::Comparator

Definition at line 75 of file organized_connected_component_segmentation.h.

template<typename PointT, typename PointLT>
typedef Comparator::ConstPtr pcl::OrganizedConnectedComponentSegmentation< PointT, PointLT >::ComparatorConstPtr

Definition at line 77 of file organized_connected_component_segmentation.h.

template<typename PointT, typename PointLT>
typedef Comparator::Ptr pcl::OrganizedConnectedComponentSegmentation< PointT, PointLT >::ComparatorPtr

Definition at line 76 of file organized_connected_component_segmentation.h.

template<typename PointT, typename PointLT>
typedef pcl::PointCloud<PointT> pcl::OrganizedConnectedComponentSegmentation< PointT, PointLT >::PointCloud

Definition at line 67 of file organized_connected_component_segmentation.h.

template<typename PointT, typename PointLT>
typedef PointCloud::ConstPtr pcl::OrganizedConnectedComponentSegmentation< PointT, PointLT >::PointCloudConstPtr

Definition at line 69 of file organized_connected_component_segmentation.h.

template<typename PointT, typename PointLT>
typedef pcl::PointCloud<PointLT> pcl::OrganizedConnectedComponentSegmentation< PointT, PointLT >::PointCloudL

Definition at line 71 of file organized_connected_component_segmentation.h.

template<typename PointT, typename PointLT>
typedef PointCloudL::ConstPtr pcl::OrganizedConnectedComponentSegmentation< PointT, PointLT >::PointCloudLConstPtr

Definition at line 73 of file organized_connected_component_segmentation.h.

template<typename PointT, typename PointLT>
typedef PointCloudL::Ptr pcl::OrganizedConnectedComponentSegmentation< PointT, PointLT >::PointCloudLPtr

Definition at line 72 of file organized_connected_component_segmentation.h.

template<typename PointT, typename PointLT>
typedef PointCloud::Ptr pcl::OrganizedConnectedComponentSegmentation< PointT, PointLT >::PointCloudPtr

Definition at line 68 of file organized_connected_component_segmentation.h.

template<typename PointT>
typedef PointIndices::ConstPtr pcl::PCLBase< PointT >::PointIndicesConstPtr
inherited

Definition at line 79 of file pcl_base.h.

template<typename PointT>
typedef PointIndices::Ptr pcl::PCLBase< PointT >::PointIndicesPtr
inherited

Definition at line 78 of file pcl_base.h.

Constructor & Destructor Documentation

template<typename PointT, typename PointLT>
pcl::OrganizedConnectedComponentSegmentation< PointT, PointLT >::OrganizedConnectedComponentSegmentation ( const ComparatorConstPtr compare)
inline

Constructor for OrganizedConnectedComponentSegmentation.

Parameters
[in]compareA pointer to the comparator to be used for segmentation. Must be an instance of pcl::Comparator.

Definition at line 82 of file organized_connected_component_segmentation.h.

template<typename PointT, typename PointLT>
virtual pcl::OrganizedConnectedComponentSegmentation< PointT, PointLT >::~OrganizedConnectedComponentSegmentation ( )
inlinevirtual

Member Function Documentation

template<typename PointT , typename PointLT >
void pcl::OrganizedConnectedComponentSegmentation< PointT, PointLT >::findLabeledRegionBoundary ( int  start_idx,
PointCloudLPtr  labels,
pcl::PointIndices boundary_indices 
)
static

Find the boundary points / contour of a connected component.

Directions: 1 2 3 0 x 4 7 6 5 e.g.

Parameters
[in]start_idxthe first (lowest) index of the connected component for which a boundary shoudl be returned
[in]labelsthe Label cloud produced by segmentation
[out]boundary_indicesthe indices of the boundary points for the label corresponding to start_idx

direction y means we came from pixel with label y to the center pixel x

Definition at line 53 of file organized_connected_component_segmentation.hpp.

template<typename PointT, typename PointLT>
ComparatorConstPtr pcl::OrganizedConnectedComponentSegmentation< PointT, PointLT >::getComparator ( ) const
inline

Get the comparator.

Definition at line 104 of file organized_connected_component_segmentation.h.

template<typename PointT>
IndicesPtr const pcl::PCLBase< PointT >::getIndices ( )
inlineinherited

Get a pointer to the vector of indices used.

Definition at line 190 of file pcl_base.h.

template<typename PointT>
PointCloudConstPtr const pcl::PCLBase< PointT >::getInputCloud ( )
inlineinherited

Get a pointer to the input point cloud dataset.

Definition at line 107 of file pcl_base.h.

template<typename PointT>
const PointT& pcl::PCLBase< PointT >::operator[] ( size_t  pos)
inlineinherited

Override PointCloud operator[] to shorten code.

Note
this method can be called instead of (*input_)[(*indices_)[pos]] or input_->points[(*indices_)[pos]]
Parameters
posposition in indices_ vector

Definition at line 197 of file pcl_base.h.

template<typename PointT , typename PointLT >
void pcl::OrganizedConnectedComponentSegmentation< PointT, PointLT >::segment ( pcl::PointCloud< PointLT > &  labels,
std::vector< pcl::PointIndices > &  label_indices 
) const

Perform the connected component segmentation.

Parameters
[out]labelsa PointCloud of labels: each connected component will have a unique id.
[out]label_indicesa vector of PointIndices corresponding to each label / component id.

Definition at line 118 of file organized_connected_component_segmentation.hpp.

template<typename PointT, typename PointLT>
void pcl::OrganizedConnectedComponentSegmentation< PointT, PointLT >::setComparator ( const ComparatorConstPtr compare)
inline

Provide a pointer to the comparator to be used for segmentation.

Parameters
[in]comparethe comparator

Definition at line 97 of file organized_connected_component_segmentation.h.

template<typename PointT>
void pcl::PCLBase< PointT >::setIndices ( const IndicesPtr indices)
inlineinherited

Provide a pointer to the vector of indices that represents the input data.

Parameters
indicesa pointer to the vector of indices that represents the input data.

Definition at line 113 of file pcl_base.h.

template<typename PointT>
void pcl::PCLBase< PointT >::setIndices ( const IndicesConstPtr indices)
inlineinherited

Provide a pointer to the vector of indices that represents the input data.

Parameters
indicesa pointer to the vector of indices that represents the input data.

Definition at line 124 of file pcl_base.h.

template<typename PointT>
void pcl::PCLBase< PointT >::setIndices ( const PointIndicesConstPtr indices)
inlineinherited

Provide a pointer to the vector of indices that represents the input data.

Parameters
indicesa pointer to the vector of indices that represents the input data.

Definition at line 135 of file pcl_base.h.

template<typename PointT>
void pcl::PCLBase< PointT >::setIndices ( size_t  row_start,
size_t  col_start,
size_t  nb_rows,
size_t  nb_cols 
)
inlineinherited

Set the indices for the points laying within an interest region of the point cloud.

Note
you shouldn't call this method on unorganized point clouds!
Parameters
row_startthe offset on rows
col_startthe offset on columns
nb_rowsthe number of rows to be considered row_start included
nb_colsthe number of columns to be considered col_start included

Definition at line 151 of file pcl_base.h.

template<typename PointT>
virtual void pcl::PCLBase< PointT >::setInputCloud ( const PointCloudConstPtr cloud)
inlinevirtualinherited

Provide a pointer to the input dataset.

Parameters
cloudthe const boost shared pointer to a PointCloud message

Reimplemented in pcl::PCA< PointT >.

Definition at line 103 of file pcl_base.h.


The documentation for this class was generated from the following files: