GpuMat Constructor (Size, MatType, IntPtr, Int64)
|
constructor for matrix headers pointing to user-allocated data
Namespace:
OpenCvSharp.Cuda
Assembly:
OpenCvSharp (in OpenCvSharp.dll) Version: 3.4.1.20180605-33-CaRLSharp
Syntaxpublic GpuMat(
Size size,
MatType type,
IntPtr data,
long step = 0
)
Public Sub New (
size As Size,
type As MatType,
data As IntPtr,
Optional step As Long = 0
)
public:
GpuMat(
Size size,
MatType type,
IntPtr data,
long long step = 0
)
new :
size : Size *
type : MatType *
data : IntPtr *
?step : int64
(* Defaults:
let _step = defaultArg step 0
*)
-> GpuMat
OpenCvSharp.Cuda.GpuMat = function(size, type, data, step);
Parameters
- size
- Type: OpenCvSharpSize
2D array size: Size(cols, rows) - type
- Type: OpenCvSharpMatType
Array type. Use MatType.CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices,
or MatType. CV_8UC(n), ..., CV_64FC(n) to create multi-channel matrices. - data
- Type: SystemIntPtr
Pointer to the user data. Matrix constructors that take data and step parameters do not allocate matrix data.
Instead, they just initialize the matrix header that points to the specified data, which means that no data is copied.
This operation is very efficient and can be used to process external data using OpenCV functions.
The external data is not automatically deallocated, so you should take care of it. - step (Optional)
- Type: SystemInt64
Number of bytes each matrix row occupies. The value should include the padding bytes at the end of each row, if any.
If the parameter is missing (set to AUTO_STEP ), no padding is assumed and the actual step is calculated as cols*elemSize() .
See Also