BayesColormapGenerator Class Reference
Colormap Generator using Bayes method. More...
#include <fvutils/colormap/bayes/bayes_generator.h>

Public Member Functions | |
| BayesColormapGenerator (unsigned int lut_depth=1, hint_t fg_object=H_UNKNOWN, unsigned int lut_width=256, unsigned int lut_height=256) | |
| Constructor. | |
| ~BayesColormapGenerator () | |
| Destructor. | |
| virtual void | set_fg_object (hint_t object) |
| Set foreground object. | |
| virtual void | set_buffer (unsigned char *buffer, unsigned int width, unsigned int height) |
| Set buffer. | |
| virtual YuvColormap * | get_current () |
| Get current color model. | |
| virtual void | consider () |
| Consider current image. | |
| virtual void | calc () |
| Calculate. | |
| virtual void | undo () |
| Undo last inclusion. | |
| virtual void | reset () |
| Reset color model. | |
| virtual void | reset_undo () |
| Reset undo. | |
| virtual void | set_selection (std::vector< fawkes::rectangle_t > region) |
| Set selection. | |
| virtual bool | has_histograms () |
| Check if this color model uses histograms. | |
| virtual std::map< hint_t, Histogram * > * | get_histograms () |
| Get histograms. | |
| virtual void | load_histograms (const char *filename) |
| Load histogram from a file. | |
| virtual void | save_histograms (const char *filename) |
| Save histograms to a file. | |
| void | set_min_probability (float min_prob) |
| Set min probability. | |
Detailed Description
Colormap Generator using Bayes method.
Definition at line 35 of file bayes_generator.h.
Constructor & Destructor Documentation
| BayesColormapGenerator::BayesColormapGenerator | ( | unsigned int | lut_depth = 1, |
|
| hint_t | fg_object = H_UNKNOWN, |
|||
| unsigned int | lut_width = 256, |
|||
| unsigned int | lut_height = 256 | |||
| ) |
Constructor.
- Parameters:
-
lut_depth the depth of the lookup table fg_object the type of a foreground object lut_width the width of the lookup table (u-resolution) lut_height the height of the lookup table (v-resolution)
Definition at line 52 of file bayes_generator.cpp.
References BayesHistosToLut::get_colormap(), and set_fg_object().
| BayesColormapGenerator::~BayesColormapGenerator | ( | ) |
Member Function Documentation
| void BayesColormapGenerator::calc | ( | ) | [virtual] |
Calculate.
Implements ColormapGenerator.
Definition at line 241 of file bayes_generator.cpp.
References BayesHistosToLut::calculateLutValues().
Referenced by ColorTrainWidget::add_to_colormap(), ColorTrainWidget::load_histograms(), and load_histograms().
| void BayesColormapGenerator::consider | ( | ) | [virtual] |
Consider current image.
Implements ColormapGenerator.
Definition at line 196 of file bayes_generator.cpp.
Referenced by ColorTrainWidget::add_to_colormap().
| YuvColormap * BayesColormapGenerator::get_current | ( | ) | [virtual] |
Get current color model.
- Returns:
- current color model
Implements ColormapGenerator.
Definition at line 137 of file bayes_generator.cpp.
Referenced by ColorTrainWidget::add_to_colormap(), ColorTrainWidget::draw_segmentation_result(), ColorTrainWidget::get_colormap(), ColorTrainWidget::load_colormap(), ColorTrainWidget::load_histograms(), and ColorTrainWidget::save_colormap().
| std::map< hint_t, Histogram * > * BayesColormapGenerator::get_histograms | ( | ) | [virtual] |
Get histograms.
- Returns:
- histograms
Implements ColormapGenerator.
Definition at line 322 of file bayes_generator.cpp.
| bool BayesColormapGenerator::has_histograms | ( | ) | [virtual] |
Check if this color model uses histograms.
- Returns:
- true
Implements ColormapGenerator.
Definition at line 312 of file bayes_generator.cpp.
| void BayesColormapGenerator::load_histograms | ( | const char * | filename | ) | [virtual] |
Load histogram from a file.
- Parameters:
-
filename the filename
Definition at line 332 of file bayes_generator.cpp.
References calc(), HistogramBlock::depth(), BayesHistosToLut::get_colormap(), HistogramBlock::height(), HistogramFile::histogram_blocks(), FireVisionDataFile::read(), FireVisionDataFile::set_owns_blocks(), and HistogramBlock::width().
Referenced by ColorTrainWidget::load_histograms().
| void BayesColormapGenerator::reset | ( | ) | [virtual] |
Reset color model.
Implements ColormapGenerator.
Definition at line 268 of file bayes_generator.cpp.
References YuvColormap::reset().
Referenced by ColorTrainWidget::reset_colormap().
| void BayesColormapGenerator::reset_undo | ( | ) | [virtual] |
Reset undo.
Implements ColormapGenerator.
Definition at line 292 of file bayes_generator.cpp.
Referenced by ColorTrainWidget::add_to_colormap().
| void BayesColormapGenerator::save_histograms | ( | const char * | filename | ) | [virtual] |
Save histograms to a file.
- Parameters:
-
filename the filename
Definition at line 443 of file bayes_generator.cpp.
References HistogramFile::add_histogram_block(), HistogramBlock::set_object_type(), FireVisionDataFile::set_owns_blocks(), and FireVisionDataFile::write().
Referenced by ColorTrainWidget::save_histograms().
| void BayesColormapGenerator::set_buffer | ( | unsigned char * | buffer, | |
| unsigned int | width, | |||
| unsigned int | height | |||
| ) | [virtual] |
Set buffer.
- Parameters:
-
buffer image buffer width image width height image height
Implements ColormapGenerator.
Definition at line 116 of file bayes_generator.cpp.
Referenced by ColorTrainWidget::add_to_colormap().
| void BayesColormapGenerator::set_fg_object | ( | hint_t | object | ) | [virtual] |
Set foreground object.
- Parameters:
-
object the new foreground object
Definition at line 95 of file bayes_generator.cpp.
Referenced by ColorTrainWidget::add_to_colormap(), and BayesColormapGenerator().
| void BayesColormapGenerator::set_min_probability | ( | float | min_prob | ) |
Set min probability.
- Parameters:
-
min_prob min probability.
Definition at line 188 of file bayes_generator.cpp.
References BayesHistosToLut::setMinProbability().
| void BayesColormapGenerator::set_selection | ( | std::vector< fawkes::rectangle_t > | region | ) | [virtual] |
Set selection.
- Parameters:
-
region selected region.
Definition at line 159 of file bayes_generator.cpp.
Referenced by ColorTrainWidget::add_to_colormap().
| void BayesColormapGenerator::undo | ( | ) | [virtual] |
Undo last inclusion.
Implements ColormapGenerator.
Definition at line 250 of file bayes_generator.cpp.
The documentation for this class was generated from the following files:
- src/firevision/fvutils/colormap/bayes/bayes_generator.h
- src/firevision/fvutils/colormap/bayes/bayes_generator.cpp

