Table of Contents

Constructor FileStorage

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

FileStorage()

Default constructor. You should call FileStorage::open() after initialization.

public FileStorage()

FileStorage(string, Modes, string?)

The full constructor

public FileStorage(string source, FileStorage.Modes flags, string? encoding = null)

Parameters

source string

Name of the file to open or the text string to read the data from. Extension of the file (.xml or .yml/.yaml) determines its format (XML or YAML respectively). Also you can append .gz to work with compressed files, for example myHugeMatrix.xml.gz. If both FileStorage::WRITE and FileStorage::MEMORY flags are specified, source is used just to specify the output file format (e.g. mydata.xml, .yml etc.).

flags FileStorage.Modes
encoding string

Encoding of the file. Note that UTF-16 XML encoding is not supported currently and you should use 8-bit encoding instead of it.