MatOfUShort Constructor (IEnumerableInt32, UInt16, IEnumerableInt64)
|
constructor for matrix headers pointing to user-allocated data
Namespace:
OpenCvSharp
Assembly:
OpenCvSharp (in OpenCvSharp.dll) Version: 3.4.1.20180605-33-CaRLSharp
Syntaxpublic MatOfUShort(
IEnumerable<int> sizes,
ushort[] data,
IEnumerable<long> steps = null
)
Public Sub New (
sizes As IEnumerable(Of Integer),
data As UShort(),
Optional steps As IEnumerable(Of Long) = Nothing
)
public:
MatOfUShort(
IEnumerable<int>^ sizes,
array<unsigned short>^ data,
IEnumerable<long long>^ steps = nullptr
)
new :
sizes : IEnumerable<int> *
data : uint16[] *
?steps : IEnumerable<int64>
(* Defaults:
let _steps = defaultArg steps null
*)
-> MatOfUShort
OpenCvSharp.MatOfUShort = function(sizes, data, steps);
Parameters
- sizes
- Type: System.Collections.GenericIEnumerableInt32
Array of integers specifying an n-dimensional array shape. - data
- Type: SystemUInt16
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. - 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