Point Cloud Library (PCL)  1.6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions
pcl::PlaneRefinementComparator< PointT, PointNT, PointLT > Class Template Reference

PlaneRefinementComparator is a Comparator that operates on plane coefficients, for use in planar segmentation. More...

#include <pcl/segmentation/plane_refinement_comparator.h>

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

List of all members.

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
< PlaneRefinementComparator
< PointT, PointNT, PointLT > > 
Ptr
typedef boost::shared_ptr
< const
PlaneRefinementComparator
< PointT, PointNT, PointLT > > 
ConstPtr
typedef PointCloud::Ptr PointCloudPtr

Public Member Functions

 PlaneRefinementComparator ()
 Empty constructor for PlaneCoefficientComparator.
 PlaneRefinementComparator (boost::shared_ptr< std::vector< pcl::ModelCoefficients > > &models, boost::shared_ptr< std::vector< bool > > &refine_labels)
 Empty constructor for PlaneCoefficientComparator.
virtual ~PlaneRefinementComparator ()
 Destructor for PlaneCoefficientComparator.
void setModelCoefficients (boost::shared_ptr< std::vector< pcl::ModelCoefficients > > &models)
 Set the vector of model coefficients to which we will compare.
void setModelCoefficients (std::vector< pcl::ModelCoefficients > &models)
 Set the vector of model coefficients to which we will compare.
void setRefineLabels (boost::shared_ptr< std::vector< bool > > &refine_labels)
 Set which labels should be refined.
void setRefineLabels (std::vector< bool > &refine_labels)
 Set which labels should be refined.
void setLabelToModel (boost::shared_ptr< std::vector< int > > &label_to_model)
 A mapping from label to index in the vector of models, allowing the model coefficients of a label to be accessed.
void setLabelToModel (std::vector< int > &label_to_model)
 A mapping from label to index in the vector of models, allowing the model coefficients of a label to be accessed.
boost::shared_ptr< std::vector
< pcl::ModelCoefficients > > 
getModelCoefficients () const
 Get the vector of model coefficients to which we will compare.
void setLabels (PointCloudLPtr &labels)
 ...
virtual bool compare (int idx1, int idx2) const
 Compare two neighboring points.
virtual void setInputCloud (const PointCloudConstPtr &cloud)
 Set the input cloud for the comparator.
void setInputNormals (const PointCloudNConstPtr &normals)
 Provide a pointer to the input normals.
PointCloudNConstPtr getInputNormals () const
 Get the input normals.
void setPlaneCoeffD (boost::shared_ptr< std::vector< float > > &plane_coeff_d)
 Provide a pointer to a vector of the d-coefficient of the planes' hessian normal form.
void setPlaneCoeffD (std::vector< float > &plane_coeff_d)
 Provide a pointer to a vector of the d-coefficient of the planes' hessian normal form.
const std::vector< float > & getPlaneCoeffD () const
 Get a pointer to the vector of the d-coefficient of the planes' hessian normal form.
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.
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.
void setDistanceThreshold (float distance_threshold, bool depth_dependent=false)
 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.
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.
virtual PointCloudConstPtr getInputCloud () const
 Get the input cloud this comparator operates on.

Detailed Description

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

PlaneRefinementComparator is a Comparator that operates on plane coefficients, for use in planar segmentation.

In conjunction with OrganizedConnectedComponentSegmentation, this allows planes to be segmented from organized data.

Author:
Alex Trevor, Suat Gedikli

Definition at line 55 of file plane_refinement_comparator.h.


Member Typedef Documentation

template<typename PointT , typename PointNT , typename PointLT >
typedef boost::shared_ptr<const PlaneRefinementComparator<PointT, PointNT, PointLT> > pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::ConstPtr
template<typename PointT , typename PointNT , typename PointLT >
typedef Comparator<PointT>::PointCloud pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::PointCloud
template<typename PointT , typename PointNT , typename PointLT >
typedef Comparator<PointT>::PointCloudConstPtr pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::PointCloudConstPtr
template<typename PointT , typename PointNT , typename PointLT >
typedef pcl::PointCloud<PointLT> pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::PointCloudL

