Class InputArray
This is the proxy class for passing read-only input arrays into OpenCV functions.
public class InputArray : UnmanagedObject, IDisposable
- Inheritance
-
InputArray
- Implements
- Derived
- Inherited Members
Constructors
InputArray(nint, object)
Create a Input array from an existing unmanaged inputArray pointer
public InputArray(nint inputArrayPtr, object parent)
Parameters
inputArrayPtr
nintThe unmanaged pointer the the InputArray
parent
objectThe parent object to keep reference to
Fields
_parent
A reference to the Parent object
protected object _parent
Field Value
Properties
IsEmpty
Return true if the input array is empty
public bool IsEmpty { get; }
Property Value
IsMat
True if the input array is a Mat
public bool IsMat { get; }
Property Value
IsMatVector
True if the input array is a vector of Mat
public bool IsMatVector { get; }
Property Value
IsMatx
True if the input array is a Matx
public bool IsMatx { get; }
Property Value
IsUMat
True if the input array is an UMat
public bool IsUMat { get; }
Property Value
IsUMatVector
True if the input array is a vector of UMat
public bool IsUMatVector { get; }
Property Value
Kind
The type of the input array
public InputArray.Type Kind { get; }
Property Value
Methods
CopyTo(IOutputArray, IInputArray)
Copy this Input array to another.
public void CopyTo(IOutputArray arr, IInputArray mask = null)
Parameters
arr
IOutputArrayThe destination array.
mask
IInputArrayThe optional mask.
DisposeObject()
Release all the unmanaged memory associated with this InputArray
protected override void DisposeObject()
GetChannels(int)
Get the number of channels
public int GetChannels(int idx = -1)
Parameters
idx
intThe optional index
Returns
- int
The number of channels
GetDepth(int)
Get the depth type
public DepthType GetDepth(int idx = -1)
Parameters
idx
intThe optional index
Returns
- DepthType
The depth type
GetDims(int)
Get the number of dimensions
public int GetDims(int i = -1)
Parameters
i
intThe optional index
Returns
- int
The dimensions
GetEmpty()
Get an empty input array
public static InputArray GetEmpty()
Returns
- InputArray
An empty input array
GetGpuMat()
Get the GpuMat from the input array
public GpuMat GetGpuMat()
Returns
- GpuMat
The GpuMat
GetMat(int)
Get the Mat from the input array
public Mat GetMat(int idx = -1)
Parameters
idx
intThe index, in case if this is an VectorOfMat
Returns
- Mat
The Mat
GetSize(int)
Get the size of the input array
public Size GetSize(int idx = -1)
Parameters
idx
intThe optional index
Returns
- Size
The size of the input array
GetUMat(int)
Get the UMat from the input array
public UMat GetUMat(int idx = -1)
Parameters
idx
intThe index, in case if this is an VectorOfUMat
Returns
- UMat
The UMat