Class GpuMat<TDepth>
Similar to CvArray but use GPU for processing
public class GpuMat<TDepth> : GpuMat, IEquatable<GpuMat>, IInputOutputArray, IInputArrayOfArrays, IOutputArrayOfArrays, IOutputArray, IInputArray, IDisposable where TDepth : new()
Type Parameters
TDepth
The type of element in the matrix
- Inheritance
-
GpuMat<TDepth>
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
GpuMat()
Create an empty GpuMat
public GpuMat()
GpuMat(IInputArray)
Create a GpuMat from an CvArray of the same depth type
public GpuMat(IInputArray arr)
Parameters
arr
IInputArrayThe CvArry to be converted to GpuMat
GpuMat(Size, int)
Create a GpuMat of the specified size
public GpuMat(Size size, int channels)
Parameters
GpuMat(int, int, int, bool)
Create a GpuMat of the specified size
public GpuMat(int rows, int cols, int channels, bool continuous = false)
Parameters
rows
intThe number of rows (height)
cols
intThe number of columns (width)
channels
intThe number of channels
continuous
boolIndicates if the data should be continuous
Methods
GetSubRect(Rectangle)
Returns a GpuMat corresponding to a specified rectangle of the current GpuMat. The data is shared with the current matrix. In other words, it allows the user to treat a rectangular part of input array as a stand-alone array.
public GpuMat<TDepth> GetSubRect(Rectangle region)
Parameters
region
RectangleZero-based coordinates of the rectangle of interest.
Returns
- GpuMat<TDepth>
A GpuMat that represent the region of the current matrix.
Remarks
The parent GpuMat should never be released before the returned GpuMat the represent the subregion
ToMatrix()
Convert this GpuMat to a Matrix
public Matrix<TDepth> ToMatrix()
Returns
- Matrix<TDepth>
The matrix that contains the same values as this GpuMat