Mht Class Reference

Big and complicated class that implements the MHT (Multiple Hypotheses Tracking) algorithm. More...

#include <mht_declaration.h>

List of all members.

Public Member Functions

void clear (void)
void clearTargetAssociations (void)
 Go through all clusters, all hypotheses and finally all targets, removing target to measurement associations from past targets.
hypothesisTreePtr getHypothesisTree (void)
double getMaxGating (void)
 Return the maximum Mahalanobis gating distance.
string getReportName (string extra)
vector< TargetPtrgetTargets (void)
void iterate (vector< MeasurementPtr > &measurements)
 Currently the main mht function that does all the work.
 Mht (void)
 Mht constructor.
void simplifySingleTargetClusters (vector< MeasurementPtr > &global_measurements)
void solveCluster (ClusterPtr cluster)
void solveClusterMultiTread (ClusterPtr cluster)
void solveHypothesis (HypothesisPtr parent_hypothesis, vector< MeasurementPtr > &measurements, vector< HypothesisPtr > &list_of_hypotheses)
 ~Mht (void)
 Mht destructor.

Public Attributes

string _aux1
vector< ClusterPtr_clusters
 Vector of current existing hypotheses clusters.
int _j
 J parameter used in the propagation of hypotheses, must be configured form outside class.
int _k
 K parameter used in the Murty's algorithm, must be configured form outside class.

Private Member Functions

TargetPtr associate (TargetPtr &target, MeasurementPtr &measurement)
void breakClusters (vector< MeasurementPtr > &measurements)
void checkCurrentTargets (vector< MeasurementPtr > &measurements)
void cleanClusters (void)
 Remove empty clusters.
void clusterAssignemnt (vector< MeasurementPtr > &measurements)
 Distribute the measurements by the existing clusters.
void clusterMerger (vector< MeasurementPtr > &measurements)
 Check if clusters need merging and do it!!
vector< ClusterPtr >::iterator completeRemoveCluster (vector< ClusterPtr >::iterator it_cluster)
 Remove the cluster with a given id along with all the hypotheses associated with it.
vector< ClusterPtr >::iterator completeRemoveCluster (long id)
 Complete deletion of a cluster.
bool consistencyCheck (void)
void createClusters (void)
vector< TargetPtrcreateCopy (vector< TargetPtr > &original)
ClusterPtr findCluster (vector< ClusterPtr > &clusters, int id)
vector< HypothesisPtrfindHypotheses (int cl, int it_past=1)
 Find all hypotheses with a given cluster id.
MeasurementPtr findMeasurement (vector< MeasurementPtr > &measurements, long id)
HypothesisPtr getHypothesisPtr (long id, ClusterPtr &cluster)
double getProbability (uint n_det, uint n_occ, uint n_del, uint n_new, uint n_fal, double prod, double previous)
void getProbability (HypothesisPtr hypothesis)
HypothesisTree::iterator insertForcedParent (long cluster)
bool normalize (vector< HypothesisPtr > &hypotheses, uint j=10e3)
void recursiveHypothesisRemove (HypothesisTree::iterator it)
 Remove the hypothesis and possible parent if empty.
void removeEmptyClusters (void)
void removeIrrelevant (void)
 Remove branches that were not propagated and old hypotheses.
void removeTheDead (void)
 Remove dead hypotheses.
void switchColor (HypothesisPtr hypothesis)
 Change hypothesis color based on its current cluster.
void updateTargetList (void)

Private Attributes

bool _clean_old_modifying_tree
 Flag that controls the removal of old hypotheses, with changes to the tree structure.
long _cluster_id
 Cluster id seed.
vector< TargetPtr_current_targets
 Vector to store outgoing targets.
uint _history_size
 Number of previous state positions to store.
HypothesisTree::leaf_iterator _hleaf
 Leaf auxiliary iterator.
hypothesisTreePtr _hypothesisTree
 Main tree holding variable.
HypothesisTree::iterator _iterator
 Simple iterator.
double _max_gating
 Maximum gating threshold.
double _minimum_representativity
 Minimum representativity value in propagating hypotheses.
int _miss_association_threshold
 Maximum number of miss associations.
bool _parent_tagging
 Flag that determines if the main parents are to be tagged, used in graphviz.
bool _remove_empty_clusters
 Flag that controls the removal of empty clusters.
bool _remove_unused
 Flag that determines if dead hypotheses are to be deleted, used in graphviz.
bool _use_minimum_representativity
 Flag that controls the use of the minimum representativity rule.
long iteration
 Current iteration.

Detailed Description

Big and complicated class that implements the MHT (Multiple Hypotheses Tracking) algorithm.

Create empty tree
Obtain new measurements

for each leaf
Gate measurements with tree leafs
Add gated measurements as leaf children
If no association was created iterate on void
Remove branch if needed
end for

for each measurement
if no associations
add new tree root node
end for

common iteration processing
tree pruning
nth pruning //delayed decision
age deletion //careful only works if age is bigger that nth pruning

Definition at line 147 of file mht_declaration.h.


Constructor & Destructor Documentation

