32 #ifndef _MHT_DECLARATION_H_
33 #define _MHT_DECLARATION_H_
47 #include <boost/shared_ptr.hpp>
48 #include <boost/math/special_functions/fpclassify.hpp>
50 #include <colormap/colormap.h>
51 #include <boost/thread.hpp>
72 typename vector<T>::iterator it;
74 it=find(v.begin(),v.end(),i);
89 class Color:
public std_msgs::ColorRGBA
98 Color(std_msgs::ColorRGBA c);
107 Color& changeColorBrightness(
double correctionFactor);
122 ostream& operator<<(ostream& o,vector<vector<int> >& measurements_assignemnt);
166 double getMaxGating(
void);
171 void clearTargetAssociations(
void);
173 void simplifySingleTargetClusters(vector<MeasurementPtr>& global_measurements);
203 void iterate(vector<MeasurementPtr>& measurements);
207 vector<TargetPtr> getTargets(
void);
211 string getReportName(
string extra);
213 void solveClusterMultiTread(
ClusterPtr cluster);
215 void solveHypothesis(
HypothesisPtr parent_hypothesis,vector<MeasurementPtr>& measurements, vector<HypothesisPtr>& list_of_hypotheses);
261 void removeIrrelevant(
void);
263 void removeTheDead(
void);
270 vector<ClusterPtr>::iterator completeRemoveCluster(
long id);
275 vector<ClusterPtr>::iterator completeRemoveCluster(vector<ClusterPtr>::iterator it_cluster);
277 MeasurementPtr findMeasurement(vector<MeasurementPtr>& measurements,
long id);
301 vector<HypothesisPtr> findHypotheses(
int cl,
int it_past = 1);
303 ClusterPtr findCluster(vector<ClusterPtr>& clusters,
int id);
305 void createClusters(
void);
310 void clusterAssignemnt(vector<MeasurementPtr>& measurements);
315 void cleanClusters(
void);
317 void removeEmptyClusters(
void);
319 bool consistencyCheck(
void);
321 void breakClusters(vector<MeasurementPtr>& measurements);
325 vector<TargetPtr> createCopy(vector<TargetPtr>& original);
332 void clusterMerger(vector<MeasurementPtr>& measurements);
336 bool normalize(vector<HypothesisPtr>& hypotheses,uint j=10e3);
340 double getProbability(uint n_det, uint n_occ, uint n_del, uint n_new, uint n_fal,
double prod,
double previous);
344 void updateTargetList(
void);
346 void checkCurrentTargets(vector<MeasurementPtr>& measurements);
boost::shared_ptr< Measurement > MeasurementPtr
double _max_gating
Maximum gating threshold.
HypothesisTree::leaf_iterator _hleaf
Leaf auxiliary iterator.
HypothesisTree::iterator _iterator
Simple iterator.
vector< ClusterPtr > _clusters
Vector of current existing hypotheses clusters.
ostream & operator<<(ostream &o, vector< vector< int > > &measurements_assignemnt)
boost::shared_ptr< Cluster > ClusterPtr
Shared pointer to the Cluster class.
int _j
J parameter used in the propagation of hypotheses, must be configured form outside class...
vector< TargetPtr > _current_targets
Vector to store outgoing targets.
double _minimum_representativity
Minimum representativity value in propagating hypotheses.
bool _use_minimum_representativity
Flag that controls the use of the minimum representativity rule.
Big and complicated class that implements the MHT (Multiple Hypotheses Tracking) algorithm.
boost::shared_ptr< HypothesisTree > hypothesisTreePtr
Shared pointer to the HypothesisTree class.
boost::shared_ptr< Hypothesis > HypothesisPtr
bool _remove_empty_clusters
Flag that controls the removal of empty clusters.
int _miss_association_threshold
Maximum number of miss associations.
bool removeLocal(vector< T > &v, T i)
long iteration
Current iteration.
K-best Murtys' algorithm header and auxiliary classes declaration.
long _cluster_id
Cluster id seed.
MatrixXd ellipseParametric(Matrix2d &cov, Vector2d &mu, double MahThreshold)
Create a ellipse using parameters.
bool _remove_unused
Flag that determines if dead hypotheses are to be deleted, used in graphviz.
boost::shared_ptr< Target > TargetPtr
Shared pointer to the Target class.
Color class, extension to std_msgs::ColorRGBA.
bool _clean_old_modifying_tree
Flag that controls the removal of old hypotheses, with changes to the tree structure.
int _k
K parameter used in the Murty's algorithm, must be configured form outside class. ...
uint _history_size
Number of previous state positions to store.
hypothesisTreePtr _hypothesisTree
Main tree holding variable.
pre_order_iterator iterator
The default iterator types throughout the tree class.
Distance metrics declaration.
bool _parent_tagging
Flag that determines if the main parents are to be tagged, used in graphviz.
Hypotheses tree class declaration.