NeuroDactyl
matcher.h
Go to the documentation of this file.
1 
6 #ifndef _MATCHER_H_
7 #define _MATCHER_H_
8 
9 #pragma once
10 
11 #include "config.h"
12 #include "extractor.h"
13 #include "export.h"
14 
15 
16 namespace NeuroDactyl {
17 
23  class TemplateDB {
24  public:
31  virtual void add(const NeuroDactyl::Template* _template, const long long id) = 0;
32 
40  virtual void add(unsigned int size, const char* data, const long long id) = 0;
41 
42  virtual void clear() = 0;
43  virtual size_t size() = 0;
44  virtual size_t maxSize() const = 0;
45 
46  virtual void getLoadedIDs(std::vector<long long>& ids) = 0;
47  virtual bool isLoaded(const long long id) = 0;
48 
49  virtual void save(const std::string& path) = 0;
50 
59  virtual void matchK(const NeuroDactyl::Template* probe,
60  unsigned int K, float threshold,
61  std::vector<std::pair<long long, float>>& results) = 0;
62 
70  virtual void matchN(const NeuroDactyl::Template* probe,
71  std::vector<float>& results, std::vector<long long>& ids) = 0;
72 
73  virtual ~TemplateDB() = default;
74  };
75 
83  FPSERVERSDK_API NeuroDactyl::TemplateDB* constructTemplateDB(const NeuroDactyl::Config* cfg, size_t maxSize);
84 
85 
93  FPSERVERSDK_API NeuroDactyl::TemplateDB* constructTemplateDB(const NeuroDactyl::Config* cfg, const std::string& path);
94 
95 
103  float FPSERVERSDK_API match(const NeuroDactyl::Template* template0, const NeuroDactyl::Template* template1);
104 
105 }
106 
107 
108 #endif /* _MATCHER_H_ */
Class for system configuration.
Definition: config.h:27
Template DB Used for storing fingerprint templates with its IDs.
Definition: matcher.h:23
virtual bool isLoaded(const long long id)=0
Checks, if a template with specific ID is loaded to the DB.
virtual size_t size()=0
Number of templates in the DB.
virtual void getLoadedIDs(std::vector< long long > &ids)=0
Returns ID list of loaded templates.
virtual size_t maxSize() const =0
Max possible number of templates in the DB.
virtual void add(const NeuroDactyl::Template *_template, const long long id)=0
virtual void matchK(const NeuroDactyl::Template *probe, unsigned int K, float threshold, std::vector< std::pair< long long, float >> &results)=0
virtual void matchN(const NeuroDactyl::Template *probe, std::vector< float > &results, std::vector< long long > &ids)=0
virtual void add(unsigned int size, const char *data, const long long id)=0
virtual void save(const std::string &path)=0
Saves the DB to hard drive.
virtual void clear()=0
Clears the DB.
Fingerprint template.
Definition: extractor.h:23
Header file with configuration description.
Header file with fingerprint template and template extractor descriptions.
FPSERVERSDK_API NeuroDactyl::TemplateDB * constructTemplateDB(const NeuroDactyl::Config *cfg, size_t maxSize)
float FPSERVERSDK_API match(const NeuroDactyl::Template *template0, const NeuroDactyl::Template *template1)
Namespace containing all symbols from the NeuroDactyl SDK.
Definition: config.h:21