Point Cloud Library (PCL)  1.7.1
List of all members | Public Types | Public Member Functions | Protected Attributes
pcl::EuclideanClusterComparator< PointT, PointNT, PointLT > Class Template Reference

EuclideanClusterComparator is a comparator used for finding clusters supported by planar surfaces. More...

#include <pcl/segmentation/euclidean_cluster_comparator.h>

+ Inheritance diagram for pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >:

Public Types

typedef Comparator< PointT >
::PointCloud 
PointCloud
 
typedef Comparator< PointT >
::PointCloudConstPtr 
PointCloudConstPtr
 
typedef pcl::PointCloud< PointNT > PointCloudN
 
typedef PointCloudN::Ptr PointCloudNPtr
 
typedef PointCloudN::ConstPtr PointCloudNConstPtr
 
typedef pcl::PointCloud< PointLT > PointCloudL
 
typedef PointCloudL::Ptr PointCloudLPtr
 
typedef PointCloudL::ConstPtr PointCloudLConstPtr
 
typedef boost::shared_ptr
< EuclideanClusterComparator
< PointT, PointNT, PointLT > > 
Ptr
 
typedef boost::shared_ptr
< const
EuclideanClusterComparator
< PointT, PointNT, PointLT > > 
ConstPtr
 
- Public Types inherited from pcl::Comparator< PointT >
typedef pcl::PointCloud< PointTPointCloud
 
typedef PointCloud::Ptr PointCloudPtr
 
typedef PointCloud::ConstPtr PointCloudConstPtr
 
typedef boost::shared_ptr
< Comparator< PointT > > 
Ptr
 
typedef boost::shared_ptr
< const Comparator< PointT > > 
ConstPtr
 

Public Member Functions

 EuclideanClusterComparator ()
 Empty constructor for EuclideanClusterComparator. More...
 
virtual ~EuclideanClusterComparator ()
 Destructor for EuclideanClusterComparator. More...
 
virtual void setInputCloud (const PointCloudConstPtr &cloud)
 Set the input cloud for the comparator. More...
 
void setInputNormals (const PointCloudNConstPtr &normals)
 Provide a pointer to the input normals. More...
 
PointCloudNConstPtr getInputNormals () const
 Get the input normals. More...
 
virtual void setAngularThreshold (float angular_threshold)
 Set the tolerance in radians for difference in normal direction between neighboring points, to be considered part of the same plane. More...
 
float getAngularThreshold () const
 Get the angular threshold in radians for difference in normal direction between neighboring points, to be considered part of the same plane. More...
 
void setDistanceThreshold (float distance_threshold, bool depth_dependent)
 Set the tolerance in meters for difference in perpendicular distance (d component of plane equation) to the plane between neighboring points, to be considered part of the same plane. More...
 
float getDistanceThreshold () const
 Get the distance threshold in meters (d component of plane equation) between neighboring points, to be considered part of the same plane. More...
 
void setLabels (PointCloudLPtr &labels)
 Set label cloud. More...
 
void setExcludeLabels (std::vector< bool > &exclude_labels)
 Set labels in the label cloud to exclude. More...
 
virtual bool compare (int idx1, int idx2) const
 Compare points at two indices by their plane equations. More...
 
- Public Member Functions inherited from pcl::Comparator< PointT >
 Comparator ()
 Empty constructor for comparator. More...
 
virtual ~Comparator ()
 Empty destructor for comparator. More...
 
virtual PointCloudConstPtr getInputCloud () const
 Get the input cloud this comparator operates on. More...
 

Protected Attributes

PointCloudNConstPtr normals_
 
PointCloudLPtr labels_
 
boost::shared_ptr< std::vector
< bool > > 
exclude_labels_
 
float angular_threshold_
 
float distance_threshold_
 
bool depth_dependent_
 
Eigen::Vector3f z_axis_
 
- Protected Attributes inherited from pcl::Comparator< PointT >
PointCloudConstPtr input_
 

Detailed Description

template<typename PointT, typename PointNT, typename PointLT>
class pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >

EuclideanClusterComparator is a comparator used for finding clusters supported by planar surfaces.

This needs to be run as a second pass after extracting planar surfaces, using MultiPlaneSegmentation for example.

Author
Alex Trevor

Definition at line 54 of file euclidean_cluster_comparator.h.

Member Typedef Documentation

template<typename PointT , typename PointNT , typename PointLT >
typedef boost::shared_ptr<const EuclideanClusterComparator<PointT, PointNT, PointLT> > pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::ConstPtr

Definition at line 69 of file euclidean_cluster_comparator.h.

template<typename PointT , typename PointNT , typename PointLT >
typedef Comparator<PointT>::PointCloud pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::PointCloud

Definition at line 57 of file euclidean_cluster_comparator.h.

template<typename PointT , typename PointNT , typename PointLT >
typedef Comparator<PointT>::PointCloudConstPtr pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::PointCloudConstPtr

Definition at line 58 of file euclidean_cluster_comparator.h.

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

Definition at line 64 of file euclidean_cluster_comparator.h.

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

Definition at line 66 of file euclidean_cluster_comparator.h.

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

Definition at line 65 of file euclidean_cluster_comparator.h.

template<typename PointT , typename PointNT , typename PointLT >
typedef pcl::PointCloud<PointNT> pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::PointCloudN

Definition at line 60 of file euclidean_cluster_comparator.h.

template<typename PointT , typename PointNT , typename PointLT >
typedef PointCloudN::ConstPtr pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::PointCloudNConstPtr

