solveAsync function

Future<(bool, Mat)> solveAsync(
  1. InputArray src1,
  2. InputArray src2, {
  3. OutputArray? dst,
  4. int flags = DECOMP_LU,
})

Solve solves one or more linear systems or least-squares problems.

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

Implementation

Future<(bool ret, Mat dst)> solveAsync(
  InputArray src1,
  InputArray src2, {
  OutputArray? dst,
  int flags = DECOMP_LU,
}) async {
  dst ??= Mat.empty();
  final p = calloc<ffi.Bool>();
  return cvRunAsync0(
    (callback) => ccore.cv_solve(src1.ref, src2.ref, dst!.ref, flags, p, callback),
    (c) {
      final rval = p.value;
      calloc.free(p);
      return c.complete((rval, dst!));
    },
  );
}