Table of Contents

Class FileNode

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

File Storage Node class

public class FileNode : DisposableCvObject, IDisposable, ICvPtrHolder, IEnumerable<FileNode>, IEnumerable
Inheritance
FileNode
Implements
Inherited Members

Constructors

FileNode()

The default constructor

public FileNode()

FileNode(nint)

Initializes from cv::FileNode*

public FileNode(nint ptr)

Parameters

ptr nint

Properties

Empty

Returns true if the node is empty

public bool Empty { get; }

Property Value

bool

IsInt

Returns true if the node is an integer

public bool IsInt { get; }

Property Value

bool

IsMap

Returns true if the node is a mapping

public bool IsMap { get; }

Property Value

bool

IsNamed

Returns true if the node has a name

public bool IsNamed { get; }

Property Value

bool

IsNone

Returns true if the node is a "none" object

public bool IsNone { get; }

Property Value

bool

IsReal

Returns true if the node is a floating-point number

public bool IsReal { get; }

Property Value

bool

IsSeq

Returns true if the node is a sequence

public bool IsSeq { get; }

Property Value

bool

IsString

Returns true if the node is a text string

public bool IsString { get; }

Property Value

bool

this[int]

returns element of a sequence node

public FileNode? this[int i] { get; }

Parameters

i int

Property Value

FileNode

this[string]

returns element of a mapping node

public FileNode? this[string nodeName] { get; }

Parameters

nodeName string

Property Value

FileNode

Name

Returns the node name or an empty string if the node is nameless

public string Name { get; }

Property Value

string

Size

Returns the number of elements in the node, if it is a sequence or mapping, or 1 otherwise.

public long Size { get; }

Property Value

long

Type

Returns type of the node.

public FileNode.Types Type { get; }

Property Value

FileNode.Types

Type of the node.

Methods

Begin()

returns iterator pointing to the first node element

public FileNodeIterator Begin()

Returns

FileNodeIterator

DisposeUnmanaged()

Releases unmanaged resources

protected override void DisposeUnmanaged()

End()

returns iterator pointing to the element following the last node element

public FileNodeIterator End()

Returns

FileNodeIterator

GetEnumerator()

Get FileNode iterator

public IEnumerator<FileNode> GetEnumerator()

Returns

IEnumerator<FileNode>

ReadDMatch()

Reads the node element as DMatch

public DMatch ReadDMatch()

Returns

DMatch

ReadDMatches()

Reads the node element as DMatch[]

public DMatch[] ReadDMatches()

Returns

DMatch[]

ReadDouble(double)

Reads the node element as Double

public double ReadDouble(double defaultValue = 0)

Parameters

defaultValue double

Returns

double

ReadFloat(float)

Reads the node element as Single (float)

public float ReadFloat(float defaultValue = 0)

Parameters

defaultValue float

Returns

float

ReadInt(int)

Reads the node element as Int32 (int)

public int ReadInt(int defaultValue = 0)

Parameters

defaultValue int

Returns

int

ReadKeyPoint()

Reads the node element as KeyPoint

public KeyPoint ReadKeyPoint()

Returns

KeyPoint

ReadKeyPoints()

Reads the node element as KeyPoint[]

public KeyPoint[] ReadKeyPoints()

Returns

KeyPoint[]

ReadMat(Mat?)

Reads the node element as Mat

public Mat ReadMat(Mat? defaultMat = null)

Parameters

defaultMat Mat

Returns

Mat

ReadPoint()

Reads the node element as Point

public Point ReadPoint()

Returns

Point

ReadPoint2d()

Reads the node element as Point2d

public Point2d ReadPoint2d()

Returns

Point2d

ReadPoint2f()

Reads the node element as Point2f

public Point2f ReadPoint2f()

Returns

Point2f

ReadPoint3d()

Reads the node element as Point3d

public Point3d ReadPoint3d()

Returns

Point3d

ReadPoint3f()

Reads the node element as Point3f

public Point3f ReadPoint3f()

Returns

Point3f

ReadPoint3i()

Reads the node element as Point3i

public Point3i ReadPoint3i()

Returns

Point3i

ReadRange()

Reads the node element as Range

public Range ReadRange()

Returns

Range

ReadRaw(string, nint, long)

Reads node elements to the buffer with the specified format

public void ReadRaw(string fmt, nint vec, long len)

Parameters

fmt string
vec nint
len long

ReadRect()

Reads the node element as Rect

public Rect ReadRect()

Returns

Rect

ReadRect2d()

Reads the node element as Rect2d

public Rect2d ReadRect2d()

Returns

Rect2d

ReadRect2f()

Reads the node element as Rect2f

public Rect2f ReadRect2f()

Returns

Rect2f

