43 #include <pcl/pcl_base.h>
45 #include <pcl/search/search.h>
46 #include <pcl/point_cloud.h>
59 template <
typename Po
intT,
typename NormalT>
109 getSmoothModeFlag ()
const;
115 setSmoothModeFlag (
bool value);
119 getCurvatureTestFlag ()
const;
127 setCurvatureTestFlag (
bool value);
131 getResidualTestFlag ()
const;
140 setResidualTestFlag (
bool value);
144 getSmoothnessThreshold ()
const;
150 setSmoothnessThreshold (
float theta);
154 getResidualThreshold ()
const;
160 setResidualThreshold (
float residual);
164 getCurvatureThreshold ()
const;
170 setCurvatureThreshold (
float curvature);
174 getNumberOfNeighbours ()
const;
180 setNumberOfNeighbours (
unsigned int neighbour_number);
184 getSearchMethod ()
const;
194 getInputNormals ()
const;
208 extract (std::vector <pcl::PointIndices>& clusters);
233 getColoredCloudRGBA ();
241 prepareForSegmentation ();
247 findPointNeighbours ();
254 applySmoothRegionGrowingAlgorithm ();
261 growRegion (
int initial_seed,
int segment_number);
342 return (i.first < j.first);
346 #ifdef PCL_NO_PRECOMPILE
347 #include <pcl/segmentation/impl/region_growing.hpp>
shared_ptr< KdTree< PointT > > Ptr
shared_ptr< PointCloud< PointT > > Ptr
Implements the well known Region Growing algorithm used for segmentation.
NormalPtr normals_
Contains normals of the points that will be segmented.
bool curvature_flag_
If set to true then curvature test will be done during segmentation.
typename KdTree::Ptr KdTreePtr
KdTreePtr search_
Search method that will be used for KNN.
std::vector< int > point_labels_
Point labels that tells to which segment each point belongs.
float theta_threshold_
Threshold used for testing the smoothness between points.
float curvature_threshold_
Threshold used in curvature test.
bool smooth_mode_flag_
Flag that signalizes if the smoothness constraint will be used.
unsigned int neighbour_number_
Number of neighbours to find.
bool normal_flag_
If set to true then normal/smoothness test will be done during segmentation.
pcl::uindex_t max_pts_per_cluster_
Stores the maximum number of points that a cluster needs to contain in order to be considered valid.
bool residual_flag_
If set to true then residual test will be done during segmentation.
float residual_threshold_
Threshold used in residual test.
std::vector< pcl::Indices > point_neighbours_
Contains neighbours of each point.
int number_of_segments_
Stores the number of segments.
pcl::uindex_t min_pts_per_cluster_
Stores the minimum number of points that a cluster needs to contain in order to be considered valid.
std::vector< pcl::uindex_t > num_pts_in_segment_
Tells how much points each segment contains.
std::vector< pcl::PointIndices > clusters_
After the segmentation it will contain the segments.
typename Normal::Ptr NormalPtr
Defines all the PCL implemented PointT point type structures.
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
Defines functions, macros and traits for allocating and using memory.
detail::int_type_t< detail::index_type_size, false > uindex_t
Type used for an unsigned index in PCL.
bool comparePair(std::pair< float, int > i, std::pair< float, int > j)
This function is used as a comparator for sorting.
detail::int_type_t< detail::index_type_size, detail::index_type_signed > index_t
Type used for an index in PCL.
Defines all the PCL and non-PCL macros used.