Definition at line 65 of file plane_refinement_comparator.h.

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

Definition at line 67 of file plane_refinement_comparator.h.

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

Definition at line 66 of file plane_refinement_comparator.h.

template<typename PointT , typename PointNT , typename PointLT >
typedef pcl::PointCloud<PointNT> pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::PointCloudN
template<typename PointT , typename PointNT , typename PointLT >
typedef PointCloudN::ConstPtr pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::PointCloudNConstPtr
template<typename PointT , typename PointNT , typename PointLT >
typedef PointCloudN::Ptr pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::PointCloudNPtr
template<typename PointT>
typedef PointCloud::Ptr pcl::Comparator< PointT >::PointCloudPtr [inherited]

Definition at line 57 of file comparator.h.

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

Constructor & Destructor Documentation

template<typename PointT , typename PointNT , typename PointLT >
pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::PlaneRefinementComparator ( ) [inline]

Empty constructor for PlaneCoefficientComparator.

Definition at line 79 of file plane_refinement_comparator.h.

template<typename PointT , typename PointNT , typename PointLT >
pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::PlaneRefinementComparator ( boost::shared_ptr< std::vector< pcl::ModelCoefficients > > &  models,
boost::shared_ptr< std::vector< bool > > &  refine_labels 
) [inline]

Empty constructor for PlaneCoefficientComparator.

Parameters:
[in]models
[in]refine_labels

Definition at line 92 of file plane_refinement_comparator.h.

template<typename PointT , typename PointNT , typename PointLT >
virtual pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::~PlaneRefinementComparator ( ) [inline, virtual]

Destructor for PlaneCoefficientComparator.

Definition at line 104 of file plane_refinement_comparator.h.


Member Function Documentation

template<typename PointT , typename PointNT , typename PointLT >
virtual bool pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::compare ( int  idx1,
int  idx2 
) const [inline, virtual]

Compare two neighboring points.

Parameters:
[in]idx1The index of the first point.
[in]idx2The index of the second point.

Reimplemented from pcl::PlaneCoefficientComparator< PointT, PointNT >.

Definition at line 183 of file plane_refinement_comparator.h.

template<typename PointT , typename PointNT >
float pcl::PlaneCoefficientComparator< PointT, PointNT >::getAngularThreshold ( ) const [inline, inherited]

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 158 of file plane_coefficient_comparator.h.

template<typename PointT , typename PointNT >
float pcl::PlaneCoefficientComparator< PointT, PointNT >::getDistanceThreshold ( ) const [inline, inherited]

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 177 of file plane_coefficient_comparator.h.

template<typename PointT>
virtual PointCloudConstPtr pcl::Comparator< PointT >::getInputCloud ( ) const [inline, virtual, inherited]

Get the input cloud this comparator operates on.

Definition at line 85 of file comparator.h.

template<typename PointT , typename PointNT >
PointCloudNConstPtr pcl::PlaneCoefficientComparator< PointT, PointNT >::getInputNormals ( ) const [inline, inherited]

Get the input normals.

Definition at line 117 of file plane_coefficient_comparator.h.

template<typename PointT , typename PointNT , typename PointLT >
boost::shared_ptr<std::vector<pcl::ModelCoefficients> > pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::getModelCoefficients ( ) const [inline]

Get the vector of model coefficients to which we will compare.

Definition at line 164 of file plane_refinement_comparator.h.

template<typename PointT , typename PointNT >
const std::vector<float>& pcl::PlaneCoefficientComparator< PointT, PointNT >::getPlaneCoeffD ( ) const [inline, inherited]

Get a pointer to the vector of the d-coefficient of the planes' hessian normal form.

Definition at line 142 of file plane_coefficient_comparator.h.

template<typename PointT , typename PointNT >
virtual void pcl::PlaneCoefficientComparator< PointT, PointNT >::setAngularThreshold ( float  angular_threshold) [inline, virtual, inherited]

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 151 of file plane_coefficient_comparator.h.

