Method WriteStruct
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
WriteStruct(string, Types, string?)
Starts writing a nested structure (sequence or mapping) and returns a disposable scope
that calls EndWriteStruct() automatically, so the structure can be written
inside a using block instead of manually pairing
StartWriteStruct(string, Types, string?)/EndWriteStruct() calls.
public FileStorage.StructScope WriteStruct(string name, FileNode.Types flags, string? typeName = null)
Parameters
namestringname of the structure. When writing to sequences (a.k.a. "arrays"), pass an empty string.
flagsFileNode.Typesstructure type, one of Map/Seq, optionally combined with Flow for a compact YAML representation.
typeNamestringoptional name of an object class this structure stores.
Returns
Examples
using (fs.WriteStruct("camera", FileNode.Types.Map))
{
fs.Write("fx", 800.0);
fs.Write("fy", 800.0);
}