Table of Contents

Method ComputeNormalsPC3d

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

ComputeNormalsPC3d(InputArray, OutputArray, int, bool, Vec3f)

Computes surface normals for a point cloud using local plane fitting.

public static int ComputeNormalsPC3d(InputArray pointCloud, OutputArray pointCloudWithNormals, int numberOfNeighbors = 6, bool flipViewpoint = false, Vec3f viewpoint = default)

Parameters

pointCloud InputArray

Input point cloud as an N-by-3 CV_32F matrix.

pointCloudWithNormals OutputArray

Output N-by-6 CV_32F matrix containing XYZ coordinates and normals.

numberOfNeighbors int

Number of neighboring points used for each local plane fit.

flipViewpoint bool

Whether normals should be oriented toward viewpoint.

viewpoint Vec3f

Viewpoint used when flipViewpoint is true.

Returns

int

One on success, matching the OpenCV implementation.