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

lti::probabilityMapBase Class Reference

base class for all probability map classes, e.g. More...

#include <ltiProbabilityMapBase.h>

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

List of all members.

Classes

class  parameters
 the parameters for the class probabilityMapBase More...

Public Member Functions

 probabilityMapBase ()
 probabilityMapBase (const probabilityMapBase &other)
virtual ~probabilityMapBase ()
virtual const char * getTypeName () const
virtual bool updateParameters ()
virtual bool setParametersKeepingHistograms (const parameters &theParams)
probabilityMapBasecopy (const probabilityMapBase &other)
probabilityMapBaseoperator= (const probabilityMapBase &other)
virtual functorclone () const =0
const parametersgetParameters () const
virtual bool read (ioHandler &handler, const bool complete=true)=0

Protected Member Functions

virtual bool generate ()
virtual bool generate (const thistogram< double > &objectModel)
virtual bool generate (const thistogram< double > &objectModel, const thistogram< double > &nonObjectModel)
void generateLookupTable (const ivector &dimensions)

Protected Attributes

thistogram< double > probabilityHistogram
matrix< ubytelookupTable

Detailed Description

base class for all probability map classes, e.g.

using 2D or 3D color histograms.


Constructor & Destructor Documentation

lti::probabilityMapBase::probabilityMapBase (  ) 

default constructor

lti::probabilityMapBase::probabilityMapBase ( const probabilityMapBase other  ) 

copy constructor

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

destructor


Member Function Documentation

virtual functor* lti::probabilityMapBase::clone (  )  const [pure virtual]

returns a pointer to a clone of this functor.

Implements lti::functor.

Implemented in lti::probabilityMap, lti::probabilityMap2D, and lti::skinProbabilityMap.

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

copy data of "other" functor.

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

Reimplemented from lti::functor.

Reimplemented in lti::probabilityMap, lti::probabilityMap2D, and lti::skinProbabilityMap.

virtual bool lti::probabilityMapBase::generate ( const thistogram< double > &  objectModel,
const thistogram< double > &  nonObjectModel 
) [protected, virtual]

generate probability histogram from two histograms.

virtual bool lti::probabilityMapBase::generate ( const thistogram< double > &  objectModel  )  [protected, virtual]

generate probability histogram from one histogram.

virtual bool lti::probabilityMapBase::generate (  )  [protected, virtual]

generate probability histogram.

This is automatically called in the setParameters method.

The generate method initialize the probabilityHistogram method which contain the pre-computations based on the bayes-theorem to compute a probability of a pixel to be an object or not.

void lti::probabilityMapBase::generateLookupTable ( const ivector dimensions  )  [protected]

generate lookup table for faster histogram element access

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

returns used parameters

Reimplemented from lti::transform.

Reimplemented in lti::probabilityMap, lti::probabilityMap2D, and lti::skinProbabilityMap.

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

returns the name of this type ("probabilityMapBase")

Reimplemented from lti::transform.

Reimplemented in lti::probabilityMap, lti::probabilityMap2D, and lti::skinProbabilityMap.

probabilityMapBase& lti::probabilityMapBase::operator= ( const probabilityMapBase other  ) 

copy data of "other" functor.

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

Reimplemented from lti::functor.

Reimplemented in lti::probabilityMap, and lti::probabilityMap2D.

virtual bool lti::probabilityMapBase::read ( ioHandler handler,
const bool  complete = true 
) [pure virtual]

Read the functor from the given ioHandler.

The default implementation is to read just the parameters object.

Since this virtual method needs to know the exact type of the parameters to call the proper read method, it will just assume that the current functor instance has a valid parameter set. If this is not the case, you need to reimplement the read method to set first a dummy parameter object.

Parameters:
handler the ioHandler to be used
complete if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written.
Returns:
true if write was successful

Reimplemented from lti::functor.

Implemented in lti::probabilityMap, and lti::probabilityMap2D.

virtual bool lti::probabilityMapBase::setParametersKeepingHistograms ( const parameters theParams  )  [virtual]

This method is similar to setParameters, but the histograms are leaved untouched.

It assumes that some parameters were already set. Otherwise it will return false.

This means, all attributes in the given histograms will be copied, except the histograms themselves.

This is necessary in time critical situations, where some of the attributes have to be modified except the probabilistic models, which are large and require some time to be copied.

virtual bool lti::probabilityMapBase::updateParameters (  )  [virtual]

updateParameters was overloaded to avoid reloading the histograms every time apply is called.

Reimplemented from lti::functor.


Member Data Documentation

element lookup table

probability histogram

This histogram contains already the computations for the first iteration of the color map.


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

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