Direct Graphical Models  v.1.7.0
DirectGraphicalModels::CTrainNodeCvGM Class Reference

OpenCV Gaussian Model training class. More...

#include <TrainNodeCvGM.h>

Inheritance diagram for DirectGraphicalModels::CTrainNodeCvGM:
Collaboration diagram for DirectGraphicalModels::CTrainNodeCvGM:

Public Member Functions

 CTrainNodeCvGM (byte nStates, word nFeatures)
 Constructor. More...
 
 ~CTrainNodeCvGM (void)
 
- Public Member Functions inherited from DirectGraphicalModels::CTrainNodeCvGMM
 CTrainNodeCvGMM (byte nStates, word nFeatures, TrainNodeCvGMMParams params=TRAIN_NODE_CV_GMM_PARAMS_DEFAULT)
 Constructor. More...
 
 CTrainNodeCvGMM (byte nStates, word nFeatures, size_t maxSamples, byte nGausses=TRAIN_NODE_CV_GMM_PARAMS_DEFAULT.numGausses)
 Constructor. More...
 
virtual ~CTrainNodeCvGMM (void)
 
void reset (void)
 Resets class variables. More...
 
void save (const std::string &path, const std::string &name=std::string(), short idx=-1) const
 Saves the training data. More...
 
void load (const std::string &path, const std::string &name=std::string(), short idx=-1)
 Loads the training data. More...
 
void addFeatureVec (const Mat &featureVector, byte gt)
 Adds new feature vector. More...
 
void train (bool doClean=false)
 Random model training. More...
 
- Public Member Functions inherited from DirectGraphicalModels::CTrainNode
 CTrainNode (byte nStates, word nFeatures)
 Constructor. More...
 
virtual ~CTrainNode (void)=default
 
void addFeatureVecs (const Mat &featureVectors, const Mat &gt)
 Adds a block of new feature vectors. More...
 
void addFeatureVecs (const vec_mat_t &featureVectors, const Mat &gt)
 Adds a block of new feature vectors. More...
 
Mat getNodePotentials (const Mat &featureVectors, const Mat &weights=Mat(), float Z=0.0f) const
 Returns a block of node potentials, based on the block of feature vector. More...
 
Mat getNodePotentials (const vec_mat_t &featureVectors, const Mat &weights=Mat(), float Z=0.0f) const
 Returns a block of node potentials, based on the block of feature vector. More...
 
Mat getNodePotentials (const Mat &featureVector, float weight, float Z=0.0f) const
 Returns the node potential, based on the feature vector. More...
 
- Public Member Functions inherited from DirectGraphicalModels::ITrain
 ITrain (byte nStates, word nFeatures)
 Constructor. More...
 
virtual ~ITrain (void)=default
 
word getNumFeatures (void) const
 Returns number of features. More...
 
- Public Member Functions inherited from DirectGraphicalModels::CBaseRandomModel
 CBaseRandomModel (byte nStates)
 Constructor. More...
 
virtual ~CBaseRandomModel (void)
 
byte getNumStates (void) const
 Returns number of states (classes) More...
 

Additional Inherited Members

- Static Public Member Functions inherited from DirectGraphicalModels::CTrainNode
static std::shared_ptr< CTrainNodecreate (byte nodeRandomModel, byte nStates, word nFeatures)
 Factory method returning node trainer object. More...
 
- Protected Member Functions inherited from DirectGraphicalModels::CTrainNodeCvGMM
void saveFile (FILE *pFile) const
 Saves the random model into the file. More...
 
void loadFile (FILE *pFile)
 Loads the random model from the file. More...
 
void calculateNodePotentials (const Mat &featureVector, Mat &potential, Mat &mask) const
 Calculates the node potential, based on the feature vector. More...
 
- Protected Member Functions inherited from DirectGraphicalModels::CBaseRandomModel
std::string generateFileName (const std::string &path, const std::string &name, short idx) const
 Generates name of the data file for storing random model parameters. More...
 
- Protected Attributes inherited from DirectGraphicalModels::CTrainNodeCvGMM
std::vector< Ptr< ml::EM > > m_vpEM
 Expectation Maximization for GMM parameters estimation. More...
 
CSamplesAccumulatorm_pSamplesAcc
 Samples Accumulator. More...
 
- Protected Attributes inherited from DirectGraphicalModels::CBaseRandomModel
byte m_nStates
 The number of states (classes) More...
 

Detailed Description

OpenCV Gaussian Model training class.

This class realizes the generative training mechanism, based on the idea of approximating a the density of multi-dimensional random variables with a single multi-dimensional Gaussian function.

Author
Sergey G. Kosov, serge.nosp@m.y.ko.nosp@m.sov@p.nosp@m.roje.nosp@m.ct-10.nosp@m..de

Definition at line 18 of file TrainNodeCvGM.h.

Constructor & Destructor Documentation

◆ CTrainNodeCvGM()

DirectGraphicalModels::CTrainNodeCvGM::CTrainNodeCvGM ( byte  nStates,
word  nFeatures 
)
inline

Constructor.

Parameters
nStatesNumber of states (classes)
nFeaturesNumber of features

Definition at line 26 of file TrainNodeCvGM.h.

◆ ~CTrainNodeCvGM()

DirectGraphicalModels::CTrainNodeCvGM::~CTrainNodeCvGM ( void  )
inline

Definition at line 27 of file TrainNodeCvGM.h.


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