29 Mat Hd(H.size(), H.type()); Hd.setTo(0);
31 if (H.at<
float>(x, x) >= 1.0f) Hd.at<
float>(x, x) = 1.0f / sqrtf(H.at<
float>(x, x));
33 gemm(H, Hd, 1.0, Mat(), 0.0, tmp);
34 gemm(Hd, tmp, 1.0, Mat(), 0.0, res);
41 const float *pH = H.ptr<
float>(y);
42 float *pRes = res.ptr<
float>(y);
44 for (x = 0; x <
m_nStates; x++)
if (max < pH[x]) max = pH[x];
45 for (x = 0; x <
m_nStates; x++) pRes[x] = pH[x] / max;
ePotNormApproach m_normApp
Flag specifying the co-occurance histogram matrix normalization approach (Ref. ePotNormApproach) ...
Mat calculatePrior(void) const
Returns the prior edge probability.
Mat m_histogramPrior
The class cooccurance histogram.
void addEdgeGroundTruth(byte gt1, byte gt2)
Adds the groud-truth value to the co-occurance histogram matrix.
byte m_nStates
The number of states (classes)