Skip to content

calcCovarMatrix

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

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

ARGUMENTSsamples, covar, mean, flags
FUNCTIONcalcCovarMatrix
RETURN TYPEvoid
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Note: use #COVAR_ROWS or #COVAR_COLS flag

calcCovarMatrix(samples: Mat, covar: Mat, mean: Mat, flags: number, ctype: number): void;
2 available overloads
calcCovarMatrix(samples: Mat, covar: Mat, mean: Mat, flags: number): void;
calcCovarMatrix(samples: Mat, covar: Mat, mean: Mat, flags: number, ctype: number): void;
samples

samples stored as rows/columns of a single matrix.

covar

Output destination, filled by the native operation. output covariance matrix of the type ctype and square size.

mean

Input/output value, modified by the native operation. input or output (depending on the flags) array as the average value of the input vectors.

flags

operation flags as a combination of #CovarFlags

ctype

type of the matrixl; it equals 'CV_64F' by default.

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.