Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
BIAS::CondensHisto Class Reference

class for tracking an object in an image More...

#include <StateEstimator/CondensHisto.hh>

+ Inheritance diagram for BIAS::CondensHisto:
+ Collaboration diagram for BIAS::CondensHisto:

Public Member Functions

void AddDebugLevel (const long int lv)
 
void AddDebugLevel (const std::string &name)
 
void CheckImageQuality (double percent, int &shutter, int &gain)
 Checks the image Quality by checking the luminance of the image. More...
 
 CondensHisto ()
 Set the state dimension in the constructor. More...
 
bool DebugLevelIsSet (const long int lv) const
 
bool DebugLevelIsSet (const std::string &name) const
 
void DrawHistoSizes (Image< unsigned char > &img)
 this draws the Sizes of the Histogram as arrows at their x position More...
 
virtual void DrawMean (BIAS::Image< unsigned char > &img)
 Draws the mean as a rectangle which size is proportional to the histogram size. More...
 
void DrawPosteriorDistribution (BIAS::Image< unsigned char > &img)
 Draws the samples with their weight as greyvalue, the weight is distributed to the 4 pixels around the sample postion. More...
 
double DrawPosteriorDistribution (BIAS::Image< float > &img)
 same as above but float precision and returns the maximum value also. More...
 
virtual void DrawSamples (Image< unsigned char > &img)
 this draws the sample weights as circles More...
 
void DrawSamplesExt (Image< unsigned char > &img)
 this draws the samples, histogram sizes as rects and weights as grey values More...
 
virtual void DrawSamplesWhite (Image< unsigned char > &img)
 this draws the sample weights as retangeles with greyvalues on white base More...
 
void DrawWeightedSamples (Image< float > &img)
 this draws the samples as circles and the color indicates the size of the histogram (the z-coordinate) More...
 
virtual void EvaluateImportanceWeights ()
 If you want to use importance sampling, then overload this function, which is the importance function. More...
 
virtual void EvaluateObservationDensities ()
 Here assign a weight to each sample. More...
 
Image< unsigned char > GetAktImage ()
 
int GetDebugLevel () const
 
std::ostream & GetDebugStream () const
 
void GetDebugStream (std::ostream &os) const
 
void GetMaxValue (Vector< double > &max)
 
void GetMaxVariance (Vector< double > &maxVar)
 
double GetMaxWeight (int &index)
 
Vector< double > GetMean ()
 returns the mean state of the density distribution More...
 
void GetMeanValue (Vector< double > &mean)
 
void GetMeanVariance (Vector< double > &meanVar)
 
double GetMeanWeight () const
 Returns the mean weight of all samples. More...
 
const std::vector
< BIAS::Vector< double > > & 
GetSamplePositions ()
 
void GetSamplePositions (Image< float > &sampleImg)
 
double GetVariance () const
 returns the weighted variance as a scalar More...
 
bool GetVariance (Vector< double > &var) const
 Returns the variance of the sample positions in var. More...
 
bool GetWeightedVariance (Vector< double > &var) const
 Returns the "weighted variance" of the sample positions in var. More...
 
int Init (unsigned int nrSmaples)
 Init the Condensation directly after constructor, with the desired amount of Samples, there more the better the approximation of the real densities. More...
 
virtual void InitModelDefaults ()
 Here u can specify the model and process defaults. More...
 
int InitPrior ()
 sets the sample positions for first time step More...
 
virtual void InitPriorPositions (unsigned int nrOfInitSamples)
 The Prior condition is used to init the first sample positions. More...
 
long int Name2DebugLevel (const std::string &name) const
 looks up a debuglevel in the internal map, returns 0 if not found More...
 
long int NewDebugLevel (const std::string &name)
 creates a new debuglevel More...
 
int PredictNewSamplePositions ()
 
void PrintDebugLevel (std::ostream &os=std::cout) const
 
void Process ()
 This really does one iteration of Condensation. More...
 
void RemoveDebugLevel (const long int lv)
 
void RemoveDebugLevel (const std::string &name)
 
void SetActiveImage (Image< unsigned char > &img)
 sets the present picture to compare and create new observation More...
 
void SetArea (Vector3< double > min, Vector3< double > max)
 The area for the initial uniform distribution. More...
 
