create method

void create(
  1. List<int> sizes,
  2. MatType type, {
  3. UMatUsageFlags flags = UMatUsageFlags.USAGE_DEFAULT,
})

allocates new matrix data unless the matrix already has specified size and type.

https://docs.opencv.org/4.x/d7/d45/classcv_1_1UMat.html#afe3063b40dd6c5d8a0054759c1142631

Implementation

void create(List<int> sizes, MatType type, {UMatUsageFlags flags = UMatUsageFlags.USAGE_DEFAULT}) {
  final cSizes = calloc<ffi.Int>(sizes.length);
  cSizes.cast<ffi.Int32>().asTypedList(sizes.length).setAll(0, sizes);
  cvRun(() => ccore.cv_UMat_createFunc_2(ref, sizes.length, cSizes, type.value, flags.value, ffi.nullptr));
  calloc.free(cSizes);
}