Point Cloud Library (PCL)  1.14.0-dev
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
pcl::RegionGrowing< PointT, NormalT > Class Template Reference

Implements the well known Region Growing algorithm used for segmentation. More...

#include <pcl/segmentation/region_growing.h>

+ Inheritance diagram for pcl::RegionGrowing< PointT, NormalT >:
+ Collaboration diagram for pcl::RegionGrowing< PointT, NormalT >:

Public Types

using KdTree = pcl::search::Search< PointT >
 
using KdTreePtr = typename KdTree::Ptr
 
using Normal = pcl::PointCloud< NormalT >
 
using NormalPtr = typename Normal::Ptr
 
using PointCloud = pcl::PointCloud< PointT >
 
- Public Types inherited from pcl::PCLBase< PointT >
using PointCloud = pcl::PointCloud< PointT >
 
using PointCloudPtr = typename PointCloud::Ptr
 
using PointCloudConstPtr = typename PointCloud::ConstPtr
 
using PointIndicesPtr = PointIndices::Ptr
 
using PointIndicesConstPtr = PointIndices::ConstPtr
 

Public Member Functions

 RegionGrowing ()
 Constructor that sets default values for member variables. More...
 
 ~RegionGrowing () override
 This destructor destroys the cloud, normals and search method used for finding KNN. More...
 
pcl::uindex_t getMinClusterSize ()
 Get the minimum number of points that a cluster needs to contain in order to be considered valid. More...
 
void setMinClusterSize (pcl::uindex_t min_cluster_size)
 Set the minimum number of points that a cluster needs to contain in order to be considered valid. More...
 
pcl::uindex_t getMaxClusterSize ()
 Get the maximum number of points that a cluster needs to contain in order to be considered valid. More...
 
void setMaxClusterSize (pcl::uindex_t max_cluster_size)
 Set the maximum number of points that a cluster needs to contain in order to be considered valid. More...
 
bool getSmoothModeFlag () const
 Returns the flag value. More...
 
void setSmoothModeFlag (bool value)
 This function allows to turn on/off the smoothness constraint. More...
 
bool getCurvatureTestFlag () const
 Returns the flag that signalize if the curvature test is turned on/off. More...
 
virtual void setCurvatureTestFlag (bool value)
 Allows to turn on/off the curvature test. More...
 
bool getResidualTestFlag () const
 Returns the flag that signalize if the residual test is turned on/off. More...
 
virtual void setResidualTestFlag (bool value)
 Allows to turn on/off the residual test. More...
 
float getSmoothnessThreshold () const
 Returns smoothness threshold. More...
 
void setSmoothnessThreshold (float theta)
 Allows to set smoothness threshold used for testing the points. More...
 
float getResidualThreshold () const
 Returns residual threshold. More...
 
void setResidualThreshold (float residual)
 Allows to set residual threshold used for testing the points. More...
 
float getCurvatureThreshold () const
 Returns curvature threshold. More...
 
void setCurvatureThreshold (float curvature)
 Allows to set curvature threshold used for testing the points. More...
 
unsigned int getNumberOfNeighbours () const
 Returns the number of nearest neighbours used for KNN. More...
 
void setNumberOfNeighbours (unsigned int neighbour_number)
 Allows to set the number of neighbours. More...
 
KdTreePtr getSearchMethod () const
 Returns the pointer to the search method that is used for KNN. More...
 
void setSearchMethod (const KdTreePtr &tree)
 Allows to set search method that will be used for finding KNN. More...
 
NormalPtr getInputNormals () const
 Returns normals. More...
 
void setInputNormals (const NormalPtr &norm)
 This method sets the normals. More...
 
virtual void extract (std::vector< pcl::PointIndices > &clusters)
 This method launches the segmentation algorithm and returns the clusters that were obtained during the segmentation. More...
 
virtual void getSegmentFromPoint (pcl::index_t index, pcl::PointIndices &cluster)
 For a given point this function builds a segment to which it belongs and returns this segment. More...
 
pcl::PointCloud< pcl::PointXYZRGB >::Ptr getColoredCloud ()
 If the cloud was successfully segmented, then function returns colored cloud. More...
 