void SetDebugLevel (const long int lv)
 
void SetDebugLevel (const std::string &name)
 
void SetDebugStream (const std::ostream &os)
 
void SetDefaultInitFraction (double fraction)
 Set the amount of samples, whose position is always taken by the prior distribution. More...
 
void SetDiffScale (double diff)
 Sets the scale for the diffusion, diffusi0nSigma = diffScale_*areaMax_ example value would be 0.05. More...
 
void SetDiffScaleSize (double diff)
 Sets the scale for the diffusion for the size of the histogram , diffusionSigma[stateDim_-1] = diffScaleSize_*areaMax_[stateDim-1] example value would be 0.05. More...
 
void SetFirstOrderScale (double scale)
 Sets the scale for the first order prediction, valid values are 0.0000..1 - 1.0. More...
 
void SetImportanceSampleFraction (double fraction)
 Only specifiy a value unlike zero, if EvaluateImportanceWeights() is overloaded. More...
 
void SetMinWeight (double min)
 Sets the minimum weight each sample is assigned, when < lower minWeight_. More...
 
void SetMultiHistogram (bool multi)
 sets if Multihistogram is used or not, default is false More...
 
void SetPredictionOffset (const BIAS::Vector< double > &offSet)
 all samples are moved by this offset at the prediction step More...
 
void SetProcessMean (const BIAS::Vector< double > &newProcessMean)
 set a new processMean for the PredictSamplePosition step, see SecondOrderARP_() More...
 
void SetReferenceHistogram (ColorHistogram< unsigned char > &refHisto)
 sets the reference colorhistogram More...
 
void SetSecondOrderScale (double scale)
 Sets the scale for the second order prediction, valid values are 0.0000..1 - 1.0. More...
 
void ShowDebugLevel (std::ostream &os=std::cout) const
 prints all internally known debuglevels More...
 
void UseIntegralHistogram (bool bIntHisto)
 

Static Public Member Functions

static long int GetGlobalDebugLevel ()
 
static void SetGlobalDebugLevel (long int lev)
 

Protected Member Functions

