15 const std::string &probeIdentifier_,
17 const uint8_t probeInputIdentifier_,
19 const std::string &referenceIdentifier_,
21 const uint8_t referenceInputIdentifier_,
22 const Minutia &referenceMinutia_) :
38 const uint16_t theta_,
40 const std::optional<uint16_t> coordinateUncertainty_,
41 const std::optional<uint8_t> thetaUncertainty_) :
53 const std::optional<uint16_t> &direction_,
54 const std::optional<uint16_t> coordinateUncertainty_,
55 const std::optional<uint8_t> directionUncertainty_) :
66 const std::optional<std::tuple<std::optional<uint16_t>,
67 std::optional<uint16_t>, std::optional<uint16_t>>> &direction_,
68 const std::optional<uint16_t> coordinateUncertainty_,
69 const std::optional<std::tuple<std::optional<uint8_t>,
70 std::optional<uint8_t>, std::optional<uint8_t>>>
71 &directionUncertainty_) :
83 const std::vector<Segment> &segments_) :
115 if (std::get_if<PalmCrease>(&cld_) !=
nullptr) {
158 throw std::logic_error{
"CreaseClassification = "
159 "PalmCrease, but FrictionRidgeGeneralizedPosition "
160 "is not from a palm"};
204 case FrictionRidgeGeneralizedPosition::
205 RightFullPalmAndWritersPalm:
207 case FrictionRidgeGeneralizedPosition::
208 LeftFullPalmAndWritersPalm:
220std::vector<FRIF::Segment>
224 return (this->segments);
231 this->segments.push_back(segment);
236 const std::vector<FRIF::Segment> &segments_)
238 this->segments = segments_;
243 const std::optional<PatternSubclassification> sub_,
244 const std::optional<WhorlDeltaRelationship> wdr_)
248 if (sub_.has_value())
251 if (wdr_.has_value())
262 this->sub = std::nullopt;
263 this->wdr = std::nullopt;
272 if (std::get_if<ArchPatternSubclassification>(&sub_) ==
nullptr)
273 throw std::logic_error{
"PatternGeneralClassification = "
274 "Arch, but PatternSubclassification is not an "
275 "ArchPatternSubclassification"};
279 if (std::get_if<WhorlPatternSubclassification>(&sub_) ==
281 throw std::logic_error{
"PatternGeneralClassification = "
282 "Whorl, but PatternSubclassification is not a "
283 "WhorlPatternSubclassification"};
286 throw std::logic_error{
"PatternGeneralClassification is not "
298 throw std::logic_error{
"PatternGeneralClassification is not "
300 if (!this->sub.has_value())
301 throw std::logic_error{
"PatternSubClassification is not set"};
302 if (std::get_if<WhorlPatternSubclassification>(&this->sub.value()) ==
304 throw std::logic_error{
"PatternGeneralClassification = Whorl, "
305 "but PatternSubclassification is not a "
306 "WhorlPatternSubclassification"};
318std::optional<FRIF::EFS::PatternSubclassification>
325std::optional<FRIF::EFS::WhorlDeltaRelationship>
334 const std::underlying_type_t<Impression> i)
356 throw std::runtime_error{
"Invalid Impression value: " +
363 const std::underlying_type_t<FrictionRidgeCaptureTechnology> i)
383 throw std::runtime_error{
"Invalid FrictionRidgeCapture"
384 "Technology value: " + std::to_string(i)};
390 const std::underlying_type_t<FrictionRidgeGeneralizedPosition> i)
480 throw std::runtime_error{
"Invalid FrictionRidgeGeneralized"
481 "Position value: " + std::to_string(i)};
486 const int16_t direction_,
487 const std::optional<uint8_t> &uncertainty_) :
496 const std::underlying_type_t<ProcessingMethod> i)
518 throw std::runtime_error{
"Invalid ProcessingMethod value: " +
525 const std::underlying_type_t<PatternGeneralClassification> i)
547 throw std::runtime_error{
"Invalid PatternGeneralClassification "
548 "value: " + std::to_string(i)};
554 const std::underlying_type_t<ArchPatternSubclassification> i)
562 throw std::runtime_error{
"Invalid ArchPatternSubclassification "
563 "value: " + std::to_string(i)};
569 const std::underlying_type_t<WhorlPatternSubclassification> i)
581 throw std::runtime_error{
"Invalid WhorlPattern"
582 "Subclassification value: " + std::to_string(i)};
588 const std::underlying_type_t<WhorlDeltaRelationship> i)
598 throw std::runtime_error{
"Invalid WhorlDeltaRelationship "
599 "value: " + std::to_string(i)};
605 const std::underlying_type_t<ValueAssessment> i)
617 throw std::runtime_error{
"Invalid ValueAssessment value: " +
624 const std::underlying_type_t<Substrate> i)
652 throw std::runtime_error{
"Invalid Substrate value: " +
659 const std::underlying_type_t<MinutiaType> i)
671 throw std::runtime_error{
"Invalid MinutiaType value: " +
678 const std::underlying_type_t<CorrespondenceType> i)
692 throw std::runtime_error{
"Invalid CorrespondenceType value: " +
699 const std::underlying_type_t<RidgeQuality> i)
715 throw std::runtime_error{
"Invalid RidgeQuality value: " +
722 const std::underlying_type_t<FingerCrease> i)
732 throw std::runtime_error{
"Invalid FingerCrease value: " +
739 const std::underlying_type_t<PalmCrease> i)
751 throw std::runtime_error{
"Invalid PalmCrease value: " +
758 const std::underlying_type_t<LinearDiscontinuity> i)
772 throw std::runtime_error{
"Invalid LinearDiscontinuity value: " +
793 "b4a1e7586b3be906f9770e4b77768038"
801 static const std::string fs =
"\x1C";
802 static const std::string us =
"\x1F";
803 static const std::string gs =
"\x1D";
807 id += d.
identifier->marketing.value_or(
"") + us;
810 id += std::to_string(d.
identifier->cbeff->owner) + us;
812 if (d.
identifier->cbeff->algorithm.has_value())
813 id += std::to_string(
820 return (std::hash<std::string>{}(
831 const double value_) :
839 const std::string &errorMessage) :
841 message{errorMessage}
846FRIF::EFS::QualityMeasure::operator bool()
859 this->value.has_value());
866 return (*this->value);
873 return (this->value.value());
880 return (this->status);
883std::optional<std::string>
887 return (this->message);
892 const std::string &message_)
894 this->message = message_;
899 const std::string &errorMessage)
902 this->message = errorMessage;
std::vector< Segment > getSegments() const
void setFrictionRidgeGeneralizedPosition(const FrictionRidgeGeneralizedPosition fgp)
Crease(const FrictionRidgeGeneralizedPosition fgp, const CreaseClassification cld, const std::vector< Segment > &segments)
Crease constructor.
void addSegment(const Segment &segment)
void setCreaseClassification(const CreaseClassification cld)
void setSegments(const std::vector< Segment > &segments)
CreaseClassification getCreaseClassification() const
FrictionRidgeGeneralizedPosition getFrictionRidgeGeneralizedPosition() const
std::optional< PatternSubclassification > getPatternSubclassification() const
void setPatternGeneralClassification(const PatternGeneralClassification)
void setWhorlDeltaRelationship(const WhorlDeltaRelationship)
PatternClassification(const PatternGeneralClassification, const std::optional< PatternSubclassification >={}, const std::optional< WhorlDeltaRelationship >={})
std::optional< WhorlDeltaRelationship > getWhorlDeltaRelationship() const
void setPatternSubclassification(const PatternSubclassification)
PatternGeneralClassification getPatternGeneralClassification() const
Status
Status of QualityMeasure value computation.
@ Success
Value computed successfully.
@ Error
Error occurred during computation of value.
void setMessage(const std::string &message)
bool hasValue() const noexcept
std::optional< std::string > getMessage() const
static const Description NFIQ2v23
Description for NFIQ 2 v2.3.
void setError(const std::string &errorMessage)
Communiate error in computation.
Types (mostly) mirroring the ANSI/NIST-ITL Type 9 Extended Feature Set.
ArchPatternSubclassification toArchPatternSubclassification(const std::underlying_type_t< ArchPatternSubclassification > i)
Convert integer to enumerated type.
std::variant< ArchPatternSubclassification, WhorlPatternSubclassification > PatternSubclassification
Subclassification of PatternClassification.
Substrate toSubstrate(const std::underlying_type_t< Substrate > i)
Convert integer to enumerated type.
MinutiaType toMinutiaType(const std::underlying_type_t< MinutiaType > i)
Convert integer to enumerated type.
PatternGeneralClassification
General classification of friction ridge structure.
PatternGeneralClassification toPatternGeneralClassification(const std::underlying_type_t< PatternGeneralClassification > i)
Convert integer to enumerated type.
FingerCrease
Permanent flexion creases on fingers.
@ DistalInterphalangeal
Below distal phalanx.
@ ProximalDigital
Between proximal phalanx and palm.
@ ProximalInterphalangeal
Below medial phalanx.
RidgeQuality toRidgeQuality(const std::underlying_type_t< RidgeQuality > i)
Convert integer to enumerated type.
FrictionRidgeGeneralizedPosition
Friction positions codes from ANSI/NIST-ITL 1-2011 (2015).
@ LeftFullPalmAndWritersPalm
@ RightFullPalmAndWritersPalm
LinearDiscontinuity
Linear discontinuities that are not named permanent creases.
WhorlPatternSubclassification
Subclassification when PatternClassification is Whorl.
FrictionRidgeCaptureTechnology
Capture device codes from ANSI/NIST-ITL 1-2011 (2015).
ProcessingMethod
Processing method codes from ANSI/NIST-ITL 1-2011 (2015).
WhorlDeltaRelationship toWhorlDeltaRelationship(const std::underlying_type_t< WhorlDeltaRelationship > i)
Convert integer to enumerated type.
WhorlPatternSubclassification toWhorlPatternSubclassification(const std::underlying_type_t< WhorlPatternSubclassification > i)
Convert integer to enumerated type.
ValueAssessment toValueAssessment(const std::underlying_type_t< ValueAssessment > i)
Convert integer to enumerated type.
FrictionRidgeGeneralizedPosition toFrictionRidgeGeneralizedPosition(const std::underlying_type_t< FrictionRidgeGeneralizedPosition > i)
Convert integer to enumerated type.
PalmCrease toPalmCrease(const std::underlying_type_t< PalmCrease > i)
Convert integer to enumerated type.
Impression
Friction ridge impression types from ANSI/NIST-ITL 1-202X.
@ PlainContactlessStationary
@ RolledContactlessStationary
ArchPatternSubclassification
Subclassification when PatternClassification is Arch.
CorrespondenceType toCorrespondenceType(const std::underlying_type_t< CorrespondenceType > i)
Convert integer to enumerated type.
ValueAssessment
Value assessment codes from ANSI/NIST-ITL 1-2011 (2015).
FingerCrease toFingerCrease(const std::underlying_type_t< FingerCrease > i)
Convert integer to enumerated type.
MinutiaType
Types of minutiae.
LinearDiscontinuity toLinearDiscontinuity(const std::underlying_type_t< LinearDiscontinuity > i)
Convert integer to enumerated type.
CorrespondenceType
Types of correspondence.
@ Definite
Probe feature definitely corresponds.
@ OutOfRegion
Probe feature lies outside the reference.
@ Possible
Probe feature possibly/debatably corresponds.
@ DoesNotExist
Probe feature definitely does not exist.
@ UnclearArea
Probe feature lies in an area experiencing quality issues in the reference.
ProcessingMethod toProcessingMethod(const std::underlying_type_t< ProcessingMethod > i)
Convert integer to enumerated type.
Impression toImpression(const std::underlying_type_t< Impression > i)
Convert integer to enumerated type.
PalmCrease
Permanent flexion creases on palms.
@ ProximalTransverse
Diagonal across palm.
@ Wrist
Bottom of the palm at the wrist.
@ RadialLongitudinal
Around the base of thenar.
@ DistalTransverse
Bottom of the interdigital area.
RidgeQuality
Local ridge quality codes from ANSI/NIST-ITL 1-2011 (2015).
@ DebatableMinutiae
Continuity of ridge flow is certain; minutiae are debatable.
@ DebatableRidgeFlow
Continuity of ridge flow is uncertain.
@ DefinitiveRidgeEdges
Ridge edges, minutiae, and ridge flow are obvious and unambiguous; pores are either debatable or not ...
@ DefinitivePores
Pores and ridge edges are obvious and unambiguous.
@ Background
No ridge information.
@ DefinitiveMinutiae
Minutiae and ridge flow are obvious and unambiguous; ridge edges are debatable.
FrictionRidgeCaptureTechnology toFrictionRidgeCaptureTechnology(const std::underlying_type_t< FrictionRidgeCaptureTechnology > i)
Convert integer to enumerated type.
Substrate
Substrate codes from ANSI/NIST-ITL 1-2011 (2015).
WhorlDeltaRelationship
Whorl-Delta relationship.
std::variant< FingerCrease, PalmCrease, LinearDiscontinuity > CreaseClassification
Collection of crease types.
std::tuple< Coordinate, Coordinate > Segment
Line segment.
Pixel location in an image.
std::optional< uint16_t > direction
Direction pointing away from the center of the curve, in degrees [0,359] counterclockwise to the righ...
std::optional< uint8_t > directionUncertainty
Uncertainty of direction, in degrees [0, 180].
std::optional< uint16_t > coordinateUncertainty
Uncertainty of coordinate, radius, in pixels.
Coordinate coordinate
Location of the feature.
Core(const Coordinate &coordinate={}, const std::optional< uint16_t > &direction={}, const std::optional< uint16_t > coordinateUncertainty={}, const std::optional< uint8_t > directionUncertainty={})
Core constructor.
CorrespondenceRelationship(const CorrespondenceType type={}, const std::string &probeIdentifier={}, const FrictionRidgeGeneralizedPosition probeFGP={}, const uint8_t probeInputIdentifier={}, const Minutia &probeMinutia={}, const std::string &referenceIdentifier={}, const FrictionRidgeGeneralizedPosition referenceFGP={}, const uint8_t referenceInputIdentifier={}, const Minutia &referenceMinutia={})
CorrespondenceRelationship constructor.
std::string probeIdentifier
Identifier from the probe template.
std::string referenceIdentifier
Identifier from the reference template.
FrictionRidgeGeneralizedPosition probeFGP
Probe finger position.
FrictionRidgeGeneralizedPosition referenceFGP
Reference finger position.
Minutia referenceMinutia
Location in the reference image of a probe image feature.
CorrespondenceType type
Type of correspondence seen at these points.
Minutia probeMinutia
Location in the probe image of a reference image feature.
uint8_t referenceInputIdentifier
Link to Image::identifier and/or Features::identifier for reference.
uint8_t probeInputIdentifier
Link to Image::identifier and/or Features::identifier for probe.
std::optional< uint16_t > coordinateUncertainty
Uncertainty of coordinate, radius, in pixels.
Delta(const Coordinate &coordinate={}, const std::optional< std::tuple< std::optional< uint16_t >, std::optional< uint16_t >, std::optional< uint16_t > > > &direction={}, std::optional< uint16_t > coordinateUncertainty={}, const std::optional< std::tuple< std::optional< uint8_t >, std::optional< uint8_t >, std::optional< uint8_t > > > &directionUncertainty={})
Delta constructor.
Coordinate coordinate
Location of the feature.
std::optional< std::tuple< std::optional< uint8_t >, std::optional< uint8_t >, std::optional< uint8_t > > > directionUncertainty
Uncertainty of direction, in degrees [0, 180].
std::optional< std::tuple< std::optional< uint16_t >, std::optional< uint16_t >, std::optional< uint16_t > > > direction
Ridge directions of the feature (typically up, left, and right), in degrees [0,359] counterclockwise ...
Friction ridge feature details.
std::optional< uint8_t > thetaUncertainty
Uncertainty of theta, in degrees [0, 180].
uint16_t theta
Ridge direction of the feature, in degrees [0,359], following conventions from ANSI/NIST-ITL 1-2011 (...
MinutiaType type
Type of feature.
std::optional< uint16_t > coordinateUncertainty
Uncertainty of coordinate, radius, in pixels.
Coordinate coordinate
Location of the feature.
Minutia(const Coordinate &coordinate={}, const uint16_t theta={}, const MinutiaType type=MinutiaType::Unknown, const std::optional< uint16_t > coordinateUncertainty={}, const std::optional< uint8_t > thetaUncertainty={})
Minutia constructor.
std::optional< uint8_t > uncertainty
Uncertainty of direction in degrees [0,180].
Orientation(const int16_t direction=0, const std::optional< uint8_t > &uncertainty=15)
Orientation constructor.
int16_t direction
Degrees needed to rotate image upright.
std::size_t operator()(const Description &d) const
Description of algorithm that computed a QualityMeasure.
std::optional< ProductIdentifier > identifier
Registered algorithm identifier (QAV, QAP).
std::optional< std::string > comment
Other information (QCM).
std::optional< std::string > modelSHA256
Model SHA-256 checksum (QCK).
std::strong_ordering operator<=>(const Description &) const
bool operator==(const Description &) const
std::optional< std::string > version
Algorithm product version (QPV).
CBEFF information registered with and assigned by IBIA.
Identifying details about algorithm components for documentation.