Method FarthestPointSampling
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
FarthestPointSampling(OutputArray, InputArray, int, float)
Point cloud sampling by Farthest Point Sampling (FPS).
public static int FarthestPointSampling(OutputArray sampledPointFlags, InputArray inputPts, int sampledPtsSize, float distLowerLimit = 0)
Parameters
sampledPointFlagsOutputArrayOutput flags of the sampled points. sampledPointFlags[i] is 1 if the i-th point is selected, 0 otherwise.
inputPtsInputArrayOriginal point cloud, Mat of size Nx3/3xN.
sampledPtsSizeintThe desired point cloud size after sampling.
distLowerLimitfloatSampling is terminated early if the distance from the farthest point to the sampled set is less than this value.
Returns
- int
The number of points actually sampled.
FarthestPointSampling(OutputArray, InputArray, float, float)
Point cloud sampling by Farthest Point Sampling (FPS).
public static int FarthestPointSampling(OutputArray sampledPointFlags, InputArray inputPts, float sampledScale, float distLowerLimit = 0)
Parameters
sampledPointFlagsOutputArrayOutput flags of the sampled points. sampledPointFlags[i] is 1 if the i-th point is selected, 0 otherwise.
inputPtsInputArrayOriginal point cloud, Mat of size Nx3/3xN.
sampledScalefloatRange (0, 1); the percentage of the sampled point cloud relative to the original size.
distLowerLimitfloatSampling is terminated early if the distance from the farthest point to the sampled set is less than this value.
Returns
- int
The number of points actually sampled.