opencv 2.2.0

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CvEM Class Reference

`#include <ml.hpp>`

Inheritance diagram for CvEM:

## Public Types
enum | { COV_MAT_SPHERICAL =0, COV_MAT_DIAGONAL =1, COV_MAT_GENERIC =2 }
enum | { START_E_STEP =1, START_M_STEP =2, START_AUTO_STEP =0 }

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

## Protected Member Functions
virtual void | init_auto (const CvVectors &samples)
virtual void | init_em (const CvVectors &train_data)
virtual void | kmeans (const CvVectors &train_data, int nclusters, CvMat *labels, CvTermCriteria criteria, const CvMat *means)
virtual double | run_em (const CvVectors &train_data)
virtual void | set_params (const CvEMParams &params, const CvVectors &train_data)

## Protected Attributes
CvMat ** | cov_rotate_mats
CvMat ** | covs
CvMat * | inv_eigen_values
double | log_likelihood
CvMat * | log_weight_div_det
CvMat * | means
CvEMParams | params
CvMat * | probs
CvMat * | weights
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

CV_WRAP CvEM::CvEM | ( |  | ) |

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

virtual CvEM::~CvEM | ( |  | ) |
| virtual

CV_WRAP CvEM::CvEM | ( | const cv::Mat & | samples,
|  | const cv::Mat & | sampleIdx = `cv::Mat()`,
|  | CvEMParams | params = `CvEMParams()`
| ) |  |

## Member Function Documentation

virtual CV_WRAP 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

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

CV_WRAP double CvEM::getLikelihood | ( |  | ) | const
| inline

CV_WRAP cv::Mat CvEM::getMeans | ( |  | ) | const

CV_WRAP int CvEM::getNClusters | ( |  | ) | const

CV_WRAP cv::Mat CvEM::getProbs | ( |  | ) | const

CV_WRAP cv::Mat CvEM::getWeights | ( |  | ) | const

virtual void CvEM::init_auto | ( | const CvVectors & | samples | ) |
| protected virtual

virtual void CvEM::init_em | ( | const CvVectors & | train_data | ) |
| protected virtual

virtual void CvEM::kmeans | ( | const CvVectors & | train_data,
|  | int | nclusters,
|  | CvMat * | labels,
|  | CvTermCriteria | criteria,
|  | const CvMat * | means
| ) |  |
| protected virtual

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

virtual CV_WRAP float CvEM::predict | ( | const cv::Mat & | sample,
|  | CV_OUT cv::Mat * | probs = `0`
| ) |  | const
| virtual

virtual double CvEM::run_em | ( | const CvVectors & | train_data | ) |
| protected virtual

virtual void CvEM::set_params | ( | const CvEMParams & | params,
|  | const CvVectors & | train_data
| ) |  |
| protected virtual

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

virtual CV_WRAP bool CvEM::train | ( | const cv::Mat & | samples,
|  | const cv::Mat & | sampleIdx = `cv::Mat()`,
|  | CvEMParams | params = `CvEMParams()`,
|  | CV_OUT cv::Mat * | labels = `0`
| ) |  |
| virtual

## Member Data Documentation

CvMat** CvEM::cov_rotate_mats
| protected

CvMat** CvEM::covs
| protected

CvMat* CvEM::inv_eigen_values
| protected

double CvEM::log_likelihood
| protected

CvMat* CvEM::log_weight_div_det
| protected

CvMat* CvEM::means
| protected

CvEMParams CvEM::params
| protected

CvMat* CvEM::probs
| protected

CvMat* CvEM::weights
| protected

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

- /usr/obj/OpenCV-2.2.0/OpenCV-2.2.0/modules/ml/include/opencv2/ml/ml.hpp