firevision::BayesHistosToLut Class Reference

LUT generation by using Bayesian method on histograms. More...

#include <fvutils/colormap/bayes/bayes_histos_to_lut.h>

List of all members.

Public Member Functions

 BayesHistosToLut (std::map< hint_t, Histogram * > &histos, unsigned int d=1, hint_t fg_object=H_UNKNOWN, unsigned int w=256, unsigned int h=256)
 Constructor.
 ~BayesHistosToLut ()
 Destructor.
std::string getName ()
 Get name.
float getObjectProb (hint_t object)
 Get object probability.
float getAPrioriProb (unsigned int u, unsigned int v, hint_t object)
 P(u, v| object).
float getAPrioriProb (unsigned int y, unsigned int u, unsigned int v, hint_t object)
 P(u, v| object).
float getAPosterioriProb (hint_t object, unsigned int u, unsigned int v)
 P(object| u, v).
float getAPosterioriProb (hint_t object, unsigned int y, unsigned int u, unsigned int v)
 P(object| u, v).
hint_t getMostLikelyObject (unsigned int u, unsigned int v)
 Get most likely object.
hint_t getMostLikelyObject (unsigned int y, unsigned int u, unsigned int v)
 Get most likely object.
void setMinProbability (float min_prob)
 Set min probability.
void setMinProbForColor (float min_prob, hint_t hint)
 Set min probability for color.
YuvColormapget_colormap ()
 Get generated color model.
void calculateLutValues (bool penalty=false)
 Calculate LUT values.
void calculateLutAllColors ()
 Calculate all LUT colors.
void saveLut (char *file)
 Save LUT to file.
void save (std::string filename)
 Save LUT to file.

Detailed Description

LUT generation by using Bayesian method on histograms.

Generates a YUV colormap.

Author:
Martin Herakles.
Tim Niemueller
Daniel Beck

Definition at line 46 of file bayes_histos_to_lut.h.


Constructor & Destructor Documentation

firevision::BayesHistosToLut::BayesHistosToLut ( std::map< hint_t, Histogram * > &  histos,
unsigned int  d = 1,
hint_t  object = H_UNKNOWN,
unsigned int  w = 256,
unsigned int  h = 256 
)

Constructor.

Parameters:
histos histograms
d depth of lookup table
object type of the foreground object
w the width of the lookup table (u-resolution)
h the height of the lookup table (v-resolution)

Definition at line 65 of file bayes_histos_to_lut.cpp.

firevision::BayesHistosToLut::~BayesHistosToLut (  ) 

Destructor.

Definition at line 89 of file bayes_histos_to_lut.cpp.


Member Function Documentation

void firevision::BayesHistosToLut::calculateLutAllColors (  ) 
void firevision::BayesHistosToLut::calculateLutValues ( bool  penalty = false  ) 
YuvColormap * firevision::BayesHistosToLut::get_colormap (  ) 

Get generated color model.

Returns:
generated color model

Definition at line 604 of file bayes_histos_to_lut.cpp.

Referenced by firevision::BayesColormapGenerator::BayesColormapGenerator(), and firevision::BayesColormapGenerator::load_histograms().

float firevision::BayesHistosToLut::getAPosterioriProb ( hint_t  object,
unsigned int  y,
unsigned int  u,
unsigned int  v 
)

P(object| u, v).

Get a-posteriori probability.

Parameters:
object objcet
y YUV Y-value
u YUV U-value
v YUV V-value
Returns:
a posteriori probability

Definition at line 232 of file bayes_histos_to_lut.cpp.

References getAPrioriProb(), and getObjectProb().

float firevision::BayesHistosToLut::getAPosterioriProb ( hint_t  object,
unsigned int  u,
unsigned int  v 
)

P(object| u, v).

Get a-posteriori probability.

Parameters:
object objcet
u YUV U-value
v YUV V-value
Returns:
a posteriori probability

Definition at line 203 of file bayes_histos_to_lut.cpp.

References getAPrioriProb(), and getObjectProb().

Referenced by getMostLikelyObject().

float firevision::BayesHistosToLut::getAPrioriProb ( unsigned int  y,
unsigned int  u,
unsigned int  v,
hint_t  object 
)

P(u, v| object).

Get a-priori probability.

Parameters:
y YUV Y-value
u YUV U-value
v YUV V-value
object object.
Returns:
probability

Definition at line 187 of file bayes_histos_to_lut.cpp.

float firevision::BayesHistosToLut::getAPrioriProb ( unsigned int  u,
unsigned int  v,
hint_t  object 
)

P(u, v| object).

Get a-priori probability.

Parameters:
u YUV U-value
v YUV V-value
object object.
Returns:
probability

Definition at line 166 of file bayes_histos_to_lut.cpp.

Referenced by getAPosterioriProb().

hint_t firevision::BayesHistosToLut::getMostLikelyObject ( unsigned int  y,
unsigned int  u,
unsigned int  v 
)

Get most likely object.

Parameters:
y YUV Y-value
u YUV U-value
v YUV V-value
Returns:
most likely object for this color

Definition at line 291 of file bayes_histos_to_lut.cpp.

References getAPosterioriProb().

hint_t firevision::BayesHistosToLut::getMostLikelyObject ( unsigned int  u,
unsigned int  v 
)

Get most likely object.

Parameters:
u YUV U-value
v YUV V-value
Returns:
most likely object for this color

Definition at line 259 of file bayes_histos_to_lut.cpp.

References getAPosterioriProb().

Referenced by calculateLutValues().

string firevision::BayesHistosToLut::getName (  ) 

Get name.

Returns:
BayesHistosToLut

Definition at line 98 of file bayes_histos_to_lut.cpp.

float firevision::BayesHistosToLut::getObjectProb ( hint_t  object  ) 

Get object probability.

Parameters:
object object
Returns:
probability.

Definition at line 108 of file bayes_histos_to_lut.cpp.

Referenced by getAPosterioriProb().

void firevision::BayesHistosToLut::save ( std::string  filename  ) 

Save LUT to file.

Parameters:
filename file name

Definition at line 550 of file bayes_histos_to_lut.cpp.

References firevision::ColormapFile::add_colormap(), and firevision::FireVisionDataFile::write().

void firevision::BayesHistosToLut::saveLut ( char *  file  ) 

Save LUT to file.

Parameters:
file file name

Definition at line 539 of file bayes_histos_to_lut.cpp.

References firevision::ColormapFile::add_colormap(), and firevision::FireVisionDataFile::write().

void firevision::BayesHistosToLut::setMinProbability ( float  min_prob  ) 

Set min probability.

Parameters:
min_prob minimum probability

Definition at line 562 of file bayes_histos_to_lut.cpp.

Referenced by firevision::BayesColormapGenerator::set_min_probability().

void firevision::BayesHistosToLut::setMinProbForColor ( float  min_prob,
hint_t  hint 
)

Set min probability for color.

Parameters:
min_prob minimum probability
hint color hint

Definition at line 573 of file bayes_histos_to_lut.cpp.


The documentation for this class was generated from the following files:

Generated on 1 Mar 2011 for Fawkes API by  doxygen 1.6.1