forked from npinto/fddb-evaluation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathResults.hpp
54 lines (48 loc) · 1.39 KB
/
Results.hpp
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
53
54
#ifndef __RESULTS_HPP__
#define __RESULTS_HPP__
#include<vector>
#include<string>
#include <fstream>
#include "MatchPair.hpp"
#include "RegionsSingleImage.hpp"
using std::vector;
using std::string;
/**
* Specifies the cumulative result statistics
* */
class Results{
private:
/// number of annotated regions (TP+FN)
unsigned int N;
/// threshold used for computing this result
double scoreThreshold;
/// True positives -- continuous
double TPCont;
/// True positives -- discrete
double TPDisc;
/// False positives -- discrete
double FP;
/// Name of the image
string imName;
public:
/// Constructor
Results();
/// Constructor -- copy the contents of *r
Results(Results *r);
/// Constructor -- copy the contents of *r and add N2 to N
Results(Results *r, int N2);
/// Constructor -- merge r1 and r2
Results(Results *r1, Results *r2);
/// Constructor
Results(string imName, double threshold, vector<MatchPair *> *matchPairs, RegionsSingleImage *annot, RegionsSingleImage *det);
/// Return a vector of results with combined statistics from the two
/// vectors rv1 and rv2
vector<Results *> * merge(vector<Results *> *rv1, vector<Results *> *rv2);
/// print this result into the ostream os
void print(std::ostream &os);
/// save the ROC curve computed from rv into the file outFile
void saveROC(string outFile, vector<Results *> *rv);
/// get N
unsigned int getN();
};
#endif