57 ,
ITrain(nStates, nFeatures)
58 ,
m_mask(nStates, 1, CV_8UC1)
70 DllExport
static std::shared_ptr<CTrainNode>
create(byte nodeRandomModel, byte nStates, word nFeatures);
77 DllExport
void addFeatureVecs(
const Mat &featureVectors,
const Mat >);
84 DllExport
void addFeatureVecs(
const vec_mat_t &featureVectors,
const Mat >);
91 DllExport
virtual void addFeatureVec(
const Mat &featureVector, byte gt) = 0;
92 DllExport
virtual void train(
bool doClean =
false) {}
101 DllExport Mat
getNodePotentials(
const Mat &featureVectors,
const Mat &weights = Mat(),
float Z = 0.0f)
const;
110 DllExport Mat
getNodePotentials(
const vec_mat_t &featureVectors,
const Mat &weights = Mat(),
float Z = 0.0f)
const;
122 DllExport Mat
getNodePotentials(
const Mat &featureVector,
float weight,
float Z = 0.0f)
const;
void addFeatureVecs(const Mat &featureVectors, const Mat >)
Adds a block of new feature vectors.
virtual void calculateNodePotentials(const Mat &featureVector, Mat &potential, Mat &mask) const =0
Calculates the node potential, based on the feature vector.
OpenCV Artificial Neural Network.
OpenCV Gaussian Mixture Model.
virtual ~CTrainNode(void)=default
Base abstract class for random model training.
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.
NodeRandomModel
Types of the node potential finction.
OpenCV Support Vector Machines.
static std::shared_ptr< CTrainNode > create(byte nodeRandomModel, byte nStates, word nFeatures)
Factory method returning node trainer object.
Base abstract class for node potentials training.
virtual void addFeatureVec(const Mat &featureVector, byte gt)=0
Adds new feature vector.
CTrainNode(byte nStates, word nFeatures)
Constructor.
virtual void train(bool doClean=false)
Random model training.
Interface class for random model training.