Definition at line 62 of file euclidean_cluster_comparator.h.

template<typename PointT , typename PointNT , typename PointLT >
typedef PointCloudN::Ptr pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::PointCloudNPtr

Definition at line 61 of file euclidean_cluster_comparator.h.

template<typename PointT , typename PointNT , typename PointLT >
typedef boost::shared_ptr<EuclideanClusterComparator<PointT, PointNT, PointLT> > pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::Ptr

Definition at line 68 of file euclidean_cluster_comparator.h.

Constructor & Destructor Documentation

template<typename PointT , typename PointNT , typename PointLT >
pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::EuclideanClusterComparator ( )
inline

Empty constructor for EuclideanClusterComparator.

Definition at line 74 of file euclidean_cluster_comparator.h.

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

Destructor for EuclideanClusterComparator.

Definition at line 85 of file euclidean_cluster_comparator.h.

Member Function Documentation

template<typename PointT , typename PointNT , typename PointLT >
virtual bool pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::compare ( int  idx1,
int  idx2 
) const
inlinevirtual

Compare points at two indices by their plane equations.

True if the angle between the normals is less than the angular threshold, and the difference between the d component of the normals is less than distance threshold, else false

Parameters
idx1The first index for the comparison
idx2The second index for the comparison

Implements pcl::Comparator< PointT >.

Definition at line 170 of file euclidean_cluster_comparator.h.

References pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::depth_dependent_, pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::distance_threshold_, pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::exclude_labels_, pcl::Comparator< PointT >::input_, pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::labels_, and pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::z_axis_.

template<typename PointT , typename PointNT , typename PointLT >
float pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::getAngularThreshold ( ) const
inline

Get the angular threshold in radians for difference in normal direction between neighboring points, to be considered part of the same plane.

Definition at line 124 of file euclidean_cluster_comparator.h.

References pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::angular_threshold_.

template<typename PointT , typename PointNT , typename PointLT >
float pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::getDistanceThreshold ( ) const
inline

Get the distance threshold in meters (d component of plane equation) between neighboring points, to be considered part of the same plane.

Definition at line 141 of file euclidean_cluster_comparator.h.

References pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::distance_threshold_.

template<typename PointT , typename PointNT , typename PointLT >
PointCloudNConstPtr pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::getInputNormals ( ) const
inline
template<typename PointT , typename PointNT , typename PointLT >
virtual void pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::setAngularThreshold ( float  angular_threshold)
inlinevirtual

Set the tolerance in radians for difference in normal direction between neighboring points, to be considered part of the same plane.

Parameters
[in]angular_thresholdthe tolerance in radians

Definition at line 117 of file euclidean_cluster_comparator.h.

References pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::angular_threshold_.

template<typename PointT , typename PointNT , typename PointLT >
void pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::setDistanceThreshold ( float  distance_threshold,
bool  depth_dependent 
)
inline

Set the tolerance in meters for difference in perpendicular distance (d component of plane equation) to the plane between neighboring points, to be considered part of the same plane.

Parameters
[in]distance_thresholdthe tolerance in meters

Definition at line 133 of file euclidean_cluster_comparator.h.

References pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::depth_dependent_, and pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::distance_threshold_.

template<typename PointT , typename PointNT , typename PointLT >
void pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::setExcludeLabels ( std::vector< bool > &  exclude_labels)
inline

Set labels in the label cloud to exclude.

Parameters
exclude_labelsa vector of bools corresponding to whether or not a given label should be considered

Definition at line 159 of file euclidean_cluster_comparator.h.

References pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::exclude_labels_.

template<typename PointT , typename PointNT , typename PointLT >
virtual void pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::setInputCloud ( const PointCloudConstPtr cloud)
inlinevirtual

Set the input cloud for the comparator.

Parameters
[in]cloudthe point cloud this comparator will operate on

Reimplemented from pcl::Comparator< PointT >.

Definition at line 90 of file euclidean_cluster_comparator.h.

References pcl::Comparator< PointT >::input_, and pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::z_axis_.

template<typename PointT , typename PointNT , typename PointLT >
void pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::setInputNormals ( const PointCloudNConstPtr normals)
inline

Provide a pointer to the input normals.

Parameters
[in]normalsthe input normal cloud

Definition at line 101 of file euclidean_cluster_comparator.h.

References pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::normals_.

template<typename PointT , typename PointNT , typename PointLT >
void pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::setLabels ( PointCloudLPtr labels)
inline

Set label cloud.

Parameters
[in]labelsThe label cloud

Definition at line 150 of file euclidean_cluster_comparator.h.

References pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::labels_.

Member Data Documentation

template<typename PointT , typename PointNT , typename PointLT >
float pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::angular_threshold_
protected
template<typename PointT , typename PointNT , typename PointLT >
bool pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::depth_dependent_
protected
template<typename PointT , typename PointNT , typename PointLT >
float pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::distance_threshold_
protected
template<typename PointT , typename PointNT , typename PointLT >
boost::shared_ptr<std::vector<bool> > pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::exclude_labels_
protected
template<typename PointT , typename PointNT , typename PointLT >
PointCloudLPtr pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::labels_
protected
template<typename PointT , typename PointNT , typename PointLT >
PointCloudNConstPtr pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::normals_
protected
template<typename PointT , typename PointNT , typename PointLT >
Eigen::Vector3f pcl::EuclideanClusterComparator< PointT, PointNT, PointLT >::z_axis_
protected

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