40 #ifndef PCL_REGION_GROWING_RGB_H_
41 #define PCL_REGION_GROWING_RGB_H_
43 #include <pcl/segmentation/region_growing.h>
53 template <
typename Po
intT,
typename NormalT = pcl::Normal>
93 getPointColorThreshold ()
const;
102 setPointColorThreshold (
float thresh);
106 getRegionColorThreshold ()
const;
114 setRegionColorThreshold (
float thresh);
120 getDistanceThreshold ()
const;
126 setDistanceThreshold (
float thresh);
132 getNumberOfRegionNeighbours ()
const;
139 setNumberOfRegionNeighbours (
unsigned int nghbr_number);
143 getNormalTestFlag ()
const;
150 setNormalTestFlag (
bool value);
156 setCurvatureTestFlag (
bool value);
163 setResidualTestFlag (
bool value);
170 extract (std::vector <pcl::PointIndices>& clusters);
184 prepareForSegmentation ();
190 findPointNeighbours ();
196 findSegmentNeighbours ();
205 findRegionsKNN (
int index,
int nghbr_number, std::vector<int>& nghbrs, std::vector<float>& dist);
212 applyRegionMergingAlgorithm ();
220 calculateColorimetricalDifference (std::vector<unsigned int>& first_color, std::vector<unsigned int>& second_color)
const;
230 findRegionNeighbours (std::vector< std::vector< std::pair<float, int> > >& neighbours_out, std::vector< std::vector<int> >& regions_in);
237 assembleRegions (std::vector<unsigned int>& num_pts_in_region,
int num_regions);
247 validatePoint (
int initial_seed,
int point,
int nghbr,
bool& is_a_seed)
const;
276 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
280 #ifdef PCL_NO_PRECOMPILE
281 #include <pcl/segmentation/impl/region_growing_rgb.hpp>
std::vector< std::vector< int > > segment_neighbours_
Stores the neighboures for the corresponding segments.
float color_p2p_threshold_
Thershold used in color test for points.
std::vector< std::vector< float > > segment_distances_
Stores distances for the segment neighbours from segment_neighbours_.
unsigned int region_neighbour_number_
Number of neighbouring segments to find.
Implements the well known Region Growing algorithm used for segmentation based on color of points...
float distance_threshold_
Threshold that tells which points we need to assume neighbouring.
std::vector< int > segment_labels_
Stores new indices for segments that were obtained at the region growing stage.
Implements the well known Region Growing algorithm used for segmentation.
std::vector< std::vector< float > > point_distances_
Stores distances for the point neighbours from point_neighbours_.
float color_r2r_threshold_
Thershold used in color test for regions.