NeuroDactyl
person.h
Go to the documentation of this file.
1 
6 #ifndef _PERSON_H_
7 #define _PERSON_H_
8 
9 #pragma once
10 
11 #include <vector>
12 #include "extractor.h"
13 
14 namespace NeuroDactyl {
15 
21  class Person {
22  public:
31  virtual int setFingerprintTemplate(int position, const NeuroDactyl::Template* _template) = 0;
32 
36  virtual int size() const = 0;
37 
38  virtual ~Person() = default;
39  };
40 
41  FPSERVERSDK_API NeuroDactyl::Person* constructPerson();
42 
43 
49  class PersonDB {
50  public:
57  virtual void add(const NeuroDactyl::Person* person, const unsigned int id) = 0;
58 
59  virtual void clear() = 0;
60  virtual size_t size() = 0;
61  virtual size_t maxSize() = 0;
62  virtual unsigned int personNum() = 0;
63 
64  virtual void getLoadedIDs(std::vector<unsigned int>& ids) = 0;
65  virtual bool isLoaded(const unsigned int id) = 0;
66 
67  virtual void save(const std::string& path) = 0;
68 
77  virtual void matchK(const NeuroDactyl::Person* person,
78  unsigned int K, float threshold,
79  std::vector<std::pair<unsigned int, float>>& results) = 0;
80 
81  virtual ~PersonDB() = default;
82  };
83 
92  FPSERVERSDK_API NeuroDactyl::PersonDB* constructPersonDB(const NeuroDactyl::Config* cfg, size_t maxSize);
93 
102  FPSERVERSDK_API NeuroDactyl::PersonDB* constructPersonDB(const NeuroDactyl::Config* cfg, const std::string& filename);
103 
111  float FPSERVERSDK_API match(const NeuroDactyl::Person* person0, const NeuroDactyl::Person* person1);
112 
113 }
114 
115 #endif /* _PERSON_H_ */
Class for system configuration.
Definition: config.h:27
Person DB Used for storing persons with its IDs.
Definition: person.h:49
virtual void save(const std::string &path)=0
Saves the DB to hard drive.
virtual void add(const NeuroDactyl::Person *person, const unsigned int id)=0
virtual unsigned int personNum()=0
Number of persons in the DB.
virtual void getLoadedIDs(std::vector< unsigned int > &ids)=0
Returns ID list of loaded persons.
virtual size_t maxSize()=0
Max possible number of templates in the DB (person can have up to 10 templates)
virtual size_t size()=0
Number of templates in the DB.
virtual void clear()=0
Clears the DB.
virtual bool isLoaded(const unsigned int id)=0
Checks, if a person with specific ID is loaded to the DB.
virtual void matchK(const NeuroDactyl::Person *person, unsigned int K, float threshold, std::vector< std::pair< unsigned int, float >> &results)=0
Person Used for storing fingerprint templates of one person.
Definition: person.h:21
virtual int setFingerprintTemplate(int position, const NeuroDactyl::Template *_template)=0
virtual int size() const =0
Fingerprint template.
Definition: extractor.h:23
Header file with fingerprint template and template extractor descriptions.
FPSERVERSDK_API NeuroDactyl::PersonDB * constructPersonDB(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