Skip to content

determinant

Core and matricesfunctionOpenCV 5.0.0
import { determinant } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

ARGUMENTSmtx
FUNCTIONdeterminant
RETURN TYPEnumber
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Returns the determinant of a square floating-point matrix.

The function cv::determinant calculates and returns the determinant of the specified matrix. For small matrices ( mtx.cols=mtx.rows<=3 ), the direct method is used. For larger matrices, the function uses LU factorization with partial pivoting.

For symmetric positively-determined matrices, it is also possible to use eigen decomposition to calculate the determinant.

See: trace, invert, solve, eigen, MatrixExpressions

determinant(mtx: Mat): number;
mtx

input matrix that must have CV_32FC1 or CV_64FC1 type and square size.

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.