forked from stupel/Matcher
-
Notifications
You must be signed in to change notification settings - Fork 1
/
matcher.h
88 lines (57 loc) · 2.14 KB
/
matcher.h
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#ifndef MATCHER_H
#define MATCHER_H
#include "matcher_global.h"
#include "matcher_config.h"
#include "matcher_isoconverter.h"
#include "bozorth3m.h"
class MATCHERSHARED_EXPORT Matcher : public QObject
{
Q_OBJECT
public:
Matcher();
~Matcher();
BozorthMultiThreadManager bozorth3m;
int setMatcher(MATCHER matcher);
void setBozorthThreshold(float);
void setSupremaThreshold(float);
int setDBTestParams(int numberOfSubject, int imgPerSubject);
void identify(unsigned char* subjectISO, const QMultiMap<QString, unsigned char *> &dbISO);
void identify(const QVector<MINUTIA> &subject, const QMultiMap<QString, QVector<MINUTIA> > &db);
void verify(unsigned char *subjectISO, const QVector<unsigned char *> &dbISO);
void verify(const QVector<MINUTIA> &subject, const QVector<QVector<MINUTIA> > &db);
void testDatabase(QMap<QString, QVector<MINUTIA> > &db);
void testDatabase(const QMap<QString, unsigned char *> &dbISO);
SUPREMA_MATCHER getSupremaMatcher() const;
DBTEST_RESULT getDbtestResult() const;
private:
MATCHER matcher;
MatcherISOConverter isoConverter;
bool matcherIsRunning;
MODE mode;
MATCH_TRESHOLDS thresholds;
QMap<QString, QVector<MINUTIA>> bozorthTemplates;
FINGERPRINT_PAIRS fingerprintPairs;
QMap<QString, QString> alternativeNames;
DBTEST_PARAMS dbtestParams;
DBTEST_RESULT dbtestResult;
SUPREMA_MATCHER supremaMatcher;
void generatePairs();
void generateGenuinePairs();
void generateImpostorPairs();
void supremaMatchingDone();
int findMaxScoreItem();
double computeEERValue();
void compureROCValues();
void boostMinutiae(QVector<MINUTIA> &mv, int minMinutiae);
void cleanDBTestResults();
void matcherError(int errorCode);
private slots:
void bozorthMatchingDone(int duration);
signals:
void identificationDoneSignal(bool success, QString bestSubject, float bestScore);
void verificationDoneSignal(bool success, float score);
void dbTestDoneSignal(DBTEST_RESULT result);
void matcherProgressSignal(int progress);
void matcherErrorSignal(int errorCode);
};
#endif // MATCHER_H