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 rval = cvRunArena<double>((arena) {
final p = arena<ffi.Double>();
cvRun(() => cffi.Mat_SolvePoly(coeffs.ref, roots!.ref, maxIters, p));
return p.value;
});
return (rval, roots);
}