C# Class OpenCvSharp.FileStorage

XML/YAML File Storage Class.
Inheritance: OpenCvSharp.DisposableCvObject
Datei anzeigen Open project: shimat/opencvsharp Class Usage Examples

Public Methods

Method Description
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

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Method Details

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

FileStorage() public method

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

FileStorage() public method

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.
return System

GetDefaultObjectName() public static method

Returns the normalized object name for the specified file name
public static GetDefaultObjectName ( string fileName ) : string
fileName string
return string

GetFirstTopLevelNode() public method

Returns the first element of the top-level mapping
public GetFirstTopLevelNode ( ) : FileNode
return FileNode

IsOpened() public method

Returns true if the object is associated with currently opened file.
public IsOpened ( ) : bool
return bool

Open() public method

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.
return bool

Release() public method

Closes the file and releases all the memory buffers
public Release ( ) : void
return void

ReleaseAndGetString() public method

Closes the file, releases all the memory buffers and returns the text string
public ReleaseAndGetString ( ) : string
return string

Root() public method

Returns the top-level mapping. YAML supports multiple streams
public Root ( int streamidx ) : FileNode
streamidx int
return FileNode

Write() public method

public Write ( string name, IEnumerable value ) : void
name string
value IEnumerable
return void

Write() public method

public Write ( string name, IEnumerable value ) : void
name string
value IEnumerable
return void

Write() public method

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

Write() public method

public Write ( string name, SparseMat value ) : void
name string
value SparseMat
return void

Write() public method

public Write ( string name, double value ) : void
name string
value double
return void

Write() public method

public Write ( string name, float value ) : void
name string
value float
return void

Write() public method

public Write ( string name, int value ) : void
name string
value int
return void

Write() public method

public Write ( string name, string value ) : void
name string
value string
return void

WriteObj() public method

Writes the registered C structure (CvMat, CvMatND, CvSeq). See cvWrite()
public WriteObj ( string name, IntPtr obj ) : void
name string
obj System.IntPtr
return void

WriteRaw() public method

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
return void

WriteScalar() public method

public WriteScalar ( double value ) : void
value double
return void

WriteScalar() public method

public WriteScalar ( float value ) : void
value float
return void

WriteScalar() public method

public WriteScalar ( int value ) : void
value int
return void

WriteScalar() public method

public WriteScalar ( string value ) : void
value string
return void

this() public method

Returns the specified element of the top-level mapping
public this ( string nodeName ) : FileNode
nodeName string
return FileNode