42 #include <pcl/segmentation/boost.h>
43 #include <pcl/segmentation/plane_coefficient_comparator.h>
53 template<
typename Po
intT,
typename Po
intNT>
63 using Ptr = shared_ptr<EuclideanPlaneCoefficientComparator<PointT, PointNT> >;
64 using ConstPtr = shared_ptr<const EuclideanPlaneCoefficientComparator<PointT, PointNT> >;
87 compare (
int idx1,
int idx2)
const override
89 float dx =
input_->points[idx1].x -
input_->points[idx2].x;
90 float dy =
input_->points[idx1].y -
input_->points[idx2].y;
91 float dz =
input_->points[idx1].z -
input_->points[idx2].z;
92 float dist = std::sqrt (dx*dx + dy*dy + dz*dz);
EuclideanPlaneCoefficientComparator is a Comparator that operates on plane coefficients, for use in planar segmentation.
typename PointCloud::ConstPtr PointCloudConstPtr
EuclideanPlaneCoefficientComparator()
Empty constructor for PlaneCoefficientComparator.
Comparator is the base class for comparators that compare two points given some function.
shared_ptr< PointCloud< PointNT > > Ptr
shared_ptr< const Comparator< PointT > > ConstPtr
bool compare(int idx1, int idx2) const override
Compare two neighboring points, by using normal information, and euclidean distance information...
PlaneCoefficientComparator is a Comparator that operates on plane coefficients, for use in planar seg...
float distance_threshold_
PointCloud represents the base class in PCL for storing collections of 3D points. ...
PointCloudNConstPtr normals_
typename PointCloudN::ConstPtr PointCloudNConstPtr
shared_ptr< const PointCloud< PointNT > > ConstPtr
shared_ptr< Comparator< PointT > > Ptr
~EuclideanPlaneCoefficientComparator()
Destructor for PlaneCoefficientComparator.
PointCloudConstPtr input_
typename PointCloudN::Ptr PointCloudNPtr