Enrollment 28.2.0
Loading...
Searching...
No Matches
FaceCaptureDeviceTechnology.h
Go to the documentation of this file.
1
9
10#pragma once
12#include "enrollment/Export.h"
13#include <ostream>
14
15namespace inno
16{
37 };
38
39 // The numbers are from ISO standard and are tested in unit tests.
40 // NOLINTBEGIN(cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers)
41
48 */
49 static constexpr int FaceToIsoCaptureDeviceTechnology(FaceCaptureDeviceTechnology printCaptureDeviceTechnology)
50 {
51 switch (printCaptureDeviceTechnology)
52 {
54 return 0;
56 return 1;
58 return 2;
60 return 3;
62 return 4;
64 return 5;
66 return 6;
67 default:
68 break;
69 }
70
71 throw EnrollmentInvalidArgumentException("Invalid conversion from FaceCaptureDeviceTechnology to ISO");
72 }
73
80 */
81 static constexpr FaceCaptureDeviceTechnology IsoToFaceCaptureDeviceTechnology(int isoCaptureDeviceTechnology)
82 {
83 switch (isoCaptureDeviceTechnology)
84 {
85 case 0:
87 case 1:
89 case 2:
91 case 3:
93 case 4:
95 case 5:
97 case 6:
99 default:
100 break;
101 }
102
103 throw EnrollmentInvalidArgumentException("Invalid conversion from ISO to FaceCaptureDeviceTechnology");
104 }
105 // NOLINTEND(cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers)
106
107 inline std::ostream& operator<<(std::ostream& os, FaceCaptureDeviceTechnology printCaptureDeviceTechnology)
108 {
109 switch (printCaptureDeviceTechnology)
110 {
112 os << "UNKNOWN";
113 break;
115 os << "STATIC_PHOTOGRAPH_FROM_UNKNOWN_SOURCE";
116 break;
118 os << "STATIC_PHOTOGRAPH_FROM_DIGITAL_CAMERA";
119 break;
121 os << "STATIC_PHOTOGRAPH_FROM_SCANNER";
122 break;
124 os << "VIDEO_FRAME_FROM_UNKNOWN_SOURCE";
125 break;
127 os << "VIDEO_FRAME_FROM_ANALOGUE_CAMERA";
128 break;
130 os << "VIDEO_FRAME_FROM_DIGITAL_CAMERA";
131 break;
132 }
133 return os;
134 }
135
136} // namespace inno
Base exception for all enrollment-sdk invalid argument exceptions.
Definition EnrollmentException.h:96
FaceCaptureDeviceTechnology
It indicates the class of device technology used to acquire the captured biometric sample iso_19794-5...
Definition FaceCaptureDeviceTechnology.h:21
static constexpr int FaceToIsoCaptureDeviceTechnology(FaceCaptureDeviceTechnology printCaptureDeviceTechnology)
Function converts FaceCaptureDeviceTechnology to ISO capture technology.
Definition FaceCaptureDeviceTechnology.h:48
static constexpr FaceCaptureDeviceTechnology IsoToFaceCaptureDeviceTechnology(int isoCaptureDeviceTechnology)
Function converts ISO capture technology to FaceCaptureDeviceTechnology.
Definition FaceCaptureDeviceTechnology.h:80
@ STATIC_PHOTOGRAPH_FROM_SCANNER
Static photograph from a scanner.
Definition FaceCaptureDeviceTechnology.h:29
@ VIDEO_FRAME_FROM_ANALOGUE_CAMERA
Video frame(s) from an analogue video camera.
Definition FaceCaptureDeviceTechnology.h:33
@ UNKNOWN
Unknown or Unspecified.
Definition FaceCaptureDeviceTechnology.h:23
@ STATIC_PHOTOGRAPH_FROM_DIGITAL_CAMERA
Static photograph from a digital still-image camera.
Definition FaceCaptureDeviceTechnology.h:27
@ STATIC_PHOTOGRAPH_FROM_UNKNOWN_SOURCE
Static photograph from an unknown source.
Definition FaceCaptureDeviceTechnology.h:25
@ VIDEO_FRAME_FROM_DIGITAL_CAMERA
Video frame(s) from a digital video camera.
Definition FaceCaptureDeviceTechnology.h:35
@ VIDEO_FRAME_FROM_UNKNOWN_SOURCE
Video frame(s) from an unknown source.
Definition FaceCaptureDeviceTechnology.h:31