Public Member Functions | Private Member Functions | Private Attributes
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)
 Perform Belief Propagation.
void Execute (int loops, int depth)
 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:
dimNumber of hypotheses

Definition at line 42 of file belief.h.


Constructor & Destructor Documentation

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

Constructor.

Parameters:
wImage width
hImage height

Definition at line 40 of file belief.cpp.

template<int dim>
BeliefProp< dim >::~BeliefProp ( )

Definition at line 55 of file belief.cpp.


Member Function Documentation

template<int dim>
void BeliefProp< dim >::ComputeBeliefs ( ) [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:
maskNot used right now
template<int dim>
void BeliefProp< dim >::Execute ( int  loops)

Perform Belief Propagation.

Perform loopy belief propagation on CPU

Parameters:
loopsNumber of iterations

Definition at line 114 of file belief.cpp.

template<int dim>
void BeliefProp< dim >::Execute ( int  loops,
int  depth 
)

Perform Belief Propagation.

Perform loopy belief propagation on CPU

Parameters:
loopsNumber of iterations
depthDepth of Propagation

Definition at line 122 of file belief.cpp.

template<int dim>
float ** BeliefProp< dim >::GetBeliefs ( )

Get labelling beliefs.

Returns:
labelling beliefs

Definition at line 74 of file belief.cpp.

template<int dim>
float ** BeliefProp< dim >::GetPriors ( )

Get Prior probabilities.

Returns:
prior probabilities

Definition at line 69 of file belief.cpp.

template<int dim>
void BeliefProp< dim >::InitMessages ( ) [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 
)

Set the gradient costs.

Parameters:
imgGray-level image
gammaGradient weight

Definition at line 79 of file belief.cpp.

template<int dim>
void BeliefProp< dim >::UpdateMessages ( ) [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 Namespaces Files Functions Variables Typedefs Enumerations Properties Friends Defines


active_realtime_segmentation
Author(s): Mårten Björkman. Maintained by Jeannette Bohg
autogenerated on Wed Jan 23 2013 15:46:44