BayesHistosToLut Class Reference
LUT generation by using Bayesian method on histograms. More...
#include <fvutils/colormap/bayes/bayes_histos_to_lut.h>
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. | |
| YuvColormap * | get_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.
Definition at line 41 of file bayes_histos_to_lut.h.
Constructor & Destructor Documentation
| 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 59 of file bayes_histos_to_lut.cpp.
| BayesHistosToLut::~BayesHistosToLut | ( | ) |
Member Function Documentation
| void BayesHistosToLut::calculateLutAllColors | ( | ) |
Calculate all LUT colors.
Definition at line 309 of file bayes_histos_to_lut.cpp.
References YuvColormap::deepness(), YuvColormap::depth(), ColorObjectMap::get_instance(), and YuvColormap::set().
| void BayesHistosToLut::calculateLutValues | ( | bool | penalty = false |
) |
Calculate LUT values.
- Parameters:
-
penalty if true, non-ball colors are penalized
Definition at line 376 of file bayes_histos_to_lut.cpp.
References YuvColormap::deepness(), YuvColormap::depth(), Histogram::get_average(), ColorObjectMap::get_instance(), Histogram::get_median(), Histogram::get_num_undos(), Histogram::get_value(), getMostLikelyObject(), YuvColormap::height(), YuvColormap::reset(), YuvColormap::set(), Histogram::set_value(), Histogram::switch_undo(), Histogram::undo(), and YuvColormap::width().
Referenced by BayesColormapGenerator::calc().
| YuvColormap * BayesHistosToLut::get_colormap | ( | ) |
Get generated color model.
- Returns:
- generated color model
Definition at line 596 of file bayes_histos_to_lut.cpp.
Referenced by BayesColormapGenerator::BayesColormapGenerator(), and BayesColormapGenerator::load_histograms().
| float 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
Definition at line 224 of file bayes_histos_to_lut.cpp.
References getAPrioriProb(), and getObjectProb().
| float 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
Definition at line 196 of file bayes_histos_to_lut.cpp.
References getAPrioriProb(), and getObjectProb().
Referenced by getMostLikelyObject().
| float 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 181 of file bayes_histos_to_lut.cpp.
| float 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 160 of file bayes_histos_to_lut.cpp.
Referenced by getAPosterioriProb().
| hint_t 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 283 of file bayes_histos_to_lut.cpp.
References getAPosterioriProb().
| hint_t 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 251 of file bayes_histos_to_lut.cpp.
References getAPosterioriProb().
Referenced by calculateLutValues().
| string BayesHistosToLut::getName | ( | ) |
| float BayesHistosToLut::getObjectProb | ( | hint_t | object | ) |
Get object probability.
- Parameters:
-
object object
- Returns:
- probability.
Definition at line 102 of file bayes_histos_to_lut.cpp.
Referenced by getAPosterioriProb().
| void BayesHistosToLut::save | ( | std::string | filename | ) |
Save LUT to file.
- Parameters:
-
filename file name
Definition at line 542 of file bayes_histos_to_lut.cpp.
References ColormapFile::add_colormap(), and FireVisionDataFile::write().
| void BayesHistosToLut::saveLut | ( | char * | file | ) |
Save LUT to file.
- Parameters:
-
file file name
Definition at line 531 of file bayes_histos_to_lut.cpp.
References ColormapFile::add_colormap(), and FireVisionDataFile::write().
| void BayesHistosToLut::setMinProbability | ( | float | min_prob | ) |
Set min probability.
- Parameters:
-
min_prob minimum probability
Definition at line 554 of file bayes_histos_to_lut.cpp.
Referenced by BayesColormapGenerator::set_min_probability().
| void BayesHistosToLut::setMinProbForColor | ( | float | min_prob, | |
| hint_t | hint | |||
| ) |
Set min probability for color.
- Parameters:
-
min_prob minimum probability hint color hint
Definition at line 565 of file bayes_histos_to_lut.cpp.
The documentation for this class was generated from the following files:
- src/firevision/fvutils/colormap/bayes/bayes_histos_to_lut.h
- src/firevision/fvutils/colormap/bayes/bayes_histos_to_lut.cpp

