40 #ifndef PCL_SEGMENTATION_EUCLIDEAN_CLUSTER_COMPARATOR_H_
41 #define PCL_SEGMENTATION_EUCLIDEAN_CLUSTER_COMPARATOR_H_
43 #include <pcl/segmentation/boost.h>
44 #include <pcl/segmentation/comparator.h>
53 template<
typename Po
intT,
typename Po
intNT,
typename Po
intLT>
68 typedef boost::shared_ptr<EuclideanClusterComparator<PointT, PointNT, PointLT> >
Ptr;
69 typedef boost::shared_ptr<const EuclideanClusterComparator<PointT, PointNT, PointLT> >
ConstPtr;
93 Eigen::Matrix3f rot =
input_->sensor_orientation_.toRotationMatrix ();
161 exclude_labels_ = boost::make_shared<std::vector<bool> >(exclude_labels);
172 int label1 =
labels_->points[idx1].label;
173 int label2 =
labels_->points[idx2].label;
175 if (label1 == -1 || label2 == -1)
184 Eigen::Vector3f vec =
input_->points[idx1].getVector3fMap ();
186 dist_threshold *= z * z;
189 float dx =
input_->points[idx1].x -
input_->points[idx2].x;
190 float dy =
input_->points[idx1].y -
input_->points[idx2].y;
191 float dz =
input_->points[idx1].z -
input_->points[idx2].z;
192 float dist = sqrtf (dx*dx + dy*dy + dz*dz);
194 return (dist < dist_threshold);
209 #endif // PCL_SEGMENTATION_PLANE_COEFFICIENT_COMPARATOR_H_