-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathMatching.hpp
More file actions
52 lines (45 loc) · 1.29 KB
/
Copy pathMatching.hpp
File metadata and controls
52 lines (45 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef __MATCHING_HPP__
#define __MATCHING_HPP__
#include <string>
#include <vector>
#include <iostream>
#include "Region.hpp"
#include "RegionsSingleImage.hpp"
#include "MatchPair.hpp"
#include "Results.hpp"
#include "Hungarian.hpp"
using std::vector;
/**
* Class that computes the matching between annotated and
* detected regions
* */
class Matching{
public:
/// Name of the algorithm used for matching
std::string matchingAlgoStr;
/// Constructor
Matching(RegionsSingleImage *, RegionsSingleImage *);
/// Constructor
Matching(std::string, RegionsSingleImage *, RegionsSingleImage *);
/// Destructor
~Matching();
/// Compute the matching pairs.
/// Returns a vector of MatchPair pointers
vector<MatchPair *> * getMatchPairs();
private:
/// Set of annotated regions
RegionsSingleImage *annot;
/// Set of detected regions
RegionsSingleImage *det;
/// Matrix of matching scores for annnotation and detections
vector<vector<double> *> * pairWiseScores;
/// Computes the score for a single pair of regions
double computeScore(Region *, Region *);
/// populate the pairWiseScores matrix
void computePairWiseScores();
/// Free the memory for the pairWiseScores matrix
void clearPairWiseScores();
/// Runs the Hungarian algorithm
vector<MatchPair *> * runHungarian();
};
#endif