Point Cloud Library (PCL)  1.14.1-dev
List of all members | Public Types | Public Member Functions | Protected Attributes
pcl::RGBPlaneCoefficientComparator< PointT, PointNT > Class Template Reference

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

#include <pcl/segmentation/rgb_plane_coefficient_comparator.h>

+ Inheritance diagram for pcl::RGBPlaneCoefficientComparator< PointT, PointNT >:
+ Collaboration diagram for pcl::RGBPlaneCoefficientComparator< PointT, PointNT >:

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 Ptr = shared_ptr< RGBPlaneCoefficientComparator< PointT, PointNT > >
 
using ConstPtr = shared_ptr< const RGBPlaneCoefficientComparator< PointT, PointNT > >
 
- 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

 RGBPlaneCoefficientComparator ()
 Empty constructor for RGBPlaneCoefficientComparator. More...
 
 RGBPlaneCoefficientComparator (shared_ptr< std::vector< float > > &plane_coeff_d)
 Constructor for RGBPlaneCoefficientComparator. More...
 
 ~RGBPlaneCoefficientComparator ()=default
 Destructor for RGBPlaneCoefficientComparator. More...
 
void setColorThreshold (float color_threshold)
 Set the tolerance in color space between neighboring points, to be considered part of the same plane. More...
 
float getColorThreshold () const
 Get the color threshold between neighboring points, to be considered part of the same plane. More...
 
bool compare (int idx1, int idx2) const override
 Compare two neighboring points, by using normal information, euclidean distance, and color information. More...
 
- Public Member Functions inherited from pcl::PlaneCoefficientComparator< PointT, PointNT >
 PlaneCoefficientComparator ()
 Empty constructor for PlaneCoefficientComparator. More...
 
 PlaneCoefficientComparator (shared_ptr< std::vector< float > > &plane_coeff_d)
 Constructor for PlaneCoefficientComparator. More...
 
 ~PlaneCoefficientComparator () override=default
 Destructor for PlaneCoefficientComparator. More...
 
void setInputCloud (const PointCloudConstPtr &cloud) override
 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...
 
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. More...
 
void setPlaneCoeffD (std::vector< float > &plane_coeff_d)
 Provide a pointer to a vector of the d-coefficient of the planes' hessian normal form. More...
 
const std::vector< float > & getPlaneCoeffD () const
 Get a pointer to the vector of the d-coefficient of the planes' hessian normal form. 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=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. 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...
 
- Public Member Functions inherited from pcl::Comparator< PointT >
 Comparator ()
 Empty constructor for comparator. More...
 
virtual ~Comparator ()=default
 Empty destructor for comparator. More...
 
virtual PointCloudConstPtr getInputCloud () const
 Get the input cloud this comparator operates on. More...
 

Protected Attributes

float color_threshold_
 
- 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>
class pcl::RGBPlaneCoefficientComparator< PointT, PointNT >

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

Also takes into account RGB, so we can segmented different colored co-planar regions. In conjunction with OrganizedConnectedComponentSegmentation, this allows planes to be segmented from organized data.

Author
Alex Trevor

Definition at line 53 of file rgb_plane_coefficient_comparator.h.

Member Typedef Documentation

◆ ConstPtr

template<typename PointT , typename PointNT >
using pcl::RGBPlaneCoefficientComparator< PointT, PointNT >::ConstPtr = shared_ptr<const RGBPlaneCoefficientComparator<PointT, PointNT> >

Definition at line 64 of file rgb_plane_coefficient_comparator.h.

◆ PointCloud

template<typename PointT , typename PointNT >
using pcl::RGBPlaneCoefficientComparator< PointT, PointNT >::PointCloud = typename Comparator<PointT>::PointCloud

Definition at line 56 of file rgb_plane_coefficient_comparator.h.

◆ PointCloudConstPtr

template<typename PointT , typename PointNT >
using pcl::RGBPlaneCoefficientComparator< PointT, PointNT >::PointCloudConstPtr = typename Comparator<PointT>::PointCloudConstPtr

Definition at line 57 of file rgb_plane_coefficient_comparator.h.