pcl::PointCloud< pcl::PointXYZRGBA >::Ptr getColoredCloudRGBA ()
 If the cloud was successfully segmented, then function returns colored cloud. More...
 
- Public Member Functions inherited from pcl::PCLBase< PointT >
 PCLBase ()
 Empty constructor. More...
 
 PCLBase (const PCLBase &base)
 Copy constructor. More...
 
virtual ~PCLBase ()=default
 Destructor. More...
 
virtual void setInputCloud (const PointCloudConstPtr &cloud)
 Provide a pointer to the input dataset. More...
 
PointCloudConstPtr const getInputCloud () const
 Get a pointer to the input point cloud dataset. More...
 
virtual void setIndices (const IndicesPtr &indices)
 Provide a pointer to the vector of indices that represents the input data. More...
 
virtual void setIndices (const IndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data. More...
 
virtual void setIndices (const PointIndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data. More...
 
virtual void setIndices (std::size_t row_start, std::size_t col_start, std::size_t nb_rows, std::size_t nb_cols)
 Set the indices for the points laying within an interest region of the point cloud. More...
 
IndicesPtr getIndices ()
 Get a pointer to the vector of indices used. More...
 
IndicesConstPtr const getIndices () const
 Get a pointer to the vector of indices used. More...
 
const PointToperator[] (std::size_t pos) const
 Override PointCloud operator[] to shorten code. More...
 

Protected Member Functions

virtual bool prepareForSegmentation ()
 This method simply checks if it is possible to execute the segmentation algorithm with the current settings. More...
 
virtual void findPointNeighbours ()
 This method finds KNN for each point and saves them to the array because the algorithm needs to find KNN a few times. More...
 
void applySmoothRegionGrowingAlgorithm ()
 This function implements the algorithm described in the article "Segmentation of point clouds using smoothness constraint" by T. More...
 
int growRegion (int initial_seed, int segment_number)
 This method grows a segment for the given seed point. More...
 
virtual bool validatePoint (pcl::index_t initial_seed, pcl::index_t point, pcl::index_t nghbr, bool &is_a_seed) const
 This function is checking if the point with index 'nghbr' belongs to the segment. More...
 
void assembleRegions ()
 This function simply assembles the regions from list of point labels. More...
 
- Protected Member Functions inherited from pcl::PCLBase< PointT >
bool initCompute ()
 This method should get called before starting the actual computation. More...
 
bool deinitCompute ()
 This method should get called after finishing the actual computation. More...
 

Protected Attributes

pcl::uindex_t min_pts_per_cluster_ {1}
 Stores the minimum number of points that a cluster needs to contain in order to be considered valid. More...
 
pcl::uindex_t max_pts_per_cluster_ {std::numeric_limits<pcl::uindex_t>::max()}
 Stores the maximum number of points that a cluster needs to contain in order to be considered valid. More...
 
bool smooth_mode_flag_ {true}
 Flag that signalizes if the smoothness constraint will be used. More...
 
bool curvature_flag_ {true}
 If set to true then curvature test will be done during segmentation. More...
 
bool residual_flag_ {false}
 If set to true then residual test will be done during segmentation. More...
 
float theta_threshold_ {30.0f / 180.0f * static_cast<float>(M_PI)}
 Threshold used for testing the smoothness between points. More...
 
float residual_threshold_ {0.05f}
 Threshold used in residual test. More...
 
float curvature_threshold_ {0.05f}
 Threshold used in curvature test. More...
 
unsigned int neighbour_number_ {30}
 Number of neighbours to find. More...
 
KdTreePtr search_ {nullptr}
 Search method that will be used for KNN. More...
 
NormalPtr normals_ {nullptr}
 Contains normals of the points that will be segmented. More...
 
std::vector< pcl::Indicespoint_neighbours_ {}
 Contains neighbours of each point. More...
 
std::vector< int > point_labels_ {}
 Point labels that tells to which segment each point belongs. More...
 
bool normal_flag_ {true}
 If set to true then normal/smoothness test will be done during segmentation. More...
 
std::vector< pcl::uindex_tnum_pts_in_segment_ {}
 Tells how much points each segment contains. More...
 
std::vector< pcl::PointIndicesclusters_ {}
 After the segmentation it will contain the segments. More...
 
int number_of_segments_ {0}
 Stores the number of segments. More...
 
- Protected Attributes inherited from pcl::PCLBase< PointT >
PointCloudConstPtr input_
 The input point cloud dataset. More...
 
IndicesPtr indices_
 A pointer to the vector of point indices to use. More...
 
bool use_indices_
 Set to true if point indices are used. More...
 
bool fake_indices_
 If no set of indices are given, we construct a set of fake indices that mimic the input PointCloud. More...
 

Detailed Description

template<typename PointT, typename NormalT>
class pcl::RegionGrowing< PointT, NormalT >

Implements the well known Region Growing algorithm used for segmentation.

Description can be found in the article "Segmentation of point clouds using smoothness constraint" by T. Rabbani, F. A. van den Heuvel, G. Vosselman. In addition to residual test, the possibility to test curvature is added.

Definition at line 60 of file region_growing.h.

Member Typedef Documentation

◆ KdTree

template<typename PointT , typename NormalT >
using pcl::RegionGrowing< PointT, NormalT >::KdTree = pcl::search::Search<PointT>

Definition at line 64 of file region_growing.h.

◆ KdTreePtr

template<typename PointT , typename NormalT >
using pcl::RegionGrowing< PointT, NormalT >::KdTreePtr = typename KdTree::Ptr

Definition at line 65 of file region_growing.h.

◆ Normal

template<typename PointT , typename NormalT >
using pcl::RegionGrowing< PointT, NormalT >::Normal = pcl::PointCloud<NormalT>

Definition at line 66 of file region_growing.h.

◆ NormalPtr

template<typename PointT , typename NormalT >
using pcl::RegionGrowing< PointT, NormalT >::NormalPtr = typename Normal::Ptr

Definition at line 67 of file region_growing.h.

◆ PointCloud

template<typename PointT , typename NormalT >
using pcl::RegionGrowing< PointT, NormalT >::PointCloud = pcl::PointCloud<PointT>

Definition at line 68 of file region_growing.h.

Constructor & Destructor Documentation

◆ RegionGrowing()

template<typename PointT , typename NormalT >
pcl::RegionGrowing< PointT, NormalT >::RegionGrowing ( )
default

Constructor that sets default values for member variables.

◆ ~RegionGrowing()

template<typename PointT , typename NormalT >
pcl::RegionGrowing< PointT, NormalT >::~RegionGrowing
override

This destructor destroys the cloud, normals and search method used for finding KNN.

In other words it frees memory.

Definition at line 61 of file region_growing.hpp.

Member Function Documentation

◆ applySmoothRegionGrowingAlgorithm()

template<typename PointT , typename NormalT >
void pcl::RegionGrowing< PointT, NormalT >::applySmoothRegionGrowingAlgorithm
protected

This function implements the algorithm described in the article "Segmentation of point clouds using smoothness constraint" by T.

Rabbani, F. A. van den Heuvel, G. Vosselman.

Definition at line 354 of file region_growing.hpp.

References pcl::comparePair().

◆ assembleRegions()

template<typename PointT , typename NormalT >
void pcl::RegionGrowing< PointT, NormalT >::assembleRegions
protected

This function simply assembles the regions from list of point labels.

Each cluster is an array of point indices.

Definition at line 517 of file region_growing.hpp.

References pcl::PointIndices::indices.

Referenced by pcl::RegionGrowingRGB< PointT, NormalT >::extract(), and pcl::RegionGrowingRGB< PointT, NormalT >::getSegmentFromPoint().

◆ extract()

template<typename PointT , typename NormalT >
void pcl::RegionGrowing< PointT, NormalT >::extract ( std::vector< pcl::PointIndices > &  clusters)
virtual

This method launches the segmentation algorithm and returns the clusters that were obtained during the segmentation.

Parameters
[out]clustersclusters that were obtained. Each cluster is an array of point indices.

Reimplemented in pcl::RegionGrowingRGB< PointT, NormalT >.

Definition at line 231 of file region_growing.hpp.

◆ findPointNeighbours()

template<typename PointT , typename NormalT >
void pcl::RegionGrowing< PointT, NormalT >::findPointNeighbours
protectedvirtual

This method finds KNN for each point and saves them to the array because the algorithm needs to find KNN a few times.

Reimplemented in pcl::RegionGrowingRGB< PointT, NormalT >.

Definition at line 324 of file region_growing.hpp.

References pcl::isFinite().

◆ getColoredCloud()

template<typename PointT , typename NormalT >
pcl::PointCloud< pcl::PointXYZRGB >::Ptr pcl::RegionGrowing< PointT, NormalT >::getColoredCloud

If the cloud was successfully segmented, then function returns colored cloud.

Otherwise it returns an empty pointer. Points that belong to the same segment have the same color. But this function doesn't guarantee that different segments will have different color(it all depends on RNG). Points that were not listed in the indices array will have red color.

Definition at line 609 of file region_growing.hpp.

References pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::is_dense, pcl::PointCloud< PointT >::points, and pcl::PointCloud< PointT >::width.

◆ getColoredCloudRGBA()

template<typename PointT , typename NormalT >
pcl::PointCloud< pcl::PointXYZRGBA >::Ptr pcl::RegionGrowing< PointT, NormalT >::getColoredCloudRGBA

If the cloud was successfully segmented, then function returns colored cloud.

Otherwise it returns an empty pointer. Points that belong to the same segment have the same color. But this function doesn't guarantee that different segments will have different color(it all depends on RNG). Points that were not listed in the indices array will have red color.

Definition at line 659 of file region_growing.hpp.

References pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::is_dense, pcl::PointCloud< PointT >::points, and pcl::PointCloud< PointT >::width.

◆ getCurvatureTestFlag()

template<typename PointT , typename NormalT >
bool pcl::RegionGrowing< PointT, NormalT >::getCurvatureTestFlag

Returns the flag that signalize if the curvature test is turned on/off.

Definition at line 113 of file region_growing.hpp.

◆ getCurvatureThreshold()

template<typename PointT , typename NormalT >
float pcl::RegionGrowing< PointT, NormalT >::getCurvatureThreshold

Returns curvature threshold.

Definition at line 175 of file region_growing.hpp.

◆ getInputNormals()

template<typename PointT , typename NormalT >
pcl::RegionGrowing< PointT, NormalT >::NormalPtr pcl::RegionGrowing< PointT, NormalT >::getInputNormals

Returns normals.

Definition at line 217 of file region_growing.hpp.

◆ getMaxClusterSize()

template<typename PointT , typename NormalT >
pcl::uindex_t pcl::RegionGrowing< PointT, NormalT >::getMaxClusterSize

Get the maximum number of points that a cluster needs to contain in order to be considered valid.

Definition at line 85 of file region_growing.hpp.

◆ getMinClusterSize()

template<typename PointT , typename NormalT >
pcl::uindex_t pcl::RegionGrowing< PointT, NormalT >::getMinClusterSize

Get the minimum number of points that a cluster needs to contain in order to be considered valid.

Definition at line 71 of file region_growing.hpp.

◆ getNumberOfNeighbours()

template<typename PointT , typename NormalT >
unsigned int pcl::RegionGrowing< PointT, NormalT >::getNumberOfNeighbours

Returns the number of nearest neighbours used for KNN.

Definition at line 189 of file region_growing.hpp.

◆ getResidualTestFlag()

template<typename PointT , typename NormalT >
bool pcl::RegionGrowing< PointT, NormalT >::getResidualTestFlag

Returns the flag that signalize if the residual test is turned on/off.

Definition at line 130 of file region_growing.hpp.

◆ getResidualThreshold()

template<typename PointT , typename NormalT >
float pcl::RegionGrowing< PointT, NormalT >::getResidualThreshold

Returns residual threshold.

Definition at line 161 of file region_growing.hpp.

◆ getSearchMethod()

template<typename PointT , typename NormalT >
pcl::RegionGrowing< PointT, NormalT >::KdTreePtr pcl::RegionGrowing< PointT, NormalT >::getSearchMethod

Returns the pointer to the search method that is used for KNN.

Definition at line 203 of file region_growing.hpp.

◆ getSegmentFromPoint()

template<typename PointT , typename NormalT >
void pcl::RegionGrowing< PointT, NormalT >::getSegmentFromPoint ( pcl::index_t  index,
pcl::PointIndices cluster 
)
virtual

For a given point this function builds a segment to which it belongs and returns this segment.

Parameters
[in]indexindex of the initial point which will be the seed for growing a segment.
[out]clustercluster to which the point belongs.

Reimplemented in pcl::RegionGrowingRGB< PointT, NormalT >.

Definition at line 548 of file region_growing.hpp.

References pcl::PointIndices::indices.

◆ getSmoothModeFlag()

template<typename PointT , typename NormalT >
bool pcl::RegionGrowing< PointT, NormalT >::getSmoothModeFlag

Returns the flag value.

This flag signalizes which mode of algorithm will be used. If it is set to true than it will work as said in the article. This means that it will be testing the angle between normal of the current point and it's neighbours normal. Otherwise, it will be testing the angle between normal of the current point and normal of the initial point that was chosen for growing new segment.

Definition at line 99 of file region_growing.hpp.

◆ getSmoothnessThreshold()

template<typename PointT , typename NormalT >
float pcl::RegionGrowing< PointT, NormalT >::getSmoothnessThreshold

Returns smoothness threshold.

Definition at line 147 of file region_growing.hpp.

◆ growRegion()

template<typename PointT , typename NormalT >
int pcl::RegionGrowing< PointT, NormalT >::growRegion ( int  initial_seed,
int  segment_number 
)
protected

This method grows a segment for the given seed point.

And returns the number of its points.

Parameters
[in]initial_seedindex of the point that will serve as the seed point
[in]segment_numberindicates which number this segment will have

Definition at line 411 of file region_growing.hpp.

◆ prepareForSegmentation()

template<typename PointT , typename NormalT >
bool pcl::RegionGrowing< PointT, NormalT >::prepareForSegmentation
protectedvirtual

This method simply checks if it is possible to execute the segmentation algorithm with the current settings.

If it is possible then it returns true.

Reimplemented in pcl::RegionGrowingRGB< PointT, NormalT >.

Definition at line 278 of file region_growing.hpp.

◆ setCurvatureTestFlag()

template<typename PointT , typename NormalT >
void pcl::RegionGrowing< PointT, NormalT >::setCurvatureTestFlag ( bool  value)
virtual

Allows to turn on/off the curvature test.

Note that at least one test (residual or curvature) must be turned on. If you are turning curvature test off then residual test will be turned on automatically.

Parameters
[in]valuenew value for curvature test. If set to true then the test will be turned on

Reimplemented in pcl::RegionGrowingRGB< PointT, NormalT >.

Definition at line 120 of file region_growing.hpp.

◆ setCurvatureThreshold()

template<typename PointT , typename NormalT >
void pcl::RegionGrowing< PointT, NormalT >::setCurvatureThreshold ( float  curvature)

Allows to set curvature threshold used for testing the points.

Parameters
[in]curvaturenew threshold value for curvature testing

Definition at line 182 of file region_growing.hpp.

◆ setInputNormals()

template<typename PointT , typename NormalT >
void pcl::RegionGrowing< PointT, NormalT >::setInputNormals ( const NormalPtr norm)

This method sets the normals.

They are needed for the algorithm, so if no normals will be set, the algorithm would not be able to segment the points.

Parameters
[in]normnormals that will be used in the algorithm

Definition at line 224 of file region_growing.hpp.

◆ setMaxClusterSize()

template<typename PointT , typename NormalT >
void pcl::RegionGrowing< PointT, NormalT >::setMaxClusterSize ( pcl::uindex_t  max_cluster_size)

Set the maximum number of points that a cluster needs to contain in order to be considered valid.

Definition at line 92 of file region_growing.hpp.

◆ setMinClusterSize()

template<typename PointT , typename NormalT >
void pcl::RegionGrowing< PointT, NormalT >::setMinClusterSize ( pcl::uindex_t  min_cluster_size)

Set the minimum number of points that a cluster needs to contain in order to be considered valid.

Definition at line 78 of file region_growing.hpp.

◆ setNumberOfNeighbours()

template<typename PointT , typename NormalT >
void pcl::RegionGrowing< PointT, NormalT >::setNumberOfNeighbours ( unsigned int  neighbour_number)

Allows to set the number of neighbours.

For more information check the article.

Parameters
[in]neighbour_numbernumber of neighbours to use

Definition at line 196 of file region_growing.hpp.

◆ setResidualTestFlag()

template<typename PointT , typename NormalT >
void pcl::RegionGrowing< PointT, NormalT >::setResidualTestFlag ( bool  value)
virtual

Allows to turn on/off the residual test.

Note that at least one test (residual or curvature) must be turned on. If you are turning residual test off then curvature test will be turned on automatically.

Parameters
[in]valuenew value for residual test. If set to true then the test will be turned on

Reimplemented in pcl::RegionGrowingRGB< PointT, NormalT >.

Definition at line 137 of file region_growing.hpp.

◆ setResidualThreshold()

template<typename PointT , typename NormalT >
void pcl::RegionGrowing< PointT, NormalT >::setResidualThreshold ( float  residual)

Allows to set residual threshold used for testing the points.

Parameters
[in]residualnew threshold value for residual testing

Definition at line 168 of file region_growing.hpp.

◆ setSearchMethod()

template<typename PointT , typename NormalT >
void pcl::RegionGrowing< PointT, NormalT >::setSearchMethod ( const KdTreePtr tree)

Allows to set search method that will be used for finding KNN.

Parameters
[in]treepointer to a KdTree

Definition at line 210 of file region_growing.hpp.

◆ setSmoothModeFlag()

template<typename PointT , typename NormalT >
void pcl::RegionGrowing< PointT, NormalT >::setSmoothModeFlag ( bool  value)

This function allows to turn on/off the smoothness constraint.

Parameters
[in]valuenew mode value, if set to true then the smooth version will be used.

Definition at line 106 of file region_growing.hpp.

◆ setSmoothnessThreshold()

template<typename PointT , typename NormalT >
void pcl::RegionGrowing< PointT, NormalT >::setSmoothnessThreshold ( float  theta)

Allows to set smoothness threshold used for testing the points.

Parameters
[in]thetanew threshold value for the angle between normals

Definition at line 154 of file region_growing.hpp.

◆ validatePoint()

template<typename PointT , typename NormalT >
bool pcl::RegionGrowing< PointT, NormalT >::validatePoint ( pcl::index_t  initial_seed,
pcl::index_t  point,
pcl::index_t  nghbr,
bool &  is_a_seed 
) const
protectedvirtual

This function is checking if the point with index 'nghbr' belongs to the segment.

If so, then it returns true. It also checks if this point can serve as the seed.

Parameters
[in]initial_seedindex of the initial point that was passed to the growRegion() function
[in]pointindex of the current seed point
[in]nghbrindex of the point that is neighbour of the current seed
[out]is_a_seedthis value is set to true if the point with index 'nghbr' can serve as the seed

Reimplemented in pcl::RegionGrowingRGB< PointT, NormalT >.

Definition at line 461 of file region_growing.hpp.

Member Data Documentation

◆ clusters_

template<typename PointT , typename NormalT >
std::vector<pcl::PointIndices> pcl::RegionGrowing< PointT, NormalT >::clusters_ {}
protected

After the segmentation it will contain the segments.

Definition at line 329 of file region_growing.h.

◆ curvature_flag_

template<typename PointT , typename NormalT >
bool pcl::RegionGrowing< PointT, NormalT >::curvature_flag_ {true}
protected

If set to true then curvature test will be done during segmentation.

Definition at line 291 of file region_growing.h.

◆ curvature_threshold_

template<typename PointT , typename NormalT >
float pcl::RegionGrowing< PointT, NormalT >::curvature_threshold_ {0.05f}
protected

Threshold used in curvature test.

Definition at line 303 of file region_growing.h.

◆ max_pts_per_cluster_

template<typename PointT , typename NormalT >
pcl::uindex_t pcl::RegionGrowing< PointT, NormalT >::max_pts_per_cluster_ {std::numeric_limits<pcl::uindex_t>::max()}
protected

Stores the maximum number of points that a cluster needs to contain in order to be considered valid.

Definition at line 285 of file region_growing.h.

◆ min_pts_per_cluster_

template<typename PointT , typename NormalT >
pcl::uindex_t pcl::RegionGrowing< PointT, NormalT >::min_pts_per_cluster_ {1}
protected

Stores the minimum number of points that a cluster needs to contain in order to be considered valid.

Definition at line 282 of file region_growing.h.

◆ neighbour_number_

template<typename PointT , typename NormalT >
unsigned int pcl::RegionGrowing< PointT, NormalT >::neighbour_number_ {30}
protected

Number of neighbours to find.

Definition at line 306 of file region_growing.h.

◆ normal_flag_

template<typename PointT , typename NormalT >
bool pcl::RegionGrowing< PointT, NormalT >::normal_flag_ {true}
protected

If set to true then normal/smoothness test will be done during segmentation.

It is always set to true for the usual region growing algorithm. It is used for turning on/off the test for smoothness in the child class RegionGrowingRGB.

Definition at line 323 of file region_growing.h.

◆ normals_

template<typename PointT , typename NormalT >
NormalPtr pcl::RegionGrowing< PointT, NormalT >::normals_ {nullptr}
protected

Contains normals of the points that will be segmented.

Definition at line 312 of file region_growing.h.

◆ num_pts_in_segment_

template<typename PointT , typename NormalT >
std::vector<pcl::uindex_t> pcl::RegionGrowing< PointT, NormalT >::num_pts_in_segment_ {}
protected

Tells how much points each segment contains.

Used for reserving memory.

Definition at line 326 of file region_growing.h.

◆ number_of_segments_

template<typename PointT , typename NormalT >
int pcl::RegionGrowing< PointT, NormalT >::number_of_segments_ {0}
protected

Stores the number of segments.

Definition at line 332 of file region_growing.h.

◆ point_labels_

template<typename PointT , typename NormalT >
std::vector<int> pcl::RegionGrowing< PointT, NormalT >::point_labels_ {}
protected

Point labels that tells to which segment each point belongs.

Definition at line 318 of file region_growing.h.

◆ point_neighbours_

template<typename PointT , typename NormalT >
std::vector<pcl::Indices> pcl::RegionGrowing< PointT, NormalT >::point_neighbours_ {}
protected

Contains neighbours of each point.

Definition at line 315 of file region_growing.h.

◆ residual_flag_

template<typename PointT , typename NormalT >
bool pcl::RegionGrowing< PointT, NormalT >::residual_flag_ {false}
protected

If set to true then residual test will be done during segmentation.

Definition at line 294 of file region_growing.h.

◆ residual_threshold_

template<typename PointT , typename NormalT >
float pcl::RegionGrowing< PointT, NormalT >::residual_threshold_ {0.05f}
protected

Threshold used in residual test.

Definition at line 300 of file region_growing.h.

◆ search_

template<typename PointT , typename NormalT >
KdTreePtr pcl::RegionGrowing< PointT, NormalT >::search_ {nullptr}
protected

Search method that will be used for KNN.

Definition at line 309 of file region_growing.h.

◆ smooth_mode_flag_

template<typename PointT , typename NormalT >
bool pcl::RegionGrowing< PointT, NormalT >::smooth_mode_flag_ {true}
protected

Flag that signalizes if the smoothness constraint will be used.

Definition at line 288 of file region_growing.h.

◆ theta_threshold_

template<typename PointT , typename NormalT >
float pcl::RegionGrowing< PointT, NormalT >::theta_threshold_ {30.0f / 180.0f * static_cast<float>(M_PI)}
protected

Threshold used for testing the smoothness between points.

Definition at line 297 of file region_growing.h.


The documentation for this class was generated from the following files: