Click or drag to resize
MatrixTDepth Class
http://www.emgu.com
A Matrix is a wrapper to cvMat of OpenCV.
Inheritance Hierarchy
SystemObject
  Emgu.UtilDisposableObject
    Emgu.UtilUnmanagedObject
      Emgu.CVCvArrayTDepth
        Emgu.CVMatrixTDepth
          Emgu.CVConvolutionKernelF
          Emgu.CVRotationVector3D

Namespace: Emgu.CV
Assembly: Emgu.CV.World (in Emgu.CV.World.dll) Version: 3.2.0.2682 (3.2.0.2682)
Syntax
[SerializableAttribute]
public class Matrix<TDepth> : CvArray<TDepth>, 
	ICloneable, IEquatable<Matrix<TDepth>>
where TDepth : new()

Type Parameters

TDepth
Depth of this matrix (either Byte, SByte, Single, double, UInt16, Int16 or Int32)

The MatrixTDepth type exposes the following members.

Constructors
  NameDescription
Protected methodMatrixTDepth
The default constructor which allows Data to be set later on
Public methodMatrixTDepth(Size)
Create a matrix of the specific size
Public methodMatrixTDepth(TDepth)
Create a matrix using the specific data.
Public methodMatrixTDepth(TDepth)
Create a matrix using the specific data
Public methodMatrixTDepth(Int32, Int32)
Create a matrix of the specific size
Public methodMatrixTDepth(SerializationInfo, StreamingContext)
Constructor used to deserialize runtime serialized object
Public methodMatrixTDepth(Int32, Int32, Int32)
Create a matrix of the specific size and channels
Public methodMatrixTDepth(Int32, Int32, IntPtr)
Create a Matrix (only header is allocated) using the Pinned/Unmanaged data. The data is not freed by the disposed function of this class
Public methodMatrixTDepth(Int32, Int32, IntPtr, Int32)
Create a Matrix (only header is allocated) using the Pinned/Unmanaged data. The data is not freed by the disposed function of this class
Public methodMatrixTDepth(Int32, Int32, Int32, IntPtr, Int32)
Create a Matrix (only header is allocated) using the Pinned/Unmanaged data. The data is not freed by the disposed function of this class
Top
Properties
  NameDescription
Public propertyBytes
Get or Set an Array of bytes that represent the data in this array
(Inherited from CvArrayTDepth.)
Public propertyCols
The number of cols for this array
(Inherited from CvArrayTDepth.)
Public propertyData
Get or Set the data for this matrix
Public propertyDet
Returns determinant of the square matrix
Public propertyHeight
Get the height (#Rows) of the cvArray. If ROI is set, the height of the ROI
(Inherited from CvArrayTDepth.)
Public propertyItem
Get or Set the value in the specific row and col
Public propertyManagedArray
Get the underneath managed array
(Overrides CvArrayTDepthManagedArray.)
Public propertyMat
Get the Mat header that represent this CvArr
(Inherited from CvArrayTDepth.)
Public propertyMCvMat
The MCvMat structure format
Public propertyNorm
The norm of this Array
(Inherited from CvArrayTDepth.)
Public propertyNumberOfChannels
Get the number of channels for this matrix
(Overrides CvArrayTDepthNumberOfChannels.)
Public propertyPtr
The pointer to the internal structure
(Inherited from CvArrayTDepth.)
Public propertyRows
The number of rows for this array
(Inherited from CvArrayTDepth.)
Public propertySerializationCompressionRatio
Get or set the Compression Ratio for serialization. A number between 0 - 9. 0 means no compression at all, while 9 means best compression
(Inherited from CvArrayTDepth.)
Public propertySize
Get the size of the array
(Overrides CvArrayTDepthSize.)
Public propertySum
Return the sum of the elements in this matrix
Public propertyTrace
Sum of diagonal elements of the matrix
(Inherited from CvArrayTDepth.)
Public propertyWidth
Get the width (#Cols) of the cvArray. If ROI is set, the width of the ROI
(Inherited from CvArrayTDepth.)
Top
Methods
  NameDescription
Public method_And
Inplace And operation with otherArray
(Inherited from CvArrayTDepth.)
Public method_Max(Double)
Inplace compute the elementwise maximum value with value
(Inherited from CvArrayTDepth.)
Public method_Max(CvArrayTDepth)
Inplace elementwise maximize the current Array with other
(Inherited from CvArrayTDepth.)
Public method_Min(Double)
Inplace compute the elementwise minimum value
(Inherited from CvArrayTDepth.)
Public method_Min(CvArrayTDepth)
Inplace elementwise minimize the current Array with other
(Inherited from CvArrayTDepth.)
Public method_Mul(Double)
Inplace multiply elements of the Array by scale
(Inherited from CvArrayTDepth.)
Public method_Mul(CvArrayTDepth)
Inplace elementwise multiply the current Array with src2
(Inherited from CvArrayTDepth.)
Public method_Not
Inplace compute the complement for all array elements
(Inherited from CvArrayTDepth.)
Public method_Or
Inplace Or operation with otherArray
(Inherited from CvArrayTDepth.)
Public methodAdd(TDepth)
Elementwise add a color val to the current matrix
Public methodAdd(MatrixTDepth)
Elementwise add another matrix with the current matrix
Protected methodAllocateData
Allocate data for the array
(Overrides CvArrayTDepthAllocateData(Int32, Int32, Int32).)
Public methodCheckRange
Check that every array element is neither NaN nor +- inf. The functions also check that each value is between min and max. in the case of multi-channel arrays each channel is processed independently. If some values are out of range, position of the first outlier is stored in pos, and then the functions return false.
(Inherited from CvArrayTDepth.)
Public methodClone
Make a copy of this matrix
Public methodCmp
This function compare the current matrix with mat2 and returns the comparison mask
Public methodConcateHorizontal
Concate the current matrix with another matrix horizontally. If this matrix is n x m1 and otherMatrix is n x m2, the resulting matrix is n x (m1 + m2).
Public methodConcateVertical
Concate the current matrix with another matrix vertically. If this matrix is n1 x m and otherMatrix is n2 x m, the resulting matrix is (n1+n2) x m.
Public methodConvertTOtherDepth
Convert this matrix to different depth
Public methodCopyBlank
Return a matrix of the same size with all elements equals 0
Public methodCopyTo
Copy the current array to destination
(Inherited from CvArrayTDepth.)
Protected methodDeserializeObjectData
A function used for runtime deserailization of the object
(Inherited from CvArrayTDepth.)
Public methodDispose
The dispose function that implements IDisposable interface
(Inherited from DisposableObject.)
Protected methodDisposeObject
Release the matrix and all the memory associate with it
(Overrides CvArrayTDepthDisposeObject.)
Public methodDotProduct
Calculates and returns the Euclidean dot product of two arrays. src1 dot src2 = sumI(src1(I)*src2(I))
(Inherited from CvArrayTDepth.)
Public methodEquals(Object) (Inherited from Object.)
Public methodEquals(MatrixTDepth)
Return true if every element of this matrix equals elements in mat2
Protected methodFinalize
Destructor
(Inherited from DisposableObject.)
Public methodGetCol
Get the specific column of the matrix
Public methodGetCols
Get the Matrix, corresponding to a specified column span of the input array
Public methodGetDiag
Return the main diagonal element of this matrix
Public methodGetDiag(Int32)
Return the specific diagonal elements of this matrix
Public methodGetHashCode (Inherited from Object.)
Public methodGetInputArray
The unmanaged pointer to the input array.
(Inherited from CvArrayTDepth.)
Public methodGetInputOutputArray
The unmanaged pointer to the input output array.
(Inherited from CvArrayTDepth.)
Public methodGetObjectData
A function used for runtime serialization of the object
(Inherited from CvArrayTDepth.)
Public methodGetOutputArray
The unmanaged pointer to the output array.
(Inherited from CvArrayTDepth.)
Public methodGetRow
Get the specific row of the matrix
Public methodGetRows
Return the matrix corresponding to a specified row span of the input array
Public methodGetSchema
Get the xml schema
(Inherited from CvArrayTDepth.)
Public methodGetSubRect
Get a submatrix corresponding to a specified rectangle
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodMinMax
Returns the min / max locations and values for the matrix
Public methodMul(Double)
Multiply the current matrix with scale
Public methodMul(MatrixTDepth)
Multiply the current matrix with mat2
Public methodReadXml
Function to call when deserializing this object from XML
(Inherited from CvArrayTDepth.)
Public methodReduceTOtherDepth
Reduces matrix to a vector by treating the matrix rows/columns as a set of 1D vectors and performing the specified operation on the vectors until a single row/column is obtained.
(Inherited from CvArrayTDepth.)
Protected methodReleaseManagedResources
Release the managed resources. This function will be called during the disposal of the current object. override ride this function if you need to call the Dispose() function on any managed IDisposable object created by the current object
(Inherited from DisposableObject.)
Public methodRemoveCols
Return the matrix without a specified column span of the input array
Public methodRemoveRows
Return the matrix without a specified row span of the input array
Public methodReshape
Get reshaped matrix which also share the same data with the current matrix
Public methodSave
Save the CvArray as image
(Inherited from CvArrayTDepth.)
Public methodSetIdentity
Initialize the identity matrix
(Inherited from CvArrayTDepth.)
Public methodSetIdentity(MCvScalar)
Initializes scaled identity matrix
(Inherited from CvArrayTDepth.)
Public methodSetRandNormal
Inplace fills Array with normally distributed random numbers
(Inherited from CvArrayTDepth.)
Public methodSetRandUniform
Inplace fills Array with uniformly distributed random numbers
(Inherited from CvArrayTDepth.)
Public methodSetValue(Double, CvArrayByte)
Set the element of the Array to value, using the specific mask
(Inherited from CvArrayTDepth.)
Public methodSetValue(MCvScalar, CvArrayByte)
Set the element of the Array to value, using the specific mask
(Inherited from CvArrayTDepth.)
Public methodSetZero
Set the values to zero
(Inherited from CvArrayTDepth.)
Public methodSplit
Get all channels for the multi channel matrix
Public methodSub(TDepth)
Elementwise subtract a color val to the current matrix
Public methodSub(MatrixTDepth)
Elementwise subtract another matrix from the current matrix
Public methodSubR
result = val - this
Public methodToString (Inherited from Object.)
Public methodToUMat
Get the umat representation of this mat
(Inherited from CvArrayTDepth.)
Public methodTranspose
Returns the transpose of this matrix
Public methodWriteXml
Function to call when serializing this object to XML
(Inherited from CvArrayTDepth.)
Top
Operators
  NameDescription
Public operatorStatic memberAddition(Double, MatrixTDepth)
val + mat1
Public operatorStatic memberAddition(MatrixTDepth, MatrixTDepth)
Elementwise add mat1 with mat2
Public operatorStatic memberAddition(MatrixTDepth, Double)
Elementwise add mat1 with val
Public operatorStatic memberDivision
mat1 / val
Public operatorStatic memberMultiply(Double, MatrixTDepth)
val * mat1
Public operatorStatic memberMultiply(MatrixTDepth, MatrixTDepth)
mat1 * mat2
Public operatorStatic memberMultiply(MatrixTDepth, Double)
mat1 * val
Public operatorStatic memberSubtraction(Double, MatrixTDepth)
val - mat1
Public operatorStatic memberSubtraction(MatrixTDepth, MatrixTDepth)
mat1 - mat2
Public operatorStatic memberSubtraction(MatrixTDepth, Double)
mat1 - val
Top
Fields
See Also