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]

List of all members.

Classes

struct  Neighbor

Public Types

typedef pcl::PointCloud< PointT > PointCloud
typedef PointCloud::Ptr PointCloudPtr
typedef PointCloud::ConstPtr PointCloudConstPtr
typedef pcl::PointCloud< PointLT > PointCloudL
typedef PointCloudL::Ptr PointCloudLPtr
typedef PointCloudL::ConstPtr PointCloudLConstPtr
typedef pcl::Comparator< PointT > Comparator
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.
virtual ~OrganizedConnectedComponentSegmentation ()
 Destructor for OrganizedConnectedComponentSegmentation.
void setComparator (const ComparatorConstPtr &compare)
 Provide a pointer to the comparator to be used for segmentation.
ComparatorConstPtr getComparator () const
 Get the comparator.
void segment (pcl::PointCloud< PointLT > &labels, std::vector< pcl::PointIndices > &label_indices) const
 Perform the connected component segmentation.
virtual void setInputCloud (const PointCloudConstPtr &cloud)
 Provide a pointer to the input dataset.
PointCloudConstPtr const getInputCloud ()
 Get a pointer to the input point cloud dataset.
void setIndices (const IndicesPtr &indices)
 Provide a pointer to the vector of indices that represents the input data.
void setIndices (const IndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data.
void setIndices (const PointIndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data.
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.
IndicesPtr const getIndices ()
 Get a pointer to the vector of indices used.
const PointT & operator[] (size_t pos)
 Override PointCloud operator[] to shorten code.

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.

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

Reimplemented from pcl::PCLBase< PointT >.

Definition at line 67 of file organized_connected_component_segmentation.h.

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

Reimplemented from pcl::PCLBase< PointT >.

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

Reimplemented from pcl::PCLBase< PointT >.

Definition at line 68 of file organized_connected_component_segmentation.h.

template<typename PointT>
typedef PointIndices::ConstPtr pcl::PCLBase< PointT >::PointIndicesConstPtr [inherited]
template<typename PointT>
typedef PointIndices::Ptr pcl::PCLBase< PointT >::PointIndicesPtr [inherited]

Constructor & Destructor Documentation

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

Constructor for OrganizedConnectedComponentSegmentation.

Parameters:
[in] compare A 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 (  )  [inline, virtual]

Member Function Documentation

template<typename PointT , typename PointLT >
void pcl::OrganizedConnectedComponentSegmentation< PointT, PointLT >::findLabeledRegionBoundary ( int  start_idx,
PointCloudLPtr  labels,
pcl::PointIndices &  boundary_indices 
) [inline, 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_idx the first (lowest) index of the connected component for which a boundary shoudl be returned
[in] labels the Label cloud produced by segmentation
[out] boundary_indices the 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 (  )  [inline, inherited]

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 (  )  [inline, inherited]

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  )  [inline, inherited]

Override PointCloud operator[] to shorten code.

Note:
this method can be called instead of (*input_)[(*indices_)[pos]] or input_->points[(*indices_)[pos]]
Parameters:
pos position 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 [inline]

Perform the connected component segmentation.

Parameters:
[out] labels a PointCloud of labels: each connected component will have a unique id.
[out] label_indices a 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] compare the comparator

Definition at line 97 of file organized_connected_component_segmentation.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 
) [inline, inherited]

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_start the offset on rows
col_start the offset on columns
nb_rows the number of rows to be considered row_start included
nb_cols the number of columns to be considered col_start included

Definition at line 151 of file pcl_base.h.

template<typename PointT>
void pcl::PCLBase< PointT >::setIndices ( const PointIndicesConstPtr &  indices  )  [inline, inherited]

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

Parameters:
indices a 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 ( const IndicesConstPtr &  indices  )  [inline, inherited]

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

Parameters:
indices a 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 IndicesPtr &  indices  )  [inline, inherited]

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

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

Definition at line 113 of file pcl_base.h.

template<typename PointT>
virtual void pcl::PCLBase< PointT >::setInputCloud ( const PointCloudConstPtr &  cloud  )  [inline, virtual, inherited]

Provide a pointer to the input dataset.

Parameters:
cloud the const boost shared pointer to a PointCloud message

Reimplemented in pcl::NormalEstimation< PointInT, pcl::Normal >.

Definition at line 103 of file pcl_base.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 16 Oct 2012 for Point Cloud Library (PCL) by  doxygen 1.6.1