Method Segment
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
Segment(out int[][], OutputArray, InputArray, InputArray, InputArray)
Executes segmentation using the Region Growing algorithm.
public virtual int Segment(out int[][] regionsIdx, OutputArray labels, InputArray inputPts, InputArray normals, InputArray nnIdx)
Parameters
regionsIdxint[][]Index information of all points in each region.
labelsOutputArrayThe label corresponds to the model number, 0 means it does not belong to any model, range [0, Number of final resultant models obtained].
inputPtsInputArrayOriginal point cloud, support vector<Point3f> and Mat of size Nx3/3xN.
normalsInputArrayNormal of each point, support vector<Point3f> and Mat of size Nx3.
nnIdxInputArrayIndex information of nearest neighbors of all points. The first nearest neighbor of each point is itself. Support 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].
Returns
- int
Number of final resultant regions obtained by segmentation.