Class Mat
Represents a multi-channel matrix.
Inherited Members
Namespace: OpenCV.Net
Assembly: OpenCV.Net.dll
Syntax
public class Mat : Arr
Constructors
| Improve this Doc View SourceMat(Size, Depth, Int32)
Initializes a new instance of the Mat class with the specified
size, element bit depth and
channels per element.
Declaration
public Mat(Size size, Depth depth, int channels)
Parameters
| Type | Name | Description |
|---|---|---|
| Size | size | The pixel-accurate size of the Mat. |
| Depth | depth | The bit depth of matrix elements. |
| Int32 | channels | The number of channels per element. |
Mat(Size, Depth, Int32, IntPtr, Int32)
Initializes a new instance of the Mat class with the specified
size, element bit depth and
channels per element. A pointer to the matrix raw
data is provided as well as the optional full row length
step size in bytes.
Declaration
public Mat(Size size, Depth depth, int channels, IntPtr data, int step = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Size | size | The pixel-accurate size of the Mat. |
| Depth | depth | The bit depth of matrix elements. |
| Int32 | channels | The number of channels per matrix element. |
| IntPtr | data | A pointer to the matrix raw element data. |
| Int32 | step | The full row length in bytes. |
Mat(Int32, Int32, Depth, Int32)
Initializes a new instance of the Mat class with the specified
number of rows and cols, element bit
depth and channels per element.
Declaration
public Mat(int rows, int cols, Depth depth, int channels)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | rows | The number of rows in the matrix. |
| Int32 | cols | The number of columns in the matrix. |
| Depth | depth | The bit depth of matrix elements. |
| Int32 | channels | The number of channels per element. |
Mat(Int32, Int32, Depth, Int32, IntPtr, Int32)
Initializes a new instance of the Mat class with the specified
number of rows and cols, element bit
depth and channels per element.
A pointer to the matrix raw data is provided as well
as the optional full row length step size in bytes.
Declaration
public Mat(int rows, int cols, Depth depth, int channels, IntPtr data, int step = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | rows | The number of rows in the matrix. |
| Int32 | cols | The number of columns in the matrix. |
| Depth | depth | The bit depth of matrix elements. |
| Int32 | channels | The number of channels per matrix element. |
| IntPtr | data | A pointer to the matrix raw element data. |
| Int32 | step | The full row length in bytes. |
Fields
| Improve this Doc View SourceAutoStep
A constant passed to the Mat constructor which specifies that no padding exists between subsequent rows of the matrix.
Declaration
public const int AutoStep = null
Field Value
| Type | Description |
|---|---|
| Int32 |
Properties
| Improve this Doc View SourceChannels
Gets the number of channels per matrix element.
Declaration
public int Channels { get; }
Property Value
| Type | Description |
|---|---|
| Int32 |
Cols
Gets the number of columns in the matrix.
Declaration
public int Cols { get; }
Property Value
| Type | Description |
|---|---|
| Int32 |
Data
Gets a pointer to the aligned matrix data.
Declaration
public IntPtr Data { get; }
Property Value
| Type | Description |
|---|---|
| IntPtr |
Depth
Gets the bit depth of matrix elements.
Declaration
public Depth Depth { get; }
Property Value
| Type | Description |
|---|---|
| Depth |
ElementSize
Gets the size of each matrix element in bytes.
Declaration
public int ElementSize { get; }
Property Value
| Type | Description |
|---|---|
| Int32 |
Rows
Gets the number of rows in the matrix.
Declaration
public int Rows { get; }
Property Value
| Type | Description |
|---|---|
| Int32 |
Step
Gets the full row length in bytes.
Declaration
public int Step { get; }
Property Value
| Type | Description |
|---|---|
| Int32 |
Methods
| Improve this Doc View SourceClone()
Creates a new Mat that is a copy of the current instance.
Declaration
public Mat Clone()
Returns
| Type | Description |
|---|---|
| Mat |
CreateMatHeader(Byte[])
Initializes a new instance of the Mat class that is a wrapper header for
the specified data. The reference to data will be
pinned in the garbage collector until the matrix header is released.
Declaration
public static Mat CreateMatHeader(byte[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| Byte[] | data | The array to be wrapped. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance that is a wrapper header around |
CreateMatHeader(Byte[,])
Initializes a new instance of the Mat class that is a wrapper header for
the specified data. The reference to data will be
pinned in the garbage collector until the matrix header is released.
Declaration
public static Mat CreateMatHeader(byte[, ] data)
Parameters
| Type | Name | Description |
|---|---|---|
| Byte[,] | data | The array to be wrapped. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance that is a wrapper header around |
CreateMatHeader(Double[])
Initializes a new instance of the Mat class that is a wrapper header for
the specified data. The reference to data will be
pinned in the garbage collector until the matrix header is released.
Declaration
public static Mat CreateMatHeader(double[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| Double[] | data | The array to be wrapped. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance that is a wrapper header around |
CreateMatHeader(Double[,])
Initializes a new instance of the Mat class that is a wrapper header for
the specified data. The reference to data will be
pinned in the garbage collector until the matrix header is released.
Declaration
public static Mat CreateMatHeader(double[, ] data)
Parameters
| Type | Name | Description |
|---|---|---|
| Double[,] | data | The array to be wrapped. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance that is a wrapper header around |
CreateMatHeader(Int16[])
Initializes a new instance of the Mat class that is a wrapper header for
the specified data. The reference to data will be
pinned in the garbage collector until the matrix header is released.
Declaration
public static Mat CreateMatHeader(short[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| Int16[] | data | The array to be wrapped. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance that is a wrapper header around |
CreateMatHeader(Int16[,])
Initializes a new instance of the Mat class that is a wrapper header for
the specified data. The reference to data will be
pinned in the garbage collector until the matrix header is released.
Declaration
public static Mat CreateMatHeader(short[, ] data)
Parameters
| Type | Name | Description |
|---|---|---|
| Int16[,] | data | The array to be wrapped. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance that is a wrapper header around |
CreateMatHeader(Int32[])
Initializes a new instance of the Mat class that is a wrapper header for
the specified data. The reference to data will be
pinned in the garbage collector until the matrix header is released.
Declaration
public static Mat CreateMatHeader(int[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32[] | data | The array to be wrapped. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance that is a wrapper header around |
CreateMatHeader(Int32[,])
Initializes a new instance of the Mat class that is a wrapper header for
the specified data. The reference to data will be
pinned in the garbage collector until the matrix header is released.
Declaration
public static Mat CreateMatHeader(int[, ] data)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32[,] | data | The array to be wrapped. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance that is a wrapper header around |
CreateMatHeader(Single[])
Initializes a new instance of the Mat class that is a wrapper header for
the specified data. The reference to data will be
pinned in the garbage collector until the matrix header is released.
Declaration
public static Mat CreateMatHeader(float[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| Single[] | data | The array to be wrapped. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance that is a wrapper header around |
CreateMatHeader(Single[,])
Initializes a new instance of the Mat class that is a wrapper header for
the specified data. The reference to data will be
pinned in the garbage collector until the matrix header is released.
Declaration
public static Mat CreateMatHeader(float[, ] data)
Parameters
| Type | Name | Description |
|---|---|---|
| Single[,] | data | The array to be wrapped. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance that is a wrapper header around |
CreateMatHeader(UInt16[])
Initializes a new instance of the Mat class that is a wrapper header for
the specified data. The reference to data will be
pinned in the garbage collector until the matrix header is released.
Declaration
public static Mat CreateMatHeader(ushort[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| UInt16[] | data | The array to be wrapped. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance that is a wrapper header around |
CreateMatHeader(UInt16[,])
Initializes a new instance of the Mat class that is a wrapper header for
the specified data. The reference to data will be
pinned in the garbage collector until the matrix header is released.
Declaration
public static Mat CreateMatHeader(ushort[, ] data)
Parameters
| Type | Name | Description |
|---|---|---|
| UInt16[,] | data | The array to be wrapped. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance that is a wrapper header around |
CreateMatHeader<TData>(TData[], Int32, Int32, Depth, Int32)
Initializes a new instance of the Mat class that is a wrapper header around
data with the specified number of rows and
cols, element bit depth and channels
per element. The reference to data will be pinned in the garbage
collector until the matrix header is released.
Declaration
public static Mat CreateMatHeader<TData>(TData[] data, int rows, int cols, Depth depth, int channels)
where TData : struct
Parameters
| Type | Name | Description |
|---|---|---|
| TData[] | data | The array to be wrapped. |
| Int32 | rows | The number of rows in the matrix. |
| Int32 | cols | The number of columns in the matrix. |
| Depth | depth | The bit depth of matrix elements. |
| Int32 | channels | The number of channels per element. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance that is a wrapper header around |
Type Parameters
| Name | Description |
|---|---|
| TData | The type of elements in the data array. |
Eye(Size, Depth, Int32)
Initializes a new Mat with ones on the main diagonal and zeros elsewhere.
The matrix will have the specified size, element bit
depth and channels per element.
Declaration
public static Mat Eye(Size size, Depth depth, int channels)
Parameters
| Type | Name | Description |
|---|---|---|
| Size | size | The pixel-accurate size of the Mat. |
| Depth | depth | The bit depth of matrix elements. |
| Int32 | channels | The number of channels per matrix element. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance with ones on the main diagonal and zeros elsewhere. |
Eye(Int32, Int32, Depth, Int32)
Initializes a new Mat with ones on the main diagonal and zeros elsewhere.
The matrix will have the specified number of rows and cols,
element bit depth and channels per element.
Declaration
public static Mat Eye(int rows, int cols, Depth depth, int channels)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | rows | The number of rows in the matrix. |
| Int32 | cols | The number of columns in the matrix. |
| Depth | depth | The bit depth of matrix elements. |
| Int32 | channels | The number of channels per matrix element. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance with ones on the main diagonal and zeros elsewhere. |
FromArray(Byte[])
Initializes a new instance of the Mat class that is a copy of
the specified managed array data.
Declaration
public static Mat FromArray(byte[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| Byte[] | data | The array that is to be converted to a Mat. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance that is a copy of the |
FromArray(Byte[,])
Initializes a new instance of the Mat class that is a copy of
the specified managed array data.
Declaration
public static Mat FromArray(byte[, ] data)
Parameters
| Type | Name | Description |
|---|---|---|
| Byte[,] | data | The array that is to be converted to a Mat. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance that is a copy of the |
FromArray(Double[])
Initializes a new instance of the Mat class that is a copy of
the specified managed array data.
Declaration
public static Mat FromArray(double[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| Double[] | data | The array that is to be converted to a Mat. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance that is a copy of the |
FromArray(Double[,])
Initializes a new instance of the Mat class that is a copy of
the specified managed array data.
Declaration
public static Mat FromArray(double[, ] data)
Parameters
| Type | Name | Description |
|---|---|---|
| Double[,] | data | The array that is to be converted to a Mat. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance that is a copy of the |
FromArray(Int16[])
Initializes a new instance of the Mat class that is a copy of
the specified managed array data.
Declaration
public static Mat FromArray(short[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| Int16[] | data | The array that is to be converted to a Mat. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance that is a copy of the |
FromArray(Int16[,])
Initializes a new instance of the Mat class that is a copy of
the specified managed array data.
Declaration
public static Mat FromArray(short[, ] data)
Parameters
| Type | Name | Description |
|---|---|---|
| Int16[,] | data | The array that is to be converted to a Mat. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance that is a copy of the |
FromArray(Int32[])
Initializes a new instance of the Mat class that is a copy of
the specified managed array data.
Declaration
public static Mat FromArray(int[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32[] | data | The array that is to be converted to a Mat. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance that is a copy of the |
FromArray(Int32[,])
Initializes a new instance of the Mat class that is a copy of
the specified managed array data.
Declaration
public static Mat FromArray(int[, ] data)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32[,] | data | The array that is to be converted to a Mat. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance that is a copy of the |
FromArray(Single[])
Initializes a new instance of the Mat class that is a copy of
the specified managed array data.
Declaration
public static Mat FromArray(float[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| Single[] | data | The array that is to be converted to a Mat. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance that is a copy of the |
FromArray(Single[,])
Initializes a new instance of the Mat class that is a copy of
the specified managed array data.
Declaration
public static Mat FromArray(float[, ] data)
Parameters
| Type | Name | Description |
|---|---|---|
| Single[,] | data | The array that is to be converted to a Mat. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance that is a copy of the |
FromArray(UInt16[])
Initializes a new instance of the Mat class that is a copy of
the specified managed array data.
Declaration
public static Mat FromArray(ushort[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| UInt16[] | data | The array that is to be converted to a Mat. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance that is a copy of the |
FromArray(UInt16[,])
Initializes a new instance of the Mat class that is a copy of
the specified managed array data.
Declaration
public static Mat FromArray(ushort[, ] data)
Parameters
| Type | Name | Description |
|---|---|---|
| UInt16[,] | data | The array that is to be converted to a Mat. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance that is a copy of the |
FromArray<TData>(TData[], Int32, Int32, Depth, Int32)
Initializes a new instance of the Mat class that is a copy of the
data array with the specified number of rows and
cols, element bit depth and channels
per element.
Declaration
public static Mat FromArray<TData>(TData[] data, int rows, int cols, Depth depth, int channels)
where TData : struct
Parameters
| Type | Name | Description |
|---|---|---|
| TData[] | data | The array to be wrapped. |
| Int32 | rows | The number of rows in the matrix. |
| Int32 | cols | The number of columns in the matrix. |
| Depth | depth | The bit depth of matrix elements. |
| Int32 | channels | The number of channels per element. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance that is a copy of the |
Type Parameters
| Name | Description |
|---|---|
| TData | The type of elements in the data array. |
Ones(Size, Depth, Int32)
Initializes a new Mat with all elements set to one and
the specified size, element bit depth
and channels per element.
Declaration
public static Mat Ones(Size size, Depth depth, int channels)
Parameters
| Type | Name | Description |
|---|---|---|
| Size | size | The pixel-accurate size of the Mat. |
| Depth | depth | The bit depth of matrix elements. |
| Int32 | channels | The number of channels per matrix element. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance with all its elements set to one. |
Ones(Int32, Int32, Depth, Int32)
Initializes a new Mat with all elements set to one and
the specified number of rows and cols,
element bit depth and channels per element.
Declaration
public static Mat Ones(int rows, int cols, Depth depth, int channels)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | rows | The number of rows in the matrix. |
| Int32 | cols | The number of columns in the matrix. |
| Depth | depth | The bit depth of matrix elements. |
| Int32 | channels | The number of channels per matrix element. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance with all its elements set to one. |
ReleaseHandle()
Executes the code required to free the native Mat handle.
Declaration
protected override bool ReleaseHandle()
Returns
| Type | Description |
|---|---|
| Boolean | true if the handle is released successfully; otherwise, in the event of a catastrophic failure, false. |
ToString()
Creates a
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| String | A |
Zeros(Size, Depth, Int32)
Initializes a new Mat with all elements set to zero and
the specified size, element bit depth
and channels per element.
Declaration
public static Mat Zeros(Size size, Depth depth, int channels)
Parameters
| Type | Name | Description |
|---|---|---|
| Size | size | The pixel-accurate size of the Mat. |
| Depth | depth | The bit depth of matrix elements. |
| Int32 | channels | The number of channels per matrix element. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance with all its elements set to zero. |
Zeros(Int32, Int32, Depth, Int32)
Initializes a new Mat with all elements set to zero and
the specified number of rows and cols,
element bit depth and channels per element.
Declaration
public static Mat Zeros(int rows, int cols, Depth depth, int channels)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | rows | The number of rows in the matrix. |
| Int32 | cols | The number of columns in the matrix. |
| Depth | depth | The bit depth of matrix elements. |
| Int32 | channels | The number of channels per matrix element. |
Returns
| Type | Description |
|---|---|
| Mat | A new Mat instance with all its elements set to zero. |
Operators
| Improve this Doc View SourceAddition(Mat, Mat)
Calculates the per-element sum of two Mat values.
Declaration
public static Mat operator +(Mat left, Mat right)
Parameters
| Type | Name | Description |
|---|---|---|
| Mat | left | The first value to add. |
| Mat | right | The second value to add. |
Returns
| Type | Description |
|---|---|
| Mat | The result of adding |
Addition(Mat, Scalar)
Declaration
public static Mat operator +(Mat left, Scalar right)
Parameters
| Type | Name | Description |
|---|---|---|
| Mat | left | The matrix to add. |
| Scalar | right | The scalar to add. |
Returns
| Type | Description |
|---|---|
| Mat | The result of adding |
Addition(Mat, Double)
Calculates the per-element sum of a Mat and a
Declaration
public static Mat operator +(Mat left, double right)
Parameters
| Type | Name | Description |
|---|---|---|
| Mat | left | The matrix to add. |
| Double | right | The scalar value to add. |
Returns
| Type | Description |
|---|---|
| Mat | The result of adding |
Addition(Scalar, Mat)
Declaration
public static Mat operator +(Scalar left, Mat right)
Parameters
| Type | Name | Description |
|---|---|---|
| Scalar | left | The scalar to add. |
| Mat | right | The matrix to add. |
Returns
| Type | Description |
|---|---|
| Mat | The result of adding |
Addition(Double, Mat)
Calculates the per-element sum of a
Declaration
public static Mat operator +(double left, Mat right)
Parameters
| Type | Name | Description |
|---|---|---|
| Double | left | The scalar value to add. |
| Mat | right | The matrix to add. |
Returns
| Type | Description |
|---|---|
| Mat | The result of adding |
BitwiseAnd(Mat, Mat)
Performs per-element bit-wise conjunction of two Mat values.
Declaration
public static Mat operator &(Mat left, Mat right)
Parameters
| Type | Name | Description |
|---|---|---|
| Mat | left | The first matrix value. |
| Mat | right | The second matrix value. |
Returns
| Type | Description |
|---|---|
| Mat | The result of performing the bit-wise conjunction of |
BitwiseAnd(Mat, Scalar)
Declaration
public static Mat operator &(Mat left, Scalar right)
Parameters
| Type | Name | Description |
|---|---|---|
| Mat | left | The matrix value. |
| Scalar | right | The scalar value. |
Returns
| Type | Description |
|---|---|
| Mat | The result of performing the bit-wise conjunction of |
BitwiseAnd(Mat, Double)
Performs per-element bit-wise conjunction of a Mat and a
Declaration
public static Mat operator &(Mat left, double right)
Parameters
| Type | Name | Description |
|---|---|---|
| Mat | left | The matrix value. |
| Double | right | The scalar value. |
Returns
| Type | Description |
|---|---|
| Mat | The result of performing the bit-wise conjunction of |
BitwiseAnd(Scalar, Mat)
Declaration
public static Mat operator &(Scalar left, Mat right)
Parameters
| Type | Name | Description |
|---|---|---|
| Scalar | left | The scalar value. |
| Mat | right | The matrix value. |
Returns
| Type | Description |
|---|---|
| Mat | The result of performing the bit-wise conjunction of |
BitwiseAnd(Double, Mat)
Performs per-element bit-wise conjunction of a
Declaration
public static Mat operator &(double left, Mat right)
Parameters
| Type | Name | Description |
|---|---|---|
| Double | left | The scalar value. |
| Mat | right | The matrix value. |
Returns
| Type | Description |
|---|---|
| Mat | The result of performing the bit-wise conjunction of |
BitwiseOr(Mat, Mat)
Performs per-element bit-wise disjunction of two Mat values.
Declaration
public static Mat operator |(Mat left, Mat right)
Parameters
| Type | Name | Description |
|---|---|---|
| Mat | left | The first matrix value. |
| Mat | right | The second matrix value. |
Returns
| Type | Description |
|---|---|
| Mat | The result of performing the bit-wise disjunction of |
BitwiseOr(Mat, Scalar)
Declaration
public static Mat operator |(Mat left, Scalar right)
Parameters
| Type | Name | Description |
|---|---|---|
| Mat | left | The matrix value. |
| Scalar | right | The scalar value. |
Returns
| Type | Description |
|---|---|
| Mat | The result of performing the bit-wise disjunction of |
BitwiseOr(Mat, Double)
Performs per-element bit-wise disjunction of a Mat and a
Declaration
public static Mat operator |(Mat left, double right)
Parameters
| Type | Name | Description |
|---|---|---|
| Mat | left | The matrix value. |
| Double | right | The scalar value. |
Returns
| Type | Description |
|---|---|
| Mat | The result of performing the bit-wise disjunction of |
BitwiseOr(Scalar, Mat)
Declaration
public static Mat operator |(Scalar left, Mat right)
Parameters
| Type | Name | Description |
|---|---|---|
| Scalar | left | The scalar value. |
| Mat | right | The matrix value. |
Returns
| Type | Description |
|---|---|
| Mat | The result of performing the bit-wise disjunction of |
BitwiseOr(Double, Mat)
Performs per-element bit-wise disjunction of a
Declaration
public static Mat operator |(double left, Mat right)
Parameters
| Type | Name | Description |
|---|---|---|
| Double | left | The scalar value. |
| Mat | right | The matrix value. |
Returns
| Type | Description |
|---|---|
| Mat | The result of performing the bit-wise disjunction of |
Division(Mat, Mat)
Calculates the per-element division of two Mat values.
Declaration
public static Mat operator /(Mat left, Mat right)
Parameters
| Type | Name | Description |
|---|---|---|
| Mat | left | The dividend. |
| Mat | right | The divisor. |
Returns
| Type | Description |
|---|---|
| Mat | The result of dividing |
Division(Mat, Double)
Calculates the per-element division of a Mat by a
Declaration
public static Mat operator /(Mat left, double right)
Parameters
| Type | Name | Description |
|---|---|---|
| Mat | left | The matrix dividend. |
| Double | right | The scalar divisor. |
Returns
| Type | Description |
|---|---|
| Mat | The result of dividing |
Division(Double, Mat)
Calculates the per-element division of a
Declaration
public static Mat operator /(double left, Mat right)
Parameters
| Type | Name | Description |
|---|---|---|
| Double | left | The scalar dividend. |
| Mat | right | The matrix divisor. |
Returns
| Type | Description |
|---|---|
| Mat | The result of dividing |
ExclusiveOr(Mat, Mat)
Performs per-element bit-wise "exclusive or" operation on two Mat values.
Declaration
public static Mat operator ^(Mat left, Mat right)
Parameters
| Type | Name | Description |
|---|---|---|
| Mat | left | The first matrix value. |
| Mat | right | The second matrix value. |
Returns
| Type | Description |
|---|---|
| Mat | The result of performing the bit-wise "exclusive or" operation
of |
ExclusiveOr(Mat, Scalar)
Declaration
public static Mat operator ^(Mat left, Scalar right)
Parameters
| Type | Name | Description |
|---|---|---|
| Mat | left | The matrix value. |
| Scalar | right | The scalar value. |
Returns
| Type | Description |
|---|---|
| Mat | The result of performing the bit-wise "exclusive or" operation
of |
ExclusiveOr(Mat, Double)
Performs per-element bit-wise "exclusive or" operation of a
Mat and a
Declaration
public static Mat operator ^(Mat left, double right)
Parameters
| Type | Name | Description |
|---|---|---|
| Mat | left | The matrix value. |
| Double | right | The scalar value. |
Returns
| Type | Description |
|---|---|
| Mat | The result of performing the bit-wise "exclusive or" operation
of |
ExclusiveOr(Scalar, Mat)
Declaration
public static Mat operator ^(Scalar left, Mat right)
Parameters
| Type | Name | Description |
|---|---|---|
| Scalar | left | The scalar value. |
| Mat | right | The matrix value. |
Returns
| Type | Description |
|---|---|
| Mat | The result of performing the bit-wise "exclusive or" operation
of |
ExclusiveOr(Double, Mat)
Performs per-element bit-wise "exclusive or" operation of a
Declaration
public static Mat operator ^(double left, Mat right)
Parameters
| Type | Name | Description |
|---|---|---|
| Double | left | The scalar value. |
| Mat | right | The matrix value. |
Returns
| Type | Description |
|---|---|
| Mat | The result of performing the bit-wise "exclusive or" operation
of |
Explicit(Mat to IplImage)
Declaration
public static explicit operator IplImage(Mat mat)
Parameters
| Type | Name | Description |
|---|---|---|
| Mat | mat | The matrix to convert. |
Returns
| Type | Description |
|---|---|
| IplImage | A IplImage value of the same size and element type. |
Multiply(Mat, Mat)
Calculates the per-element product of two Mat values.
Declaration
public static Mat operator *(Mat left, Mat right)
Parameters
| Type | Name | Description |
|---|---|---|
| Mat | left | The first value to multiply. |
| Mat | right | The second value to multiply. |
Returns
| Type | Description |
|---|---|
| Mat | The result of multiplying |
Multiply(Mat, Double)
Calculates the per-element product of a Mat by a
Declaration
public static Mat operator *(Mat left, double right)
Parameters
| Type | Name | Description |
|---|---|---|
| Mat | left | The matrix to multiply. |
| Double | right | The scalar value to multiply. |
Returns
| Type | Description |
|---|---|
| Mat | The result of multiplying |
Multiply(Double, Mat)
Calculates the per-element product of a
Declaration
public static Mat operator *(double left, Mat right)
Parameters
| Type | Name | Description |
|---|---|---|
| Double | left | The scalar value to multiply. |
| Mat | right | The matrix to multiply. |
Returns
| Type | Description |
|---|---|
| Mat | The result of multiplying |
OnesComplement(Mat)
Performs per-element bit-wise inversion of the specified Mat value.
Declaration
public static Mat operator ~(Mat mat)
Parameters
| Type | Name | Description |
|---|---|---|
| Mat | mat | The matrix to invert. |
Returns
| Type | Description |
|---|---|
| Mat | The result of bitwise inverting |
Subtraction(Mat, Mat)
Calculates the per-element difference between two Mat values.
Declaration
public static Mat operator -(Mat left, Mat right)
Parameters
| Type | Name | Description |
|---|---|---|
| Mat | left | The minuend. |
| Mat | right | The subtrahend. |
Returns
| Type | Description |
|---|---|
| Mat | The result of subtracting |
Subtraction(Mat, Scalar)
Declaration
public static Mat operator -(Mat left, Scalar right)
Parameters
| Type | Name | Description |
|---|---|---|
| Mat | left | The matrix minuend. |
| Scalar | right | The scalar subtrahend. |
Returns
| Type | Description |
|---|---|
| Mat | The result of subtracting |
Subtraction(Mat, Double)
Calculates the per-element difference between a Mat and a
Declaration
public static Mat operator -(Mat left, double right)
Parameters
| Type | Name | Description |
|---|---|---|
| Mat | left | The matrix minuend. |
| Double | right | The scalar subtrahend. |
Returns
| Type | Description |
|---|---|
| Mat | The result of subtracting |
Subtraction(Scalar, Mat)
Declaration
public static Mat operator -(Scalar left, Mat right)
Parameters
| Type | Name | Description |
|---|---|---|
| Scalar | left | The scalar minuend. |
| Mat | right | The matrix subtrahend. |
Returns
| Type | Description |
|---|---|
| Mat | The result of subtracting |
Subtraction(Double, Mat)
Subtracts every element of the specified Mat value from a
Declaration
public static Mat operator -(double left, Mat right)
Parameters
| Type | Name | Description |
|---|---|---|
| Double | left | The scalar minuend. |
| Mat | right | The matrix subtrahend. |
Returns
| Type | Description |
|---|---|
| Mat | The result of subtracting |
UnaryNegation(Mat)
Negates the specified Mat value.
Declaration
public static Mat operator -(Mat mat)
Parameters
| Type | Name | Description |
|---|---|---|
| Mat | mat | The matrix to negate. |
Returns
| Type | Description |
|---|---|
| Mat | The result of |
UnaryPlus(Mat)
Returns the Mat value (the sign is unchanged).
Declaration
public static Mat operator +(Mat mat)
Parameters
| Type | Name | Description |
|---|---|---|
| Mat | mat | The matrix to return. |
Returns
| Type | Description |
|---|---|
| Mat | The matrix |