OpenCV 5.0.0-pre
Open Source Computer Vision
|
Region Growing algorithm in 3D point cloud. More...
#include <opencv2/3d/ptcloud.hpp>
Public Member Functions | |
RegionGrowing3D ()=default | |
virtual | ~RegionGrowing3D ()=default |
virtual void | getCurvatures (OutputArray curvatures) const =0 |
Get the curvature of each point if you have set. | |
virtual double | getCurvatureThreshold () const =0 |
Get threshold value of curvature. | |
virtual int | getMaxNumberOfNeighbors () const =0 |
Get the maximum number of neighbors including itself. | |
virtual int | getMaxSize () const =0 |
Get the maximum size of region. | |
virtual int | getMinSize () const =0 |
Get the minimum size of region. | |
virtual bool | getNeedSort () const =0 |
Get whether the results need to be sorted you have set. | |
virtual int | getNumberOfRegions () const =0 |
Get the maximum number of regions you want. | |
virtual void | getSeeds (OutputArray seeds) const =0 |
Get the seed points. | |
virtual bool | getSmoothModeFlag () const =0 |
Get whether to use the smoothness mode. | |
virtual double | getSmoothnessThreshold () const =0 |
Get threshold value of the angle between normals. | |
virtual int | segment (OutputArrayOfArrays regions_idx, OutputArray labels, InputArray input_pts, InputArray normals, InputArrayOfArrays nn_idx)=0 |
Execute segmentation using the Region Growing algorithm. | |
virtual void | setCurvatures (InputArray curvatures)=0 |
Set the curvature of each point, support vector<float> and Mat. If not, you can set it to noArray(). | |
virtual void | setCurvatureThreshold (double curvature_thr)=0 |
virtual void | setMaxNumberOfNeighbors (int max_neighbor_num)=0 |
virtual void | setMaxSize (int max_size)=0 |
Set the maximum size of region. | |
virtual void | setMinSize (int min_size)=0 |
Set the minimum size of region. | |
virtual void | setNeedSort (bool need_sort)=0 |
Set whether the results need to be sorted in descending order by the number of points. | |
virtual void | setNumberOfRegions (int region_num)=0 |
Set the maximum number of regions you want. | |
virtual void | setSeeds (InputArray seeds)=0 |
virtual void | setSmoothModeFlag (bool smooth_mode)=0 |
virtual void | setSmoothnessThreshold (double smoothness_thr)=0 |
Set threshold value of the angle between normals, the input value is in radian. | |
Static Public Member Functions | |
static Ptr< RegionGrowing3D > | create () |
Region Growing algorithm in 3D point cloud.
The key idea of region growing is to merge the nearest neighbor points that satisfy a certain angle threshold into the same region according to the normal between the two points, so as to achieve the purpose of segmentation. For more details, please refer to [222].
|
default |
|
virtualdefault |
|
static |
|
pure virtual |
Get the curvature of each point if you have set.
|
pure virtual |
Get threshold value of curvature.
|
pure virtual |
Get the maximum number of neighbors including itself.
|
pure virtual |
Get the maximum size of region.
|
pure virtual |
Get the minimum size of region.
|
pure virtual |
Get whether the results need to be sorted you have set.
|
pure virtual |
Get the maximum number of regions you want.
|
pure virtual |
Get the seed points.
|
pure virtual |
Get whether to use the smoothness mode.
|
pure virtual |
Get threshold value of the angle between normals.
|
pure virtual |
Execute segmentation using the Region Growing algorithm.
[out] | regions_idx | Index information of all points in each region, support vector<vector<int>>, vector<Mat>. |
[out] | labels | The label corresponds to the model number, 0 means it does not belong to any model, range [0, Number of final resultant models obtained]. Support vector<int> and Mat. |
input_pts | Original point cloud, support vector<Point3f> and Mat of size Nx3/3xN. | |
normals | Normal of each point, support vector<Point3f> and Mat of size Nx3. | |
nn_idx | Index information of nearest neighbors of all points. The first nearest neighbor of each point is itself. Support vector<vector<int>>, vector<Mat> and Mat of size NxK. If the information in a row is [0, 2, 1, -5, -1, 4, 7 ... negative number] it will use only non-negative indexes until it meets a negative number or bound of this row i.e. [0, 2, 1]. |
|
pure virtual |
|
pure virtual |
Set threshold value of curvature. Default will be 0.05. Only points with curvature less than the threshold will be considered to belong to the same region. If the curvature of each point is not set, this option will not work.
|
pure virtual |
Set the maximum number of neighbors want to use including itself. Setting to a non-positive number or default will use the information from nn_idx.
|
pure virtual |
Set the maximum size of region.
|
pure virtual |
Set the minimum size of region.
|
pure virtual |
Set whether the results need to be sorted in descending order by the number of points.
|
pure virtual |
Set the maximum number of regions you want.
|
pure virtual |
Set the seed points, it will grow according to the seeds. If noArray() is set, the default method will be used:
|
pure virtual |
Set whether to use the smoothness mode. Default will be true. If true it will check the angle between the normal of the current point and the normal of its neighbor. Otherwise, it will check the angle between the normal of the seed point and the normal of current neighbor.
|
pure virtual |
Set threshold value of the angle between normals, the input value is in radian.