Loading...
Searching...
No Matches
pcl::EuclideanClusterComparator< PointT, PointLT > Class Template Reference

EuclideanClusterComparator is a comparator used for finding clusters based on euclidean distance. More...

`#include <pcl/segmentation/euclidean_cluster_comparator.h>`

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

## Public Types

using | PointCloudL = pcl::PointCloud< PointLT >
using | PointCloudLPtr = typename PointCloudL::Ptr
using | PointCloudLConstPtr = typename PointCloudL::ConstPtr
using | Ptr = shared_ptr< EuclideanClusterComparator< PointT, PointLT > >
using | ConstPtr = shared_ptr< const EuclideanClusterComparator< PointT, PointLT > >
using | ExcludeLabelSet = std::set< std::uint32_t >
using | ExcludeLabelSetPtr = shared_ptr< ExcludeLabelSet >
using | ExcludeLabelSetConstPtr = shared_ptr< const ExcludeLabelSet >
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

| EuclideanClusterComparator ()=default
| Default constructor for EuclideanClusterComparator.
void | setInputCloud (const PointCloudConstPtr &cloud) override
| Set the input cloud for the comparator.
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.
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.
bool | getDepthDependent () const
| Get if depth dependent.
void | setLabels (const PointCloudLPtr &labels)
| Set label cloud.
const PointCloudLPtr & | getLabels () const
| Get labels.
const ExcludeLabelSetConstPtr & | getExcludeLabels () const
| Get exclude labels.
void | setExcludeLabels (const ExcludeLabelSetConstPtr &exclude_labels)
| Set labels in the label cloud to exclude.
bool | compare (int idx1, int idx2) const override
| Compare points at two indices by their euclidean distance.
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

PointCloudLPtr | labels_
| Set of labels with similar size as the input point cloud, aggregating points into groups based on a similar label identifier.
ExcludeLabelSetConstPtr | exclude_labels_
| Specifies which labels should be excluded com being clustered.
float | distance_threshold_ = 0.005f
bool | depth_dependent_ = false
Eigen::Vector3f | z_axis_
Protected Attributes inherited from pcl::Comparator< PointT >
PointCloudConstPtr | input_

## Detailed Description

template<typename PointT, typename PointLT = pcl::Label>
class pcl::EuclideanClusterComparator< PointT, PointLT >

EuclideanClusterComparator is a comparator used for finding clusters based on euclidean distance.

Author
  Alex Trevor

Definition at line 56 of file euclidean_cluster_comparator.h.

## Member Typedef Documentation

## ConstPtr

template<typename PointT , typename PointLT = pcl::Label>

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

Definition at line 71 of file euclidean_cluster_comparator.h.

## ExcludeLabelSet

template<typename PointT , typename PointLT = pcl::Label>

using pcl::EuclideanClusterComparator< PointT, PointLT >::ExcludeLabelSet = std::set<std::uint32_t>

Definition at line 73 of file euclidean_cluster_comparator.h.

## ExcludeLabelSetConstPtr

template<typename PointT , typename PointLT = pcl::Label>

using pcl::EuclideanClusterComparator< PointT, PointLT >::ExcludeLabelSetConstPtr = shared_ptr<const ExcludeLabelSet>

Definition at line 75 of file euclidean_cluster_comparator.h.

## ExcludeLabelSetPtr

template<typename PointT , typename PointLT = pcl::Label>

using pcl::EuclideanClusterComparator< PointT, PointLT >::ExcludeLabelSetPtr = shared_ptr<ExcludeLabelSet>

Definition at line 74 of file euclidean_cluster_comparator.h.

## PointCloudL

template<typename PointT , typename PointLT = pcl::Label>

using pcl::EuclideanClusterComparator< PointT, PointLT >::PointCloudL = pcl::PointCloud<PointLT>

Definition at line 66 of file euclidean_cluster_comparator.h.

## PointCloudLConstPtr

template<typename PointT , typename PointLT = pcl::Label>

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

Definition at line 68 of file euclidean_cluster_comparator.h.

## PointCloudLPtr

template<typename PointT , typename PointLT = pcl::Label>

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

Definition at line 67 of file euclidean_cluster_comparator.h.

## Ptr

template<typename PointT , typename PointLT = pcl::Label>

using pcl::EuclideanClusterComparator< PointT, PointLT >::Ptr = shared_ptr<EuclideanClusterComparator<PointT, PointLT> >

Definition at line 70 of file euclidean_cluster_comparator.h.

## Constructor & Destructor Documentation

## EuclideanClusterComparator()

template<typename PointT , typename PointLT = pcl::Label>

pcl::EuclideanClusterComparator< PointT, PointLT >::EuclideanClusterComparator | ( |  | ) |

default

Default constructor for EuclideanClusterComparator.

## Member Function Documentation

## compare()

template<typename PointT , typename PointLT = pcl::Label>

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

inline override virtual

Compare points at two indices by their euclidean distance.

Parameters

  idx1 | The first index for the comparison
  idx2 | The second index for the comparison

Implements pcl::Comparator< PointT >.

Definition at line 150 of file euclidean_cluster_comparator.h.

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

## getDepthDependent()

template<typename PointT , typename PointLT = pcl::Label>

bool pcl::EuclideanClusterComparator< PointT, PointLT >::getDepthDependent | ( |  | ) | const

inline

Get if depth dependent.

Definition at line 108 of file euclidean_cluster_comparator.h.

