PedestrainCounting
MatchMatrix.h
1 
5 #ifndef MATCH_MATRIX_HEADER
6 #define MATCH_MATRIX_HEADER
7 
8 #include "Pool.h"
9 
10 class MatchMatrix {
11 public:
12  MatchMatrix(int capacity);
13  ~MatchMatrix();
14 
15  struct MatchScore {
16  float score;
17  int target;
18  int detection;
19 
20  MatchScore() : target(-1), detection(-1), score(0.0f) {}
21 
22  bool operator<(const MatchScore &other) const {
23  return score < other.score;
24  }
25 
29  bool operator>(const MatchScore &other) const {
30  return score > other.score;
31  }
32  };
33 
38  void SetNumDets(int numDets);
39 
44  void SetTargets(std::vector<int> &targets, float threshold);
45 
49  void PrintMatchMatrix();
50 
54  const int capacity;
55 
60  std::vector<MatchScore> matchMatrix;
61 
66  std::vector<char> isDetMatched;
67 };
68 
69 
70 #endif
std::vector< MatchScore > matchMatrix
Definition: MatchMatrix.h:60
Definition: MatchMatrix.h:15
std::vector< char > isDetMatched
Definition: MatchMatrix.h:66
bool operator>(const MatchScore &other) const
Definition: MatchMatrix.h:29
void PrintMatchMatrix()
Definition: MatchMatrix.cpp:66
void SetTargets(std::vector< int > &targets, float threshold)
Definition: MatchMatrix.cpp:38
void SetNumDets(int numDets)
Definition: MatchMatrix.cpp:11
const int capacity
Definition: MatchMatrix.h:54
Definition: MatchMatrix.h:10