5 #include "TrainEdgePottsCS.h" 30 DllExport
virtual void reset(
void);
32 DllExport
virtual void addFeatureVecs(
const Mat &featureVector1, byte gt1,
const Mat &featureVector2, byte gt2);
33 DllExport
virtual void train(
bool doClean =
false);
36 DllExport
virtual void saveFile(FILE *pFile)
const;
37 DllExport
virtual void loadFile(FILE *pFile);
58 DllExport
virtual Mat
calculateEdgePotentials(
const Mat &featureVector1,
const Mat &featureVector2,
const vec_float_t &vParams)
const;
virtual ~CTrainEdgePrior(void)
Contrast-Sensitive Potts training class.
virtual void reset(void)
Resets class variables.
CTrainEdgePrior(byte nStates, word nFeatures, ePotPenalApproach penApproach=eP_APP_PEN_EXP, ePotNormApproach normApproach=eP_APP_NORM_SYMMETRIC)
Constructor.
Edge prior probability estimation class.
virtual void loadFile(FILE *pFile)
Loads the random model from the file.
virtual Mat calculateEdgePotentials(const Mat &featureVector1, const Mat &featureVector2, const vec_float_t &vParams) const
Calculates the edge potential, based on the feature vectors.
Contrast-Sensitive Potts training with edge prior probability class.
ePotPenalApproach
Penalization approach flag.
virtual void addFeatureVecs(const Mat &featureVector1, byte gt1, const Mat &featureVector2, byte gt2)
Adds a pair of feature vectors.
virtual void train(bool doClean=false)
Random model training.
virtual void saveFile(FILE *pFile) const
Saves the random model into the file.
Exponential penalization approach.
ePotNormApproach
Normalization approach flag.
void loadPriorMatrix(void)