Point Cloud Library (PCL)
1.7.0
|
PlaneCoefficientComparator is a Comparator that operates on plane coefficients, for use in planar segmentation. More...
#include <pcl/segmentation/plane_coefficient_comparator.h>
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 boost::shared_ptr < PlaneCoefficientComparator < PointT, PointNT > > | Ptr |
typedef boost::shared_ptr < const PlaneCoefficientComparator < PointT, PointNT > > | ConstPtr |
Public Member Functions | |
PlaneCoefficientComparator () | |
Empty constructor for PlaneCoefficientComparator. | |
PlaneCoefficientComparator (boost::shared_ptr< std::vector< float > > &plane_coeff_d) | |
Constructor for PlaneCoefficientComparator. | |
virtual | ~PlaneCoefficientComparator () |
Destructor for PlaneCoefficientComparator. | |
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 bool | compare (int idx1, int idx2) const |
Compare points at two indices by their plane equations. | |
Protected Attributes | |
PointCloudNConstPtr | normals_ |
boost::shared_ptr< std::vector < float > > | plane_coeff_d_ |
float | angular_threshold_ |
float | distance_threshold_ |
bool | depth_dependent_ |
Eigen::Vector3f | z_axis_ |
PlaneCoefficientComparator 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.
Definition at line 55 of file plane_coefficient_comparator.h.
typedef boost::shared_ptr<const PlaneCoefficientComparator<PointT, PointNT> > pcl::PlaneCoefficientComparator< PointT, PointNT >::ConstPtr |
Reimplemented from pcl::Comparator< PointT >.
Reimplemented in pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >, pcl::EdgeAwarePlaneComparator< PointT, PointNT >, pcl::RGBPlaneCoefficientComparator< PointT, PointNT >, and pcl::EuclideanPlaneCoefficientComparator< PointT, PointNT >.
Definition at line 66 of file plane_coefficient_comparator.h.
typedef Comparator<PointT>::PointCloud pcl::PlaneCoefficientComparator< PointT, PointNT >::PointCloud |
Reimplemented from pcl::Comparator< PointT >.
Reimplemented in pcl::EdgeAwarePlaneComparator< PointT, PointNT >, pcl::EuclideanPlaneCoefficientComparator< PointT, PointNT >, pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >, and pcl::RGBPlaneCoefficientComparator< PointT, PointNT >.
Definition at line 58 of file plane_coefficient_comparator.h.
typedef Comparator<PointT>::PointCloudConstPtr pcl::PlaneCoefficientComparator< PointT, PointNT >::PointCloudConstPtr |
Reimplemented from pcl::Comparator< PointT >.
Reimplemented in pcl::EdgeAwarePlaneComparator< PointT, PointNT >, pcl::EuclideanPlaneCoefficientComparator< PointT, PointNT >, pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >, and pcl::RGBPlaneCoefficientComparator< PointT, PointNT >.
Definition at line 59 of file plane_coefficient_comparator.h.
typedef pcl::PointCloud<PointNT> pcl::PlaneCoefficientComparator< PointT, PointNT >::PointCloudN |
Reimplemented in pcl::EdgeAwarePlaneComparator< PointT, PointNT >, pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >, pcl::RGBPlaneCoefficientComparator< PointT, PointNT >, and pcl::EuclideanPlaneCoefficientComparator< PointT, PointNT >.
Definition at line 61 of file plane_coefficient_comparator.h.
typedef PointCloudN::ConstPtr pcl::PlaneCoefficientComparator< PointT, PointNT >::PointCloudNConstPtr |
Reimplemented in pcl::EdgeAwarePlaneComparator< PointT, PointNT >, pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >, pcl::RGBPlaneCoefficientComparator< PointT, PointNT >, and pcl::EuclideanPlaneCoefficientComparator< PointT, PointNT >.
Definition at line 63 of file plane_coefficient_comparator.h.
typedef PointCloudN::Ptr pcl::PlaneCoefficientComparator< PointT, PointNT >::PointCloudNPtr |
Reimplemented in pcl::EdgeAwarePlaneComparator< PointT, PointNT >, pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >, pcl::RGBPlaneCoefficientComparator< PointT, PointNT >, and pcl::EuclideanPlaneCoefficientComparator< PointT, PointNT >.
Definition at line 62 of file plane_coefficient_comparator.h.
typedef boost::shared_ptr<PlaneCoefficientComparator<PointT, PointNT> > pcl::PlaneCoefficientComparator< PointT, PointNT >::Ptr |
Reimplemented from pcl::Comparator< PointT >.
Reimplemented in pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >, pcl::EdgeAwarePlaneComparator< PointT, PointNT >, pcl::RGBPlaneCoefficientComparator< PointT, PointNT >, and pcl::EuclideanPlaneCoefficientComparator< PointT, PointNT >.
Definition at line 65 of file plane_coefficient_comparator.h.
pcl::PlaneCoefficientComparator< PointT, PointNT >::PlaneCoefficientComparator | ( | ) | [inline] |
Empty constructor for PlaneCoefficientComparator.
Definition at line 71 of file plane_coefficient_comparator.h.
pcl::PlaneCoefficientComparator< PointT, PointNT >::PlaneCoefficientComparator | ( | boost::shared_ptr< std::vector< float > > & | plane_coeff_d | ) | [inline] |
Constructor for PlaneCoefficientComparator.
[in] | plane_coeff_d | a 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 84 of file plane_coefficient_comparator.h.
virtual pcl::PlaneCoefficientComparator< PointT, PointNT >::~PlaneCoefficientComparator | ( | ) | [inline, virtual] |
Destructor for PlaneCoefficientComparator.
Definition at line 96 of file plane_coefficient_comparator.h.
virtual bool pcl::PlaneCoefficientComparator< PointT, PointNT >::compare | ( | int | idx1, |
int | idx2 | ||
) | const [inline, virtual] |
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
idx1 | The first index for the comparison |
idx2 | The second index for the comparison |
Implements pcl::Comparator< PointT >.
Reimplemented in pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >, pcl::EdgeAwarePlaneComparator< PointT, PointNT >, pcl::RGBPlaneCoefficientComparator< PointT, PointNT >, and pcl::EuclideanPlaneCoefficientComparator< PointT, PointNT >.
Definition at line 188 of file plane_coefficient_comparator.h.
References pcl::PlaneCoefficientComparator< PointT, PointNT >::angular_threshold_, pcl::PlaneCoefficientComparator< PointT, PointNT >::depth_dependent_, pcl::PlaneCoefficientComparator< PointT, PointNT >::distance_threshold_, pcl::Comparator< PointT >::input_, pcl::PlaneCoefficientComparator< PointT, PointNT >::normals_, pcl::PlaneCoefficientComparator< PointT, PointNT >::plane_coeff_d_, and pcl::PlaneCoefficientComparator< PointT, PointNT >::z_axis_.
float pcl::PlaneCoefficientComparator< PointT, PointNT >::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 158 of file plane_coefficient_comparator.h.
References pcl::PlaneCoefficientComparator< PointT, PointNT >::angular_threshold_.
float pcl::PlaneCoefficientComparator< PointT, PointNT >::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 177 of file plane_coefficient_comparator.h.
References pcl::PlaneCoefficientComparator< PointT, PointNT >::distance_threshold_.
PointCloudNConstPtr pcl::PlaneCoefficientComparator< PointT, PointNT >::getInputNormals | ( | ) | const [inline] |
Get the input normals.
Definition at line 117 of file plane_coefficient_comparator.h.
References pcl::PlaneCoefficientComparator< PointT, PointNT >::normals_.
const std::vector<float>& pcl::PlaneCoefficientComparator< PointT, PointNT >::getPlaneCoeffD | ( | ) | const [inline] |
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.
References pcl::PlaneCoefficientComparator< PointT, PointNT >::plane_coeff_d_.
virtual void pcl::PlaneCoefficientComparator< PointT, PointNT >::setAngularThreshold | ( | float | angular_threshold | ) | [inline, virtual] |
Set the tolerance in radians for difference in normal direction between neighboring points, to be considered part of the same plane.
[in] | angular_threshold | the tolerance in radians |
Definition at line 151 of file plane_coefficient_comparator.h.
References pcl::PlaneCoefficientComparator< PointT, PointNT >::angular_threshold_.
void pcl::PlaneCoefficientComparator< PointT, PointNT >::setDistanceThreshold | ( | float | distance_threshold, |
bool | depth_dependent = false |
||
) | [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.
[in] | distance_threshold | the tolerance in meters (at 1m) |
[in] | depth_dependent | whether to scale the threshold based on range from the sensor (default: false) |
Definition at line 168 of file plane_coefficient_comparator.h.
References pcl::PlaneCoefficientComparator< PointT, PointNT >::depth_dependent_, and pcl::PlaneCoefficientComparator< PointT, PointNT >::distance_threshold_.
virtual void pcl::PlaneCoefficientComparator< PointT, PointNT >::setInputCloud | ( | const PointCloudConstPtr & | cloud | ) | [inline, virtual] |
Set the input cloud for the comparator.
[in] | cloud | the point cloud this comparator will operate on |
Reimplemented from pcl::Comparator< PointT >.
Definition at line 101 of file plane_coefficient_comparator.h.
References pcl::Comparator< PointT >::input_.
void pcl::PlaneCoefficientComparator< PointT, PointNT >::setInputNormals | ( | const PointCloudNConstPtr & | normals | ) | [inline] |
Provide a pointer to the input normals.
[in] | normals | the input normal cloud |
Definition at line 110 of file plane_coefficient_comparator.h.
References pcl::PlaneCoefficientComparator< PointT, PointNT >::normals_.
void pcl::PlaneCoefficientComparator< PointT, PointNT >::setPlaneCoeffD | ( | boost::shared_ptr< std::vector< float > > & | plane_coeff_d | ) | [inline] |
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.
[in] | plane_coeff_d | a pointer to the plane coefficients. |
Definition at line 126 of file plane_coefficient_comparator.h.
References pcl::PlaneCoefficientComparator< PointT, PointNT >::plane_coeff_d_.
void pcl::PlaneCoefficientComparator< PointT, PointNT >::setPlaneCoeffD | ( | std::vector< float > & | plane_coeff_d | ) | [inline] |
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.
[in] | plane_coeff_d | a pointer to the plane coefficients. |
Definition at line 135 of file plane_coefficient_comparator.h.
References pcl::PlaneCoefficientComparator< PointT, PointNT >::plane_coeff_d_.
float pcl::PlaneCoefficientComparator< PointT, PointNT >::angular_threshold_ [protected] |
Definition at line 205 of file plane_coefficient_comparator.h.
Referenced by pcl::EuclideanPlaneCoefficientComparator< PointT, PointNT >::compare(), pcl::RGBPlaneCoefficientComparator< PointT, PointNT >::compare(), pcl::EdgeAwarePlaneComparator< PointT, PointNT >::compare(), pcl::PlaneCoefficientComparator< PointT, PointNT >::compare(), pcl::PlaneCoefficientComparator< PointT, PointNT >::getAngularThreshold(), and pcl::PlaneCoefficientComparator< PointT, PointNT >::setAngularThreshold().
bool pcl::PlaneCoefficientComparator< PointT, PointNT >::depth_dependent_ [protected] |
Reimplemented in pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >.
Definition at line 207 of file plane_coefficient_comparator.h.
Referenced by pcl::EdgeAwarePlaneComparator< PointT, PointNT >::compare(), pcl::PlaneCoefficientComparator< PointT, PointNT >::compare(), and pcl::PlaneCoefficientComparator< PointT, PointNT >::setDistanceThreshold().
float pcl::PlaneCoefficientComparator< PointT, PointNT >::distance_threshold_ [protected] |
Definition at line 206 of file plane_coefficient_comparator.h.
Referenced by pcl::EuclideanPlaneCoefficientComparator< PointT, PointNT >::compare(), pcl::RGBPlaneCoefficientComparator< PointT, PointNT >::compare(), pcl::EdgeAwarePlaneComparator< PointT, PointNT >::compare(), pcl::PlaneRefinementComparator< PointT, PointNT, PointLT >::compare(), pcl::PlaneCoefficientComparator< PointT, PointNT >::compare(), pcl::PlaneCoefficientComparator< PointT, PointNT >::getDistanceThreshold(), and pcl::PlaneCoefficientComparator< PointT, PointNT >::setDistanceThreshold().
PointCloudNConstPtr pcl::PlaneCoefficientComparator< PointT, PointNT >::normals_ [protected] |
Definition at line 203 of file plane_coefficient_comparator.h.
Referenced by pcl::EuclideanPlaneCoefficientComparator< PointT, PointNT >::compare(), pcl::RGBPlaneCoefficientComparator< PointT, PointNT >::compare(), pcl::EdgeAwarePlaneComparator< PointT, PointNT >::compare(), pcl::PlaneCoefficientComparator< PointT, PointNT >::compare(), pcl::PlaneCoefficientComparator< PointT, PointNT >::getInputNormals(), and pcl::PlaneCoefficientComparator< PointT, PointNT >::setInputNormals().
boost::shared_ptr<std::vector<float> > pcl::PlaneCoefficientComparator< PointT, PointNT >::plane_coeff_d_ [protected] |
Definition at line 204 of file plane_coefficient_comparator.h.
Referenced by pcl::EdgeAwarePlaneComparator< PointT, PointNT >::compare(), pcl::PlaneCoefficientComparator< PointT, PointNT >::compare(), pcl::PlaneCoefficientComparator< PointT, PointNT >::getPlaneCoeffD(), and pcl::PlaneCoefficientComparator< PointT, PointNT >::setPlaneCoeffD().
Eigen::Vector3f pcl::PlaneCoefficientComparator< PointT, PointNT >::z_axis_ [protected] |