Table of Contents

Method PCACompute

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

PCACompute(InputArray, InputOutputArray, OutputArray, int)

PCA of the supplied dataset.

public static void PCACompute(InputArray data, InputOutputArray mean, OutputArray eigenvectors, int maxComponents = 0)

Parameters

data InputArray

input samples stored as the matrix rows or as the matrix columns.

mean InputOutputArray

optional mean value; if the matrix is empty (noArray()), the mean is computed from the data.

eigenvectors OutputArray

eigenvectors of the covariation matrix

maxComponents int

Number of components that PCA should retain; by default, all the components are retained.

PCACompute(InputArray, InputOutputArray, OutputArray, OutputArray, int)

PCA of the supplied dataset.

public static void PCACompute(InputArray data, InputOutputArray mean, OutputArray eigenvectors, OutputArray eigenvalues, int maxComponents = 0)

Parameters

data InputArray

input samples stored as the matrix rows or as the matrix columns.

mean InputOutputArray

optional mean value; if the matrix is empty (noArray()), the mean is computed from the data.

eigenvectors OutputArray

eigenvectors of the covariation matrix

eigenvalues OutputArray

eigenvalues of the covariation matrix

maxComponents int

Number of components that PCA should retain; by default, all the components are retained.