solvePoly function
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
(double rval, Mat roots) solvePoly(
InputArray coeffs, {
OutputArray? roots,
int maxIters = 300,
}) {
roots ??= Mat.empty();
final p = calloc<ffi.Double>();
cvRun(() => ccore.cv_solvePoly(coeffs.ref, roots!.ref, maxIters, p, ffi.nullptr));
final rval = p.value;
calloc.free(p);
return (rval, roots);
}