ReadScalar()

Reads the node element as Scalar

public Scalar ReadScalar()

Returns

Scalar

ReadSize()

Reads the node element as Size

public Size ReadSize()

Returns

Size

ReadSize2d()

Reads the node element as Size2d

public Size2d ReadSize2d()

Returns

Size2d

ReadSize2f()

Reads the node element as Size2f

public Size2f ReadSize2f()

Returns

Size2f

ReadSparseMat(SparseMat?)

Reads the node element as SparseMat

public SparseMat ReadSparseMat(SparseMat? defaultMat = null)

Parameters

defaultMat SparseMat

Returns

SparseMat

ReadString(string?)

Reads the node element as String

public string ReadString(string? defaultValue = null)

Parameters

defaultValue string

Returns

string

ReadVec2b()

Reads the node element as Vector

public Vec2b ReadVec2b()

Returns

Vec2b

ReadVec2d()

Reads the node element as Vector

public Vec2d ReadVec2d()

Returns

Vec2d

ReadVec2f()

Reads the node element as Vector

public Vec2f ReadVec2f()

Returns

Vec2f

ReadVec2i()

Reads the node element as Vector

public Vec2i ReadVec2i()

Returns

Vec2i

ReadVec2s()

Reads the node element as Vector

public Vec2s ReadVec2s()

Returns

Vec2s

ReadVec2w()

Reads the node element as Vector

public Vec2w ReadVec2w()

Returns

Vec2w

ReadVec3b()

public Vec3b ReadVec3b()

Returns

Vec3b

ReadVec3d()

Reads the node element as Vector

public Vec3d ReadVec3d()

Returns

Vec3d

ReadVec3f()

Reads the node element as Vector

public Vec3f ReadVec3f()

Returns

Vec3f

ReadVec3i()

Reads the node element as Vector

public Vec3i ReadVec3i()

Returns

Vec3i

ReadVec3s()

Reads the node element as Vector

public Vec3s ReadVec3s()

Returns

Vec3s

ReadVec3w()

Reads the node element as Vector

public Vec3w ReadVec3w()

Returns

Vec3w

ReadVec4b()

Reads the node element as Vector

public Vec4b ReadVec4b()

Returns

Vec4b

ReadVec4d()

Reads the node element as Vector

public Vec4d ReadVec4d()

Returns

Vec4d

ReadVec4f()

Reads the node element as Vector

public Vec4f ReadVec4f()

Returns

Vec4f

ReadVec4i()

Reads the node element as Vector

public Vec4i ReadVec4i()

Returns

Vec4i

ReadVec4s()

Reads the node element as Vector

public Vec4s ReadVec4s()

Returns

Vec4s

ReadVec4w()

Reads the node element as Vector

public Vec4w ReadVec4w()

Returns

Vec4w

ReadVec6b()

Reads the node element as Vector

public Vec6b ReadVec6b()

Returns

Vec6b

ReadVec6d()

Reads the node element as Vector

public Vec6d ReadVec6d()

Returns

Vec6d

ReadVec6f()

Reads the node element as Vector

public Vec6f ReadVec6f()

Returns

Vec6f

ReadVec6i()

Reads the node element as Vector

public Vec6i ReadVec6i()

Returns

Vec6i

ReadVec6s()

Reads the node element as Vector

public Vec6s ReadVec6s()

Returns

Vec6s

ReadVec6w()

Reads the node element as Vector

public Vec6w ReadVec6w()

Returns

Vec6w

ToDouble()

Returns the node content as double

public double ToDouble()

Returns

double

ToInt32()

Returns the node content as an integer. If the node stores floating-point number, it is rounded.

public int ToInt32()

Returns

int

ToMat()

Returns the node content as OpenCV Mat

public Mat ToMat()

Returns

Mat

ToSingle()

Returns the node content as System.Single

public float ToSingle()

Returns

float

ToString()

Returns the node content as text string

public override string ToString()

Returns

string

Operators

explicit operator Mat(FileNode)

Returns the node content as OpenCV Mat

public static explicit operator Mat(FileNode node)

Parameters

node FileNode

Returns

Mat

explicit operator double(FileNode)

Returns the node content as double

public static explicit operator double(FileNode node)

Parameters

node FileNode

Returns

double

explicit operator int(FileNode)

Returns the node content as an integer. If the node stores floating-point number, it is rounded.

public static explicit operator int(FileNode node)

Parameters

node FileNode

Returns

int

explicit operator float(FileNode)

Returns the node content as float

public static explicit operator float(FileNode node)

Parameters

node FileNode

Returns

float

explicit operator string(FileNode)

Returns the node content as text string

public static explicit operator string(FileNode node)

Parameters

node FileNode

Returns

string