References pcl::EuclideanClusterComparator< PointT, PointLT >::depth_dependent_.

## getDistanceThreshold()

template<typename PointT , typename PointLT = pcl::Label>

float pcl::EuclideanClusterComparator< PointT, 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 101 of file euclidean_cluster_comparator.h.

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

## getExcludeLabels()

template<typename PointT , typename PointLT = pcl::Label>

const ExcludeLabelSetConstPtr & pcl::EuclideanClusterComparator< PointT, PointLT >::getExcludeLabels | ( |  | ) | const

inline

Get exclude labels.

Definition at line 131 of file euclidean_cluster_comparator.h.

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

## getLabels()

template<typename PointT , typename PointLT = pcl::Label>

const PointCloudLPtr & pcl::EuclideanClusterComparator< PointT, PointLT >::getLabels | ( |  | ) | const

inline

Get labels.

Definition at line 124 of file euclidean_cluster_comparator.h.

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

## setDistanceThreshold()

template<typename PointT , typename PointLT = pcl::Label>

void pcl::EuclideanClusterComparator< PointT, 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_threshold | the tolerance in meters
  | depth_dependent |

Definition at line 93 of file euclidean_cluster_comparator.h.

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

## setExcludeLabels()

template<typename PointT , typename PointLT = pcl::Label>

void pcl::EuclideanClusterComparator< PointT, PointLT >::setExcludeLabels | ( | const ExcludeLabelSetConstPtr & | exclude_labels | ) |

inline

Set labels in the label cloud to exclude.

Parameters

  exclude_labels | a vector of bools corresponding to whether or not a given label should be considered

Definition at line 140 of file euclidean_cluster_comparator.h.

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

## setInputCloud()

template<typename PointT , typename PointLT = pcl::Label>

void pcl::EuclideanClusterComparator< PointT, PointLT >::setInputCloud | ( | const PointCloudConstPtr & | cloud | ) |

inline override virtual

Set the input cloud for the comparator.

Parameters

  [in] | cloud | the point cloud this comparator will operate on

Reimplemented from pcl::Comparator< PointT >.

Definition at line 81 of file euclidean_cluster_comparator.h.

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

## setLabels()

template<typename PointT , typename PointLT = pcl::Label>

void pcl::EuclideanClusterComparator< PointT, PointLT >::setLabels | ( | const PointCloudLPtr & | labels | ) |

inline

Set label cloud.

Parameters

  [in] | labels | The label cloud

Definition at line 117 of file euclidean_cluster_comparator.h.

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

## Member Data Documentation

## depth_dependent_

template<typename PointT , typename PointLT = pcl::Label>

bool pcl::EuclideanClusterComparator< PointT, PointLT >::depth_dependent_ = false

protected

Definition at line 200 of file euclidean_cluster_comparator.h.

Referenced by pcl::EuclideanClusterComparator< PointT, PointLT >::compare(), pcl::EuclideanClusterComparator< PointT, PointLT >::getDepthDependent(), and pcl::EuclideanClusterComparator< PointT, PointLT >::setDistanceThreshold().

## distance_threshold_

template<typename PointT , typename PointLT = pcl::Label>

float pcl::EuclideanClusterComparator< PointT, PointLT >::distance_threshold_ = 0.005f

protected

Definition at line 198 of file euclidean_cluster_comparator.h.

Referenced by pcl::EuclideanClusterComparator< PointT, PointLT >::compare(), pcl::EuclideanClusterComparator< PointT, PointLT >::getDistanceThreshold(), and pcl::EuclideanClusterComparator< PointT, PointLT >::setDistanceThreshold().

## exclude_labels_

template<typename PointT , typename PointLT = pcl::Label>

ExcludeLabelSetConstPtr pcl::EuclideanClusterComparator< PointT, PointLT >::exclude_labels_

protected

Specifies which labels should be excluded com being clustered.

If a label is not specified, it's assumed by default that it's intended be excluded

Definition at line 196 of file euclidean_cluster_comparator.h.

Referenced by pcl::EuclideanClusterComparator< PointT, PointLT >::compare(), pcl::EuclideanClusterComparator< PointT, PointLT >::getExcludeLabels(), and pcl::EuclideanClusterComparator< PointT, PointLT >::setExcludeLabels().

## labels_

template<typename PointT , typename PointLT = pcl::Label>

PointCloudLPtr pcl::EuclideanClusterComparator< PointT, PointLT >::labels_

protected

Set of labels with similar size as the input point cloud, aggregating points into groups based on a similar label identifier.

It needs to be set in conjunction with the exclude_labels_ member in order to provided a masking functionality.

Definition at line 189 of file euclidean_cluster_comparator.h.

Referenced by pcl::EuclideanClusterComparator< PointT, PointLT >::compare(), pcl::EuclideanClusterComparator< PointT, PointLT >::getLabels(), and pcl::EuclideanClusterComparator< PointT, PointLT >::setLabels().

## z_axis_

template<typename PointT , typename PointLT = pcl::Label>

Eigen::Vector3f pcl::EuclideanClusterComparator< PointT, PointLT >::z_axis_

protected

Definition at line 202 of file euclidean_cluster_comparator.h.

Referenced by pcl::EuclideanClusterComparator< PointT, PointLT >::compare(), and pcl::EuclideanClusterComparator< PointT, PointLT >::setInputCloud().

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

- pcl/segmentation/euclidean_cluster_comparator.h