splitAsync function

Future<VecMat> splitAsync(
  1. InputArray m
)

Split creates an array of single channel images from a multi-channel image Created images should be closed manualy to avoid memory leaks.

For further details, please see: https://docs.opencv.org/master/d2/de8/group__core__array.html#ga0547c7fed86152d7e9d0096029c8518a

Implementation

Future<VecMat> splitAsync(InputArray m) async {
  final vec = calloc<cvg.VecMat>();
  return cvRunAsync0(
    (callback) => ccore.cv_split(m.ref, vec, callback),
    (c) {
      return c.complete(VecMat.fromPointer(vec));
    },
  );
}