C# Class OpenCvSharp.EM

The class implements the Expectation Maximization algorithm.
Inheritance: Algorithm
Exibir arquivo Open project: shimat/opencvsharp

Public Methods

Method Description
Create ( ) : EM

Creates empty EM model.

GetCovs ( ) : OpenCvSharp.Mat[]

Returns covariation matrices. Returns vector of covariation matrices. Number of matrices is the number of gaussian mixtures, each matrix is a square floating-point matrix NxN, where N is the space dimensionality.

GetMeans ( ) : OpenCvSharp.Mat

Returns the cluster centers (means of the Gaussian mixture). Returns matrix with the number of rows equal to the number of mixtures and number of columns equal to the space dimensionality.

GetWeights ( ) : OpenCvSharp.Mat

Returns weights of the mixtures. Returns vector with the number of elements equal to the number of mixtures.

Predict2 ( InputArray sample, OutputArray probs = null ) : Vec2d

Predicts the response for sample

TrainE ( InputArray samples, InputArray means0, InputArray covs0 = null, InputArray weights0 = null, OutputArray logLikelihoods = null, OutputArray labels = null, OutputArray probs = null ) : bool

Estimates Gaussian mixture parameters from the sample set

TrainM ( InputArray samples, InputArray probs0, OutputArray logLikelihoods = null, OutputArray labels = null, OutputArray probs = null ) : bool

Estimates Gaussian mixture parameters from the sample set

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

EM ( IntPtr p ) : System

Creates instance by raw pointer cv::ml::EM*

Method Details

Create() public static method

Creates empty EM model.
public static Create ( ) : EM
return EM

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool /// If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. /// If false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed. ///
return void

EM() protected method

Creates instance by raw pointer cv::ml::EM*
protected EM ( IntPtr p ) : System
p System.IntPtr
return System

GetCovs() public method

Returns covariation matrices. Returns vector of covariation matrices. Number of matrices is the number of gaussian mixtures, each matrix is a square floating-point matrix NxN, where N is the space dimensionality.
public GetCovs ( ) : OpenCvSharp.Mat[]
return OpenCvSharp.Mat[]

GetMeans() public method

Returns the cluster centers (means of the Gaussian mixture). Returns matrix with the number of rows equal to the number of mixtures and number of columns equal to the space dimensionality.
public GetMeans ( ) : OpenCvSharp.Mat
return OpenCvSharp.Mat

GetWeights() public method

Returns weights of the mixtures. Returns vector with the number of elements equal to the number of mixtures.
public GetWeights ( ) : OpenCvSharp.Mat
return OpenCvSharp.Mat

Predict2() public method

Predicts the response for sample
public Predict2 ( InputArray sample, OutputArray probs = null ) : Vec2d
sample InputArray
probs OutputArray
return Vec2d

TrainE() public method

Estimates Gaussian mixture parameters from the sample set
public TrainE ( InputArray samples, InputArray means0, InputArray covs0 = null, InputArray weights0 = null, OutputArray logLikelihoods = null, OutputArray labels = null, OutputArray probs = null ) : bool
samples InputArray
means0 InputArray
covs0 InputArray
weights0 InputArray
logLikelihoods OutputArray
labels OutputArray
probs OutputArray
return bool

TrainM() public method

Estimates Gaussian mixture parameters from the sample set
public TrainM ( InputArray samples, InputArray probs0, OutputArray logLikelihoods = null, OutputArray labels = null, OutputArray probs = null ) : bool
samples InputArray
probs0 InputArray
logLikelihoods OutputArray
labels OutputArray
probs OutputArray
return bool