| Mat Constructor (IEnumerableInt32, MatType, Array, IEnumerableInt64) |
constructor for matrix headers pointing to user-allocated data
Namespace:
OpenCvSharp
Assembly:
OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax public Mat(
IEnumerable<int> sizes,
MatType type,
Array data,
IEnumerable<long> steps = null
)
Public Sub New (
sizes As IEnumerable(Of Integer),
type As MatType,
data As Array,
Optional steps As IEnumerable(Of Long) = Nothing
)
public:
Mat(
IEnumerable<int>^ sizes,
MatType type,
Array^ data,
IEnumerable<long long>^ steps = nullptr
)
new :
sizes : IEnumerable<int> *
type : MatType *
data : Array *
?steps : IEnumerable<int64>
(* Defaults:
let _steps = defaultArg steps null
*)
-> Mat
Parameters
- sizes
- Type: System.Collections.GenericIEnumerableInt32
Array of integers specifying an n-dimensional array shape. - 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: SystemArray
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 de-allocated, so you should take care of it. - steps (Optional)
- Type: System.Collections.GenericIEnumerableInt64
Array of ndims-1 steps in case of a multi-dimensional array (the last step is always set to the element size).
If not specified, the matrix is assumed to be continuous.
See Also