virtual void AddDiffusions_ ()
 Adds gaussian noise to the position, can be overwritten if some other (i.e. More...
 
virtual void AddOffsets_ ()
 adds offSet_ to the samplePosNew_, can be overwritten if some other offset mechanism is needed More...
 
virtual void CalculateBaseWeights_ ()
 Once all the unweighted sample positions have been computed using predict_new_bases, this routine computes the weights by evaluating the observation density at each of the positions. More...
 
void CalculateMean_ ()
 
long ConsumeNextFreeDebuglevel_ ()
 returns the next available debuglevel More...
 
void EvaluateFromIntegralHistoImage_ ()
 
unsigned int PickImportanceSample_ ()
 
unsigned int PickOneSample_ ()
 The process model for a first-order auto-regressive process is:
x_{t+1} - mean = (x_t - mean)*scaling + sigma*w_t
where w_t is unit iid Gaussian noise, which is added by AddDiffusion. More...
 
void SecondOrderARP_ (unsigned int indexOldSample, Vector< double > &newSample)
 question: real pos_tminus2 of each sample or better old mean value for all samples? More...
 

Static Protected Member Functions

static int compdouble (const void *l, const void *r)
 

Protected Attributes

bool _doSecondOrderARP
 
long int _liDebugLevel
 
long int _liNextDebugLevel
 new concept, debuglevel are managed here in the debug class More...
 
double * _randomArray
 
std::map< std::string, long int > _String2Debuglevel
 
BIAS::Vector3< double > areaMax_
 
BIAS::Vector3< double > areaMin_
 
bool bIntegralHisto_
 
ColorHistogram< unsigned char > chist_
 
std::vector< double > correctionOfImportanceWeights_
 
std::vector< double > cumulProbArray_
 
std::vector< double > cumulProbArrayImportance_
 
double defaultInitFraction_
 
double diffScale_
 
double diffScaleSize_
 
Vector< double > diffusionSigma_
 Process parameters. More...
 
BIAS::Image< float > fImg_
 
double firstOrderScale_
 
Image< unsigned char > * img_
 
double importanceFraction_
 
std::vector< unsigned int > indexTminus2_
 
bool initial_
 
IntegralHistogram intHisto_
 
double m_dMaxRefHistoSize
 
Vector< double > mean_
 
Vector< double > meanTminus1_
 
double minWeight_
 
unsigned int Nsamples_
 
BIAS::Vector< double > offSet_
 
std::vector< unsigned int > oldIndices_
 
Vector< double > processFirstOrderScale_
 
Vector< double > processMean_
 
Vector< double > processSecondOrderScale_
 
Random random_
 
ColorHistogram< unsigned char > refHisto2_
 
ColorHistogram< unsigned char > refHisto_
 
std::vector< double > sampleImportanceWeights_
 
std::vector< Vector< double > > samplePosNew_
 
std::vector< Vector< double > > samplePosOld_
 
std::vector< Vector< double > > samplePosTminus2_
 
std::vector< double > sampleWeights_
 
BIAS::Vector2< double > secondHistPos_
 
double secondOrderScale_
 
unsigned int stateDim_
 
double sumOfImportanceWeights_
 
double sumOfWeights_
 
bool useMultiHistogram_
 

Static Protected Attributes

static std::ostream _zDebugStream
 
static long int GlobalDebugLevel = 0
 

Detailed Description

class for tracking an object in an image

This class is able to handle "normal" ColorHistograms, and MultiColorHistograms. Just Set a MultiColorHistogram in SetReferenceHistogram() and the whole process switches to multiHistogram processing

You have to call:

then just call these functions in every turn

Examples:
ExampleCondensHisto.cpp.

Definition at line 67 of file CondensHisto.hh.

Constructor & Destructor Documentation

CondensHisto::CondensHisto ( )

Set the state dimension in the constructor.

Definition at line 37 of file CondensHisto.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::AddDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 362 of file Debug.hh.

void Condensation::AddDiffusions_ ( )
protectedvirtualinherited

Adds gaussian noise to the position, can be overwritten if some other (i.e.

non gaussian) noise is needed

Definition at line 275 of file Condensation.cpp.

void Condensation::AddOffsets_ ( )
protectedvirtualinherited

adds offSet_ to the samplePosNew_, can be overwritten if some other offset mechanism is needed

Definition at line 292 of file Condensation.cpp.

void Condensation::CalculateBaseWeights_ ( )
protectedvirtualinherited

Once all the unweighted sample positions have been computed using predict_new_bases, this routine computes the weights by evaluating the observation density at each of the positions.

Cumulative probabilities are also computed at the same time, to permit an efficient implementation of pick_base_sample using binary search.

Definition at line 301 of file Condensation.cpp.

References BIAS::TimeMeasure::GetRealTime(), BIAS::TimeMeasure::Reset(), BIAS::TimeMeasure::Start(), and BIAS::TimeMeasure::Stop().

void BIAS::Condensation::CalculateMean_ ( )
inlineprotectedinherited
void CondensHisto::CheckImageQuality ( double  percent,
int &  shutter,
int &  gain 
)

Checks the image Quality by checking the luminance of the image.

the shutter and gain of the camera has to be set by the returned shutter and gain in params

Parameters
percent= the allowed percentage of pixels, below minsat in light and dark regions
shutter= the shutter the camera has to be set to
gain= the gain ---------— ---------—

Definition at line 254 of file CondensHisto.cpp.

static int BIAS::Condensation::compdouble ( const void *  l,
const void *  r 
)
inlinestaticprotectedinherited

Definition at line 252 of file Condensation.hh.

long BIAS::Debug::ConsumeNextFreeDebuglevel_ ( )
inlineprotectedinherited

returns the next available debuglevel

Author
woelk 09/2006

Definition at line 521 of file Debug.hh.

bool BIAS::Debug::DebugLevelIsSet ( const long int  lv) const
inlineinherited
bool BIAS::Debug::DebugLevelIsSet ( const std::string &  name) const
inlineinherited

Definition at line 350 of file Debug.hh.

void CondensHisto::DrawHistoSizes ( Image< unsigned char > &  img)
void CondensHisto::DrawMean ( BIAS::Image< unsigned char > &  img)
virtual

Draws the mean as a rectangle which size is proportional to the histogram size.

draws the mean value(mean position of all samples) in the image, with the size of the rectangle indicating the size of the histogram

Examples:
ExampleCondensHisto.cpp.

Definition at line 689 of file CondensHisto.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), and BIAS::ImageDraw< StorageType >::RectangleCorners().

