solvePolyAsync function

Future<(double, Mat)> solvePolyAsync(
  1. InputArray coeffs, {
  2. int maxIters = 300,
})

SolvePoly finds the real or complex roots of a polynomial equation.

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

Implementation

Future<(double rval, Mat roots)> solvePolyAsync(
  InputArray coeffs, {
  int maxIters = 300,
}) async =>
    cvRunAsync2((callback) => ccore.core_SolvePoly_Async(coeffs.ref, maxIters, callback), (c, p, p1) {
      final rval = p.cast<ffi.Double>().value;
      calloc.free(p);
      c.complete((rval, Mat.fromPointer(p1.cast<ccore.Mat>())));
    });