Click or drag to resize

PCAComputeVar Method

Performs PCA. The operator performs %PCA of the supplied dataset. It is safe to reuse the same PCA structure for multiple datasets. That is, if the structure has been previously used with another dataset, the existing internal data is reclaimed and the new @ref eigenvalues, @ref eigenvectors and @ref mean are allocated and computed. The computed @ref eigenvalues are sorted from the largest to the smallest and the corresponding @ref eigenvectors are stored as eigenvectors rows.

Namespace:  OpenCvSharp
Assembly:  OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax
public PCA ComputeVar(
	InputArray data,
	InputArray mean,
	PCAFlags flags,
	double retainedVariance
)

Parameters

data
Type: OpenCvSharpInputArray
input samples stored as the matrix rows or as the matrix columns.
mean
Type: OpenCvSharpInputArray
optional mean value; if the matrix is empty (noArray()), the mean is computed from the data.
flags
Type: OpenCvSharpPCAFlags
operation flags; currently the parameter is only used to specify the data layout. (PCA::Flags)
retainedVariance
Type: SystemDouble
Percentage of variance that %PCA should retain. Using this parameter will let the %PCA decided how many components to retain but it will always keep at least 2.

Return Value

Type: PCA

[Missing <returns> documentation for "M:OpenCvSharp.PCA.ComputeVar(OpenCvSharp.InputArray,OpenCvSharp.InputArray,OpenCvSharp.PCA.Flags,System.Double)"]

See Also