void CondensHisto::DrawPosteriorDistribution ( BIAS::Image< unsigned char > &  img)

Draws the samples with their weight as greyvalue, the weight is distributed to the 4 pixels around the sample postion.

draws the poserior distribution of the samples in the image

Image has to be initialized with correct size and channelcount !

Definition at line 625 of file CondensHisto.cpp.

References BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::ImageBase::GetPixelCount(), and BIAS::ImageBase::GetWidth().

double CondensHisto::DrawPosteriorDistribution ( BIAS::Image< float > &  img)

same as above but float precision and returns the maximum value also.

same as above but in grey value picture

Definition at line 648 of file CondensHisto.cpp.

References BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageDataArray(), and BIAS::ImageBase::GetWidth().

void CondensHisto::DrawSamples ( Image< unsigned char > &  img)
virtual
void CondensHisto::DrawSamplesExt ( BIAS::Image< unsigned char > &  img)

this draws the samples, histogram sizes as rects and weights as grey values

Author
grest / schiller

Definition at line 563 of file CondensHisto.cpp.

References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), and BIAS::ImageDraw< StorageType >::RectangleCenter().

void CondensHisto::DrawSamplesWhite ( Image< unsigned char > &  img)
virtual
void CondensHisto::DrawWeightedSamples ( Image< float > &  img)

this draws the samples as circles and the color indicates the size of the histogram (the z-coordinate)

draws the samples in the positions and draws the weights of the samples as circles, the bigger the circle the higher the weight and the grey value indicates the size of the ROI of histogram

Examples:
ExampleCondensHisto.cpp.

Definition at line 596 of file CondensHisto.cpp.

References BIAS::ImageDraw< StorageType >::CircleCenter(), BIAS::ImageBase::CM_Grey, BIAS::Image< StorageType >::FillImageWithConstValue(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), and BIAS::ImageBase::SetColorModel().

void CondensHisto::EvaluateFromIntegralHistoImage_ ( )
protected

Definition at line 96 of file CondensHisto.cpp.

virtual void BIAS::Condensation::EvaluateImportanceWeights ( )
inlinevirtualinherited

If you want to use importance sampling, then overload this function, which is the importance function.

It should be a density distribution, which gives hint where to measure the object state.
Evaluate here the samplePosOld_, not the new ones
IMPORTANT: the scale of the importance weights must be equal to the normal weights, like in EvaluateObservationDensities()

Reimplemented in BIAS::CondensImg.

Definition at line 177 of file Condensation.hh.

void CondensHisto::EvaluateObservationDensities ( )
virtual

Here assign a weight to each sample.

The weight must correspond to the similarity of the histograms of the regions.

Implements BIAS::Condensation.

Definition at line 173 of file CondensHisto.cpp.

Image< unsigned char > CondensHisto::GetAktImage ( )
Returns
the aktual image on which the condensation is doing it's job
Author
Ingo Schiller
Returns
the active image in condensation algo

Definition at line 430 of file CondensHisto.cpp.

int BIAS::Debug::GetDebugLevel ( ) const
inlineinherited
std::ostream& BIAS::Debug::GetDebugStream ( ) const
inlineinherited

Definition at line 405 of file Debug.hh.

void BIAS::Debug::GetDebugStream ( std::ostream &  os) const
inlineinherited

Definition at line 414 of file Debug.hh.

static long int BIAS::Debug::GetGlobalDebugLevel ( )
inlinestaticinherited

Definition at line 431 of file Debug.hh.

void CondensHisto::GetMaxValue ( Vector< double > &  max)

Definition at line 317 of file CondensHisto.cpp.

References TNT::Vector< T >::newsize().

void CondensHisto::GetMaxVariance ( Vector< double > &  maxVar)
Parameters
maxVar=MaxVariance is a vector of struct: [varPosx, varPosy, varSize, varWeight]

Definition at line 385 of file CondensHisto.cpp.

References BIAS::Vector< T >::ElementwiseProduct(), and TNT::Vector< T >::newsize().