◆ PointCloudN

template<typename PointT , typename PointNT >
using pcl::RGBPlaneCoefficientComparator< PointT, PointNT >::PointCloudN = pcl::PointCloud<PointNT>

Definition at line 59 of file rgb_plane_coefficient_comparator.h.

◆ PointCloudNConstPtr

template<typename PointT , typename PointNT >
using pcl::RGBPlaneCoefficientComparator< PointT, PointNT >::PointCloudNConstPtr = typename PointCloudN::ConstPtr

Definition at line 61 of file rgb_plane_coefficient_comparator.h.

◆ PointCloudNPtr

template<typename PointT , typename PointNT >
using pcl::RGBPlaneCoefficientComparator< PointT, PointNT >::PointCloudNPtr = typename PointCloudN::Ptr

Definition at line 60 of file rgb_plane_coefficient_comparator.h.

◆ Ptr

template<typename PointT , typename PointNT >
using pcl::RGBPlaneCoefficientComparator< PointT, PointNT >::Ptr = shared_ptr<RGBPlaneCoefficientComparator<PointT, PointNT> >

Definition at line 63 of file rgb_plane_coefficient_comparator.h.

Constructor & Destructor Documentation

◆ RGBPlaneCoefficientComparator() [1/2]

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

Empty constructor for RGBPlaneCoefficientComparator.

Definition at line 72 of file rgb_plane_coefficient_comparator.h.

◆ RGBPlaneCoefficientComparator() [2/2]

template<typename PointT , typename PointNT >
pcl::RGBPlaneCoefficientComparator< PointT, PointNT >::RGBPlaneCoefficientComparator ( shared_ptr< std::vector< float > > &  plane_coeff_d)
inline

Constructor for RGBPlaneCoefficientComparator.

Parameters
[in]plane_coeff_da reference to a vector of d coefficients of plane equations. Must be the same size as the input cloud and input normals. a, b, and c coefficients are in the input normals.

Definition at line 80 of file rgb_plane_coefficient_comparator.h.

◆ ~RGBPlaneCoefficientComparator()

template<typename PointT , typename PointNT >
pcl::RGBPlaneCoefficientComparator< PointT, PointNT >::~RGBPlaneCoefficientComparator ( )
default

Member Function Documentation

◆ compare()

template<typename PointT , typename PointNT >
bool pcl::RGBPlaneCoefficientComparator< PointT, PointNT >::compare ( int  idx1,
int  idx2 
) const
inlineoverridevirtual

Compare two neighboring points, by using normal information, euclidean distance, and color information.

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

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

Definition at line 110 of file rgb_plane_coefficient_comparator.h.

References pcl::PlaneCoefficientComparator< PointT, PointNT >::angular_threshold_, pcl::RGBPlaneCoefficientComparator< PointT, PointNT >::color_threshold_, pcl::PlaneCoefficientComparator< PointT, PointNT >::distance_threshold_, and pcl::PlaneCoefficientComparator< PointT, PointNT >::normals_.

◆ getColorThreshold()

template<typename PointT , typename PointNT >
float pcl::RGBPlaneCoefficientComparator< PointT, PointNT >::getColorThreshold ( ) const
inline

Get the color threshold between neighboring points, to be considered part of the same plane.

Definition at line 100 of file rgb_plane_coefficient_comparator.h.

References pcl::RGBPlaneCoefficientComparator< PointT, PointNT >::color_threshold_.

◆ setColorThreshold()

template<typename PointT , typename PointNT >
void pcl::RGBPlaneCoefficientComparator< PointT, PointNT >::setColorThreshold ( float  color_threshold)
inline

Set the tolerance in color space between neighboring points, to be considered part of the same plane.

Parameters
[in]color_thresholdThe distance in color space

Definition at line 93 of file rgb_plane_coefficient_comparator.h.

References pcl::RGBPlaneCoefficientComparator< PointT, PointNT >::color_threshold_.

Member Data Documentation

◆ color_threshold_

template<typename PointT , typename PointNT >
float pcl::RGBPlaneCoefficientComparator< PointT, PointNT >::color_threshold_
protected

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