Smart pointer for GPU memory with reference counting. Its interface is mostly similar with cv::Mat.
Inheritance Hierarchy
OpenCvSharpDisposableObject
OpenCvSharpDisposableCvObject
OpenCvSharp.CPlusPlus.GpuGpuMat
Namespace: OpenCvSharp.CPlusPlus.Gpu
Assembly: OpenCvSharp.CPlusPlus (in OpenCvSharp.CPlusPlus.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
The GpuMat type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| GpuMat |
Creates empty GpuMat
| |
| GpuMat(IntPtr) |
Creates from native cv::gpu::GpuMat* pointer
| |
| GpuMat(GpuMat) |
creates a matrix for other matrix
| |
| GpuMat(Mat) |
creates a matrix for other matrix
| |
| GpuMat(GpuMat, Rect) |
creates a matrix header for a part of the bigger matrix
| |
| GpuMat(Size, MatType) |
constructs 2D matrix of the specified size and type
| |
| GpuMat(Int32, Int32, MatType) |
constructs 2D matrix of the specified size and type
| |
| GpuMat(GpuMat, Range, Range) |
creates a matrix header for a part of the bigger matrix
| |
| GpuMat(Size, MatType, Scalar) |
constucts 2D matrix and fills it with the specified Scalar value.
| |
| GpuMat(Int32, Int32, MatType, Scalar) |
constucts 2D matrix and fills it with the specified Scalar value.
| |
| GpuMat(Size, MatType, IntPtr, Int64) |
constructor for matrix headers pointing to user-allocated data
| |
| GpuMat(Int32, Int32, MatType, IntPtr, Int64) |
constructor for matrix headers pointing to user-allocated data
|
Properties
| Name | Description | |
|---|---|---|
| AllocatedMemory |
Gets or sets a memory address allocated by AllocMemory.
(Inherited from DisposableObject.) | |
| AllocatedMemorySize |
Gets or sets the byte length of the allocated memory
(Inherited from DisposableObject.) | |
| Bpp | ||
| Col |
Indexer to access GpuMat column
| |
| Cols |
the number of columns
| |
| CvPtr |
Native pointer of OpenCV structure
(Inherited from DisposableCvObject.) | |
| Data |
pointer to the data
| |
| DataEnd |
helper fields used in locateROI and adjustROI
| |
| DataStart |
helper fields used in locateROI and adjustROI
| |
| Flags |
includes several bit-fields:
1.the magic signature
2.continuity flag
3.depth
4.number of channels
| |
| Height |
the number of rows
| |
| IsDisposed |
Gets a value indicating whether this instance has been disposed.
(Inherited from DisposableObject.) | |
| IsEnabledDispose |
Gets or sets a value indicating whether you permit disposing this instance.
(Inherited from DisposableObject.) | |
| ItemRect | ||
| ItemRange, Range | ||
| ItemInt32, Int32, Int32, Int32 |
Extracts a rectangular submatrix.
| |
| RefCount |
pointer to the reference counter;
when matrix points to user-allocated data, the pointer is NULL
| |
| Row |
Indexer to access GpuMat row
| |
| Rows |
the number of rows
| |
| Width |
the number of columns
|
Methods
| Name | Description | |
|---|---|---|
| AdjustROI |
moves/resizes the current matrix ROI inside the parent matrix.
| |
| AllocGCHandle |
Pins the object to be allocated by cvSetData.
(Inherited from DisposableObject.) | |
| AllocMemory |
Allocates the specified size of memory.
(Inherited from DisposableObject.) | |
| AssignTo(GpuMat) | ||
| AssignTo(GpuMat, MatType) | ||
| AtT |
Returns a value to the specified array element.
| |
| Channels |
Returns the number of matrix channels.
| |
| Clone |
returns deep copy of the matrix, i.e. the data is copied
| |
| ColRange(Range) |
returns a new matrix header for the specified column span
| |
| ColRange(Int32, Int32) |
returns a new matrix header for the specified column span
| |
| ConvertTo |
converts matrix to another datatype with optional scalng. See cvConvertScale.
| |
| CopyTo(GpuMat) |
copies those matrix elements to "m"
| |
| CopyTo(GpuMat, GpuMat) |
copies those matrix elements to "m" that are marked with non-zero mask elements.
| |
| Create(Size, MatType) |
allocates new matrix data unless the matrix already has specified size and type.
previous data is unreferenced if needed.
| |
| Create(Int32, Int32, MatType) |
allocates new matrix data unless the matrix already has specified size and type.
previous data is unreferenced if needed.
| |
| Depth |
Returns the depth of a matrix element.
| |
| Dispose |
Releases the resources
(Inherited from DisposableObject.) | |
| Dispose(Boolean) |
Clean up any resources being used.
(Overrides DisposableCvObjectDispose(Boolean).) | |
| Download |
Downloads data from device to host memory. Blocking calls.
| |
| ElemSize |
Returns the matrix element size in bytes.
| |
| ElemSize1 |
Returns the size of each matrix element channel in bytes.
| |
| Empty |
returns true if GpuMatrix data is NULL
| |
| Equals | (Inherited from Object.) | |
| Finalize |
Destructor
(Inherited from DisposableObject.) | |
| GetT |
Returns a value to the specified array element.
| |
| GetGenericIndexerT |
Gets a type-specific indexer. The indexer has getters/setters to access each matrix element.
| |
| GetHashCode | (Inherited from Object.) | |
| GetType | (Inherited from Object.) | |
| IsContinuous |
returns true iff the GpuMatrix data is continuous
(i.e. when there are no gaps between successive rows).
similar to CV_IS_GpuMat_CONT(cvGpuMat->type)
| |
| LocateROI |
locates matrix header within a parent matrix.
| |
| MemberwiseClone | (Inherited from Object.) | |
| NotifyMemoryPressure |
Notifies the allocated size of memory.
(Inherited from DisposableObject.) | |
| Ptr |
returns pointer to y-th row
| |
| Release |
Clean up any resources being used.
| |
| Reshape |
creates alternative matrix header for the same data, with different
number of channels and/or different number of rows. see cvReshape.
| |
| RowRange(Range) |
returns a new matrix header for the specified row span
| |
| RowRange(Int32, Int32) |
returns a new matrix header for the specified row span
| |
| SetT |
Set a value to the specified array element.
| |
| SetTo |
sets some of the matrix elements to s, according to the mask
| |
| Size |
Returns a matrix size.
| |
| Step |
a distance between successive rows in bytes; includes the gap if any
| |
| Step1 |
Returns a normalized step.
| |
| Swap |
swaps with other smart pointer
| |
| ThrowIfDisposed |
If this object is disposed, then ObjectDisposedException is thrown.
(Inherited from DisposableObject.) | |
| ToString |
Returns a string that represents this Mat.
(Overrides ObjectToString.) | |
| Type |
Returns the type of a matrix element.
| |
| Upload |
Pefroms blocking upload data to GpuMat.
|
Operators
| Name | Description | |
|---|---|---|
| (Mat to GpuMat) |
converts header to GpuMat
| |
| (GpuMat to Mat) |
converts header to Mat
|
Fields
| Name | Description | |
|---|---|---|
| dataHandle |
Gets or sets a handle which allocates using cvSetData.
(Inherited from DisposableObject.) | |
| ptr |
Data pointer
(Inherited from DisposableCvObject.) |
See Also