Struct MatType
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
Matrix data type (depth and number of channels)
public readonly record struct MatType : IEquatable<int>, IEquatable<MatType>
- Implements
- Inherited Members
Constructors
MatType(int)
Matrix data type (depth and number of channels)
public MatType(int value)
Parameters
valueint
Fields
CV_16BF
type depth constants
public const int CV_16BF = 8
Field Value
CV_16BFC1
predefined type constants
public static readonly MatType CV_16BFC1
Field Value
CV_16BFC2
predefined type constants
public static readonly MatType CV_16BFC2
Field Value
CV_16BFC3
predefined type constants
public static readonly MatType CV_16BFC3
Field Value
CV_16BFC4
predefined type constants
public static readonly MatType CV_16BFC4
Field Value
CV_16F
type depth constants
public const int CV_16F = 7
Field Value
CV_16FC1
predefined type constants
public static readonly MatType CV_16FC1
Field Value
CV_16FC2
predefined type constants
public static readonly MatType CV_16FC2
Field Value
CV_16FC3
predefined type constants
public static readonly MatType CV_16FC3
Field Value
CV_16FC4
predefined type constants
public static readonly MatType CV_16FC4
Field Value
CV_16S
type depth constants
public const int CV_16S = 3
Field Value
CV_16SC1
predefined type constants
public static readonly MatType CV_16SC1
Field Value
CV_16SC2
predefined type constants
public static readonly MatType CV_16SC2
Field Value
CV_16SC3
predefined type constants
public static readonly MatType CV_16SC3
Field Value
CV_16SC4
predefined type constants
public static readonly MatType CV_16SC4
Field Value
CV_16U
type depth constants
public const int CV_16U = 2
Field Value
CV_16UC1
predefined type constants
public static readonly MatType CV_16UC1
Field Value
CV_16UC2
predefined type constants
public static readonly MatType CV_16UC2
Field Value
CV_16UC3
predefined type constants
public static readonly MatType CV_16UC3
Field Value
CV_16UC4
predefined type constants
public static readonly MatType CV_16UC4
Field Value
CV_32F
type depth constants
public const int CV_32F = 5
Field Value
CV_32FC1
predefined type constants
public static readonly MatType CV_32FC1
Field Value
CV_32FC2
predefined type constants
public static readonly MatType CV_32FC2
Field Value
CV_32FC3
predefined type constants
public static readonly MatType CV_32FC3
Field Value
CV_32FC4
predefined type constants
public static readonly MatType CV_32FC4
Field Value
CV_32S
type depth constants
public const int CV_32S = 4
Field Value
CV_32SC1
predefined type constants
public static readonly MatType CV_32SC1
Field Value
CV_32SC2
predefined type constants
public static readonly MatType CV_32SC2
Field Value
CV_32SC3
predefined type constants
public static readonly MatType CV_32SC3
Field Value
CV_32SC4
predefined type constants
public static readonly MatType CV_32SC4
Field Value
CV_32U
type depth constants
public const int CV_32U = 12
Field Value
CV_32UC1
predefined type constants
public static readonly MatType CV_32UC1
Field Value
CV_32UC2
predefined type constants
public static readonly MatType CV_32UC2
Field Value
CV_32UC3
predefined type constants
public static readonly MatType CV_32UC3
Field Value
CV_32UC4
predefined type constants
public static readonly MatType CV_32UC4
Field Value
CV_64F
type depth constants
public const int CV_64F = 6
Field Value
CV_64FC1
predefined type constants
public static readonly MatType CV_64FC1
Field Value
CV_64FC2
predefined type constants
public static readonly MatType CV_64FC2
Field Value
CV_64FC3
predefined type constants
public static readonly MatType CV_64FC3
Field Value
CV_64FC4
predefined type constants
public static readonly MatType CV_64FC4
Field Value
CV_64S
type depth constants
public const int CV_64S = 11
Field Value
CV_64SC1
predefined type constants
public static readonly MatType CV_64SC1
Field Value
CV_64SC2
predefined type constants
public static readonly MatType CV_64SC2
Field Value
CV_64SC3
predefined type constants
public static readonly MatType CV_64SC3
Field Value
CV_64SC4
predefined type constants
public static readonly MatType CV_64SC4
Field Value
CV_64U
type depth constants
public const int CV_64U = 10
Field Value
CV_64UC1
predefined type constants
public static readonly MatType CV_64UC1
Field Value
CV_64UC2
predefined type constants
public static readonly MatType CV_64UC2
Field Value
CV_64UC3
predefined type constants
public static readonly MatType CV_64UC3
Field Value
CV_64UC4
predefined type constants
public static readonly MatType CV_64UC4
Field Value
CV_8S
type depth constants
public const int CV_8S = 1
Field Value
CV_8SC1
predefined type constants
public static readonly MatType CV_8SC1
Field Value
CV_8SC2
predefined type constants
public static readonly MatType CV_8SC2
Field Value
CV_8SC3
predefined type constants
public static readonly MatType CV_8SC3
Field Value
CV_8SC4
predefined type constants
public static readonly MatType CV_8SC4
Field Value
CV_8U
type depth constants
public const int CV_8U = 0
Field Value
CV_8UC1
predefined type constants
public static readonly MatType CV_8UC1
Field Value
CV_8UC2
predefined type constants
public static readonly MatType CV_8UC2
Field Value
CV_8UC3
predefined type constants
public static readonly MatType CV_8UC3
Field Value
CV_8UC4
predefined type constants
public static readonly MatType CV_8UC4
Field Value
CV_Bool
type depth constants
public const int CV_Bool = 9
Field Value
CV_BoolC1
predefined type constants
public static readonly MatType CV_BoolC1
Field Value
CV_BoolC2
predefined type constants
public static readonly MatType CV_BoolC2
Field Value
CV_BoolC3
predefined type constants
public static readonly MatType CV_BoolC3
Field Value
CV_BoolC4
predefined type constants
public static readonly MatType CV_BoolC4
Field Value
CV_USRTYPE1
type depth constants
public const int CV_USRTYPE1 = 7
Field Value
Properties
Channels
public int Channels { get; }
Property Value
Depth
public int Depth { get; }
Property Value
IsInteger
Returns true if the depth is an integer type. Mirrors OpenCV's CV_IS_INT_TYPE: integer depths are CV_8U, CV_8S, CV_16U, CV_16S, CV_32S, CV_Bool, CV_64U, CV_64S and CV_32U (the bitmask 0x1e1f), while CV_32F, CV_64F, CV_16F and CV_16BF are floating-point.
public bool IsInteger { get; }
Property Value
Value
Entity value
public int Value { get; }
Property Value
Methods
CV_16BFC(int)
public static MatType CV_16BFC(int ch)
Parameters
chint
Returns
CV_16FC(int)
public static MatType CV_16FC(int ch)
Parameters
chint
Returns
CV_16SC(int)
public static MatType CV_16SC(int ch)
Parameters
chint
Returns
CV_16UC(int)
public static MatType CV_16UC(int ch)
Parameters
chint
Returns
CV_32FC(int)
public static MatType CV_32FC(int ch)
Parameters
chint
Returns
CV_32SC(int)
public static MatType CV_32SC(int ch)
Parameters
chint
Returns
CV_32UC(int)
public static MatType CV_32UC(int ch)
Parameters
chint
Returns
CV_64FC(int)
public static MatType CV_64FC(int ch)
Parameters
chint
Returns
CV_64SC(int)
public static MatType CV_64SC(int ch)
Parameters
chint
Returns
CV_64UC(int)
public static MatType CV_64UC(int ch)
Parameters
chint
Returns
CV_8SC(int)
public static MatType CV_8SC(int ch)
Parameters
chint
Returns
CV_8UC(int)
public static MatType CV_8UC(int ch)
Parameters
chint
Returns
CV_BoolC(int)
public static MatType CV_BoolC(int ch)
Parameters
chint
Returns
Equals(int)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(int other)
Parameters
otherintAn object to compare with this object.
Returns
FromInt32(int)
public static MatType FromInt32(int value)
Parameters
valueint
Returns
MakeType(int, int)
public static MatType MakeType(int depth, int channels)
Parameters
Returns
ToInt32()
public int ToInt32()
Returns
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
operator ==(MatType, int)
public static bool operator ==(MatType self, int other)
Parameters
Returns
explicit operator int(MatType)
public static explicit operator int(MatType self)
Parameters
selfMatType
Returns
implicit operator MatType(int)
public static implicit operator MatType(int value)
Parameters
valueint
Returns
operator !=(MatType, int)
public static bool operator !=(MatType self, int other)