solveCubicAsync function

Future<(int, Mat)> solveCubicAsync(
  1. InputArray coeffs
)

SolveCubic finds the real roots of a cubic equation.

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

Implementation

Future<(int rval, Mat roots)> solveCubicAsync(InputArray coeffs) async =>
    cvRunAsync2((callback) => ccore.core_SolveCubic_Async(coeffs.ref, callback), (c, p, p1) {
      final rval = p.cast<ffi.Int>().value;
      calloc.free(p);
      c.complete((rval, Mat.fromPointer(p1.cast<ccore.Mat>())));
    });