2 #include "GraphPairwise.h" 12 float *temp =
new float[nStates];
14 for (
unsigned int i = 0; i < nIt; i++) {
15 #ifdef DEBUG_PRINT_INFO 16 if (i == 0) printf(
"\n");
17 if (i % 5 == 0) printf(
"--- It: %d ---\n", i);
21 float *temp =
new float[nStates];
26 size_t nToEdges = node->to.size();
27 for (
size_t e_t = 0; e_t < nToEdges; e_t++) {
byte getNumStates(void) const
Returns number of states (classes)
void swapMessages(void)
Swaps Edge::msg and Edge::msg_temp for all edges in the graph.
float * msg_temp
Temp Message (used in message-passing algorithms): Mat(size: nStates x 1; type: CV_32FC1) ...
CGraph & getGraph(void) const
Returns the reference to the graph.
virtual void calculateMessages(unsigned int nIt)
Calculates messages, associated with the edges of corresponding graphical model.
std::unique_ptr< Node > ptr_node_t
bool m_maxSum
Flag indicating weather the max-sum LBP (Viterbi algorithm) should be applied.
CGraphPairwise & getGraphPairwise(void) const
Returns the graph.
void calculateMessage(Edge *edge, float *temp, float *&dst, bool maxSum=false)
Calculates one message for the specified edge edge.