Table of Contents

Method RandomSampling

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

RandomSampling(OutputArray, InputArray, int)

Point cloud sampling by randomly selecting points.

public static void RandomSampling(OutputArray sampledPts, InputArray inputPts, int sampledPtsSize)

Parameters

sampledPts OutputArray

Point cloud after sampling.

inputPts InputArray

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

sampledPtsSize int

The desired point cloud size after sampling.

RandomSampling(OutputArray, InputArray, float)

Point cloud sampling by randomly selecting points.

public static void RandomSampling(OutputArray sampledPts, InputArray inputPts, float sampledScale)

Parameters

sampledPts OutputArray

Point cloud after sampling.

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.