33 #include <pcl/console/parse.h>
34 #include <pcl/io/pcd_io.h>
37 #include <pcl/filters/passthrough.h>
38 #include <pcl/segmentation/supervoxel_clustering.h>
41 #include <pcl/segmentation/lccp_segmentation.h>
46 class PointCloudSegmenter;
57 using PointT = pcl::PointXYZRGBA;
58 using SuperVoxelAdjacencyList = pcl::LCCPSegmentation<PointT>::SupervoxelAdjacencyList;
61 pcl::PointCloud<pcl::PointXYZL>::Ptr sv_labeled_cloud;
62 pcl::PointCloud<pcl::PointXYZL>::Ptr lccp_labeled_cloud;
64 pcl::PointCloud<PointT>::Ptr input_cloud_ptr;
65 pcl::PointCloud<pcl::Normal>::Ptr input_normals_ptr;
72 float voxel_resolution;
73 float seed_resolution;
74 float color_importance;
75 float spatial_importance;
76 float normal_importance;
77 bool use_single_cam_transform;
78 bool use_supervoxel_refinement;
81 float concavity_tolerance_threshold;
82 float smoothness_threshold;
83 uint32_t min_segment_size;
84 bool use_extended_convexity;
85 bool use_sanity_criterion;
90 bool SegmentPointCloud();
92 std::map<uint32_t, pcl::Supervoxel<PointT>::Ptr> supervoxel_clusters;
98 pcl::PointCloud<pcl::PointXYZL>::Ptr&
GetLabeledPointCloud(pcl::PointCloud<pcl::PointXYZRGBA>::Ptr& CloudPtr);
101 return supervoxel_clusters.size();
104 void UpdateParameters(
float voxelRes,
float seedRes,
float colorImp,
float spatialImp,
float normalImp,
float concavityThres,
float smoothnessThes, uint32_t minSegSize);