Loading...
Searching...
No Matches
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 >:

## Public Types

using | PointCloud = typename Comparator< PointT >::PointCloud
using | PointCloudConstPtr = typename Comparator< PointT >::PointCloudConstPtr
using | PointCloudN = pcl::PointCloud< PointNT >
using | PointCloudNPtr = typename PointCloudN::Ptr
using | PointCloudNConstPtr = typename PointCloudN::ConstPtr
using | PointCloudL = pcl::PointCloud< PointLT >
using | PointCloudLPtr = typename PointCloudL::Ptr
using | PointCloudLConstPtr = typename PointCloudL::ConstPtr
using | Ptr = shared_ptr< PlaneRefinementComparator< PointT, PointNT, PointLT > >
using | ConstPtr = shared_ptr< const PlaneRefinementComparator< PointT, PointNT, PointLT > >
Public Types inherited from pcl::PlaneCoefficientComparator< PointT, PointNT >
using | PointCloud = typename Comparator< PointT >::PointCloud
using | PointCloudConstPtr = typename Comparator< PointT >::PointCloudConstPtr
using | PointCloudN = pcl::PointCloud< PointNT >
using | PointCloudNPtr = typename PointCloudN::Ptr
using | PointCloudNConstPtr = typename PointCloudN::ConstPtr
using | Ptr = shared_ptr< PlaneCoefficientComparator< PointT, PointNT > >
using | ConstPtr = shared_ptr< const PlaneCoefficientComparator< PointT, PointNT > >
Public Types inherited from pcl::Comparator< PointT >
using | PointCloud = pcl::PointCloud< PointT >
using | PointCloudPtr = typename PointCloud::Ptr
using | PointCloudConstPtr = typename PointCloud::ConstPtr
using | Ptr = shared_ptr< Comparator< PointT > >
using | ConstPtr = shared_ptr< const Comparator< PointT > >

## Public Member Functions