double CondensHisto::GetMaxWeight ( int &  index)
Returns
= the maximum weight of all samples;
Parameters
index= the index of which maxWeight is found
Returns
= the maximum weight of all samples
Parameters
index= the index in samplePosNew_ where maxWeight is found

Definition at line 365 of file CondensHisto.cpp.

Vector<double> BIAS::Condensation::GetMean ( void  )
inlineinherited

returns the mean state of the density distribution

Examples:
ExampleCondensImg.cpp.

Definition at line 115 of file Condensation.hh.

void CondensHisto::GetMeanValue ( Vector< double > &  mean)

Definition at line 328 of file CondensHisto.cpp.

void CondensHisto::GetMeanVariance ( Vector< double > &  meanVar)
Parameters
meanVar=MeanVariance is a vector of struct: [varPosx, varPosy, varSize, varWeight]

Definition at line 337 of file CondensHisto.cpp.

References BIAS::Vector< T >::ElementwiseProduct(), TNT::Vector< T >::newsize(), and BIAS::Vector< T >::SetZero().

double Condensation::GetMeanWeight ( ) const
inherited

Returns the mean weight of all samples.

Initialization samples and importance samples are not used in calculation.

Author
woelk 12/2004

Definition at line 432 of file Condensation.cpp.

const std::vector<BIAS::Vector<double> >& BIAS::Condensation::GetSamplePositions ( )
inlineinherited

Definition at line 107 of file Condensation.hh.

void CondensHisto::GetSamplePositions ( Image< float > &  sampleImg)

Definition at line 416 of file CondensHisto.cpp.

References BIAS::Image< StorageType >::GetImageDataArray().

double Condensation::GetVariance ( ) const
inherited

returns the weighted variance as a scalar

Author
grest

Definition at line 375 of file Condensation.cpp.

bool Condensation::GetVariance ( Vector< double > &  var) const
inherited

Returns the variance of the sample positions in var.

Initialization samples and importance samples are not used in calculation.

Author
woelk 12/2004

Definition at line 412 of file Condensation.cpp.

References BIAS::Vector< T >::ElementwiseProduct(), TNT::Vector< T >::newsize(), and BIAS::Vector< T >::SetZero().

bool Condensation::GetWeightedVariance ( Vector< double > &  var) const
inherited

Returns the "weighted variance" of the sample positions in var.

Initialization samples and importance samples are not used in calculation.

Author
woelk 12/2004

Definition at line 390 of file Condensation.cpp.

References BIAS::Vector< T >::ElementwiseProduct(), TNT::Vector< T >::newsize(), and BIAS::Vector< T >::SetZero().

int Condensation::Init ( unsigned int  nrSmaples)
inherited

Init the Condensation directly after constructor, with the desired amount of Samples, there more the better the approximation of the real densities.

The other Init functions are called here also.

Examples:
ExampleCondensHisto.cpp, and ExampleCondensImg.cpp.

Definition at line 58 of file Condensation.cpp.

void CondensHisto::InitModelDefaults ( )
virtual

Here u can specify the model and process defaults.

Implements BIAS::Condensation.

Definition at line 56 of file CondensHisto.cpp.

int Condensation::InitPrior ( )
inherited

sets the sample positions for first time step

Examples:
ExampleCondensHisto.cpp, and ExampleCondensImg.cpp.

Definition at line 113 of file Condensation.cpp.

References BIAS::TimeMeasure::GetRealTime(), BIAS::TimeMeasure::Start(), and BIAS::TimeMeasure::Stop().

void CondensHisto::InitPriorPositions ( unsigned int  nrOfInitSamples)
virtual

The Prior condition is used to init the first sample positions.

Calculates a initial pos for all samples. The prior cond. maybe defined by an image (if state vector is 2-dim) or by a mixture of gaussions or Uniform_distributed or ... or ...

Implements BIAS::Condensation.

Examples:
ExampleCondensHisto.cpp.

Definition at line 85 of file CondensHisto.cpp.

long int BIAS::Debug::Name2DebugLevel ( const std::string &  name) const
inlineinherited

looks up a debuglevel in the internal map, returns 0 if not found

Author
woelk 09/2006

Definition at line 454 of file Debug.hh.

