Skip to content

PCACompute2

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

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

wrap PCA::operator() and add eigenvalues output parameter

PCACompute2(data: Mat, mean: Mat, eigenvectors: Mat, eigenvalues: Mat, maxComponents: number): void;
2 available overloads
PCACompute2(data: Mat, mean: Mat, eigenvectors: Mat, eigenvalues: Mat): void;
PCACompute2(data: Mat, mean: Mat, eigenvectors: Mat, eigenvalues: Mat, maxComponents: number): void;
data

data argument (Mat).

mean

Input/output value, modified by the native operation. mean argument (Mat).

eigenvectors

Output destination, filled by the native operation. eigenvectors argument (Mat).

eigenvalues

Output destination, filled by the native operation. eigenvalues argument (Mat).

maxComponents

max components argument (number).

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.