| PlaneRefinementComparator ()
| Empty constructor for PlaneCoefficientComparator.
| PlaneRefinementComparator (shared_ptr< std::vector< pcl::ModelCoefficients > > &models, shared_ptr< std::vector< bool > > &refine_labels)
| Empty constructor for PlaneCoefficientComparator.
| ~PlaneRefinementComparator () override=default
| Destructor for PlaneCoefficientComparator.
void | setModelCoefficients (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 (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 (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.
shared_ptr< std::vector< pcl::ModelCoefficients > > | getModelCoefficients () const
| Get the vector of model coefficients to which we will compare.
void | setLabels (PointCloudLPtr &labels)
| ...
bool | compare (int idx1, int idx2) const override
| Compare two neighboring points.
Public Member Functions inherited from pcl::PlaneCoefficientComparator< PointT, PointNT >
| PlaneCoefficientComparator ()
| Empty constructor for PlaneCoefficientComparator.
| PlaneCoefficientComparator (shared_ptr< std::vector< float > > &plane_coeff_d)
| Constructor for PlaneCoefficientComparator.
| ~PlaneCoefficientComparator () override=default
| Destructor for PlaneCoefficientComparator.
void | setInputCloud (const PointCloudConstPtr &cloud) override
| 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 (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.
Public Member Functions inherited from pcl::Comparator< PointT >
| Comparator ()
| Empty constructor for comparator.
virtual | ~Comparator ()=default
| Empty destructor for comparator.
virtual PointCloudConstPtr | getInputCloud () const
| Get the input cloud this comparator operates on.

## Protected Attributes

shared_ptr< std::vector< pcl::ModelCoefficients > > | models_
PointCloudLPtr | labels_
shared_ptr< std::vector< bool > > | refine_labels_
shared_ptr< std::vector< int > > | label_to_model_
bool | depth_dependent_
Protected Attributes inherited from pcl::PlaneCoefficientComparator< PointT, PointNT >
PointCloudNConstPtr | normals_
shared_ptr< std::vector< float > > | plane_coeff_d_
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::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 54 of file plane_refinement_comparator.h.

## Member Typedef Documentation

## ConstPtr

template<typename PointT , typename PointNT , typename PointLT >

using pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::ConstPtr = shared_ptr<const PlaneRefinementComparator<PointT, PointNT, PointLT> >

Definition at line 69 of file plane_refinement_comparator.h.

## PointCloud

template<typename PointT , typename PointNT , typename PointLT >

using pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::PointCloud = typename Comparator<PointT>::PointCloud

Definition at line 57 of file plane_refinement_comparator.h.

## PointCloudConstPtr

template<typename PointT , typename PointNT , typename PointLT >

using pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::PointCloudConstPtr = typename Comparator<PointT>::PointCloudConstPtr

Definition at line 58 of file plane_refinement_comparator.h.

## PointCloudL

template<typename PointT , typename PointNT , typename PointLT >

using pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::PointCloudL = pcl::PointCloud<PointLT>

Definition at line 64 of file plane_refinement_comparator.h.

## PointCloudLConstPtr

template<typename PointT , typename PointNT , typename PointLT >

using pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::PointCloudLConstPtr = typename PointCloudL::ConstPtr

Definition at line 66 of file plane_refinement_comparator.h.

## PointCloudLPtr

template<typename PointT , typename PointNT , typename PointLT >

using pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::PointCloudLPtr = typename PointCloudL::Ptr

Definition at line 65 of file plane_refinement_comparator.h.

## PointCloudN

template<typename PointT , typename PointNT , typename PointLT >

using pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::PointCloudN = pcl::PointCloud<PointNT>

Definition at line 60 of file plane_refinement_comparator.h.

## PointCloudNConstPtr

template<typename PointT , typename PointNT , typename PointLT >

using pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::PointCloudNConstPtr = typename PointCloudN::ConstPtr

Definition at line 62 of file plane_refinement_comparator.h.

## PointCloudNPtr

template<typename PointT , typename PointNT , typename PointLT >

using pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::PointCloudNPtr = typename PointCloudN::Ptr

Definition at line 61 of file plane_refinement_comparator.h.

## Ptr

template<typename PointT , typename PointNT , typename PointLT >

using pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::Ptr = shared_ptr<PlaneRefinementComparator<PointT, PointNT, PointLT> >

Definition at line 68 of file plane_refinement_comparator.h.

## Constructor & Destructor Documentation

## PlaneRefinementComparator() [1/2]

template<typename PointT , typename PointNT , typename PointLT >

pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::PlaneRefinementComparator | ( |  | ) |

inline

Empty constructor for PlaneCoefficientComparator.

Definition at line 78 of file plane_refinement_comparator.h.

## PlaneRefinementComparator() [2/2]

template<typename PointT , typename PointNT , typename PointLT >

pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::PlaneRefinementComparator | ( | shared_ptr< std::vector< pcl::ModelCoefficients > > & | models,
|  | shared_ptr< std::vector< bool > > & | refine_labels
| ) |  |

inline

Empty constructor for PlaneCoefficientComparator.

Parameters

  [in] | models |
  [in] | refine_labels |

Definition at line 88 of file plane_refinement_comparator.h.

## ~PlaneRefinementComparator()

template<typename PointT , typename PointNT , typename PointLT >

pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::~PlaneRefinementComparator | ( |  | ) |

override default

Destructor for PlaneCoefficientComparator.

## Member Function Documentation

## compare()

template<typename PointT , typename PointNT , typename PointLT >

bool pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::compare | ( | int | idx1,
|  | int | idx2
| ) |  | const

inline override virtual

Compare two neighboring points.

Parameters

  [in] | idx1 | The index of the first point.
  [in] | idx2 | The index of the second point.

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

Definition at line 175 of file plane_refinement_comparator.h.

References pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::depth_dependent_, pcl::PlaneCoefficientComparator< PointT, PointNT >::distance_threshold_, pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::refine_labels_, pcl::ModelCoefficients::values, and pcl::PlaneCoefficientComparator< PointT, PointNT >::z_axis_.

## getModelCoefficients()

template<typename PointT , typename PointNT , typename PointLT >

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 156 of file plane_refinement_comparator.h.

References pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::models_.

## setLabels()

template<typename PointT , typename PointNT , typename PointLT >

void pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::setLabels | ( | PointCloudLPtr & | labels | ) |

inline

...

Parameters

  [in] | labels |

Definition at line 165 of file plane_refinement_comparator.h.

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

## setLabelToModel() [1/2]

template<typename PointT , typename PointNT , typename PointLT >

void pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::setLabelToModel | ( | 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_model | A vector of size max_label, with the index of each corresponding model in models

Definition at line 140 of file plane_refinement_comparator.h.

References pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::label_to_model_.

## setLabelToModel() [2/2]

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_model | A vector of size max_label, with the index of each corresponding model in models

Definition at line 149 of file plane_refinement_comparator.h.

References pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::label_to_model_.

## setModelCoefficients() [1/2]

template<typename PointT , typename PointNT , typename PointLT >

void pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::setModelCoefficients | ( | shared_ptr< std::vector< pcl::ModelCoefficients > > & | models | ) |

inline

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

Parameters

  [in] | models | a vector of model coefficients produced by the initial segmentation step.

Definition at line 104 of file plane_refinement_comparator.h.

References pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::models_.

## setModelCoefficients() [2/2]

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] | models | a vector of model coefficients produced by the initial segmentation step.

Definition at line 113 of file plane_refinement_comparator.h.

References pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::models_.

## setRefineLabels() [1/2]

template<typename PointT , typename PointNT , typename PointLT >

void pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::setRefineLabels | ( | 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_labels | A vector of bools 0-max_label, true if the label should be refined.

Definition at line 122 of file plane_refinement_comparator.h.

References pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::refine_labels_.

## setRefineLabels() [2/2]

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_labels | A vector of bools 0-max_label, true if the label should be refined.

Definition at line 131 of file plane_refinement_comparator.h.

References pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::refine_labels_.

## Member Data Documentation

## depth_dependent_

template<typename PointT , typename PointNT , typename PointLT >

bool pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::depth_dependent_

protected

Definition at line 210 of file plane_refinement_comparator.h.

Referenced by pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::compare().

## label_to_model_

template<typename PointT , typename PointNT , typename PointLT >

shared_ptr<std::vector<int> > pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::label_to_model_

protected

Definition at line 209 of file plane_refinement_comparator.h.

Referenced by pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::setLabelToModel(), and pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::setLabelToModel().

## labels_

template<typename PointT , typename PointNT , typename PointLT >

PointCloudLPtr pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::labels_

protected

Definition at line 207 of file plane_refinement_comparator.h.

Referenced by pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::setLabels().

## models_

template<typename PointT , typename PointNT , typename PointLT >

shared_ptr<std::vector<pcl::ModelCoefficients> > pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::models_

protected

Definition at line 206 of file plane_refinement_comparator.h.

Referenced by pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::getModelCoefficients(), pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::setModelCoefficients(), and pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::setModelCoefficients().

## refine_labels_

template<typename PointT , typename PointNT , typename PointLT >

shared_ptr<std::vector<bool> > pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::refine_labels_

protected

Definition at line 208 of file plane_refinement_comparator.h.

Referenced by pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::compare(), pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::setRefineLabels(), and pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::setRefineLabels().

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

- pcl/segmentation/plane_refinement_comparator.h