#include <ml.hpp>
Inherits cv::Algorithm.
Public Types | |
| enum | { COV_MAT_SPHERICAL = 0, COV_MAT_DIAGONAL = 1, COV_MAT_GENERIC = 2, COV_MAT_DEFAULT = COV_MAT_DIAGONAL } |
| enum | { DEFAULT_NCLUSTERS = 5, DEFAULT_MAX_ITERS = 100 } |
| enum | { START_E_STEP = 1, START_M_STEP = 2, START_AUTO_STEP = 0 } |
| typedef Algorithm *(* | Constructor )(void) |
| typedef int(Algorithm::* | Getter )() const |
| typedef void(Algorithm::* | Setter )(int) |
Public Member Functions | |
| CV_WRAP | EM (int nclusters=EM::DEFAULT_NCLUSTERS, int covMatType=EM::COV_MAT_DIAGONAL, const TermCriteria &termCrit=TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, EM::DEFAULT_MAX_ITERS, FLT_EPSILON)) |
| virtual | ~EM () |
| virtual CV_WRAP void | clear () |
| virtual CV_WRAP bool | train (InputArray samples, OutputArray logLikelihoods=noArray(), OutputArray labels=noArray(), OutputArray probs=noArray()) |
| virtual CV_WRAP bool | trainE (InputArray samples, InputArray means0, InputArray covs0=noArray(), InputArray weights0=noArray(), OutputArray logLikelihoods=noArray(), OutputArray labels=noArray(), OutputArray probs=noArray()) |
| virtual CV_WRAP bool | trainM (InputArray samples, InputArray probs0, OutputArray logLikelihoods=noArray(), OutputArray labels=noArray(), OutputArray probs=noArray()) |
| CV_WRAP Vec2d | predict (InputArray sample, OutputArray probs=noArray()) const |
| CV_WRAP bool | isTrained () const |
| AlgorithmInfo * | info () const |
| virtual void | read (const FileNode &fn) |
| string | name () const |
| template<typename _Tp > | |
| ParamType< _Tp >::member_type | get (const string &name) const |
| template<typename _Tp > | |
| ParamType< _Tp >::member_type | get (const char *name) const |
| CV_WRAP int | getInt (const string &name) const |
| CV_WRAP double | getDouble (const string &name) const |
| CV_WRAP bool | getBool (const string &name) const |
| CV_WRAP string | getString (const string &name) const |
| CV_WRAP Mat | getMat (const string &name) const |
| CV_WRAP vector< Mat > | getMatVector (const string &name) const |
| CV_WRAP Ptr< Algorithm > | getAlgorithm (const string &name) const |
| void | set (const string &name, int value) |
| void | set (const string &name, double value) |
| void | set (const string &name, bool value) |
| void | set (const string &name, const string &value) |
| void | set (const string &name, const Mat &value) |
| void | set (const string &name, const vector< Mat > &value) |
| void | set (const string &name, const Ptr< Algorithm > &value) |
| template<typename _Tp > | |
| void | set (const string &name, const Ptr< _Tp > &value) |
| void | set (const char *name, int value) |
| void | set (const char *name, double value) |
| void | set (const char *name, bool value) |
| void | set (const char *name, const string &value) |
| void | set (const char *name, const Mat &value) |
| void | set (const char *name, const vector< Mat > &value) |
| void | set (const char *name, const Ptr< Algorithm > &value) |
| template<typename _Tp > | |
| void | set (const char *name, const Ptr< _Tp > &value) |
| CV_WRAP void | setInt (const string &name, int value) |
| void | setInt (const char *name, int value) |
| CV_WRAP void | setDouble (const string &name, double value) |
| void | setDouble (const char *name, double value) |
| CV_WRAP void | setBool (const string &name, bool value) |
| void | setBool (const char *name, bool value) |
| CV_WRAP void | setString (const string &name, const string &value) |
| void | setString (const char *name, const string &value) |
| CV_WRAP void | setMat (const string &name, const Mat &value) |
| void | setMat (const char *name, const Mat &value) |
| CV_WRAP void | setMatVector (const string &name, const vector< Mat > &value) |
| void | setMatVector (const char *name, const vector< Mat > &value) |
| CV_WRAP void | setAlgorithm (const string &name, const Ptr< Algorithm > &value) |
| template<typename _Tp > | |
| void | setAlgorithm (const string &name, const Ptr< _Tp > &value) |
| void | setAlgorithm (const char *name, const Ptr< Algorithm > &value) |
| template<typename _Tp > | |
| void | setAlgorithm (const char *name, const Ptr< _Tp > &value) |
| CV_WRAP string | paramHelp (const string &name) const |
| int | paramType (const char *name) const |
| CV_WRAP int | paramType (const string &name) const |
| CV_WRAP void | getParams (CV_OUT vector< string > &names) const |
| virtual void | write (FileStorage &fs) const |
Static Public Member Functions | |
| static CV_WRAP void | getList (CV_OUT vector< string > &algorithms) |
| static CV_WRAP Ptr< Algorithm > | _create (const string &name) |
| template<typename _Tp > | |
| static Ptr< _Tp > | create (const string &name) |
Protected Member Functions | |
| virtual void | setTrainData (int startStep, const Mat &samples, const Mat *probs0, const Mat *means0, const vector< Mat > *covs0, const Mat *weights0) |
| bool | doTrain (int startStep, OutputArray logLikelihoods, OutputArray labels, OutputArray probs) |
| virtual void | eStep () |
| virtual void | mStep () |
| void | clusterTrainSamples () |
| void | decomposeCovs () |
| void | computeLogWeightDivDet () |
| Vec2d | computeProbabilities (const Mat &sample, Mat *probs) const |
Protected Attributes | |
| CV_PROP_RW int | nclusters |
| CV_PROP_RW int | covMatType |
| CV_PROP_RW int | maxIters |
| CV_PROP_RW double | epsilon |
| Mat | trainSamples |
| Mat | trainProbs |
| Mat | trainLogLikelihoods |
| Mat | trainLabels |
| CV_PROP Mat | weights |
| CV_PROP Mat | means |
| CV_PROP vector< Mat > | covs |
| vector< Mat > | covsEigenValues |
| vector< Mat > | covsRotateMats |
| vector< Mat > | invCovsEigenValues |
| Mat | logWeightDivDet |
typedef Algorithm*(* cv::Algorithm::Constructor)(void) [inherited] |
typedef int(Algorithm::* cv::Algorithm::Getter)() const [inherited] |
typedef void(Algorithm::* cv::Algorithm::Setter)(int) [inherited] |
| CV_WRAP cv::EM::EM | ( | int | nclusters = EM::DEFAULT_NCLUSTERS, |
| int | covMatType = EM::COV_MAT_DIAGONAL, |
||
| const TermCriteria & | termCrit = TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, EM::DEFAULT_MAX_ITERS, FLT_EPSILON) |
||
| ) |
| virtual cv::EM::~EM | ( | ) | [virtual] |
| virtual CV_WRAP void cv::EM::clear | ( | ) | [virtual] |
| virtual CV_WRAP bool cv::EM::train | ( | InputArray | samples, |
| OutputArray | logLikelihoods = noArray(), |
||
| OutputArray | labels = noArray(), |
||
| OutputArray | probs = noArray() |
||
| ) | [virtual] |
| virtual CV_WRAP bool cv::EM::trainE | ( | InputArray | samples, |
| InputArray | means0, | ||
| InputArray | covs0 = noArray(), |
||
| InputArray | weights0 = noArray(), |
||
| OutputArray | logLikelihoods = noArray(), |
||
| OutputArray | labels = noArray(), |
||
| OutputArray | probs = noArray() |
||
| ) | [virtual] |
| virtual CV_WRAP bool cv::EM::trainM | ( | InputArray | samples, |
| InputArray | probs0, | ||
| OutputArray | logLikelihoods = noArray(), |
||
| OutputArray | labels = noArray(), |
||
| OutputArray | probs = noArray() |
||
| ) | [virtual] |
| CV_WRAP Vec2d cv::EM::predict | ( | InputArray | sample, |
| OutputArray | probs = noArray() |
||
| ) | const |
| CV_WRAP bool cv::EM::isTrained | ( | ) | const |
| AlgorithmInfo* cv::EM::info | ( | ) | const [virtual] |
Reimplemented from cv::Algorithm.
| virtual void cv::EM::read | ( | const FileNode & | fn | ) | [virtual] |
Reimplemented from cv::Algorithm.
| virtual void cv::EM::setTrainData | ( | int | startStep, |
| const Mat & | samples, | ||
| const Mat * | probs0, | ||
| const Mat * | means0, | ||
| const vector< Mat > * | covs0, | ||
| const Mat * | weights0 | ||
| ) | [protected, virtual] |
| bool cv::EM::doTrain | ( | int | startStep, |
| OutputArray | logLikelihoods, | ||
| OutputArray | labels, | ||
| OutputArray | probs | ||
| ) | [protected] |
| virtual void cv::EM::eStep | ( | ) | [protected, virtual] |
| virtual void cv::EM::mStep | ( | ) | [protected, virtual] |
| void cv::EM::clusterTrainSamples | ( | ) | [protected] |
| void cv::EM::decomposeCovs | ( | ) | [protected] |
| void cv::EM::computeLogWeightDivDet | ( | ) | [protected] |
| Vec2d cv::EM::computeProbabilities | ( | const Mat & | sample, |
| Mat * | probs | ||
| ) | const [protected] |
| string cv::Algorithm::name | ( | ) | const [inherited] |
| ParamType< _Tp >::member_type cv::Algorithm::get | ( | const string & | name | ) | const [inherited] |
| ParamType< _Tp >::member_type cv::Algorithm::get | ( | const char * | name | ) | const [inherited] |
| CV_WRAP int cv::Algorithm::getInt | ( | const string & | name | ) | const [inherited] |
| CV_WRAP double cv::Algorithm::getDouble | ( | const string & | name | ) | const [inherited] |
| CV_WRAP bool cv::Algorithm::getBool | ( | const string & | name | ) | const [inherited] |
| CV_WRAP string cv::Algorithm::getString | ( | const string & | name | ) | const [inherited] |
| CV_WRAP Mat cv::Algorithm::getMat | ( | const string & | name | ) | const [inherited] |
| CV_WRAP vector<Mat> cv::Algorithm::getMatVector | ( | const string & | name | ) | const [inherited] |
| CV_WRAP Ptr<Algorithm> cv::Algorithm::getAlgorithm | ( | const string & | name | ) | const [inherited] |
| void cv::Algorithm::set | ( | const string & | name, |
| int | value | ||
| ) | [inherited] |
| void cv::Algorithm::set | ( | const string & | name, |
| double | value | ||
| ) | [inherited] |
| void cv::Algorithm::set | ( | const string & | name, |
| bool | value | ||
| ) | [inherited] |
| void cv::Algorithm::set | ( | const string & | name, |
| const string & | value | ||
| ) | [inherited] |
| void cv::Algorithm::set | ( | const string & | name, |
| const Mat & | value | ||
| ) | [inherited] |
| void cv::Algorithm::set | ( | const string & | name, |
| const vector< Mat > & | value | ||
| ) | [inherited] |
| void cv::Algorithm::set | ( | const string & | name, |
| const Ptr< Algorithm > & | value | ||
| ) | [inherited] |
| void cv::Algorithm::set | ( | const string & | name, |
| const Ptr< _Tp > & | value | ||
| ) | [inherited] |
| void cv::Algorithm::set | ( | const char * | name, |
| int | value | ||
| ) | [inherited] |
| void cv::Algorithm::set | ( | const char * | name, |
| double | value | ||
| ) | [inherited] |
| void cv::Algorithm::set | ( | const char * | name, |
| bool | value | ||
| ) | [inherited] |
| void cv::Algorithm::set | ( | const char * | name, |
| const string & | value | ||
| ) | [inherited] |
| void cv::Algorithm::set | ( | const char * | name, |
| const Mat & | value | ||
| ) | [inherited] |
| void cv::Algorithm::set | ( | const char * | name, |
| const vector< Mat > & | value | ||
| ) | [inherited] |
| void cv::Algorithm::set | ( | const char * | name, |
| const Ptr< Algorithm > & | value | ||
| ) | [inherited] |
| void cv::Algorithm::set | ( | const char * | name, |
| const Ptr< _Tp > & | value | ||
| ) | [inherited] |
| CV_WRAP void cv::Algorithm::setInt | ( | const string & | name, |
| int | value | ||
| ) | [inherited] |
| void cv::Algorithm::setInt | ( | const char * | name, |
| int | value | ||
| ) | [inherited] |
| CV_WRAP void cv::Algorithm::setDouble | ( | const string & | name, |
| double | value | ||
| ) | [inherited] |
| void cv::Algorithm::setDouble | ( | const char * | name, |
| double | value | ||
| ) | [inherited] |
| CV_WRAP void cv::Algorithm::setBool | ( | const string & | name, |
| bool | value | ||
| ) | [inherited] |
| void cv::Algorithm::setBool | ( | const char * | name, |
| bool | value | ||
| ) | [inherited] |
| CV_WRAP void cv::Algorithm::setString | ( | const string & | name, |
| const string & | value | ||
| ) | [inherited] |
| void cv::Algorithm::setString | ( | const char * | name, |
| const string & | value | ||
| ) | [inherited] |
| CV_WRAP void cv::Algorithm::setMat | ( | const string & | name, |
| const Mat & | value | ||
| ) | [inherited] |
| void cv::Algorithm::setMat | ( | const char * | name, |
| const Mat & | value | ||
| ) | [inherited] |
| CV_WRAP void cv::Algorithm::setMatVector | ( | const string & | name, |
| const vector< Mat > & | value | ||
| ) | [inherited] |
| void cv::Algorithm::setMatVector | ( | const char * | name, |
| const vector< Mat > & | value | ||
| ) | [inherited] |
| CV_WRAP void cv::Algorithm::setAlgorithm | ( | const string & | name, |
| const Ptr< Algorithm > & | value | ||
| ) | [inherited] |
| void cv::Algorithm::setAlgorithm | ( | const string & | name, |
| const Ptr< _Tp > & | value | ||
| ) | [inherited] |
| void cv::Algorithm::setAlgorithm | ( | const char * | name, |
| const Ptr< Algorithm > & | value | ||
| ) | [inherited] |
| void cv::Algorithm::setAlgorithm | ( | const char * | name, |
| const Ptr< _Tp > & | value | ||
| ) | [inherited] |
| CV_WRAP string cv::Algorithm::paramHelp | ( | const string & | name | ) | const [inherited] |
| int cv::Algorithm::paramType | ( | const char * | name | ) | const [inherited] |
| CV_WRAP int cv::Algorithm::paramType | ( | const string & | name | ) | const [inherited] |
| CV_WRAP void cv::Algorithm::getParams | ( | CV_OUT vector< string > & | names | ) | const [inherited] |
| virtual void cv::Algorithm::write | ( | FileStorage & | fs | ) | const [virtual, inherited] |
| static CV_WRAP void cv::Algorithm::getList | ( | CV_OUT vector< string > & | algorithms | ) | [static, inherited] |
| static CV_WRAP Ptr<Algorithm> cv::Algorithm::_create | ( | const string & | name | ) | [static, inherited] |
| Ptr< _Tp > cv::Algorithm::create | ( | const string & | name | ) | [static, inherited] |
Reimplemented in cv::DescriptorMatcher, cv::AdjusterAdapter, cv::Feature2D, cv::DescriptorExtractor, and cv::FeatureDetector.
CV_PROP_RW int cv::EM::nclusters [protected] |
CV_PROP_RW int cv::EM::covMatType [protected] |
CV_PROP_RW int cv::EM::maxIters [protected] |
CV_PROP_RW double cv::EM::epsilon [protected] |
Mat cv::EM::trainSamples [protected] |
Mat cv::EM::trainProbs [protected] |
Mat cv::EM::trainLogLikelihoods [protected] |
Mat cv::EM::trainLabels [protected] |
CV_PROP Mat cv::EM::weights [protected] |
CV_PROP Mat cv::EM::means [protected] |
CV_PROP vector<Mat> cv::EM::covs [protected] |
vector<Mat> cv::EM::covsEigenValues [protected] |
vector<Mat> cv::EM::covsRotateMats [protected] |
vector<Mat> cv::EM::invCovsEigenValues [protected] |
Mat cv::EM::logWeightDivDet [protected] |