30 if (weight != 1.0f) res.convertTo(res, res.type(), weight);
Unary random model: no iteraction between nodes.
virtual void loadFile(FILE *pFile)
Loads the random model from the file.
RandomModelType
Random model types.
Mat m_histogramPrior
The class cooccurance histogram.
Base abstract class for random model training.
void reset(void)
Resets class variables.
virtual void saveFile(FILE *pFile) const
Saves the random model into the file.
Mat getPrior(float weight=1.0f) const
Returns the prior probabilies.
CPrior(byte nStates, RandomModelType type)
Constructor.
virtual Mat calculatePrior(void) const =0
Calculates the prior probabilies.
Pairwise random model: maximum two nodes in the cliques.
Triplet random model: maximum tree nodes in the cliques.
byte m_nStates
The number of states (classes)
RandomModelType m_type
Type of the random model (RandomModelType)