LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::chrominanceMapEstimator Class Reference

This class computes a map between the chrominances and the most likely object based on chrominance histograms and the Bayes Theorem. More...

#include <ltiChrominanceMapEstimator.h>

Inheritance diagram for lti::chrominanceMapEstimator:
Inheritance graph
[legend]
Collaboration diagram for lti::chrominanceMapEstimator:
Collaboration graph
[legend]

List of all members.

Classes

class  parameters
 the parameters for the class chrominanceModelEstimator More...

Public Member Functions

 chrominanceMapEstimator ()
 chrominanceMapEstimator (const parameters &par)
 chrominanceMapEstimator (const chrominanceMapEstimator &other)
virtual ~chrominanceMapEstimator ()
virtual const char * getTypeName () const
chrominanceMapEstimatorcopy (const chrominanceMapEstimator &other)
chrominanceMapEstimatoroperator= (const chrominanceMapEstimator &other)
virtual functorclone () const
const parametersgetParameters () const
bool setParameters (const parameters &theParams)
bool apply (ubyte u, ubyte v, int &label) const
bool apply (ubyte u, ubyte v, int &label, float &prob) const
bool update ()
bool updateExclude ()
bool updateAll ()
const channel8getChrominanceMap () const
const channelgetProbabilityMap () const
bool writeChrominanceMap (const std::string &prefix, const vector< rgbPixel > &colors) const

Protected Member Functions

void initUpdate (std::vector< histogram2D::const_iterator > &histIts, dvector &objNumEntries) const
parametersgetWritableParameters ()

Protected Attributes

channel8 m_colorMap
channel m_probabilityMap
bool m_constructMap

Detailed Description

This class computes a map between the chrominances and the most likely object based on chrominance histograms and the Bayes Theorem.

For details about building the colors models take a look at the description of chrominanceModelEstimator.

See also:
overlappingSets2D, chrominanceModelEstimator, probabilityMap2D, chrominanceMapMasking

Constructor & Destructor Documentation

lti::chrominanceMapEstimator::chrominanceMapEstimator (  ) 

default constructor

lti::chrominanceMapEstimator::chrominanceMapEstimator ( const parameters par  ) 

Construct a functor using the given parameters.

lti::chrominanceMapEstimator::chrominanceMapEstimator ( const chrominanceMapEstimator other  ) 

copy constructor

Parameters:
other the object to be copied
virtual lti::chrominanceMapEstimator::~chrominanceMapEstimator (  )  [virtual]

destructor


Member Function Documentation

bool lti::chrominanceMapEstimator::apply ( ubyte  u,
ubyte  v,
int &  label,
float &  prob 
) const [inline]

For a given chrominance get the object label which is most likely and its probability.

For more sophisticated segmentation

See also:
chrominanceMapMasking.
Parameters:
u refers to the columns of the chrominance map.
v refers to the rows of the chrominance map.
label the most likely object label.
prob the probability of the most likely object.
Returns:
true on success and false otherwise.

References lti::genericMatrix< T >::at(), m_colorMap, and m_probabilityMap.

bool lti::chrominanceMapEstimator::apply ( ubyte  u,
ubyte  v,
int &  label 
) const [inline]

For a given chrominance get the object label which is most likely.

For more sophisticated segmentation

See also:
chrominanceMapMasking.
Parameters:
u refers to the columns of the chrominance map.
v refers to the rows of the chrominance map.
label the most likely object label.
Returns:
true on success and false otherwise.

References lti::genericMatrix< T >::at(), and m_colorMap.

virtual functor* lti::chrominanceMapEstimator::clone (  )  const [virtual]

returns a pointer to a clone of this functor.

Reimplemented from lti::chrominanceModelEstimator.

chrominanceMapEstimator& lti::chrominanceMapEstimator::copy ( const chrominanceMapEstimator other  ) 

copy data of "other" functor.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

Reimplemented from lti::chrominanceModelEstimator.

const channel8& lti::chrominanceMapEstimator::getChrominanceMap (  )  const

Returns the chrominance map.

const parameters& lti::chrominanceMapEstimator::getParameters (  )  const

returns used parameters

Reimplemented from lti::chrominanceModelEstimator.

const channel& lti::chrominanceMapEstimator::getProbabilityMap (  )  const

Returns the probabilities of the most likely object.

virtual const char* lti::chrominanceMapEstimator::getTypeName (  )  const [virtual]

returns the name of this type ("chrominanceModelEstimator")

Reimplemented from lti::chrominanceModelEstimator.

parameters& lti::chrominanceMapEstimator::getWritableParameters (  )  [protected]

Returns used parameters.

Reimplemented from lti::chrominanceModelEstimator.

void lti::chrominanceMapEstimator::initUpdate ( std::vector< histogram2D::const_iterator > &  histIts,
dvector objNumEntries 
) const [protected]

Initializes stuff needed by the update methods.

Parameters:
histIts iterator pointing at the chrominance model
objNumEntries the number of entries in each histogram.
chrominanceMapEstimator& lti::chrominanceMapEstimator::operator= ( const chrominanceMapEstimator other  ) 

alias for copy member

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

Reimplemented from lti::chrominanceModelEstimator.

bool lti::chrominanceMapEstimator::setParameters ( const parameters theParams  )  [virtual]

set the parameters and ensure validity

Reimplemented from lti::chrominanceModelEstimator.

bool lti::chrominanceMapEstimator::update (  ) 

Recompute the chrominance map and probabilities from the chrominance models.

This method checks the parameters to determine if the entire map is processed or only those parts that are covered by an object as specified by the maximal chrominance sets.

Returns:
true on success and false otherwise.
bool lti::chrominanceMapEstimator::updateAll (  ) 

Recompute the chrominance map and probabilities from the chrominance models.

This method processes the entire map. specified by the maximal chrominance sets.

Returns:
true on success and false otherwise.
bool lti::chrominanceMapEstimator::updateExclude (  ) 

Recompute the chrominance map and probabilities from the chrominance models.

This method processes only those parts that are covered by an object. specified by the maximal chrominance sets.

Returns:
true on success and false otherwise.
bool lti::chrominanceMapEstimator::writeChrominanceMap ( const std::string &  prefix,
const vector< rgbPixel > &  colors 
) const

Writes the chrominance map and probabilities to disk.

Parameters:
prefix a string containing the path or prefix to the files. If you specify a directory, please do not forget the /. It is not added automatically.
colors color each object as specified by this vector.
Returns:
true on success and false otherwise.

Member Data Documentation

the color map

Referenced by apply().

Special care when error in setParameters during construction.

Historic and complicated code, but it works.

probabilities of the best object

Referenced by apply().


The documentation for this class was generated from the following file:

Generated on Sat Apr 10 15:27:06 2010 for LTI-Lib by Doxygen 1.6.1