OpenCV  2.4.13.6
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

anonymous enum
Enumerator
COV_MAT_SPHERICAL 
COV_MAT_DIAGONAL 
COV_MAT_GENERIC 

§ anonymous enum

anonymous enum
Enumerator
START_E_STEP 
START_M_STEP 
START_AUTO_STEP 

Constructor & Destructor Documentation

§ CvEM() [1/3]

CvEM::CvEM ( )

§ CvEM() [2/3]

CvEM::CvEM ( const CvMat samples,
const CvMat sampleIdx = 0,
CvEMParams  params = CvEMParams(),
CvMat labels = 0 
)

§ ~CvEM()

virtual CvEM::~CvEM ( )
virtual

§ CvEM() [3/3]

CvEM::CvEM ( const cv::Mat samples,
const cv::Mat sampleIdx = cv::Mat(),
CvEMParams  params = CvEMParams() 
)

Member Function Documentation

§ calcLikelihood()

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

§ clear()

virtual void CvEM::clear ( )
virtual

Reimplemented from CvStatModel.

§ get_covs()

const CvMat** CvEM::get_covs ( ) const

§ get_log_likelihood()

double CvEM::get_log_likelihood ( ) const
inline

§ get_means()

const CvMat* CvEM::get_means ( ) const

§ get_nclusters()

int CvEM::get_nclusters ( ) const

§ get_probs()

const CvMat* CvEM::get_probs ( ) const

§ get_weights()

const CvMat* CvEM::get_weights ( ) const

§ getCovs()

void CvEM::getCovs ( CV_OUT std::vector< cv::Mat > &  covs) const

§ getLikelihood()

double CvEM::getLikelihood ( ) const
inline

§ getMeans()

cv::Mat CvEM::getMeans ( ) const

§ getNClusters()

int CvEM::getNClusters ( ) const

§ getProbs()

cv::Mat CvEM::getProbs ( ) const

§ getWeights()

cv::Mat CvEM::getWeights ( ) const

§ predict() [1/2]

virtual float CvEM::predict ( const CvMat sample,
CV_OUT CvMat probs 
) const
virtual

§ predict() [2/2]

virtual float CvEM::predict ( const cv::Mat sample,
CV_OUT cv::Mat probs = 0 
) const
virtual

§ read()

virtual void CvEM::read ( CvFileStorage fs,
CvFileNode node 
)
virtual

Reimplemented from CvStatModel.

§ set_mat_hdrs()

void CvEM::set_mat_hdrs ( )
protected

§ train() [1/2]

virtual bool CvEM::train ( const CvMat samples,
const CvMat sampleIdx = 0,
CvEMParams  params = CvEMParams(),
CvMat labels = 0 
)
virtual

§ train() [2/2]

virtual bool CvEM::train ( const cv::Mat samples,
const cv::Mat sampleIdx = cv::Mat(),
CvEMParams  params = CvEMParams(),
CV_OUT cv::Mat labels = 0 
)
virtual

§ write()

virtual void CvEM::write ( CvFileStorage fs,
const char *  name 
) const
virtual

Reimplemented from CvStatModel.

Member Data Documentation

§ covsHdrs

std::vector<CvMat> CvEM::covsHdrs
protected

§ covsPtrs

std::vector<CvMat*> CvEM::covsPtrs
protected

§ emObj

cv::EM CvEM::emObj
protected

§ logLikelihood

double CvEM::logLikelihood
protected

§ meansHdr

CvMat CvEM::meansHdr
protected

§ probs

cv::Mat CvEM::probs
protected

§ probsHdr

CvMat CvEM::probsHdr
protected

§ weightsHdr

CvMat CvEM::weightsHdr
protected

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