Skip to content

Commit

Permalink
final changes
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioRAgostinho committed Nov 27, 2017
1 parent 838449d commit 3bff000
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@
plane_labels->insert (i);
typename PointCloud<PointT>::CloudVectorType clusters;

typename EuclideanClusterComparator<PointT, pcl::Normal, pcl::Label>::Ptr euclidean_cluster_comparator =
boost::make_shared <EuclideanClusterComparator<PointT, pcl::Normal, pcl::Label> > ();
typename EuclideanClusterComparator<PointT, pcl::Label>::Ptr euclidean_cluster_comparator =
boost::make_shared <EuclideanClusterComparator<PointT, pcl::Label> > ();
euclidean_cluster_comparator->setInputCloud (input_cloud);
euclidean_cluster_comparator->setLabels (labels);
euclidean_cluster_comparator->setExcludeLabels (plane_labels);
Expand Down
2 changes: 1 addition & 1 deletion apps/include/pcl/apps/organized_segmentation_demo.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class OrganizedSegmentationDemo : public QMainWindow
pcl::RGBPlaneCoefficientComparator<PointT, pcl::Normal>::Ptr rgb_comparator_;
pcl::RGBPlaneCoefficientComparator<PointT, pcl::Normal> rgb_comp_;
pcl::EdgeAwarePlaneComparator<PointT, pcl::Normal>::Ptr edge_aware_comparator_;
pcl::EuclideanClusterComparator<PointT, pcl::Normal, pcl::Label>::Ptr euclidean_cluster_comparator_;
pcl::EuclideanClusterComparator<PointT, pcl::Label>::Ptr euclidean_cluster_comparator_;

public Q_SLOTS:
void toggleCapturePressed()
Expand Down
2 changes: 1 addition & 1 deletion apps/src/ni_linemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ class NILinemod
exppd.segment (*points_above_plane);

// Use an organized clustering segmentation to extract the individual clusters
EuclideanClusterComparator<PointT, Normal, Label>::Ptr euclidean_cluster_comparator (new EuclideanClusterComparator<PointT, Normal, Label>);
EuclideanClusterComparator<PointT, Label>::Ptr euclidean_cluster_comparator (new EuclideanClusterComparator<PointT, Label>);
euclidean_cluster_comparator->setInputCloud (cloud);
euclidean_cluster_comparator->setDistanceThreshold (0.03f, false);
// Set the entire scene to false, and the inliers of the objects located on top of the plane to true
Expand Down
2 changes: 1 addition & 1 deletion apps/src/organized_segmentation_demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ OrganizedSegmentationDemo::OrganizedSegmentationDemo (pcl::Grabber& grabber) : g
euclidean_comparator_.reset (new pcl::EuclideanPlaneCoefficientComparator<PointT, pcl::Normal> ());
rgb_comparator_.reset (new pcl::RGBPlaneCoefficientComparator<PointT, pcl::Normal> ());
edge_aware_comparator_.reset (new pcl::EdgeAwarePlaneComparator<PointT, pcl::Normal> ());
euclidean_cluster_comparator_ = pcl::EuclideanClusterComparator<PointT, pcl::Normal, pcl::Label>::Ptr (new pcl::EuclideanClusterComparator<PointT, pcl::Normal, pcl::Label> ());
euclidean_cluster_comparator_ = pcl::EuclideanClusterComparator<PointT, pcl::Label>::Ptr (new pcl::EuclideanClusterComparator<PointT, pcl::Label> ());

