44 #include <pcl/segmentation/region_growing.h>
55 template <
typename Po
intT,
typename NormalT = pcl::Normal>
95 getPointColorThreshold ()
const;
104 setPointColorThreshold (
float thresh);
108 getRegionColorThreshold ()
const;
116 setRegionColorThreshold (
float thresh);
122 getDistanceThreshold ()
const;
128 setDistanceThreshold (
float thresh);
134 getNumberOfRegionNeighbours ()
const;
141 setNumberOfRegionNeighbours (
unsigned int nghbr_number);
145 getNormalTestFlag ()
const;
152 setNormalTestFlag (
bool value);
158 setCurvatureTestFlag (
bool value)
override;
165 setResidualTestFlag (
bool value)
override;
172 extract (std::vector <pcl::PointIndices>& clusters)
override;
187 prepareForSegmentation ()
override;
193 findPointNeighbours ()
override;
199 findSegmentNeighbours ();
215 applyRegionMergingAlgorithm ();
223 calculateColorimetricalDifference (std::vector<unsigned int>& first_color, std::vector<unsigned int>& second_color)
const;
233 findRegionNeighbours (std::vector< std::vector< std::pair<float, pcl::index_t> > >& neighbours_out, std::vector< std::vector<int> >& regions_in);
240 assembleRegions (std::vector<unsigned int>& num_pts_in_region,
int num_regions);
255 float color_p2p_threshold_{1225.0f};
258 float color_r2r_threshold_{10.0f};
261 float distance_threshold_{0.05f};
264 unsigned int region_neighbour_number_{100};
283 #ifdef PCL_NO_PRECOMPILE
284 #include <pcl/segmentation/impl/region_growing_rgb.hpp>
Implements the well known Region Growing algorithm used for segmentation.
Implements the well known Region Growing algorithm used for segmentation based on color of points.
std::vector< std::vector< float > > point_distances_
Stores distances for the point neighbours from point_neighbours_.
std::vector< pcl::Indices > segment_neighbours_
Stores the neighboures for the corresponding segments.
std::vector< std::vector< float > > segment_distances_
Stores distances for the segment neighbours from segment_neighbours_.
std::vector< int > segment_labels_
Stores new indices for segments that were obtained at the region growing stage.
#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.
detail::int_type_t< detail::index_type_size, detail::index_type_signed > index_t
Type used for an index in PCL.
IndicesAllocator<> Indices
Type used for indices in PCL.
Defines all the PCL and non-PCL macros used.