long int BIAS::Debug::NewDebugLevel ( const std::string &  name)
inlineinherited
unsigned int BIAS::Condensation::PickImportanceSample_ ( )
inlineprotectedinherited
unsigned int BIAS::Condensation::PickOneSample_ ( )
inlineprotectedinherited

The process model for a first-order auto-regressive process is:
x_{t+1} - mean = (x_t - mean)*scaling + sigma*w_t
where w_t is unit iid Gaussian noise, which is added by AddDiffusion.

This is binary search using cumulative probabilities to pick a base sample. The use of this routine makes Condensation O(NlogN) where N is the number of samples. It is probably better to pick base samples deterministically, since then the algorithm is O(N) and probably marginally more efficient, but this routine is kept here for conceptual simplicity and because it maps better to the published literature.

Definition at line 258 of file Condensation.hh.

References BIAS::Condensation::cumulProbArray_, BIAS::Random::GetUniformDistributed(), BIAS::Condensation::Nsamples_, BIAS::Condensation::random_, and BIAS::Condensation::sumOfWeights_.

int Condensation::PredictNewSamplePositions ( )
inherited

now pick samples from the last time step using the weights

most probably from the process model

most probably gaussian noise

Examples:
ExampleCondensHisto.cpp, and ExampleCondensImg.cpp.

Definition at line 142 of file Condensation.cpp.

References BIAS::TimeMeasure::GetRealTime(), BIAS::TimeMeasure::Reset(), BIAS::TimeMeasure::Start(), and BIAS::TimeMeasure::Stop().

void BIAS::Debug::PrintDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

Definition at line 383 of file Debug.hh.

void Condensation::Process ( )
inherited

This really does one iteration of Condensation.

It calls PredictSamplePosition() and EvaluateObservationDensity() in the necessary order.

Examples:
ExampleCondensHisto.cpp, and ExampleCondensImg.cpp.

Definition at line 332 of file Condensation.cpp.

References BIAS::TimeMeasure::GetRealTime(), BIAS::TimeMeasure::Reset(), BIAS::TimeMeasure::Start(), and BIAS::TimeMeasure::Stop().

void BIAS::Debug::RemoveDebugLevel ( const long int  lv)
inlineinherited

Definition at line 369 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 376 of file Debug.hh.

void BIAS::Condensation::SecondOrderARP_ ( unsigned int  indexOldSample,
Vector< double > &  newSample 
)
inlineprotectedinherited
void BIAS::CondensHisto::SetActiveImage ( Image< unsigned char > &  img)
inline

sets the present picture to compare and create new observation

Examples:
ExampleCondensHisto.cpp.

Definition at line 164 of file CondensHisto.hh.

void CondensHisto::SetArea ( Vector3< double >  min,
Vector3< double >  max 
)

The area for the initial uniform distribution.

3-dim case

Examples:
ExampleCondensHisto.cpp.

Definition at line 248 of file CondensHisto.cpp.

void BIAS::Debug::SetDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::SetDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 325 of file Debug.hh.

void BIAS::Debug::SetDebugStream ( const std::ostream &  os)
inlineinherited

Definition at line 398 of file Debug.hh.

void Condensation::SetDefaultInitFraction ( double  fraction)
inherited

Set the amount of samples, whose position is always taken by the prior distribution.

Default is 0.2.
fraction must be in [0..1];

Definition at line 260 of file Condensation.cpp.

void BIAS::CondensHisto::SetDiffScale ( double  diff)
inline

Sets the scale for the diffusion, diffusi0nSigma = diffScale_*areaMax_ example value would be 0.05.

Definition at line 113 of file CondensHisto.hh.

void BIAS::CondensHisto::SetDiffScaleSize ( double  diff)
inline

Sets the scale for the diffusion for the size of the histogram , diffusionSigma[stateDim_-1] = diffScaleSize_*areaMax_[stateDim-1] example value would be 0.05.

Definition at line 126 of file CondensHisto.hh.

void BIAS::CondensHisto::SetFirstOrderScale ( double  scale)
inline

Sets the scale for the first order prediction, valid values are 0.0000..1 - 1.0.

Definition at line 151 of file CondensHisto.hh.

static void BIAS::Debug::SetGlobalDebugLevel ( long int  lev)
inlinestaticinherited

Definition at line 424 of file Debug.hh.

void Condensation::SetImportanceSampleFraction ( double  fraction)
inherited

