31 DllExport
virtual void reset(
void);
33 DllExport
virtual void addFeatureVec(
const Mat &featureVector, byte gt);
34 DllExport
virtual void train(
bool doClean =
false);
42 DllExport
IPDF *
getPDF(byte state, word feature)
const {
return m_pPDF[state][feature]; }
54 DllExport
void smooth(
int nIt = 1);
57 DllExport
virtual void saveFile(FILE *pFile)
const;
58 DllExport
virtual void loadFile(FILE *pFile);
void smooth(int nIt=1)
Smothes the underlying Probability Density Functions (PDFs)
IPDF *** m_pPDF
The 1D PDF for node potentials [state][feature].
virtual void train(bool doClean=false)
Random model training.
IPDF * getPDF2D(byte state) const
Returns the 2D normalized probability density function (PDF) for specific state (class) ...
virtual void reset(void)
Resets class variables.
Mat m_prior
The class prior probability vector.
virtual void saveFile(FILE *pFile) const
Saves the random model into the file.
virtual void addFeatureVec(const Mat &featureVector, byte gt)
Adds new feature vector.
CTrainNodeBayes(byte nStates, word nFeatures)
Constructor.
IPDF * getPDF(byte state, word feature) const
Returns the normalized probability density function (PDF) for specific state (class) and feature...
virtual void loadFile(FILE *pFile)
Loads the random model from the file.
Node prior probability estimation class
Interface class for Probability Density Function (PDF)
virtual ~CTrainNodeBayes(void)
IPDF ** m_pPDF2D
The 2D data histogram for node potentials and 2 features[state].
Base abstract class for node potentials training.
void calculateNodePotentials(const Mat &featureVector, Mat &potential, Mat &mask) const
Calculates the node potential, based on the feature vector.