Fawkes API
Fawkes Development Version
|
Colormap Generator using Bayes method. More...
#include <>>
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. More... | |
~BayesColormapGenerator () | |
Destructor. More... | |
virtual void | set_fg_object (hint_t object) |
Set foreground object. More... | |
virtual void | set_buffer (unsigned char *buffer, unsigned int width, unsigned int height) |
Set buffer. More... | |
virtual YuvColormap * | get_current () |
Get current color model. More... | |
virtual void | consider () |
Consider current image. More... | |
virtual void | calc () |
Calculate. More... | |
virtual void | undo () |
Undo last inclusion. More... | |
virtual void | reset () |
Reset color model. More... | |
virtual void | reset_undo () |
Reset undo. More... | |
virtual void | set_selection (std::vector< fawkes::rectangle_t > region) |
Set selection. More... | |
virtual bool | has_histograms () |
Check if this color model uses histograms. More... | |
virtual std::map< hint_t, Histogram *> * | get_histograms () |
Get histograms. More... | |
virtual void | load_histograms (const char *filename) |
Load histogram from a file. More... | |
virtual void | save_histograms (const char *filename) |
Save histograms to a file. More... | |
void | set_min_probability (float min_prob) |
Set min probability. More... | |
![]() | |
virtual | ~ColormapGenerator () |
Virtual empty destructor. More... | |
Colormap Generator using Bayes method.
Definition at line 40 of file bayes_generator.h.
firevision::BayesColormapGenerator::BayesColormapGenerator | ( | unsigned int | lut_depth = 1 , |
hint_t | fg_object = H_UNKNOWN , |
||
unsigned int | lut_width = 256 , |
||
unsigned int | lut_height = 256 |
||
) |
Constructor.
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 57 of file bayes_generator.cpp.
firevision::BayesColormapGenerator::~BayesColormapGenerator | ( | ) |
Destructor.
Definition at line 78 of file bayes_generator.cpp.
|
virtual |
Calculate.
Implements firevision::ColormapGenerator.
Definition at line 246 of file bayes_generator.cpp.
|
virtual |
Consider current image.
Implements firevision::ColormapGenerator.
Definition at line 201 of file bayes_generator.cpp.
|
virtual |
Get current color model.
Implements firevision::ColormapGenerator.
Definition at line 142 of file bayes_generator.cpp.
|
virtual |
Get histograms.
Implements firevision::ColormapGenerator.
Definition at line 327 of file bayes_generator.cpp.
|
virtual |
Check if this color model uses histograms.
Implements firevision::ColormapGenerator.
Definition at line 317 of file bayes_generator.cpp.
|
virtual |
Load histogram from a file.
filename | the filename |
Definition at line 337 of file bayes_generator.cpp.
References firevision::HistogramBlock::depth(), firevision::HistogramBlock::height(), firevision::HistogramFile::histogram_blocks(), firevision::FireVisionDataFile::read(), firevision::FireVisionDataFile::set_owns_blocks(), and firevision::HistogramBlock::width().
|
virtual |
Reset color model.
Implements firevision::ColormapGenerator.
Definition at line 273 of file bayes_generator.cpp.
|
virtual |
Reset undo.
Implements firevision::ColormapGenerator.
Definition at line 297 of file bayes_generator.cpp.
|
virtual |
Save histograms to a file.
filename | the filename |
Definition at line 448 of file bayes_generator.cpp.
References firevision::Histogram::add(), firevision::HistogramFile::add_histogram_block(), firevision::Histogram::get_sum(), firevision::Histogram::get_value(), firevision::HistogramBlock::set_object_type(), firevision::FireVisionDataFile::set_owns_blocks(), firevision::Histogram::set_value(), firevision::Histogram::sub(), and firevision::FireVisionDataFile::write().
|
virtual |
Set buffer.
buffer | image buffer |
width | image width |
height | image height |
Implements firevision::ColormapGenerator.
Definition at line 121 of file bayes_generator.cpp.
|
virtual |
Set foreground object.
object | the new foreground object |
Definition at line 100 of file bayes_generator.cpp.
void firevision::BayesColormapGenerator::set_min_probability | ( | float | min_prob | ) |
Set min probability.
min_prob | min probability. |
Definition at line 193 of file bayes_generator.cpp.
|
virtual |
Set selection.
region | selected region. |
Definition at line 164 of file bayes_generator.cpp.
|
virtual |
Undo last inclusion.
Implements firevision::ColormapGenerator.
Definition at line 255 of file bayes_generator.cpp.