Table of Contents

Class GpuMat<TDepth>

Namespace
Emgu.CV.Cuda
Assembly
Emgu.CV.dll

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 IInputArray

The CvArry to be converted to GpuMat

GpuMat(Size, int)

Create a GpuMat of the specified size

public GpuMat(Size size, int channels)

Parameters

size Size

The size of the GpuMat

channels int

The number of channels

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 int

The number of rows (height)

cols int

The number of columns (width)

channels int

The number of channels

continuous bool

Indicates 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 Rectangle

Zero-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