solvePoly
import { solvePoly } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
ARGUMENTScoeffs, roots, maxIters
FUNCTIONsolvePoly
RETURN TYPEnumber
Finds the real or complex roots of a polynomial equation.
The function cv::solvePoly finds real and complex roots of a polynomial equation:
\texttt{coeffs} [n] x^{n} + \texttt{coeffs} [n-1] x^{n-1} + ... + \texttt{coeffs} [1] x + \texttt{coeffs} [0] = 0
solvePoly(coeffs: Mat, roots: Mat, maxIters: number): number;2 available overloads
solvePoly(coeffs: Mat, roots: Mat): number;solvePoly(coeffs: Mat, roots: Mat, maxIters: number): number;coeffsarray of polynomial coefficients.
rootsOutput destination, filled by the native operation. output (complex) array of roots.
maxItersmaximum number of iterations the algorithm does.
Returns
The number result.
These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.