Only specifiy a value unlike zero, if EvaluateImportanceWeights() is overloaded.

Definition at line 268 of file Condensation.cpp.

void BIAS::CondensHisto::SetMinWeight ( double  min)
inline

Sets the minimum weight each sample is assigned, when < lower minWeight_.

Examples:
ExampleCondensHisto.cpp.

Definition at line 105 of file CondensHisto.hh.

void BIAS::CondensHisto::SetMultiHistogram ( bool  multi)
inline

sets if Multihistogram is used or not, default is false

Definition at line 186 of file CondensHisto.hh.

void BIAS::Condensation::SetPredictionOffset ( const BIAS::Vector< double > &  offSet)
inlineinherited

all samples are moved by this offset at the prediction step

Definition at line 103 of file Condensation.hh.

void BIAS::Condensation::SetProcessMean ( const BIAS::Vector< double > &  newProcessMean)
inlineinherited

set a new processMean for the PredictSamplePosition step, see SecondOrderARP_()

Definition at line 152 of file Condensation.hh.

void BIAS::CondensHisto::SetReferenceHistogram ( ColorHistogram< unsigned char > &  refHisto)
inline
void BIAS::CondensHisto::SetSecondOrderScale ( double  scale)
inline

Sets the scale for the second order prediction, valid values are 0.0000..1 - 1.0.

Definition at line 137 of file CondensHisto.hh.

void BIAS::Debug::ShowDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

prints all internally known debuglevels

Author
woelk 09/2006

Definition at line 496 of file Debug.hh.

void CondensHisto::UseIntegralHistogram ( bool  bIntHisto)

Definition at line 51 of file CondensHisto.cpp.

Member Data Documentation

bool BIAS::Condensation::_doSecondOrderARP
protectedinherited

Definition at line 177 of file Condensation.hh.

long int BIAS::Debug::_liDebugLevel
protectedinherited

Definition at line 510 of file Debug.hh.

Referenced by BIAS::Debug::operator=(), and BIAS::ImageBase::operator=().

long int BIAS::Debug::_liNextDebugLevel
protectedinherited

new concept, debuglevel are managed here in the debug class

Definition at line 516 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

double* BIAS::Condensation::_randomArray
protectedinherited

Definition at line 249 of file Condensation.hh.

std::map<std::string, long int> BIAS::Debug::_String2Debuglevel
protectedinherited

Definition at line 517 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream
staticprotectedinherited

Definition at line 511 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

BIAS::Vector3<double> BIAS::CondensHisto::areaMax_
protected

Definition at line 288 of file CondensHisto.hh.

BIAS::Vector3<double> BIAS::CondensHisto::areaMin_
protected

Definition at line 288 of file CondensHisto.hh.

bool BIAS::CondensHisto::bIntegralHisto_
protected

Definition at line 315 of file CondensHisto.hh.

ColorHistogram<unsigned char> BIAS::CondensHisto::chist_
protected

Definition at line 292 of file CondensHisto.hh.

std::vector<double> BIAS::Condensation::correctionOfImportanceWeights_
protectedinherited

Definition at line 236 of file Condensation.hh.

std::vector<double> BIAS::Condensation::cumulProbArray_
protectedinherited

Definition at line 234 of file Condensation.hh.

Referenced by BIAS::Condensation::PickOneSample_().

std::vector<double> BIAS::Condensation::cumulProbArrayImportance_
protectedinherited

Definition at line 235 of file Condensation.hh.

Referenced by BIAS::Condensation::PickImportanceSample_().

double BIAS::Condensation::defaultInitFraction_
protectedinherited

Definition at line 245 of file Condensation.hh.

double BIAS::CondensHisto::diffScale_
protected

Definition at line 305 of file CondensHisto.hh.

double BIAS::CondensHisto::diffScaleSize_
protected

Definition at line 306 of file CondensHisto.hh.

Vector<double> BIAS::Condensation::diffusionSigma_
protectedinherited

Process parameters.

Definition at line 241 of file Condensation.hh.

BIAS::Image<float> BIAS::CondensHisto::fImg_
protected

Definition at line 302 of file CondensHisto.hh.

double BIAS::CondensHisto::firstOrderScale_
protected

