Point Cloud Library (PCL)  1.8.1-dev
List of all members | Classes | Public Member Functions
pcl::CPCSegmentation< PointT > Class Template Reference

A segmentation algorithm partitioning a supervoxel graph. More...

#include <pcl/segmentation/cpc_segmentation.h>

+ Inheritance diagram for pcl::CPCSegmentation< PointT >:

Public Member Functions

 CPCSegmentation ()
 
virtual ~CPCSegmentation ()
 
void segment ()
 Merge supervoxels using cuts through local convexities. More...
 
void setCutting (const uint32_t max_cuts=20, const uint32_t cutting_min_segments=0, const float cutting_min_score=0.16, const bool locally_constrained=true, const bool directed_cutting=true, const bool clean_cutting=false)
 Determines if we want to use cutting planes. More...
 
void setRANSACIterations (const uint32_t ransac_iterations)
 Set the number of iterations for the weighted RANSAC step (best cut estimations) More...
 
- Public Member Functions inherited from pcl::LCCPSegmentation< PointT >
 LCCPSegmentation ()
 
virtual ~LCCPSegmentation ()
 
void reset ()
 Reset internal memory. More...
 
void setInputSupervoxels (const std::map< uint32_t, typename pcl::Supervoxel< PointT >::Ptr > &supervoxel_clusters_arg, const std::multimap< uint32_t, uint32_t > &label_adjacency_arg)
 Set the supervoxel clusters as well as the adjacency graph for the segmentation.Those parameters are generated by using the SupervoxelClustering class. More...
 
void segment ()
 Merge supervoxels using local convexity. More...
 
void relabelCloud (pcl::PointCloud< pcl::PointXYZL > &labeled_cloud_arg)
 Relabels cloud with supervoxel labels with the computed segment labels. More...
 
void getSegmentToSupervoxelMap (std::map< uint32_t, std::set< uint32_t > > &segment_supervoxel_map_arg) const
 Get map<SegmentID, std::set<SuperVoxel IDs> > More...
 
void getSupervoxelToSegmentMap (std::map< uint32_t, uint32_t > &supervoxel_segment_map_arg) const
 Get map<Supervoxel_ID, Segment_ID> More...
 
void getSegmentAdjacencyMap (std::map< uint32_t, std::set< uint32_t > > &segment_adjacency_map_arg)
 Get map <SegmentID, std::set<Neighboring SegmentIDs> > More...
 
float getConcavityToleranceThreshold () const
 Get normal threshold. More...
 
void getSVAdjacencyList (SupervoxelAdjacencyList &adjacency_list_arg) const
 Get the supervoxel adjacency graph with classified edges (boost::adjacency_list). More...
 
void setConcavityToleranceThreshold (float concavity_tolerance_threshold_arg)
 Set normal threshold. More...
 
void setSmoothnessCheck (bool use_smoothness_check_arg, float voxel_res_arg, float seed_res_arg, float smoothness_threshold_arg=0.1)
 Determines if a smoothness check is done during segmentation, trying to invalidate edges of non-smooth connected edges (steps). More...
 
void setSanityCheck (const bool use_sanity_criterion_arg)
 Determines if we want to use the sanity criterion to invalidate singular connected patches. More...
 
void setKFactor (const uint32_t k_factor_arg)
 Set the value used for k convexity. More...
 
void setMinSegmentSize (const uint32_t min_segment_size_arg)
 Set the value min_segment_size_ used in mergeSmallSegments. More...
 

Additional Inherited Members

- Public Types inherited from pcl::LCCPSegmentation< PointT >
typedef boost::adjacency_list
< boost::setS, boost::setS,
boost::undirectedS, uint32_t,
EdgeProperties > 
SupervoxelAdjacencyList
 
typedef boost::graph_traits
< SupervoxelAdjacencyList >
::vertex_iterator 
VertexIterator
 
typedef boost::graph_traits
< SupervoxelAdjacencyList >
::adjacency_iterator 
AdjacencyIterator
 
typedef boost::graph_traits
< SupervoxelAdjacencyList >
::vertex_descriptor 
VertexID
 
typedef boost::graph_traits
< SupervoxelAdjacencyList >
::edge_iterator 
EdgeIterator
 
typedef boost::graph_traits
< SupervoxelAdjacencyList >
::out_edge_iterator 
OutEdgeIterator
 
typedef boost::graph_traits
< SupervoxelAdjacencyList >
::edge_descriptor 
EdgeID
 
- Protected Member Functions inherited from pcl::LCCPSegmentation< PointT >
void mergeSmallSegments ()
 Segments smaller than min_segment_size_ are merged to the label of largest neighbor. More...
 
void computeSegmentAdjacency ()
 Compute the adjacency of the segments. More...
 
void prepareSegmentation (const std::map< uint32_t, typename pcl::Supervoxel< PointT >::Ptr > &supervoxel_clusters_arg, const std::multimap< uint32_t, uint32_t > &label_adjacency_arg)
 Is called within setInputSupervoxels mainly to reserve required memory. More...
 
void doGrouping ()
 Perform depth search on the graph and recursively group all supervoxels with convex connections. More...
 
void recursiveSegmentGrowing (const VertexID &queryPointID, const unsigned int group_label)
 Assigns neighbors of the query point to the same group as the query point. More...
 
void calculateConvexConnections (SupervoxelAdjacencyList &adjacency_list_arg)
 Calculates convexity of edges and saves this to the adjacency graph. More...
 
