30 #ifndef __FIREVISION_COLORMODEL_BAYES_HISTOS_TO_LUT_H_ 31 #define __FIREVISION_COLORMODEL_BAYES_HISTOS_TO_LUT_H_ 33 #include <fvutils/base/roi.h> 51 hint_t fg_object = H_UNKNOWN,
53 unsigned int h = 256);
95 void save(std::string filename);
98 std::map<hint_t, Histogram*> &histograms;
99 std::map<hint_t, unsigned int> numberOfOccurrences;
100 std::map<hint_t, float> object_probabilities;
109 float min_probability;
113 float min_prob_green;
114 float min_prob_yellow;
116 float min_prob_white;
117 float min_prob_black;
LUT generation by using Bayesian method on histograms.
void saveLut(char *file)
Save LUT to file.
float getAPosterioriProb(hint_t object, unsigned int u, unsigned int v)
P(object| u, v).
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.
void setMinProbability(float min_prob)
Set min probability.
std::string getName()
Get name.
void setMinProbForColor(float min_prob, hint_t hint)
Set min probability for color.
float getAPrioriProb(unsigned int u, unsigned int v, hint_t object)
P(u, v| object).
void calculateLutValues(bool penalty=false)
Calculate LUT values.
void save(std::string filename)
Save LUT to file.
float getObjectProb(hint_t object)
Get object probability.
void calculateLutAllColors()
Calculate all LUT colors.
YuvColormap * get_colormap()
Get generated color model.
hint_t getMostLikelyObject(unsigned int u, unsigned int v)
Get most likely object.
~BayesHistosToLut()
Destructor.