Mht::Mht ( void   ) 

Mht constructor.

Definition at line 185 of file mht_implementation.cpp.

Mht::~Mht ( void   ) 

Mht destructor.

Definition at line 233 of file mht_implementation.cpp.


Member Function Documentation

TargetPtr Mht::associate ( TargetPtr target,
MeasurementPtr measurement 
) [private]

Definition at line 2620 of file mht_implementation.cpp.

void Mht::breakClusters ( vector< MeasurementPtr > &  measurements  )  [private]

Definition at line 1986 of file mht_implementation.cpp.

void Mht::checkCurrentTargets ( vector< MeasurementPtr > &  measurements  )  [private]

Definition at line 2809 of file mht_implementation.cpp.

void Mht::cleanClusters ( void   )  [private]

Remove empty clusters.

Definition at line 1864 of file mht_implementation.cpp.

void Mht::clear ( void   ) 

Definition at line 1348 of file mht_implementation.cpp.

void Mht::clearTargetAssociations ( void   ) 

Go through all clusters, all hypotheses and finally all targets, removing target to measurement associations from past targets.

Definition at line 242 of file mht_implementation.cpp.

void Mht::clusterAssignemnt ( vector< MeasurementPtr > &  measurements  )  [private]

Distribute the measurements by the existing clusters.

Definition at line 1812 of file mht_implementation.cpp.

void Mht::clusterMerger ( vector< MeasurementPtr > &  measurements  )  [private]

Check if clusters need merging and do it!!

This is quite complicated, merging involves a total reevaluation of targets, measurements and probabilities.

Definition at line 2377 of file mht_implementation.cpp.

vector< ClusterPtr >::iterator Mht::completeRemoveCluster ( vector< ClusterPtr >::iterator  it_cluster  )  [private]

Remove the cluster with a given id along with all the hypotheses associated with it.

Definition at line 1613 of file mht_implementation.cpp.

vector< ClusterPtr >::iterator Mht::completeRemoveCluster ( long  id  )  [private]

Complete deletion of a cluster.

Parameters:
id of the cluster to remove
Returns:
cluster vector iterator

Definition at line 1600 of file mht_implementation.cpp.

bool Mht::consistencyCheck ( void   )  [private]

Definition at line 1911 of file mht_implementation.cpp.

void Mht::createClusters ( void   )  [private]

Definition at line 1760 of file mht_implementation.cpp.

vector< TargetPtr > Mht::createCopy ( vector< TargetPtr > &  original  )  [private]

Definition at line 2344 of file mht_implementation.cpp.

ClusterPtr Mht::findCluster ( vector< ClusterPtr > &  clusters,
int  id 
) [private]

Definition at line 1749 of file mht_implementation.cpp.

vector< HypothesisPtr > Mht::findHypotheses ( int  cl,
int  it_past = 1 
) [private]

Find all hypotheses with a given cluster id.

This function will find all hypotheses that are currently leafs of the main tree with a given cluster. This function will create a std::vector of the HypothesisPtr and return it.

Warning:
Only LEAF nodes will be returned! Not the whole branch!
Parameters:
cl cluster id
it_past select the iteration from which the hypotheses will be extracted (default 1, previous iteration)
Returns:
vector of hypothesisPtr

Definition at line 1722 of file mht_implementation.cpp.

MeasurementPtr Mht::findMeasurement ( vector< MeasurementPtr > &  measurements,
long  id 
) [private]

Definition at line 1655 of file mht_implementation.cpp.

HypothesisPtr Mht::getHypothesisPtr ( long  id,
ClusterPtr cluster 
) [private]

Definition at line 2733 of file mht_implementation.cpp.

hypothesisTreePtr Mht::getHypothesisTree ( void   ) 

Definition at line 1337 of file mht_implementation.cpp.

double Mht::getMaxGating ( void   ) 

Return the maximum Mahalanobis gating distance.

Definition at line 237 of file mht_implementation.cpp.

double Mht::getProbability ( uint  n_det,
uint  n_occ,
uint  n_del,
uint  n_new,
uint  n_fal,
double  prod,
double  previous 
) [private]

Definition at line 2700 of file mht_implementation.cpp.

void Mht::getProbability ( HypothesisPtr  hypothesis  )  [private]

Definition at line 2686 of file mht_implementation.cpp.

string Mht::getReportName ( string  extra  ) 

Definition at line 1360 of file mht_implementation.cpp.

vector< TargetPtr > Mht::getTargets ( void   ) 

Definition at line 1342 of file mht_implementation.cpp.

HypothesisTree::iterator Mht::insertForcedParent ( long  cluster  )  [private]

Definition at line 2330 of file mht_implementation.cpp.

void Mht::iterate ( vector< MeasurementPtr > &  measurements  ) 

Currently the main mht function that does all the work.

This function starts by going through all the current leafs on the tree, for each leaf/hypothesis go through all targets and for each target check which measurements fall within its gate and add those measurements to the hypothesis cluster.

This is called measurement to cluster assignment, the end result is the cluster_assignemnt map.