template<typename PointT , typename PointNT >
void pcl::PlaneCoefficientComparator< PointT, PointNT >::setDistanceThreshold ( float  distance_threshold,
bool  depth_dependent = false 
) [inline, inherited]

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 (at 1m)
[in]depth_dependentwhether to scale the threshold based on range from the sensor (default: false)

Definition at line 168 of file plane_coefficient_comparator.h.

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

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 101 of file plane_coefficient_comparator.h.

template<typename PointT , typename PointNT >
void pcl::PlaneCoefficientComparator< PointT, PointNT >::setInputNormals ( const PointCloudNConstPtr normals) [inline, inherited]

Provide a pointer to the input normals.

Parameters:
[in]normalsthe input normal cloud

Definition at line 110 of file plane_coefficient_comparator.h.

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

...

Parameters:
[in]labels

Definition at line 173 of file plane_refinement_comparator.h.

template<typename PointT , typename PointNT , typename PointLT >
void pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::setLabelToModel ( boost::shared_ptr< std::vector< int > > &  label_to_model) [inline]

A mapping from label to index in the vector of models, allowing the model coefficients of a label to be accessed.

Parameters:
[in]label_to_modelA vector of size max_label, with the index of each corresponding model in models

Definition at line 148 of file plane_refinement_comparator.h.

template<typename PointT , typename PointNT , typename PointLT >
void pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::setLabelToModel ( std::vector< int > &  label_to_model) [inline]

A mapping from label to index in the vector of models, allowing the model coefficients of a label to be accessed.

Parameters:
[in]label_to_modelA vector of size max_label, with the index of each corresponding model in models

Definition at line 157 of file plane_refinement_comparator.h.

template<typename PointT , typename PointNT , typename PointLT >
void pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::setModelCoefficients ( boost::shared_ptr< std::vector< pcl::ModelCoefficients > > &  models) [inline]

Set the vector of model coefficients to which we will compare.

Parameters:
[in]modelsa vector of model coefficients produced by the initial segmentation step.

Definition at line 112 of file plane_refinement_comparator.h.

template<typename PointT , typename PointNT , typename PointLT >
void pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::setModelCoefficients ( std::vector< pcl::ModelCoefficients > &  models) [inline]

Set the vector of model coefficients to which we will compare.

Parameters:
[in]modelsa vector of model coefficients produced by the initial segmentation step.

Definition at line 121 of file plane_refinement_comparator.h.

template<typename PointT , typename PointNT >
void pcl::PlaneCoefficientComparator< PointT, PointNT >::setPlaneCoeffD ( boost::shared_ptr< std::vector< float > > &  plane_coeff_d) [inline, inherited]

Provide a pointer to a vector of the d-coefficient of the planes' hessian normal form.

a, b, and c are provided by the normal cloud.

Parameters:
[in]plane_coeff_da pointer to the plane coefficients.

Definition at line 126 of file plane_coefficient_comparator.h.

template<typename PointT , typename PointNT >
void pcl::PlaneCoefficientComparator< PointT, PointNT >::setPlaneCoeffD ( std::vector< float > &  plane_coeff_d) [inline, inherited]

Provide a pointer to a vector of the d-coefficient of the planes' hessian normal form.

a, b, and c are provided by the normal cloud.

Parameters:
[in]plane_coeff_da pointer to the plane coefficients.

Definition at line 135 of file plane_coefficient_comparator.h.

template<typename PointT , typename PointNT , typename PointLT >
void pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::setRefineLabels ( boost::shared_ptr< std::vector< bool > > &  refine_labels) [inline]

Set which labels should be refined.

This is a vector of bools 0-max_label, true if the label should be refined.

Parameters:
[in]refine_labelsA vector of bools 0-max_label, true if the label should be refined.

Definition at line 130 of file plane_refinement_comparator.h.

template<typename PointT , typename PointNT , typename PointLT >
void pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::setRefineLabels ( std::vector< bool > &  refine_labels) [inline]

Set which labels should be refined.

This is a vector of bools 0-max_label, true if the label should be refined.

Parameters:
[in]refine_labelsA vector of bools 0-max_label, true if the label should be refined.

Definition at line 139 of file plane_refinement_comparator.h.


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