OpenCV  2.4.13
Open Source Computer Vision
CvEM Class Reference

#include <legacy.hpp>

Inheritance diagram for CvEM:
CvStatModel

Public Types

enum  { COV_MAT_SPHERICAL =cv::EM::COV_MAT_SPHERICAL, COV_MAT_DIAGONAL =cv::EM::COV_MAT_DIAGONAL, COV_MAT_GENERIC =cv::EM::COV_MAT_GENERIC }
 
enum  { START_E_STEP =cv::EM::START_E_STEP, START_M_STEP =cv::EM::START_M_STEP, START_AUTO_STEP =cv::EM::START_AUTO_STEP }
 

Public Member Functions

 CvEM ()
 
 CvEM (const CvMat *samples, const CvMat *sampleIdx=0, CvEMParams params=CvEMParams(), CvMat *labels=0)
 
virtual ~CvEM ()
 
virtual bool train (const CvMat *samples, const CvMat *sampleIdx=0, CvEMParams params=CvEMParams(), CvMat *labels=0)
 
virtual float predict (const CvMat *sample, CV_OUT CvMat *probs) const
 
 CvEM (const cv::Mat &samples, const cv::Mat &sampleIdx=cv::Mat(), CvEMParams params=CvEMParams())
 
virtual bool train (const cv::Mat &samples, const cv::Mat &sampleIdx=cv::Mat(), CvEMParams params=CvEMParams(), CV_OUT cv::Mat *labels=0)
 
virtual float predict (const cv::Mat &sample, CV_OUT cv::Mat *probs=0) const
 
virtual double calcLikelihood (const cv::Mat &sample) const
 
int getNClusters () const
 
cv::Mat getMeans () const
 
void getCovs (CV_OUT std::vector< cv::Mat > &covs) const
 
cv::Mat getWeights () const
 
cv::Mat getProbs () const
 
double getLikelihood () const
 
virtual void clear ()
 
int get_nclusters () const
 
const CvMatget_means () const
 
const CvMat ** get_covs () const
 
const CvMatget_weights () const
 
const CvMatget_probs () const
 
double get_log_likelihood () const
 
virtual void read (CvFileStorage *fs, CvFileNode *node)
 
virtual void write (CvFileStorage *fs, const char *name) const
 
- Public Member Functions inherited from CvStatModel
 CvStatModel ()
 
virtual ~CvStatModel ()
 
virtual void save (const char *filename, const char *name=0) const
 
virtual void load (const char *filename, const char *name=0)
 

Protected Member Functions

void set_mat_hdrs ()
 

Protected Attributes

cv::EM emObj
 
cv::Mat probs
 
double logLikelihood
 
CvMat meansHdr
 
std::vector< CvMatcovsHdrs
 
std::vector< CvMat * > covsPtrs
 
CvMat weightsHdr
 
CvMat probsHdr
 
- Protected Attributes inherited from CvStatModel
const char * default_model_name
 

Member Enumeration Documentation

anonymous enum
Enumerator
COV_MAT_SPHERICAL 
COV_MAT_DIAGONAL 
COV_MAT_GENERIC 
anonymous enum
Enumerator
START_E_STEP 
START_M_STEP 
START_AUTO_STEP 

Constructor & Destructor Documentation

CvEM::CvEM ( )
CvEM::CvEM ( const CvMat samples,
const CvMat sampleIdx = 0,
CvEMParams  params = CvEMParams(),
CvMat labels = 0 
)
virtual CvEM::~CvEM ( )
virtual
CvEM::CvEM ( const cv::Mat samples,
const cv::Mat sampleIdx = cv::Mat(),
CvEMParams  params = CvEMParams() 
)

Member Function Documentation

virtual double CvEM::calcLikelihood ( const cv::Mat sample) const
virtual
virtual void CvEM::clear ( )
virtual

Reimplemented from CvStatModel.

const CvMat** CvEM::get_covs ( ) const
double CvEM::get_log_likelihood ( ) const
inline
const CvMat* CvEM::get_means ( ) const
int CvEM::get_nclusters ( ) const
const CvMat* CvEM::get_probs ( ) const
const CvMat* CvEM::get_weights ( ) const
void CvEM::getCovs ( CV_OUT std::vector< cv::Mat > &  covs) const
double CvEM::getLikelihood ( ) const
inline
cv::Mat CvEM::getMeans ( ) const
int CvEM::getNClusters ( ) const
cv::Mat CvEM::getProbs ( ) const
cv::Mat CvEM::getWeights ( ) const
virtual float CvEM::predict ( const CvMat sample,
CV_OUT CvMat probs 
) const
virtual
virtual float CvEM::predict ( const cv::Mat sample,
CV_OUT cv::Mat probs = 0 
) const
virtual
virtual void CvEM::read ( CvFileStorage fs,
CvFileNode node 
)
virtual

Reimplemented from CvStatModel.

void CvEM::set_mat_hdrs ( )
protected
virtual bool CvEM::train ( const CvMat samples,
const CvMat sampleIdx = 0,
CvEMParams  params = CvEMParams(),
CvMat labels = 0 
)
virtual
virtual bool CvEM::train ( const cv::Mat samples,
const cv::Mat sampleIdx = cv::Mat(),
CvEMParams  params = CvEMParams(),
CV_OUT cv::Mat labels = 0 
)
virtual
virtual void CvEM::write ( CvFileStorage fs,
const char *  name 
) const
virtual

Reimplemented from CvStatModel.

Member Data Documentation

std::vector<CvMat> CvEM::covsHdrs
protected
std::vector<CvMat*> CvEM::covsPtrs
protected
cv::EM CvEM::emObj
protected
double CvEM::logLikelihood
protected
CvMat CvEM::meansHdr
protected
cv::Mat CvEM::probs
protected
CvMat CvEM::probsHdr
protected
CvMat CvEM::weightsHdr
protected

The documentation for this class was generated from the following file: