invertAsync function

Future<(double, Mat)> invertAsync(
  1. InputArray src, {
  2. int flags = DECOMP_LU,
})

Invert finds the inverse or pseudo-inverse of a matrix.

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

Implementation

Future<(double rval, Mat dst)> invertAsync(
  InputArray src, {
  int flags = DECOMP_LU,
}) async =>
    cvRunAsync2<(double, Mat)>((callback) => cffi.core_Invert_Async(src.ref, flags, callback), (c, p, p1) {
      final rval = p.cast<ffi.Double>().value;
      calloc.free(p);
      c.complete((rval, Mat.fromPointer(p1.cast<cvg.Mat>())));
    });