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:
dim Number of hypotheses

Definition at line 42 of file belief.h.


Constructor & Destructor Documentation

template<int dim>
BeliefProp< dim >::BeliefProp ( int  w,
int  h 
) [inline]

Constructor.

Parameters:
w Image width
h Image height

Definition at line 40 of file belief.cpp.

template<int dim>
BeliefProp< dim >::~BeliefProp (  )  [inline]

Definition at line 55 of file belief.cpp.


Member Function Documentation

template<int dim>
void BeliefProp< dim >::ComputeBeliefs (  )  [inline, private]

Compute the Beliefs.

Definition at line 188 of file belief.cpp.

template<int dim = 3>
void BeliefProp< dim >::ComputeMAP ( Image< unsigned char > &  mask  ) 

Compute Posterior with Graph Cuts.

Compute Posterior with Graph Cuts (Not used right now)

Parameters:
mask Not used right now
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]

Update the Messages.

Definition at line 195 of file belief.cpp.


Member Data Documentation

template<int dim = 3>
float* BeliefProp< dim >::belief[dim] [private]

Labeling beliefs.

Definition at line 54 of file belief.h.

template<int dim = 3>
float* BeliefProp< dim >::costh [private]

horizontal costs

Definition at line 56 of file belief.h.

template<int dim = 3>
float* BeliefProp< dim >::costv [private]

vertical costs

Definition at line 58 of file belief.h.

template<int dim = 3>
int BeliefProp< dim >::height [private]

Image height.

Definition at line 62 of file belief.h.

template<int dim = 3>
float* BeliefProp< dim >::msgd[dim] [private]

Messages down.

Definition at line 50 of file belief.h.

template<int dim = 3>
float* BeliefProp< dim >::msgl[dim] [private]

Messages to left.

Definition at line 44 of file belief.h.

template<int dim = 3>
float* BeliefProp< dim >::msgr[dim] [private]

Messages to right.

Definition at line 46 of file belief.h.

template<int dim = 3>
float* BeliefProp< dim >::msgu[dim] [private]

Messages up.

Definition at line 48 of file belief.h.

template<int dim = 3>
float* BeliefProp< dim >::prior[dim] [private]

Prior probabilities.

Definition at line 52 of file belief.h.

template<int dim = 3>
int BeliefProp< dim >::width [private]

Image width.

Definition at line 60 of file belief.h.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Friends Defines


active_realtime_segmentation
Author(s): Marten Bjorkman. Maintained by Jeannette Bohg
autogenerated on Fri Jan 11 09:51:13 2013