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
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;
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
568 virtual
569 std::tuple<ReturnStatus,
570 std::optional<SearchSubjectPositionResult>>
572 const std::vector<std::byte> &probeTemplate,
573 const uint16_t maxCandidates)
574 const = 0;
575
619 virtual
620 std::tuple<ReturnStatus, std::optional<SearchSubjectResult>>
622 const std::vector<std::byte> &probeTemplate,
623 const uint16_t maxCandidates)
624 const = 0;
625
673 virtual
674 std::optional<SubjectPositionCandidateListCorrespondence>
676 const std::vector<std::byte> &probeTemplate,
677 const SearchSubjectPositionResult &searchResult)
678 const = 0;
679
726 virtual
727 std::optional<SubjectCandidateListCorrespondence>
729 const std::vector<std::byte> &probeTemplate,
730 const SearchSubjectResult &searchResult)
731 const = 0;
732
733 /**************************************************************/
734
775 static
776 std::shared_ptr<SearchInterface>
778 const std::filesystem::path &configurationDirectory,
779 const std::filesystem::path &databaseDirectory);
780
796 static
797 std::optional<ProductIdentifier>
799
815 static
818
821 SearchInterface(const SearchInterface&) = delete;
823 SearchInterface& operator=(const SearchInterface&) = delete;
828 };
829
830 /*
831 * API versioning.
832 *
833 * NIST code will extern the version number symbols. Participant code
834 * shall compile them into their core library.
835 */
836 #ifdef NIST_EXTERN_FRIFTE_E1N_API_VERSION
838 extern uint16_t API_MAJOR_VERSION;
840 extern uint16_t API_MINOR_VERSION;
842 extern uint16_t API_PATCH_VERSION;
843 #else /* NIST_EXTERN_FRIFTE_E1N_API_VERSION */
845 uint16_t API_MAJOR_VERSION{1};
847 uint16_t API_MINOR_VERSION{2};
849 uint16_t API_PATCH_VERSION{0};
850 #endif /* NIST_EXTERN_FRIFTE_E1N_API_VERSION */
851}
852
853#endif /* FRIF_EVALUATIONS_E1N_H_ */
Interface for feature extraction implemented by participant.
Definition e1n.h:74
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.
Interface for database search implemented by participant.
Definition e1n.h:397
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:849
LibraryIdentifier getLibraryIdentifier()
uint16_t API_MAJOR_VERSION
API major version number.
Definition e1n.h:845
uint16_t API_MINOR_VERSION
API minor version number.
Definition e1n.h:847
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