Table of Contents

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

sampledPointFlags OutputArray

Output flags of the sampled points. sampledPointFlags[i] is 1 if the i-th point is selected, 0 otherwise.

inputPts InputArray

Original point cloud, Mat of size Nx3/3xN.

sampledPtsSize int

The desired point cloud size after sampling.

distLowerLimit float

Sampling 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

sampledPointFlags OutputArray

Output flags of the sampled points. sampledPointFlags[i] is 1 if the i-th point is selected, 0 otherwise.

inputPts InputArray

Original point cloud, Mat of size Nx3/3xN.

sampledScale float

Range (0, 1); the percentage of the sampled point cloud relative to the original size.

distLowerLimit float

Sampling 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.