Table of Contents

Struct InputArray

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

Stack-only input proxy (see file header). Carries a native handle or an inline value; building one allocates nothing on the managed heap.

public readonly ref struct InputArray
Inherited Members

Methods

Create(IVec)

Wraps a fixed-length IVec value (no allocation; travels inline).

public static InputArray Create(IVec vec)

Parameters

vec IVec

Returns

InputArray

Create(Mat?)

Wraps a Mat (no allocation).

public static InputArray Create(Mat? mat)

Parameters

mat Mat

Returns

InputArray

Create(MatExpr)

Wraps a MatExpr (materializes it to a native cv::MatExpr).

public static InputArray Create(MatExpr node)

Parameters

node MatExpr

Returns

InputArray

Create(Scalar)

Wraps a Scalar value (no allocation; travels inline).

public static InputArray Create(Scalar val)

Parameters

val Scalar

Returns

InputArray

Create(UMat)

Wraps a UMat (no allocation).

public static InputArray Create(UMat mat)

Parameters

mat UMat

Returns

InputArray

Create(double)

Wraps a double value (no allocation; travels inline).

public static InputArray Create(double val)

Parameters

val double

Returns

InputArray

Create<T>(IEnumerable<T>)

Wraps a sequence, inferring the MatType from T.

public static InputArray Create<T>(IEnumerable<T> enumerable) where T : unmanaged

Parameters

enumerable IEnumerable<T>

Returns

InputArray

Type Parameters

T

Create<T>(IEnumerable<T>, MatType)

Wraps a sequence by copying it into a freshly-created Mat of the given type.

public static InputArray Create<T>(IEnumerable<T> enumerable, MatType type) where T : unmanaged

Parameters

enumerable IEnumerable<T>
type MatType

Returns

InputArray

Type Parameters

T

Create<T>(T[,])

Wraps a 2-D array, inferring the MatType from T.

public static InputArray Create<T>(T[,] array) where T : unmanaged

Parameters

array T[,]

Returns

InputArray

Type Parameters

T

Create<T>(T[,], MatType)

Wraps a 2-D array by copying it into a freshly-created Mat of the given type.

public static InputArray Create<T>(T[,] array, MatType type) where T : unmanaged

Parameters

array T[,]
type MatType

Returns

InputArray

Type Parameters

T

Create<T>(T[])

Wraps a 1-D array, inferring the MatType from T.

public static InputArray Create<T>(T[] array) where T : unmanaged

Parameters

array T[]

Returns

InputArray

Type Parameters

T

Create<T>(T[], MatType)

Wraps a 1-D array by copying it into a freshly-created Mat of the given type (not allocation-free: this materializes a real Mat, same as the class-based InputArray.Create<T> it replaces).

public static InputArray Create<T>(T[] array, MatType type) where T : unmanaged

Parameters

array T[]
type MatType

Returns

InputArray

Type Parameters

T

Operators

implicit operator InputArray(Mat)

Wraps a Mat (no allocation).

public static implicit operator InputArray(Mat mat)

Parameters

mat Mat

Returns

InputArray

implicit operator InputArray(MatExpr)

Wraps a MatExpr. The expression is materialized into a native cv::MatExpr (kept alive via OpenCvSharp.InputArray.Source), so this path is not allocation-free — matching the inherent cost of feeding a lazy expression into an OpenCV call.

public static implicit operator InputArray(MatExpr expr)

Parameters

expr MatExpr

Returns

InputArray

implicit operator InputArray(Scalar)

Wraps a Scalar value (no allocation; travels inline).

public static implicit operator InputArray(Scalar s)

Parameters

s Scalar

Returns

InputArray

implicit operator InputArray(UMat)

Wraps a UMat (no allocation).

public static implicit operator InputArray(UMat mat)

Parameters

mat UMat

Returns

InputArray

implicit operator InputArray(Vec2b)

Wraps a Vec2b value (no allocation; travels inline).

public static implicit operator InputArray(Vec2b v)

Parameters

v Vec2b

Returns

InputArray

implicit operator InputArray(Vec2d)

Wraps a Vec2d value (no allocation; travels inline).

public static implicit operator InputArray(Vec2d v)

Parameters

v Vec2d

Returns

InputArray

implicit operator InputArray(Vec2f)

Wraps a Vec2f value (no allocation; travels inline).

public static implicit operator InputArray(Vec2f v)

Parameters

v Vec2f

Returns

InputArray

implicit operator InputArray(Vec2i)

