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);
Comparator is the base class for comparators that compare two points given some function.
shared_ptr< Comparator< PointT > > Ptr
typename PointCloud::ConstPtr PointCloudConstPtr
shared_ptr< const Comparator< PointT > > ConstPtr
EuclideanPlaneCoefficientComparator is a Comparator that operates on plane coefficients,...
~EuclideanPlaneCoefficientComparator()=default
Destructor for PlaneCoefficientComparator.
EuclideanPlaneCoefficientComparator()=default
Empty constructor for PlaneCoefficientComparator.
bool compare(int idx1, int idx2) const override
Compare two neighboring points, by using normal information, and euclidean distance information.
typename PointCloudN::ConstPtr PointCloudNConstPtr
typename PointCloudN::Ptr PointCloudNPtr
PlaneCoefficientComparator is a Comparator that operates on plane coefficients, for use in planar seg...
float distance_threshold_
PointCloudNConstPtr normals_
PointCloud represents the base class in PCL for storing collections of 3D points.
shared_ptr< PointCloud< PointNT > > Ptr
shared_ptr< const PointCloud< PointNT > > ConstPtr