void applyKconvexity (const unsigned int k_arg)
 Connections are only convex if this is true for at least k_arg common neighbors of the two patches. More...
 
bool connIsConvex (const uint32_t source_label_arg, const uint32_t target_label_arg, float &normal_angle)
 Returns true if the connection between source and target is convex. More...
 
- Protected Attributes inherited from pcl::LCCPSegmentation< PointT >
float concavity_tolerance_threshold_
 *** Parameters *** /// More...
 
bool grouping_data_valid_
 Marks if valid grouping data (sv_adjacency_list_, sv_label_to_seg_label_map_, processed_) is avaiable. More...
 
bool supervoxels_set_
 Marks if supervoxels have been set by calling setInputSupervoxels. More...
 
bool use_smoothness_check_
 Determines if the smoothness check is used during segmentation. More...
 
float smoothness_threshold_
 Two supervoxels are unsmooth if their plane-to-plane distance DIST > (expected_distance + smoothness_threshold_*voxel_resolution_). More...
 
bool use_sanity_check_
 Determines if we use the sanity check which tries to find and invalidate singular connected patches. More...
 
float seed_resolution_
 Seed resolution of the supervoxels (used only for smoothness check) More...
 
float voxel_resolution_
 Voxel resolution used to build the supervoxels (used only for smoothness check) More...
 
uint32_t k_factor_
 Factor used for k-convexity. More...
 
uint32_t min_segment_size_
 Minimum segment size. More...
 
std::map< uint32_t, bool > processed_
 Stores which supervoxel labels were already visited during recursive grouping. More...
 
SupervoxelAdjacencyList sv_adjacency_list_
 Adjacency graph with the supervoxel labels as nodes and edges between adjacent supervoxels. More...
 
std::map< uint32_t, typename
pcl::Supervoxel< PointT >::Ptr > 
sv_label_to_supervoxel_map_
 map from the supervoxel labels to the supervoxel objects More...
 
std::map< uint32_t, uint32_t > sv_label_to_seg_label_map_
 Storing relation between original SuperVoxel Labels and new segmantion labels. More...
 
std::map< uint32_t, std::set
< uint32_t > > 
seg_label_to_sv_list_map_
 map <Segment Label, std::set <SuperVoxel labels>=""> > More...
 
std::map< uint32_t, std::set
< uint32_t > > 
seg_label_to_neighbor_set_map_
 map < SegmentID, std::set< Neighboring segment labels> > More...
 

Detailed Description

template<typename PointT>
class pcl::CPCSegmentation< PointT >

A segmentation algorithm partitioning a supervoxel graph.

It uses planar cuts induced by local concavities for the recursive segmentation. Cuts are estimated using locally constrained directed RANSAC.

Note
If you use this in a scientific work please cite the following paper: M. Schoeler, J. Papon, F. Woergoetter Constrained Planar Cuts - Object Partitioning for Point Clouds In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) 2015 Inherits most of its functionality from LCCPSegmentation
Author
Markus Schoeler (mscho.nosp@m.eler.nosp@m.@web..nosp@m.de)

Definition at line 68 of file cpc_segmentation.h.

Constructor & Destructor Documentation

template<typename PointT >
pcl::CPCSegmentation< PointT >::CPCSegmentation ( )

Definition at line 44 of file cpc_segmentation.hpp.

template<typename PointT >
pcl::CPCSegmentation< PointT >::~CPCSegmentation ( )
virtual

Definition at line 55 of file cpc_segmentation.hpp.

Member Function Documentation

template<typename PointT >
void pcl::CPCSegmentation< PointT >::segment ( )

Merge supervoxels using cuts through local convexities.

The input parameters are generated by using the SupervoxelClustering class. To retrieve the output use the relabelCloud method.

Note
There are three ways to retrieve the segmentation afterwards (inherited from LCCPSegmentation): relabelCloud, getSegmentSupervoxelMap and getSupervoxelSegmentMap

Definition at line 60 of file cpc_segmentation.hpp.

template<typename PointT >
void pcl::CPCSegmentation< PointT >::setCutting ( const uint32_t  max_cuts = 20,
const uint32_t  cutting_min_segments = 0,
const float  cutting_min_score = 0.16,
const bool  locally_constrained = true,
const bool  directed_cutting = true,
const bool  clean_cutting = false 
)
inline

Determines if we want to use cutting planes.

Parameters
[in]max_cutsMaximum number of cuts
[in]cutting_min_segmentsMinimum segment size for cutting
[in]cutting_min_scoreMinimum score a proposed cut has to achieve for being performed
[in]locally_constrainedDecide if we constrain our cuts locally
[in]directed_cuttingDecide if we prefer cuts perpendicular to the edge-direction
[in]clean_cuttingDecide if we cut only edges with supervoxels on opposite sides of the plane (clean) or all edges within the seed_resolution_ distance to the plane (not clean). The later was used in the paper.

Definition at line 109 of file cpc_segmentation.h.

template<typename PointT >
void pcl::CPCSegmentation< PointT >::setRANSACIterations ( const uint32_t  ransac_iterations)
inline

Set the number of iterations for the weighted RANSAC step (best cut estimations)

Parameters
[in]ransac_iterationsThe number of iterations

Definition at line 127 of file cpc_segmentation.h.


The documentation for this class was generated from the following files: