42#include <pcl/segmentation/plane_coefficient_comparator.h>
52 template<
typename Po
intT,
typename Po
intNT>
114 float dx = (*input_)[
idx1].x - (*input_)[
idx2].x;
115 float dy = (*input_)[
idx1].y - (*input_)[
idx2].y;
116 float dz = (*input_)[
idx1].z - (*input_)[
idx2].z;
118 int dr = (*input_)[
idx1].r - (*input_)[
idx2].r;
119 int dg = (*input_)[
idx1].g - (*input_)[
idx2].g;
120 int db = (*input_)[
idx1].b - (*input_)[
idx2].b;
Comparator is the base class for comparators that compare two points given some function.
PointCloudConstPtr input_
typename PointCloud::ConstPtr PointCloudConstPtr
Iterator class for point clouds with or without given indices.
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
RGBPlaneCoefficientComparator is a Comparator that operates on plane coefficients,...
bool compare(int idx1, int idx2) const override
Compare two neighboring points, by using normal information, euclidean distance, and color informatio...
RGBPlaneCoefficientComparator()
Empty constructor for RGBPlaneCoefficientComparator.
typename PointCloudN::Ptr PointCloudNPtr
typename Comparator< PointT >::PointCloud PointCloud
RGBPlaneCoefficientComparator(shared_ptr< std::vector< float > > &plane_coeff_d)
Constructor for RGBPlaneCoefficientComparator.
void setColorThreshold(float color_threshold)
Set the tolerance in color space between neighboring points, to be considered part of the same plane.
typename PointCloudN::ConstPtr PointCloudNConstPtr
typename Comparator< PointT >::PointCloudConstPtr PointCloudConstPtr
float getColorThreshold() const
Get the color threshold between neighboring points, to be considered part of the same plane.
~RGBPlaneCoefficientComparator()
Destructor for RGBPlaneCoefficientComparator.
A point structure representing Euclidean xyz coordinates, and the RGB color.