Friction Ridge Image and Features Technology Evaluations
API for participating in NIST's Friction Ridge Image and Features Technology Evaluations.
Loading...
Searching...
No Matches
e1n.h
Go to the documentation of this file.
1/*
2 * This software was developed at the National Institute of Standards and
3 * Technology (NIST) by employees of the Federal Government in the course
4 * of their official duties. Pursuant to title 17 Section 105 of the
5 * United States Code, this software is not subject to copyright protection
6 * and is in the public domain. NIST assumes no responsibility whatsoever for
7 * its use by other parties, and makes no guarantees, expressed or implied,
8 * about its quality, reliability, or any other characteristic.
9 */
10
49
50#ifndef FRIF_EVALUATIONS_E1N_H_
51#define FRIF_EVALUATIONS_E1N_H_
52
53#include <cstddef>
54#include <cstdint>
55#include <filesystem>
56#include <memory>
57#include <optional>
58#include <set>
59#include <string>
60#include <tuple>
61#include <vector>
62
63#include <frifte/frifte.h>
64
67{
71
74 {
75 public:
81 {
87
93
106 std::set<uint16_t> probeTemplateVersions{};
107
120 std::set<uint16_t> referenceTemplateVersions{};
121
134 std::set<uint16_t> referenceDatabaseVersions{};
135 };
136
196 virtual
197 std::tuple<ReturnStatus, std::optional<CreateTemplateResult>>
199 const TemplateType templateType,
200 const std::string &identifier,
201 const std::vector<Sample> &samples)
202 const = 0;
203
249 virtual
250 std::optional<std::tuple<ReturnStatus,
251 std::vector<TemplateData>>>
253 const TemplateType templateType,
254 const CreateTemplateResult &templateResult)
255 const = 0;
256
303 virtual
306 const TemplateArchive &referenceTemplates,
307 const std::filesystem::path &databaseDirectory,
308 const uint64_t maxSize)
309 const = 0;
310
311 /**************************************************************/
312
340 static
341 std::shared_ptr<ExtractionInterface>
343 const std::filesystem::path &configurationDirectory);
344
360 static
361 std::optional<ProductIdentifier>
363
379 static
382
387 ExtractionInterface& operator=(const ExtractionInterface&) =
388 delete;
390
393 };
394
397 {
398 public:
404 {
410
423 std::set<uint16_t> probeTemplateVersions{};
424
437 std::set<uint16_t> referenceDatabaseVersions{};
438 };
439
501 virtual
504 const uint64_t maxSize) = 0;
505
506 /**************************************************************/
507
569 virtual
570 std::tuple<ReturnStatus,
571 std::optional<SearchSubjectPositionResult>>
573 const std::vector<std::byte> &probeTemplate,
574 const uint16_t maxCandidates)
575 const = 0;
576
626 virtual
627 std::tuple<ReturnStatus, std::optional<SearchSubjectResult>>
629 const std::vector<std::byte> &probeTemplate,
630 const uint16_t maxCandidates)
631 const = 0;
632
680 virtual
681 std::optional<SubjectPositionCandidateListCorrespondence>
683 const std::vector<std::byte> &probeTemplate,
684 const SearchSubjectPositionResult &searchResult)
685 const = 0;
686
733 virtual
734 std::optional<SubjectCandidateListCorrespondence>
736 const std::vector<std::byte> &probeTemplate,
737 const SearchSubjectResult &searchResult)
738 const = 0;
739
740 /**************************************************************/
741
782 static
783 std::shared_ptr<SearchInterface>
785 const std::filesystem::path &configurationDirectory,
786 const std::filesystem::path &databaseDirectory);
787
803 static
804 std::optional<ProductIdentifier>
806
822 static
825
828 SearchInterface(const SearchInterface&) = delete;
830 SearchInterface& operator=(const SearchInterface&) = delete;
832
835 };
836
837 /*
838 * API versioning.
839 *
840 * NIST code will extern the version number symbols. Participant code
841 * shall compile them into their core library.
842 */
843 #ifdef NIST_EXTERN_FRIFTE_E1N_API_VERSION
845 extern uint16_t API_MAJOR_VERSION;
847 extern uint16_t API_MINOR_VERSION;
849 extern uint16_t API_PATCH_VERSION;
850 #else /* NIST_EXTERN_FRIFTE_E1N_API_VERSION */
852 uint16_t API_MAJOR_VERSION{1};
854 uint16_t API_MINOR_VERSION{2};
856 uint16_t API_PATCH_VERSION{0};
857 #endif /* NIST_EXTERN_FRIFTE_E1N_API_VERSION */
858}
859
860#endif /* FRIF_EVALUATIONS_E1N_H_ */
virtual std::tuple< ReturnStatus, std::optional< CreateTemplateResult > > createTemplate(const TemplateType templateType, const std::string &identifier, const std::vector< Sample > &samples) const =0
Extract features from one or more images and encode them into a template.
static Compatibility getCompatibility()
Obtain information about API feature and version compatibility of this implementation.
virtual std::optional< std::tuple< ReturnStatus, std::vector< TemplateData > > > extractTemplateData(const TemplateType templateType, const CreateTemplateResult &templateResult) const =0
Extract information contained within a template.
static std::shared_ptr< ExtractionInterface > getImplementation(const std::filesystem::path &configurationDirectory)
Obtain a managed pointer to an object implementing ExtractionInterface.
static std::optional< ProductIdentifier > getProductIdentifier()
Obtain identification and version information for the extraction portion of this submission.
virtual ReturnStatus createReferenceDatabase(const TemplateArchive &referenceTemplates, const std::filesystem::path &databaseDirectory, const uint64_t maxSize) const =0
Create a reference database on the file system.
virtual std::tuple< ReturnStatus, std::optional< SearchSubjectPositionResult > > searchSubjectPosition(const std::vector< std::byte > &probeTemplate, const uint16_t maxCandidates) const =0
Search the reference database for the samples represented in probeTemplate including the most localiz...
static Compatibility getCompatibility()
Obtain information about API feature and version compatibility of this implementation.
virtual std::optional< SubjectPositionCandidateListCorrespondence > extractCorrespondenceSubjectPosition(const std::vector< std::byte > &probeTemplate, const SearchSubjectPositionResult &searchResult) const =0
Extract pairs of corresponding Minutia between TemplateType::Probe and TemplateType::Reference templa...
virtual std::optional< SubjectCandidateListCorrespondence > extractCorrespondenceSubject(const std::vector< std::byte > &probeTemplate, const SearchSubjectResult &searchResult) const =0
Extract pairs of corresponding Minutia between TemplateType::Probe and TemplateType::Reference templa...
virtual std::tuple< ReturnStatus, std::optional< SearchSubjectResult > > searchSubject(const std::vector< std::byte > &probeTemplate, const uint16_t maxCandidates) const =0
Search the reference database for the samples represented in probeTemplate including the most localiz...
static std::shared_ptr< SearchInterface > getImplementation(const std::filesystem::path &configurationDirectory, const std::filesystem::path &databaseDirectory)
Obtain a managed pointer to an object implementing SearchInterface.
virtual ReturnStatus load(const uint64_t maxSize)=0
Load reference database into memory.
static std::optional< ProductIdentifier > getProductIdentifier()
Obtain identification and version information for the search portion of this submission.
FRIF TE Exemplar 1:N functionality.
Definition e1n.h:67
uint16_t API_PATCH_VERSION
API patch version number.
Definition e1n.h:856
LibraryIdentifier getLibraryIdentifier()
uint16_t API_MAJOR_VERSION
API major version number.
Definition e1n.h:852
uint16_t API_MINOR_VERSION
API minor version number.
Definition e1n.h:854
TemplateType
Use for data extracted from Sample.
Definition io.h:354
Output from extracting features into a template .
Definition io.h:50
Information used by the NIST testing apparatus to help efficiently test this implementation.
Definition e1n.h:81
std::set< uint16_t > referenceTemplateVersions
LibraryIdentifier::versionNumber of previously-submitted software that generates reference templates ...
Definition e1n.h:120
bool supportsReferenceTemplateIntrospection
Is useful information returned from extractTemplateData() for references?
Definition e1n.h:92
bool supportsProbeTemplateIntrospection
Is useful information returned from extractTemplateData() for probes?
Definition e1n.h:86
std::set< uint16_t > referenceDatabaseVersions
LibraryIdentifier::versionNumber of previously-submitted software that generates reference databases ...
Definition e1n.h:134
std::set< uint16_t > probeTemplateVersions
LibraryIdentifier::versionNumber of previously-submitted software that generates probe templates that...
Definition e1n.h:106
Information used by the NIST testing apparatus to help efficiently test this implementation.
Definition e1n.h:404
bool supportsCorrespondence
Is useful information returned from extractCorrespondence()?
Definition e1n.h:409
std::set< uint16_t > referenceDatabaseVersions
LibraryIdentifier::versionNumber of previously-submitted software that generates reference databases ...
Definition e1n.h:437
std::set< uint16_t > probeTemplateVersions
LibraryIdentifier::versionNumber of previously-submitted software that generates probe templates that...
Definition e1n.h:423
Identification information about the submitted library.
Definition evaluations.h:27
Information about the result of calling a FRIF TE API function.
Definition common.h:29
The results of a searching a database for subject finger positions.
Definition io.h:247
The results of a searching a database for a subject, without respect to finger positions.
Definition io.h:287
Collection of templates on disk.
Definition io.h:324