C# Класс OpenCvSharp.FileStorage

XML/YAML File Storage Class.
Наследование: OpenCvSharp.DisposableCvObject
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
FileStorage ( ) : System

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

FileStorage ( string source, Mode flags, string encoding = null ) : System

The full constructor

GetDefaultObjectName ( string fileName ) : string

Returns the normalized object name for the specified file name

GetFirstTopLevelNode ( ) : FileNode

Returns the first element of the top-level mapping

IsOpened ( ) : bool

Returns true if the object is associated with currently opened file.

Open ( string fileName, Mode flags, string encoding = null ) : bool

operator that performs PCA. The previously stored data, if any, is released

Release ( ) : void

Closes the file and releases all the memory buffers

ReleaseAndGetString ( ) : string

Closes the file, releases all the memory buffers and returns the text string

Root ( int streamidx ) : FileNode

Returns the top-level mapping. YAML supports multiple streams

Write ( string name, IEnumerable value ) : void

Write ( string name, IEnumerable value ) : void

Write ( string name, OpenCvSharp.Mat value ) : void

Write ( string name, SparseMat value ) : void

Write ( string name, double value ) : void

Write ( string name, float value ) : void

Write ( string name, int value ) : void

Write ( string name, string value ) : void

WriteObj ( string name, IntPtr obj ) : void

Writes the registered C structure (CvMat, CvMatND, CvSeq). See cvWrite()

WriteRaw ( string fmt, IntPtr vec, long len ) : void

Writes one or more numbers of the specified format to the currently written structure

WriteScalar ( double value ) : void

WriteScalar ( float value ) : void

WriteScalar ( int value ) : void

WriteScalar ( string value ) : void

this ( string nodeName ) : FileNode

Returns the specified element of the top-level mapping

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Описание методов

Dispose() защищенный Метод

protected Dispose ( bool disposing ) : void
disposing bool
Результат void

FileStorage() публичный Метод

Default constructor. You should call FileStorage::open() after initialization.
public FileStorage ( ) : System
Результат System

FileStorage() публичный Метод

The full constructor
public FileStorage ( string source, Mode flags, string encoding = null ) : System
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 Mode
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.
Результат System

GetDefaultObjectName() публичный статический Метод

Returns the normalized object name for the specified file name
public static GetDefaultObjectName ( string fileName ) : string
fileName string
Результат string

GetFirstTopLevelNode() публичный Метод

Returns the first element of the top-level mapping
public GetFirstTopLevelNode ( ) : FileNode
Результат FileNode

IsOpened() публичный Метод

Returns true if the object is associated with currently opened file.
public IsOpened ( ) : bool
Результат bool

Open() публичный Метод

operator that performs PCA. The previously stored data, if any, is released
public Open ( string fileName, Mode flags, string encoding = null ) : bool
fileName string
flags Mode
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.
Результат bool

Release() публичный Метод

Closes the file and releases all the memory buffers
public Release ( ) : void
Результат void

ReleaseAndGetString() публичный Метод

Closes the file, releases all the memory buffers and returns the text string
public ReleaseAndGetString ( ) : string
Результат string

Root() публичный Метод

Returns the top-level mapping. YAML supports multiple streams
public Root ( int streamidx ) : FileNode
streamidx int
Результат FileNode

Write() публичный Метод

public Write ( string name, IEnumerable value ) : void
name string
value IEnumerable
Результат void

Write() публичный Метод

public Write ( string name, IEnumerable value ) : void
name string
value IEnumerable
Результат void

Write() публичный Метод

public Write ( string name, OpenCvSharp.Mat value ) : void
name string
value OpenCvSharp.Mat
Результат void

Write() публичный Метод

public Write ( string name, SparseMat value ) : void
name string
value SparseMat
Результат void

Write() публичный Метод

public Write ( string name, double value ) : void
name string
value double
Результат void

Write() публичный Метод

public Write ( string name, float value ) : void
name string
value float
Результат void

Write() публичный Метод

public Write ( string name, int value ) : void
name string
value int
Результат void

Write() публичный Метод

public Write ( string name, string value ) : void
name string
value string
Результат void

WriteObj() публичный Метод

Writes the registered C structure (CvMat, CvMatND, CvSeq). See cvWrite()
public WriteObj ( string name, IntPtr obj ) : void
name string
obj System.IntPtr
Результат void

WriteRaw() публичный Метод

Writes one or more numbers of the specified format to the currently written structure
public WriteRaw ( string fmt, IntPtr vec, long len ) : void
fmt string
vec System.IntPtr
len long
Результат void

WriteScalar() публичный Метод

public WriteScalar ( double value ) : void
value double
Результат void

WriteScalar() публичный Метод

public WriteScalar ( float value ) : void
value float
Результат void

WriteScalar() публичный Метод

public WriteScalar ( int value ) : void
value int
Результат void

WriteScalar() публичный Метод

public WriteScalar ( string value ) : void
value string
Результат void

this() публичный Метод

Returns the specified element of the top-level mapping
public this ( string nodeName ) : FileNode
nodeName string
Результат FileNode