40 #ifndef PCL_RGB_SEGMENTATION_PLANE_COEFFICIENT_COMPARATOR_H_
41 #define PCL_RGB_SEGMENTATION_PLANE_COEFFICIENT_COMPARATOR_H_
43 #include <pcl/segmentation/boost.h>
44 #include <pcl/segmentation/plane_coefficient_comparator.h>
54 template<
typename Po
intT,
typename Po
intNT>
65 typedef boost::shared_ptr<RGBPlaneCoefficientComparator<PointT, PointNT> >
Ptr;
66 typedef boost::shared_ptr<const RGBPlaneCoefficientComparator<PointT, PointNT> >
ConstPtr;
116 float dx =
input_->points[idx1].x -
input_->points[idx2].x;
117 float dy =
input_->points[idx1].y -
input_->points[idx2].y;
118 float dz =
input_->points[idx1].z -
input_->points[idx2].z;
119 float dist = sqrtf (dx*dx + dy*dy + dz*dz);
120 int dr =
input_->points[idx1].r -
input_->points[idx2].r;
121 int dg =
input_->points[idx1].g -
input_->points[idx2].g;
122 int db =
input_->points[idx1].b -
input_->points[idx2].b;
124 float color_dist =
static_cast<float> (dr*dr + dg*dg + db*db);
135 #endif // PCL_SEGMENTATION_PLANE_COEFFICIENT_COMPARATOR_H_