Table of Contents

Method SaveMesh

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

SaveMesh(string, InputArray, IEnumerable<Mat>, InputArray, InputArray, InputArray)

Saves a mesh to a file (.ply / .obj). The file format is chosen by the extension.

public static void SaveMesh(string filename, InputArray vertices, IEnumerable<Mat> indices, InputArray normals = default, InputArray colors = default, InputArray texCoords = default)

Parameters

filename string

Name of the file.

vertices InputArray

Vertex coordinates, each value contains 3 floats.

indices IEnumerable<Mat>

Per-face list of vertex indices; each element is a vector of ints.

normals InputArray

Per-vertex normals, each value contains 3 floats (optional).

colors InputArray

Per-vertex colors, each value contains 3 floats (optional).

texCoords InputArray

Per-vertex texture coordinates, each value contains 2 or 3 floats (optional).