Direct Graphical Models
v.1.7.0
|
Node prior probability estimation class More...
#include <PriorNode.h>
Public Member Functions | |
CPriorNode (byte nStates) | |
Constructor. More... | |
~CPriorNode (void) | |
void | addNodeGroundTruth (const Mat >) |
Adds ground truth values to the co-occurance histogram vector. More... | |
void | addNodeGroundTruth (byte gt) |
Adds a ground truth value to the co-occurance histogram vector. More... | |
Public Member Functions inherited from DirectGraphicalModels::CPrior | |
CPrior (byte nStates, RandomModelType type) | |
Constructor. More... | |
~CPrior (void) | |
void | reset (void) |
Resets class variables. More... | |
Mat | getPrior (float weight=1.0f) const |
Returns the prior probabilies. More... | |
Public Member Functions inherited from DirectGraphicalModels::CBaseRandomModel | |
CBaseRandomModel (byte nStates) | |
Constructor. More... | |
virtual | ~CBaseRandomModel (void) |
virtual void | save (const std::string &path, const std::string &name=std::string(), short idx=-1) const |
Saves the training data. More... | |
virtual void | load (const std::string &path, const std::string &name=std::string(), short idx=-1) |
Loads the training data. More... | |
byte | getNumStates (void) const |
Returns number of states (classes) More... | |
Protected Member Functions | |
Mat | calculatePrior (void) const |
Calculates the prior probabilies. More... | |
Protected Member Functions inherited from DirectGraphicalModels::CPrior | |
virtual void | saveFile (FILE *pFile) const |
Saves the random model into the file. More... | |
virtual void | loadFile (FILE *pFile) |
Loads the random model from the file. 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... | |
Additional Inherited Members | |
Protected Attributes inherited from DirectGraphicalModels::CPrior | |
Mat | m_histogramPrior |
The class cooccurance histogram. More... | |
Protected Attributes inherited from DirectGraphicalModels::CBaseRandomModel | |
byte | m_nStates |
The number of states (classes) More... | |
Node prior probability estimation class
Definition at line 14 of file PriorNode.h.
|
inline |
Constructor.
nStates | Number of states (classes) |
Definition at line 21 of file PriorNode.h.
|
inline |
Definition at line 22 of file PriorNode.h.
void DirectGraphicalModels::CPriorNode::addNodeGroundTruth | ( | const Mat & | gt | ) |
Adds ground truth values to the co-occurance histogram vector.
gt | Matrix, each element of which is a ground-truth state (class) |
Definition at line 7 of file PriorNode.cpp.
void DirectGraphicalModels::CPriorNode::addNodeGroundTruth | ( | byte | gt | ) |
Adds a ground truth value to the co-occurance histogram vector.
gt | The ground-truth state (class) |
Definition at line 12 of file PriorNode.cpp.
|
protectedvirtual |
Calculates the prior probabilies.
This function returns the normalized class co-occurance histogram, which ought to be build during the training phase with help of the addNodeGroundTruth() function.
Implements DirectGraphicalModels::CPrior.
Definition at line 18 of file PriorNode.cpp.