// Set up Organized Multi Plane Segmentation
mps.setMinInliers (10000);
Expand Down
2 changes: 1 addition & 1 deletion apps/src/pcd_select_object_plane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class ObjectSelection
if (cloud_->isOrganized ())
{
// Use an organized clustering segmentation to extract the individual clusters
typename EuclideanClusterComparator<PointT, Normal, Label>::Ptr euclidean_cluster_comparator (new EuclideanClusterComparator<PointT, Normal, Label>);
typename EuclideanClusterComparator<PointT, Label>::Ptr euclidean_cluster_comparator (new EuclideanClusterComparator<PointT, Label>);
euclidean_cluster_comparator->setInputCloud (cloud);
euclidean_cluster_comparator->setDistanceThreshold (0.03f, false);
// Set the entire scene to false, and the inliers of the objects located on top of the plane to true
Expand Down
2 changes: 1 addition & 1 deletion apps/src/stereo_ground_segmentation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ class HRCSSegmentation
if ((region_indices[i].indices.size () > mps.getMinInliers ()))
plane_labels->insert (i);

pcl::EuclideanClusterComparator<PointT, pcl::Normal, pcl::Label>::Ptr euclidean_cluster_comparator_ (new pcl::EuclideanClusterComparator<PointT, pcl::Normal, pcl::Label> ());
pcl::EuclideanClusterComparator<PointT, pcl::Label>::Ptr euclidean_cluster_comparator_ (new pcl::EuclideanClusterComparator<PointT, pcl::Label> ());
euclidean_cluster_comparator_->setInputCloud (cloud);
euclidean_cluster_comparator_->setLabels (labels_ptr);
euclidean_cluster_comparator_->setExcludeLabels (plane_labels);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ namespace pcl

using experimental::EuclideanClusterComparator<PointT, PointLT>::setExcludeLabels;

/** \brief Empty constructor for EuclideanClusterComparator. */
PCL_DEPRECATED ("EuclideanClusterComparator will no longer be templated on a PointNormal type in future minor release")
/** \brief Default constructor for EuclideanClusterComparator. */
PCL_DEPRECATED ("Remove PointNT from template parameters.")
EuclideanClusterComparator ()
: normals_ ()
, angular_threshold_ (0.0f)
Expand All @@ -222,27 +222,35 @@ namespace pcl
* \param[in] normals the input normal cloud
*/
inline void
PCL_DEPRECATED ("EuclideanClusterComparator no longer makes use of normals.")
PCL_DEPRECATED ("EuclideadClusterComparator never actually used normals and angular threshold, "
"this function has no effect on the behavior of the comparator. Therefore it is "
"deprecated and will be removed in future releases.")
setInputNormals (const PointCloudNConstPtr& normals) { normals_ = normals; }

/** \brief Get the input normals. */
inline PointCloudNConstPtr
PCL_DEPRECATED ("EuclideanClusterComparator no longer makes use of normals.")
PCL_DEPRECATED ("EuclideadClusterComparator never actually used normals and angular threshold, "
"this function has no effect on the behavior of the comparator. Therefore it is "
"deprecated and will be removed in future releases.")
getInputNormals () const { return (normals_); }

/** \brief Set the tolerance in radians for difference in normal direction between neighboring points, to be considered part of the same plane.
* \param[in] angular_threshold the tolerance in radians
*/
inline void
PCL_DEPRECATED ("EuclideanClusterComparator no longer makes use of the angular threshold.")
PCL_DEPRECATED ("EuclideadClusterComparator never actually used normals and angular threshold, "
"this function has no effect on the behavior of the comparator. Therefore it is "
"deprecated and will be removed in future releases.")
setAngularThreshold (float angular_threshold)
{
angular_threshold_ = std::cos (angular_threshold);
}

/** \brief Get the angular threshold in radians for difference in normal direction between neighboring points, to be considered part of the same plane. */
inline float
PCL_DEPRECATED ("EuclideanClusterComparator no longer makes use of the angular threshold.")
PCL_DEPRECATED ("EuclideadClusterComparator never actually used normals and angular threshold, "
"this function has no effect on the behavior of the comparator. Therefore it is "
"deprecated and will be removed in future releases.")
getAngularThreshold () const { return (std::acos (angular_threshold_) ); }

/** \brief Set labels in the label cloud to exclude.
Expand Down

0 comments on commit 3bff000

Please sign in to comment.