latest version v1.9 - last update 10 Apr 2010 |
base class for all probability map classes, e.g. More...
#include <ltiProbabilityMapBase.h>
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) |
probabilityMapBase & | copy (const probabilityMapBase &other) |
probabilityMapBase & | operator= (const probabilityMapBase &other) |
virtual functor * | clone () const =0 |
const parameters & | getParameters () 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< ubyte > | lookupTable |
base class for all probability map classes, e.g.
using 2D or 3D color histograms.
lti::probabilityMapBase::probabilityMapBase | ( | ) |
default constructor
lti::probabilityMapBase::probabilityMapBase | ( | const probabilityMapBase & | other | ) |
copy constructor
other | the object to be copied |
virtual lti::probabilityMapBase::~probabilityMapBase | ( | ) | [virtual] |
destructor
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.
other | the functor to be copied |
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.
other | the functor to be copied |
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.
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. |
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.
matrix<ubyte> lti::probabilityMapBase::lookupTable [protected] |
element lookup table
thistogram<double> lti::probabilityMapBase::probabilityHistogram [protected] |
probability histogram
This histogram contains already the computations for the first iteration of the color map.