Direct Graphical Models  v.1.7.0
PriorTriplet.cpp
1 #include "PriorTriplet.h"
2 #include "macroses.h"
3 
4 namespace DirectGraphicalModels
5 {
6 void CPriorTriplet::addTripletGroundTruth(byte gt1, byte gt2, byte gt3)
7 {
8  DGM_ASSERT(gt1 < m_nStates);
9  DGM_ASSERT(gt2 < m_nStates);
10  DGM_ASSERT(gt3 < m_nStates);
11  m_histogramPrior.at<int>(gt1, gt2, gt3)++;
12 }
13 
17 {
18  int size[] = {m_nStates, m_nStates, m_nStates};
19  Mat res(3, size, CV_32FC1);
20 
21  res.setTo(1.0f);
22 
23  return res;
24 }
25 
26 }
void addTripletGroundTruth(byte gt1, byte gt2, byte gt3)
Adds the groud-truth value to the co-occurance histogram matrix.
Definition: PriorTriplet.cpp:6
Mat m_histogramPrior
The class cooccurance histogram.
Definition: Prior.h:51
Mat calculatePrior(void) const
Calculates the prior probabilies.
byte m_nStates
The number of states (classes)