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);
285 pcl::uindex_t max_pts_per_cluster_{std::numeric_limits<pcl::uindex_t>::max()};
288 bool smooth_mode_flag_{
true};
291 bool curvature_flag_{
true};
294 bool residual_flag_{
false};
297 float theta_threshold_{30.0f / 180.0f *
static_cast<float>(
M_PI)};
300 float residual_threshold_{0.05f};
303 float curvature_threshold_{0.05f};
306 unsigned int neighbour_number_{30};
315 std::vector<pcl::Indices> point_neighbours_{};
318 std::vector<int> point_labels_{};
323 bool normal_flag_{
true};
326 std::vector<pcl::uindex_t> num_pts_in_segment_{};
329 std::vector <pcl::PointIndices> clusters_{};
332 int number_of_segments_{0};
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.
typename KdTree::Ptr KdTreePtr
RegionGrowing()
Constructor that sets default values for member variables.
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.