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);
283#ifdef PCL_NO_PRECOMPILE
284#include <pcl/segmentation/impl/region_growing_rgb.hpp>
Iterator class for point clouds with or without given indices.
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.
float color_r2r_threshold_
Thershold used in color test for regions.
float distance_threshold_
Threshold that tells which points we need to assume neighbouring.
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.
float color_p2p_threshold_
Thershold used in color test for points.
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, detail::index_type_signed > index_t
Type used for an index in PCL.
IndicesAllocator<> Indices
Type used for indices in PCL.
detail::int_type_t< detail::index_type_size, false > uindex_t
Type used for an unsigned index in PCL.
Defines all the PCL and non-PCL macros used.
A point structure representing normal coordinates and the surface curvature estimate.
A point structure representing Euclidean xyz coordinates, and the RGB color.