BayesColormapGenerator Class Reference

Colormap Generator using Bayes method. More...

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

Inheritance diagram for BayesColormapGenerator:

List of all members.


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 YuvColormapget_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.

Author:
Tim Niemueller

Daniel Beck

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 (  ) 

Destructor.

Definition at line 73 of file bayes_generator.cpp.


Member Function Documentation

void BayesColormapGenerator::calc (  )  [virtual]

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]

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]

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.
See also:
BayesHistosToLut::setMinProbability()

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: