VAT  3.0
Video Analysis Tool
RMMHypothesisSet.h
1 #ifndef RMMHYPOTHESISSET_H
2 #define RMMHYPOTHESISSET_H
3 
4 #include "src/blob.h"
5 #include "RMMHypothesis.h"
6 #include <iostream>
7 #include <map>
8 #include <deque>
9 
10 class RMMHypothesisSet;
11 
12 typedef QSharedPointer<RMMHypothesisSet> SpRMMHypothesisSet;
13 
15 
16  private:
17  int bestHypothesisIndex;
18  double bestMeanProbability;
19 
20 
21  public:
22  std::set<SpRMMHypothesis, hypothesesOrderedByBestProbabilityOperator> hypotheses;
23  static int m_currentTrackingBlobsNumber;
24  unsigned long id;
25  int incompleteHypotheses;
26  int numUsed;
27  bool toErase;
30 
31  //Blobs used in "follow mobiles" phase.
32  bool *usedBlobs;
33  bool *involvedBlobs;
34 
35  //Init Functions
36  void initUsedBlobsList();
37  void initInvolvedBlobs();
38 
39  void setUsedBlobs();
40 
41  //Inserting Functions
42  void insertNewHypothesis(SpRMMHypothesis h);
43 
44  //Setting Functions
45  void setBestHypothesis();
46 
47  //Getting Functions
48  double getBestProbability();
49  int getBestHypothesisIndex();
50  SpRMMHypothesis getBestHypothesis();
51  std::set<SpRMMHypothesis, hypothesesOrderedByBestProbabilityOperator>* getHypotheses();
52  std::set<SpRMMHypothesis, hypothesesOrderedByBestProbabilityOperator>::iterator begin();
53  std::set<SpRMMHypothesis, hypothesesOrderedByBestProbabilityOperator>::iterator end();
54  void erase(std::set<SpRMMHypothesis, hypothesesOrderedByBestProbabilityOperator>::iterator first, std::set<SpRMMHypothesis, hypothesesOrderedByBestProbabilityOperator>::iterator last);
55  void erase(std::set<SpRMMHypothesis, hypothesesOrderedByBestProbabilityOperator>::iterator element);
56 
57  std::set<SpRMMHypothesis, hypothesesOrderedByBestProbabilityOperator>::iterator operator[](int);
58  unsigned int size();
59  bool empty();
60  void clear();
61  void insert(SpRMMHypothesis);
62  void insert(std::set<SpRMMHypothesis, hypothesesOrderedByBestProbabilityOperator>::iterator first,
63  std::set<SpRMMHypothesis, hypothesesOrderedByBestProbabilityOperator>::iterator last);
64  friend std::ostream& operator<<(std::ostream&, SpRMMHypothesisSet);
65  };
66 
67 
69 
70 #endif
Definition: RMMHypothesisSet.h:14