NIST Fingerprint Image Quality 2
Fingerprint image quality assessment tool
Loading...
Searching...
No Matches
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
23namespace NFIQ2 {
24
29class Algorithm {
30 public:
40
50 Algorithm(const std::string &fileName, const std::string &fileHash);
51
59 Algorithm(const NFIQ2::ModelInfo &modelInfoObj);
60
63
66
68 Algorithm(Algorithm &&) noexcept;
69
71 Algorithm &operator=(Algorithm &&) noexcept;
72
75
92 const NFIQ2::FingerprintImageData &rawImage) const;
93
110 unsigned int computeUnifiedQualityScore(const std::vector<
111 std::shared_ptr<NFIQ2::QualityMeasures::Algorithm>> &algorithms)
112 const;
113
132 const std::unordered_map<std::string, double> &features) const;
133
154 static std::unordered_map<std::string, unsigned int>
155 getQualityBlockValues(const std::unordered_map<std::string, double>
156 &nativeQualityMeasureValues);
157
178 static unsigned int
179 getQualityBlockValue(const std::string &nativeQualityMeasureIdentifier,
180 const double nativeQualityMeasureValue);
181
192 std::string getParameterHash() const;
193
202 bool isInitialized() const;
203
212 bool isEmbedded() const;
213
225 unsigned int getEmbeddedFCT() const;
226
227 private:
229 class Impl;
230
232 std::unique_ptr<Algorithm::Impl> pimpl;
233};
234} // namespace NFIQ
235
236#endif /* NFIQ2_ALGORITHM_HPP_ */
Applies trained random forest parameters to native quality measures, computing a unified quality scor...
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 39794-4...
Information about a random forest parameter model.
unsigned int computeUnifiedQualityScore(const NFIQ2::FingerprintImageData &rawImage) const
Compute a unified quality score.
static unsigned int getQualityBlockValue(const std::string &nativeQualityMeasureIdentifier, const double nativeQualityMeasureValue)
Obtain the quality block value (i.e., [0, 100]) for the native quality measure value.
static std::unordered_map< std::string, unsigned int > getQualityBlockValues(const std::unordered_map< std::string, double > &nativeQualityMeasureValues)
Obtain the quality block values (i.e., [0, 100]) for the native quality measure values.
Classes and functions that contribute to the calculation of unified quality scores.
Definition nfiq2.hpp:103