NIST Fingerprint Image Quality 2
Fingerprint image quality assessment tool
nfiq2_algorithm.hpp
Go to the documentation of this file.
1 /*
2  * This file is part of NIST Fingerprint Image Quality (NFIQ) 2. For more
3  * information on this project, refer to:
4  * - https://nist.gov/services-resources/software/nfiq2
5  * - https://github.com/usnistgov/NFIQ2
6  *
7  * This work is in the public domain. For complete licensing details, refer to:
8  * - https://github.com/usnistgov/NFIQ2/blob/master/LICENSE.md
9  */
10 
11 #ifndef NFIQ2_ALGORITHM_HPP_
12 #define NFIQ2_ALGORITHM_HPP_
13 
14 #include <nfiq2_constants.hpp>
16 #include <nfiq2_modelinfo.hpp>
18 
19 #include <memory>
20 #include <string>
21 #include <unordered_map>
22 
23 namespace NFIQ2 {
24 
29 class Algorithm {
30  public:
40 
50  Algorithm(const std::string &fileName, const std::string &fileHash);
51 
59  Algorithm(const NFIQ2::ModelInfo &modelInfoObj);
60 
62  Algorithm(const Algorithm &);
63 
66 
68  Algorithm(Algorithm &&) noexcept;
69 
71  Algorithm &operator=(Algorithm &&) noexcept;
72 
75 
91  unsigned int computeQualityScore(
92  const NFIQ2::FingerprintImageData &rawImage) const;
93 
110  unsigned int computeQualityScore(
111  const std::vector<std::shared_ptr<NFIQ2::QualityFeatures::Module>>
112  &modules) const;
113 
130  unsigned int computeQualityScore(
131  const std::unordered_map<std::string, double> &features) const;
132 
143  std::string getParameterHash() const;
144 
153  bool isInitialized() const;
154 
163  bool isEmbedded() const;
164 
176  unsigned int getEmbeddedFCT() const;
177 
178  private:
180  class Impl;
181 
183  std::unique_ptr<Algorithm::Impl> pimpl;
184 };
185 } // namespace NFIQ
186 
187 #endif /* NFIQ2_ALGORITHM_HPP_ */
Applies trained random forest parameters to quality features, computing an overall quality score (i....
Algorithm()
Default constructor of Algorithm.
unsigned int getEmbeddedFCT() const
Obtain the friction ridge capture technology (FCT) specified for the embedded random forest parameter...
Algorithm(const std::string &fileName, const std::string &fileHash)
Constructor that loads random forest parameters from disk.
Algorithm(const Algorithm &)
Copy constructor.
std::string getParameterHash() const
Obtain MD5 checksum of random forest parameter file loaded.
bool isInitialized() const
Determine if random forest parameters have been loaded.
Algorithm(const NFIQ2::ModelInfo &modelInfoObj)
Constructor using NFIQ2::ModelInfo to initialize the random forest.
Algorithm(Algorithm &&) noexcept
Move constructor.
bool isEmbedded() const
Obtain if the random forest parameters are embedded in the library or located externally.
Algorithm & operator=(const Algorithm &)
Assignment operator.
Binary data representing a decompressed fingerprint image, canonically encoded as per ISO/IEC 19794-4...
Information about a random forest parameter model.
unsigned int computeQualityScore(const NFIQ2::FingerprintImageData &rawImage) const
Compute a NFIQ 2 quality score.
Classes and functions that contribute to the calculation of NFIQ 2 quality scores.
Definition: nfiq2.hpp:97