Definition at line 308 of file CondensHisto.hh.

long int BIAS::Debug::GlobalDebugLevel = 0
staticprotectedinherited

Definition at line 513 of file Debug.hh.

Image<unsigned char>* BIAS::CondensHisto::img_
protected

Definition at line 289 of file CondensHisto.hh.

double BIAS::Condensation::importanceFraction_
protectedinherited

Definition at line 246 of file Condensation.hh.

std::vector<unsigned int> BIAS::Condensation::indexTminus2_
protectedinherited

Definition at line 230 of file Condensation.hh.

Referenced by BIAS::Condensation::SecondOrderARP_().

bool BIAS::Condensation::initial_
protectedinherited

Definition at line 244 of file Condensation.hh.

IntegralHistogram BIAS::CondensHisto::intHisto_
protected

Definition at line 295 of file CondensHisto.hh.

double BIAS::CondensHisto::m_dMaxRefHistoSize
protected

Definition at line 310 of file CondensHisto.hh.

Vector<double> BIAS::Condensation::mean_
protectedinherited

Definition at line 232 of file Condensation.hh.

Referenced by BIAS::Condensation::CalculateMean_().

Vector<double> BIAS::Condensation::meanTminus1_
protectedinherited

Definition at line 232 of file Condensation.hh.

double BIAS::CondensHisto::minWeight_
protected

Definition at line 304 of file CondensHisto.hh.

unsigned int BIAS::Condensation::Nsamples_
protectedinherited
BIAS::Vector<double> BIAS::Condensation::offSet_
protectedinherited

Definition at line 250 of file Condensation.hh.

std::vector<unsigned int> BIAS::Condensation::oldIndices_
protectedinherited

Definition at line 230 of file Condensation.hh.

Vector<double> BIAS::Condensation::processFirstOrderScale_
protectedinherited

Definition at line 242 of file Condensation.hh.

Referenced by BIAS::Condensation::SecondOrderARP_().

Vector<double> BIAS::Condensation::processMean_
protectedinherited

Definition at line 241 of file Condensation.hh.

Referenced by BIAS::Condensation::SecondOrderARP_().

Vector<double> BIAS::Condensation::processSecondOrderScale_
protectedinherited

Definition at line 242 of file Condensation.hh.

Referenced by BIAS::Condensation::SecondOrderARP_().

Random BIAS::Condensation::random_
protectedinherited
ColorHistogram<unsigned char> BIAS::CondensHisto::refHisto2_
protected

Definition at line 299 of file CondensHisto.hh.

ColorHistogram<unsigned char> BIAS::CondensHisto::refHisto_
protected

Definition at line 298 of file CondensHisto.hh.

std::vector<double> BIAS::Condensation::sampleImportanceWeights_
protectedinherited

Definition at line 235 of file Condensation.hh.

std::vector<Vector<double> > BIAS::Condensation::samplePosNew_
protectedinherited

Definition at line 225 of file Condensation.hh.

std::vector<Vector<double> > BIAS::Condensation::samplePosOld_
protectedinherited
std::vector<Vector<double> > BIAS::Condensation::samplePosTminus2_
protectedinherited

Definition at line 227 of file Condensation.hh.

Referenced by BIAS::Condensation::SecondOrderARP_().

std::vector<double> BIAS::Condensation::sampleWeights_
protectedinherited

Definition at line 234 of file Condensation.hh.

Referenced by BIAS::Condensation::CalculateMean_().

BIAS::Vector2<double> BIAS::CondensHisto::secondHistPos_
protected

Definition at line 313 of file CondensHisto.hh.

double BIAS::CondensHisto::secondOrderScale_
protected

Definition at line 307 of file CondensHisto.hh.

unsigned int BIAS::Condensation::stateDim_
protectedinherited

Definition at line 224 of file Condensation.hh.

Referenced by BIAS::Condensation::SecondOrderARP_().

double BIAS::Condensation::sumOfImportanceWeights_
protectedinherited

Definition at line 238 of file Condensation.hh.

Referenced by BIAS::Condensation::PickImportanceSample_().

double BIAS::Condensation::sumOfWeights_
protectedinherited
bool BIAS::CondensHisto::useMultiHistogram_
protected

Definition at line 309 of file CondensHisto.hh.


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