BeliefProp< dim > Class Template Reference
Templated Belief Propagation Class.
More...
#include <belief.h>
List of all members.
Public Member Functions |
| BeliefProp (int w, int h) |
| Constructor.
|
void | ComputeMAP (Image< unsigned char > &mask) |
| Compute Posterior with Graph Cuts.
|
void | Execute (int loops, int depth) |
| Perform Belief Propagation.
|
void | Execute (int loops) |
| Perform Belief Propagation.
|
float ** | GetBeliefs () |
| Get labelling beliefs.
|
float ** | GetPriors () |
| Get Prior probabilities.
|
void | SetGradientCosts (Image< unsigned char > &img, float gamma) |
| Set the gradient costs.
|
| ~BeliefProp () |
Private Member Functions |
void | ComputeBeliefs () |
| Compute the Beliefs.
|
void | InitMessages () |
| Initialise the Messages.
|
void | UpdateMessages () |
| Update the Messages.
|
Private Attributes |
float * | belief [dim] |
| Labeling beliefs.
|
float * | costh |
| horizontal costs
|
float * | costv |
| vertical costs
|
int | height |
| Image height.
|
float * | msgd [dim] |
| Messages down.
|
float * | msgl [dim] |
| Messages to left.
|
float * | msgr [dim] |
| Messages to right.
|
float * | msgu [dim] |
| Messages up.
|
float * | prior [dim] |
| Prior probabilities.
|
int | width |
| Image width.
|
Detailed Description
template<int dim = 3>
class BeliefProp< dim >
Templated Belief Propagation Class.
Performs loopy belief propagation on CPU
- Parameters:
-
Definition at line 42 of file belief.h.
Constructor & Destructor Documentation
Constructor.
- Parameters:
-
Definition at line 40 of file belief.cpp.
Member Function Documentation
template<int dim>
void BeliefProp< dim >::ComputeBeliefs |
( |
|
) |
[inline, private] |
Compute Posterior with Graph Cuts.
Compute Posterior with Graph Cuts (Not used right now)
- Parameters:
-
template<int dim>
void BeliefProp< dim >::Execute |
( |
int |
loops, |
|
|
int |
depth | |
|
) |
| | [inline] |
Perform Belief Propagation.
Perform loopy belief propagation on CPU
- Parameters:
-
| loops | Number of iterations |
| depth | Depth of Propagation |
Definition at line 122 of file belief.cpp.
template<int dim>
void BeliefProp< dim >::Execute |
( |
int |
loops |
) |
[inline] |
Perform Belief Propagation.
Perform loopy belief propagation on CPU
- Parameters:
-
| loops | Number of iterations |
Definition at line 114 of file belief.cpp.
template<int dim>
float ** BeliefProp< dim >::GetBeliefs |
( |
|
) |
[inline] |
Get labelling beliefs.
- Returns:
- labelling beliefs
Definition at line 74 of file belief.cpp.
template<int dim>
float ** BeliefProp< dim >::GetPriors |
( |
|
) |
[inline] |
Get Prior probabilities.
- Returns:
- prior probabilities
Definition at line 69 of file belief.cpp.
template<int dim>
void BeliefProp< dim >::InitMessages |
( |
|
) |
[inline, private] |
Initialise the Messages.
Definition at line 177 of file belief.cpp.
template<int dim>
void BeliefProp< dim >::SetGradientCosts |
( |
Image< unsigned char > & |
img, |
|
|
float |
gamma | |
|
) |
| | [inline] |
Set the gradient costs.
- Parameters:
-
| img | Gray-level image |
| gamma | Gradient weight |
Definition at line 79 of file belief.cpp.
template<int dim>
void BeliefProp< dim >::UpdateMessages |
( |
|
) |
[inline, private] |
Member Data Documentation
Labeling beliefs.
Definition at line 54 of file belief.h.
horizontal costs
Definition at line 56 of file belief.h.
vertical costs
Definition at line 58 of file belief.h.
Messages down.
Definition at line 50 of file belief.h.
Messages to left.
Definition at line 44 of file belief.h.
Messages to right.
Definition at line 46 of file belief.h.
Messages up.
Definition at line 48 of file belief.h.
Prior probabilities.
Definition at line 52 of file belief.h.
The documentation for this class was generated from the following files: