40 #ifndef PCL_SEGMENTATION_PLANE_COEFFICIENT_COMPARATOR_H_
41 #define PCL_SEGMENTATION_PLANE_COEFFICIENT_COMPARATOR_H_
43 #include <pcl/common/angles.h>
44 #include <pcl/segmentation/boost.h>
45 #include <pcl/segmentation/comparator.h>
54 template<
typename Po
intT,
typename Po
intNT>
65 typedef boost::shared_ptr<PlaneCoefficientComparator<PointT, PointNT> >
Ptr;
66 typedef boost::shared_ptr<const PlaneCoefficientComparator<PointT, PointNT> >
ConstPtr;
77 ,
z_axis_ (Eigen::Vector3f (0.0, 0.0, 1.0) )
90 ,
z_axis_ (Eigen::Vector3f (0.0f, 0.0f, 1.0f) )
137 plane_coeff_d_ = boost::make_shared<std::vector<float> >(plane_coeff_d);
141 const std::vector<float>&
169 bool depth_dependent =
false)
193 Eigen::Vector3f vec =
input_->points[idx1].getVector3fMap ();
211 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
215 #endif // PCL_SEGMENTATION_PLANE_COEFFICIENT_COMPARATOR_H_
PointCloud::ConstPtr PointCloudConstPtr
boost::shared_ptr< PlaneCoefficientComparator< PointT, PointNT > > Ptr
virtual void setInputCloud(const PointCloudConstPtr &cloud)
Set the input cloud for the comparator.
boost::shared_ptr< const PointCloud< PointT > > ConstPtr
float deg2rad(float alpha)
Convert an angle from degrees to radians.
boost::shared_ptr< const PlaneCoefficientComparator< PointT, PointNT > > ConstPtr
void setInputNormals(const PointCloudNConstPtr &normals)
Provide a pointer to the input normals.
boost::shared_ptr< PointCloud< PointT > > Ptr
pcl::PointCloud< PointNT > PointCloudN
const std::vector< float > & getPlaneCoeffD() const
Get a pointer to the vector of the d-coefficient of the planes' hessian normal form.
float getAngularThreshold() const
Get the angular threshold in radians for difference in normal direction between neighboring points...
virtual bool compare(int idx1, int idx2) const
Compare points at two indices by their plane equations.
PointCloudN::Ptr PointCloudNPtr
Comparator is the base class for comparators that compare two points given some function.
PointCloudN::ConstPtr PointCloudNConstPtr
void setPlaneCoeffD(std::vector< float > &plane_coeff_d)
Provide a pointer to a vector of the d-coefficient of the planes' hessian normal form.
float getDistanceThreshold() const
Get the distance threshold in meters (d component of plane equation) between neighboring points...
PlaneCoefficientComparator is a Comparator that operates on plane coefficients, for use in planar seg...
float distance_threshold_
PointCloudNConstPtr normals_
boost::shared_ptr< std::vector< float > > plane_coeff_d_
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 setDistanceThreshold(float distance_threshold, bool depth_dependent=false)
Set the tolerance in meters for difference in perpendicular distance (d component of plane equation) ...
Comparator< PointT >::PointCloudConstPtr PointCloudConstPtr
PointCloudNConstPtr getInputNormals() const
Get the input normals.
virtual ~PlaneCoefficientComparator()
Destructor for PlaneCoefficientComparator.
PointCloudConstPtr input_
PlaneCoefficientComparator(boost::shared_ptr< std::vector< float > > &plane_coeff_d)
Constructor for PlaneCoefficientComparator.
virtual void setAngularThreshold(float angular_threshold)
Set the tolerance in radians for difference in normal direction between neighboring points...
PlaneCoefficientComparator()
Empty constructor for PlaneCoefficientComparator.
Comparator< PointT >::PointCloud PointCloud