Wraps a Vec2i value (no allocation; travels inline).

public static implicit operator InputArray(Vec2i v)

Parameters

v Vec2i

Returns

InputArray

implicit operator InputArray(Vec2s)

Wraps a Vec2s value (no allocation; travels inline).

public static implicit operator InputArray(Vec2s v)

Parameters

v Vec2s

Returns

InputArray

implicit operator InputArray(Vec2w)

Wraps a Vec2w value (no allocation; travels inline).

public static implicit operator InputArray(Vec2w v)

Parameters

v Vec2w

Returns

InputArray

implicit operator InputArray(Vec3b)

Wraps a Vec3b value (no allocation; travels inline).

public static implicit operator InputArray(Vec3b v)

Parameters

v Vec3b

Returns

InputArray

implicit operator InputArray(Vec3d)

Wraps a Vec3d value (no allocation; travels inline).

public static implicit operator InputArray(Vec3d v)

Parameters

v Vec3d

Returns

InputArray

implicit operator InputArray(Vec3f)

Wraps a Vec3f value (no allocation; travels inline).

public static implicit operator InputArray(Vec3f v)

Parameters

v Vec3f

Returns

InputArray

implicit operator InputArray(Vec3i)

Wraps a Vec3i value (no allocation; travels inline).

public static implicit operator InputArray(Vec3i v)

Parameters

v Vec3i

Returns

InputArray

implicit operator InputArray(Vec3s)

Wraps a Vec3s value (no allocation; travels inline).

public static implicit operator InputArray(Vec3s v)

Parameters

v Vec3s

Returns

InputArray

implicit operator InputArray(Vec3w)

Wraps a Vec3w value (no allocation; travels inline).

public static implicit operator InputArray(Vec3w v)

Parameters

v Vec3w

Returns

InputArray

implicit operator InputArray(Vec4b)

Wraps a Vec4b value (no allocation; travels inline).

public static implicit operator InputArray(Vec4b v)

Parameters

v Vec4b

Returns

InputArray

implicit operator InputArray(Vec4d)

Wraps a Vec4d value (no allocation; travels inline).

public static implicit operator InputArray(Vec4d v)

Parameters

v Vec4d

Returns

InputArray

implicit operator InputArray(Vec4f)

Wraps a Vec4f value (no allocation; travels inline).

public static implicit operator InputArray(Vec4f v)

Parameters

v Vec4f

Returns

InputArray

implicit operator InputArray(Vec4i)

Wraps a Vec4i value (no allocation; travels inline).

public static implicit operator InputArray(Vec4i v)

Parameters

v Vec4i

Returns

InputArray

implicit operator InputArray(Vec4s)

Wraps a Vec4s value (no allocation; travels inline).

public static implicit operator InputArray(Vec4s v)

Parameters

v Vec4s

Returns

InputArray

implicit operator InputArray(Vec4w)

Wraps a Vec4w value (no allocation; travels inline).

public static implicit operator InputArray(Vec4w v)

Parameters

v Vec4w

Returns

InputArray

implicit operator InputArray(Vec6b)

Wraps a Vec6b value (no allocation; travels inline).

public static implicit operator InputArray(Vec6b v)

Parameters

v Vec6b

Returns

InputArray

implicit operator InputArray(Vec6d)

Wraps a Vec6d value (no allocation; travels inline).

public static implicit operator InputArray(Vec6d v)

Parameters

v Vec6d

Returns

InputArray

implicit operator InputArray(Vec6f)

Wraps a Vec6f value (no allocation; travels inline).

public static implicit operator InputArray(Vec6f v)

Parameters

v Vec6f

Returns

InputArray

implicit operator InputArray(Vec6i)

Wraps a Vec6i value (no allocation; travels inline).

public static implicit operator InputArray(Vec6i v)

Parameters

v Vec6i

Returns

InputArray

implicit operator InputArray(Vec6s)

Wraps a Vec6s value (no allocation; travels inline).

public static implicit operator InputArray(Vec6s v)

Parameters

v Vec6s

Returns

InputArray

implicit operator InputArray(Vec6w)

Wraps a Vec6w value (no allocation; travels inline).

public static implicit operator InputArray(Vec6w v)

Parameters

v Vec6w

Returns

InputArray

implicit operator InputArray(double)

Wraps a double value (no allocation; travels inline as Scalar(d,0,0,0)).

public static implicit operator InputArray(double d)

Parameters

d double

Returns

InputArray