Click or drag to resize

EMTrainE Method

Estimate the Gaussian mixture parameters from a samples set.

Namespace:  OpenCvSharp
Assembly:  OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax
public virtual bool TrainE(
	InputArray samples,
	InputArray means0,
	InputArray covs0 = null,
	InputArray weights0 = null,
	OutputArray logLikelihoods = null,
	OutputArray labels = null,
	OutputArray probs = null
)

Parameters

samples
Type: OpenCvSharpInputArray
Samples from which the Gaussian mixture model will be estimated. It should be a one-channel matrix, each row of which is a sample. If the matrix does not have CV_64F type it will be converted to the inner matrix of such type for the further computing.
means0
Type: OpenCvSharpInputArray
Initial means \f$a_k\f$ of mixture components. It is a one-channel matrix of \f$nclusters \times dims\f$ size. If the matrix does not have CV_64F type it will be converted to the inner matrix of such type for the further computing.
covs0 (Optional)
Type: OpenCvSharpInputArray
The vector of initial covariance matrices \f$S_k\f$ of mixture components. Each of covariance matrices is a one-channel matrix of \f$dims \times dims\f$ size. If the matrices do not have CV_64F type they will be converted to the inner matrices of such type for the further computing.
weights0 (Optional)
Type: OpenCvSharpInputArray
Initial weights \f$\pi_k\f$ of mixture components. It should be a one-channel floating-point matrix with \f$1 \times nclusters\f$ or \f$nclusters \times 1\f$ size.
logLikelihoods (Optional)
Type: OpenCvSharpOutputArray
The optional output matrix that contains a likelihood logarithm value for each sample. It has \f$nsamples \times 1\f$ size and CV_64FC1 type.
labels (Optional)
Type: OpenCvSharpOutputArray
The optional output "class label" for each sample: \f$\texttt{labels}_i=\texttt{arg max}_k(p_{i,k}), i=1..N\f$ (indices of the most probable mixture component for each sample). It has \f$nsamples \times 1\f$ size and CV_32SC1 type.
probs (Optional)
Type: OpenCvSharpOutputArray
The optional output matrix that contains posterior probabilities of each Gaussian mixture component given the each sample. It has \f$nsamples \times nclusters\f$ size and CV_64FC1 type.

Return Value

Type: Boolean

[Missing <returns> documentation for "M:OpenCvSharp.EM.TrainE(OpenCvSharp.InputArray,OpenCvSharp.InputArray,OpenCvSharp.InputArray,OpenCvSharp.InputArray,OpenCvSharp.OutputArray,OpenCvSharp.OutputArray,OpenCvSharp.OutputArray)"]

See Also