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