The following step checks if measurements belong to more that one cluster and merges those clusters, if a measurement is shared this means that both clusters should be evaluated simultaneously. The merging of clusters is complicated: the first step is to define which cluster name will remain and which will disappear, I choose the first assigned to the measurement (for no particular reason). Then we go through all clusters associated with the measurement changing the associated hypothesis to the new cluster and all measurements associated with this cluster changing their association as well. In the end all clusters have different measurements without any overlap.

The next step is to create the list of problems to solve, each problem is a association of all the measurements of that cluster with the hypothesis that the cluster contains. This problems will be solved using the Murty algorithm with the Hungarian as a lower layer.

There are still a few steps missing ...

In the end, all measurements that were not associated with any cluster will create new clusters with a single hypothesis and a single target. This step makes the global tree grow.

Parameters:
measurements input vector of measurements

Definition at line 1155 of file mht_implementation.cpp.

bool Mht::normalize ( vector< HypothesisPtr > &  hypotheses,
uint  j = 10e3 
) [private]

Definition at line 2665 of file mht_implementation.cpp.

void Mht::recursiveHypothesisRemove ( HypothesisTree::iterator  it  )  [private]

Remove the hypothesis and possible parent if empty.

Definition at line 1383 of file mht_implementation.cpp.

void Mht::removeEmptyClusters ( void   )  [private]

Definition at line 1878 of file mht_implementation.cpp.

void Mht::removeIrrelevant ( void   )  [private]

Remove branches that were not propagated and old hypotheses.

Definition at line 1401 of file mht_implementation.cpp.

void Mht::removeTheDead ( void   )  [private]

Remove dead hypotheses.

Definition at line 1561 of file mht_implementation.cpp.

void Mht::simplifySingleTargetClusters ( vector< MeasurementPtr > &  global_measurements  ) 

Definition at line 262 of file mht_implementation.cpp.

void Mht::solveCluster ( ClusterPtr  cluster  ) 

Definition at line 724 of file mht_implementation.cpp.

void Mht::solveClusterMultiTread ( ClusterPtr  cluster  ) 

Definition at line 585 of file mht_implementation.cpp.

void Mht::solveHypothesis ( HypothesisPtr  parent_hypothesis,
vector< MeasurementPtr > &  measurements,
vector< HypothesisPtr > &  list_of_hypotheses 
)

Definition at line 325 of file mht_implementation.cpp.

void Mht::switchColor ( HypothesisPtr  hypothesis  )  [private]

Change hypothesis color based on its current cluster.

This functions checks the cluster id of the hypothesis and calculates the corresponding color by doing cluster_id mod 8.
The result will be the color id.

Parameters:
hypothesis the working node

Definition at line 1663 of file mht_implementation.cpp.

void Mht::updateTargetList ( void   )  [private]

Definition at line 2741 of file mht_implementation.cpp.


Member Data Documentation

string Mht::_aux1

Definition at line 153 of file mht_declaration.h.

Flag that controls the removal of old hypotheses, with changes to the tree structure.

Definition at line 255 of file mht_declaration.h.

long Mht::_cluster_id [private]

Cluster id seed.

Definition at line 257 of file mht_declaration.h.

Vector of current existing hypotheses clusters.

Definition at line 152 of file mht_declaration.h.

vector<TargetPtr> Mht::_current_targets [private]

Vector to store outgoing targets.

Definition at line 233 of file mht_declaration.h.

uint Mht::_history_size [private]

Number of previous state positions to store.

Definition at line 245 of file mht_declaration.h.

HypothesisTree::leaf_iterator Mht::_hleaf [private]

Leaf auxiliary iterator.

Definition at line 228 of file mht_declaration.h.

Main tree holding variable.

Definition at line 225 of file mht_declaration.h.

Simple iterator.

Definition at line 230 of file mht_declaration.h.

int Mht::_j

J parameter used in the propagation of hypotheses, must be configured form outside class.

Definition at line 220 of file mht_declaration.h.

int Mht::_k

K parameter used in the Murty's algorithm, must be configured form outside class.

Definition at line 218 of file mht_declaration.h.

double Mht::_max_gating [private]

Maximum gating threshold.

Definition at line 238 of file mht_declaration.h.

Minimum representativity value in propagating hypotheses.

Definition at line 242 of file mht_declaration.h.

Maximum number of miss associations.

Definition at line 240 of file mht_declaration.h.

bool Mht::_parent_tagging [private]

Flag that determines if the main parents are to be tagged, used in graphviz.

Definition at line 249 of file mht_declaration.h.

Flag that controls the removal of empty clusters.

Definition at line 253 of file mht_declaration.h.

bool Mht::_remove_unused [private]

Flag that determines if dead hypotheses are to be deleted, used in graphviz.

Definition at line 247 of file mht_declaration.h.

Flag that controls the use of the minimum representativity rule.

Definition at line 251 of file mht_declaration.h.

long Mht::iteration [private]

Current iteration.

Definition at line 236 of file mht_declaration.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


mtt
Author(s): Jorge Almeida
autogenerated on Wed Jul 23 04:34:58 2014