44 #include <pcl/segmentation/region_growing.h> 54 template <
typename Po
intT,
typename NormalT = pcl::Normal>
94 getPointColorThreshold ()
const;
103 setPointColorThreshold (
float thresh);
107 getRegionColorThreshold ()
const;
115 setRegionColorThreshold (
float thresh);
121 getDistanceThreshold ()
const;
127 setDistanceThreshold (
float thresh);
133 getNumberOfRegionNeighbours ()
const;
140 setNumberOfRegionNeighbours (
unsigned int nghbr_number);
144 getNormalTestFlag ()
const;
151 setNormalTestFlag (
bool value);
157 setCurvatureTestFlag (
bool value)
override;
164 setResidualTestFlag (
bool value)
override;
171 extract (std::vector <pcl::PointIndices>& clusters)
override;
186 prepareForSegmentation ()
override;
192 findPointNeighbours ()
override;
198 findSegmentNeighbours ();
207 findRegionsKNN (
int index,
int nghbr_number, std::vector<int>& nghbrs, std::vector<float>& dist);
214 applyRegionMergingAlgorithm ();
222 calculateColorimetricalDifference (std::vector<unsigned int>& first_color, std::vector<unsigned int>& second_color)
const;
232 findRegionNeighbours (std::vector< std::vector< std::pair<float, int> > >& neighbours_out, std::vector< std::vector<int> >& regions_in);
239 assembleRegions (std::vector<unsigned int>& num_pts_in_region,
int num_regions);
249 validatePoint (
int initial_seed,
int point,
int nghbr,
bool& is_a_seed)
const override;
282 #ifdef PCL_NO_PRECOMPILE 283 #include <pcl/segmentation/impl/region_growing_rgb.hpp> float distance_threshold_
Threshold that tells which points we need to assume neighbouring.
Defines functions, macros and traits for allocating and using memory.
std::vector< std::vector< float > > segment_distances_
Stores distances for the segment neighbours from segment_neighbours_.
Implements the well known Region Growing algorithm used for segmentation based on color of points...
unsigned int region_neighbour_number_
Number of neighbouring segments to find.
std::vector< std::vector< float > > point_distances_
Stores distances for the point neighbours from point_neighbours_.
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
Implements the well known Region Growing algorithm used for segmentation.
std::vector< std::vector< int > > segment_neighbours_
Stores the neighboures for the corresponding segments.
std::vector< int > segment_labels_
Stores new indices for segments that were obtained at the region growing stage.
float color_r2r_threshold_
Thershold used in color test for regions.
float color_p2p_threshold_
Thershold used in color test for points.
Defines all the PCL and non-PCL macros used.