|
Enrollment 28.2.0
|
It holds all functions and data related to Face manipulation. More...
#include <Face.h>
Classes | |
| class | Keypoint |
| It holds all attributes related to a facial key point. More... | |
| class | Keypoints |
| It holds all facial keypoints detected on a FaceCapture image. More... | |
Public Types | |
| enum class | AgeEstimationMode : uint8_t { BALANCED = 1 , ACCURATE = 2 } |
| Specifies the level of compromise between age estimation speed and accuracy. More... | |
| enum class | GenderEstimationMode : uint8_t { BALANCED = 1 , ACCURATE = 2 } |
| Specifies the level of compromise between age estimation speed and accuracy. More... | |
| enum class | PassiveLivenessMode : uint8_t { FAST , ACCURATE } |
| Mode of passive liveness calculation. More... | |
| enum class | AttributeID : uint8_t { CONFIDENCE , SHARPNESS , BRIGHTNESS , CONTRAST , UNIQUE_INTENSITY_LEVELS , SHADOW , NOSE_SHADOW , SPECULARITY , EYE_GAZE , RIGHT_EYE_STATUS , LEFT_EYE_STATUS , GLASS_STATUS , HEAVY_FRAME , MOUTH_STATUS , BACKGROUND_UNIFORMITY , AGE , RIGHT_RED_EYE , LEFT_RED_EYE , GENDER , EYE_DISTANCE , ROLL_ANGLE , PITCH_ANGLE , YAW_ANGLE , FACE_SIZE , FACE_RELATIVE_AREA , FACE_RELATIVE_AREA_IN_IMAGE , TINTED_GLASSES , WIDTH_HEIGHT_RATIO } |
| Face attributes IDs. More... | |
Public Member Functions | |
| std::shared_ptr< Keypoints > | GetKeypoints () const |
| Provides the facial keypoints detected on the face in the original face capture. | |
| std::shared_ptr< CroppedFace > | Crop (FaceCropConfiguration cfg) const |
| Crops the detected face from the original face capture. | |
| Rectangle | DetectionRectangle () const |
| Retrieves the bounding box of the detected face. | |
| std::vector< uint8_t > | ToIsoImage (ImageEncoder &encoder) const |
| Function creates ISO image based on ISO/IEC 19794-5 (Face image data). | |
| std::shared_ptr< ExtractedFace > | Extract (const FaceExtractorConfig &cfg) |
| This function creates a template for the detected face. | |
| std::shared_ptr< ExtractedFace > | Extract () |
| This function creates a template for the detected face with default FaceExtractorConfig. | |
| void | WriteTo (Writer &writer) const final |
| Function serializes Face via provided Writer. | |
| bool | IsSameAs (const Face &face) const |
| Returns true when argument is same object. | |
| bool | operator== (const Face &f) const |
| Compares if Face is equal with other one. | |
| bool | operator!= (const Face &f) const |
| Compares if Face is not equal with other one. | |
| float | Sharpness () |
| Sharpness attribute used to measure the sharpness level of an area of the detected face in the original face capture. | |
| float | Brightness () |
| Brightness attribute used to measure the brightness level of an area of the detected face in the original face capture. | |
| float | Contrast () |
| Contrast attribute used to measure the contrast level of an area of the detected face in the original face capture. | |
| float | UniqueIntensityLevels () |
| Unique Intensity Levels attribute used to measure whether an area of the detected face in the original face capture has an appropriate number of unique intensity levels. | |
| float | Shadow () |
| Shadow attribute used to evaluate whether an area of the detected face in the original face capture is affected by shadows. | |
| float | NoseShadow () |
| Nose Shadow attribute for evaluating whether eyes or a nose don't cast sharp shadows. | |
| float | Specularity () |
| Specularity attribute used to evaluate the presence of spotlights in an area of the detected face in the original face capture. | |
| float | EyeGaze () |
| Eye Gaze attribute used to evaluate whether the gaze direction of the detected face in the original face capture is frontal. | |
| float | RightEyeStatus () |
| Attribute for evaluating right eye status. | |
| float | LeftEyeStatus () |
| Attribute for evaluating left eye status. | |
| float | GlassStatus () |
| Attribute for evaluating glasses presence. | |
| float | HeavyFrame () |
| Attribute for evaluating whether glasses with heavy frames are not present. | |
| float | MouthStatus () |
| Attribute for evaluating mouth status. | |
| float | BackgroundUniformity (uint8_t minimalBackgroundRatio) |
| Attribute used to measure background uniformity in the close area around the detected face in the original face capture. | |
| float | BackgroundUniformity () |
| Attribute used to measure background uniformity in the close area around the detected face in the original face capture. | |
| float | Age () |
| Attribute for evaluating age of subject using the face. | |
| float | Age (AgeEstimationMode mode) |
| Attribute for evaluating age of subject using the face. | |
| float | RightRedEye () |
| Attribute for evaluating whether red-eye effect is not present on right eye. | |
| float | LeftRedEye () |
| Attribute for evaluating whether red-eye effect is not present on left eye. | |
| float | Gender () |
| Attribute for evaluating gender of subject. | |
| float | Gender (GenderEstimationMode mode) |
| Attribute for evaluating gender of subject. | |
| float | EyeDistance () |
| Attribute used to measure the distance between the eyes in pixels for the detected face in the original face capture. | |
| float | RollAngle () |
| Attribute representing the head rotation angle around the Z-axis of the detected face in the original face capture, relative to the camera reference frame, as per DIN 9300. | |
| float | PitchAngle () |
| Attribute representing the head rotation angle around the X-axis of the detected face in the original face capture, relative to the camera reference frame, as per DIN 9300. | |
| float | YawAngle () |
| Attribute representing the head rotation angle around the Y-axis of the detected face in the original face capture, relative to the camera reference frame, as per DIN 9300. | |
| float | FaceSize () |
| Attribute representing face size - the maximum of eye distance and eye-mouth distance. | |
| float | FaceRelativeArea () |
| Attribute representing the area of the detected face in the original face capture relative to the size of the original face capture. | |
| float | FaceRelativeAreaInImage () |
| Attribute representing the visible area of the detected face in the original face capture relative to the total face area. | |
| float | TintedGlasses () |
| Attribute for evaluating tinted glasses presence. | |
| float | WidthHeightRatio () const |
| Attribute representing width to height aspect ratio of the original face capture. | |
| float | PassiveLiveness () |
| Attribute used to assess whether a detected face in the original face capture qualifies as live, using the PassiveLivenessMode::ACCURATE calculation method. | |
| float | PassiveLiveness (PassiveLivenessMode mode) |
| Attribute used to assess whether a detected face in the original face capture qualifies as live. | |
Public Attributes | |
| const std::shared_ptr< FaceCapture > | capture |
| Provides the original FaceCapture. | |
| const unsigned int | confidence |
| Provides confidence score of the face related to face detection. | |
Friends | |
| class | FaceDetector |
It holds all functions and data related to Face manipulation.
|
strong |
Specifies the level of compromise between age estimation speed and accuracy.
| Enumerator | |
|---|---|
| BALANCED | Provides the fastest processing speed but the lowest age estimation accuracy compared to ACCURATE mode.
|
| ACCURATE | Provides better age estimation accuracy compared to BALANCED mode. However the performance of the age estimation is not as good as when BALANCED mode is used.
|
|
strong |
Face attributes IDs.
| Enumerator | |
|---|---|
| CONFIDENCE | Provides confidence score of the face related to face detection.
|
| SHARPNESS | Sharpness attribute used to measure the sharpness level of an area of the detected face in the original face capture.
|
| BRIGHTNESS | Brightness attribute used to measure the brightness level of an area of the detected face in the original face capture.
|
| CONTRAST | Contrast attribute used to measure the contrast level of an area of the detected face in the original face capture.
|
| UNIQUE_INTENSITY_LEVELS | Unique Intensity Levels attribute used to measure whether an area of the detected face in the original face capture has an appropriate number of unique intensity levels.
|
| SHADOW | Shadow attribute used to evaluate whether an area of the detected face in the original face capture is affected by shadows.
|
| NOSE_SHADOW | Nose Shadow attribute for evaluating whether eyes or a nose don't cast sharp shadows.
|
| SPECULARITY | Specularity attribute used to evaluate the presence of spotlights in an area of the detected face in the original face capture.
|
| EYE_GAZE | Eye Gaze attribute used to evaluate whether the gaze direction of the detected face in the original face capture is frontal.
|
| RIGHT_EYE_STATUS | Attribute for evaluating right eye status.
|
| LEFT_EYE_STATUS | Attribute for evaluating left eye status.
|
| GLASS_STATUS | Attribute for evaluating glasses presence.
|
| HEAVY_FRAME | Attribute for evaluating whether glasses with heavy frames are not present.
|
| MOUTH_STATUS | Attribute for evaluating mouth status.
|
| BACKGROUND_UNIFORMITY | Attribute used to measure background uniformity in the close area around the detected face in the original face capture.
|
| AGE | Attribute for evaluating age of subject using the face.
|
| RIGHT_RED_EYE | Attribute for evaluating whether red-eye effect is not present on right eye.
|
| LEFT_RED_EYE | Attribute for evaluating whether red-eye effect is not present on left eye.
|
| GENDER | Attribute for evaluating gender of subject.
|
| EYE_DISTANCE | Attribute used to measure the distance between the eyes in pixels for the detected face in the original face capture.
|
| ROLL_ANGLE | Attribute representing the head rotation angle around the Z-axis of the detected face in the original face capture, relative to the camera reference frame, as per DIN 9300.
|
| PITCH_ANGLE | Attribute representing the head rotation angle around the X-axis of the detected face in the original face capture, relative to the camera reference frame, as per DIN 9300.
|
| YAW_ANGLE | Attribute representing the head rotation angle around the Y-axis of the detected face in the original face capture, relative to the camera reference frame, as per DIN 9300.
|
| FACE_SIZE | Attribute representing face size - the maximum of eye distance and eye-mouth distance.
|
| FACE_RELATIVE_AREA | Attribute representing the area of the detected face in the original face capture relative to the size of the original face capture.
|
| FACE_RELATIVE_AREA_IN_IMAGE | Attribute representing the visible area of the detected face in the original face capture relative to the total face area.
|
| TINTED_GLASSES | Attribute for evaluating tinted glasses presence.
|
| WIDTH_HEIGHT_RATIO | Attribute representing width to height aspect ratio of the original face capture.
|
|
strong |
Specifies the level of compromise between age estimation speed and accuracy.
| Enumerator | |
|---|---|
| BALANCED | Provides the fastest processing speed but the lowest gender estimation accuracy compared to ACCURATE mode.
|
| ACCURATE | Provides better gender estimation accuracy compared to BALANCED mode. However the performance of the gender estimation is not as good as when BALANCED mode is used.
|
|
strong |
Mode of passive liveness calculation.
| Enumerator | |
|---|---|
| FAST | Passive liveness mode with best performance available but worse accuracy as ACCURATE mode.
|
| ACCURATE | Passive liveness mode with highest accuracy available but significantly slower as FAST mode.
|
|
inline |
Attribute for evaluating age of subject using the face.
It uses BALANCED estimation.
| EnrollmentException | when attribute can not be calculated |
Total size of solvers is 8 MB.
References face-attribute-age-gender-balanced.solver
References Age(), and BALANCED.
Referenced by Age().
|
inline |
Attribute for evaluating age of subject using the face.
| mode | mode of age estimation |
| EnrollmentException | when attribute can not be calculated |
|
inline |
Attribute used to measure background uniformity in the close area around the detected face in the original face capture.
The original face capture is stored in the Face::capture member variable.
The attribute can be taken as an ICAO feature.
The default background percentage of the whole image is 5%.
| EnrollmentException | when attribute can not be calculated |
Total size of solvers is 1 MB.
References face-attribute-background-uniformity.solver
References BackgroundUniformity().
Referenced by BackgroundUniformity().
|
inline |
Attribute used to measure background uniformity in the close area around the detected face in the original face capture.
The original face capture is stored in the Face::capture member variable.
The attribute can be taken as an ICAO feature.
| minimalBackgroundRatio | Specifies minimal background percentage of the whole image which needs to be available for background uniformity solver. The values lower as 5% resolves into less accurate result. |
| EnrollmentException | when attribute can not be calculated |
| EnrollmentInvalidArgumentException | when minimalBackgroundRatio is not in range <0,100> |
Total size of solvers is 1 MB.
References face-attribute-background-uniformity.solver
|
inline |
Brightness attribute used to measure the brightness level of an area of the detected face in the original face capture.
The original face capture is stored in the Face::capture member variable.
The attribute can be taken as an ICAO feature.
| EnrollmentException | when attribute can not be calculated |
|
inline |
Contrast attribute used to measure the contrast level of an area of the detected face in the original face capture.
The original face capture is stored in the Face::capture member variable.
The attribute can be taken as an ICAO feature.
| EnrollmentException | when attribute can not be calculated |
|
inlinenodiscard |
Crops the detected face from the original face capture.
This method extracts a cropped version of the detected face based on the given cropping configuration. The original face capture is stored in the Face::capture member variable.
| cfg | The configuration specifying how the face should be cropped. |
References capture.
|
inlinenodiscard |
Retrieves the bounding box of the detected face.
This method returns the rectangular region that encloses the detected face within the original face capture.
|
inline |
This function creates a template for the detected face with default FaceExtractorConfig.
| EnrollmentException | when it is not possible to extract templates |
References FaceExtractorConfig::Default(), and Extract().
Referenced by Extract().
|
inline |
This function creates a template for the detected face.
| cfg | FaceExtractorConfig |
| EnrollmentException | when it is not possible to extract templates |
References capture, and FaceExtractorConfig::GetExtractor().
|
inline |
Attribute used to measure the distance between the eyes in pixels for the detected face in the original face capture.
The original face capture is stored in the Face::capture member variable.
The attribute can be taken as an ICAO feature.
| EnrollmentException | when attribute can not be calculated |
|
inline |
Eye Gaze attribute used to evaluate whether the gaze direction of the detected face in the original face capture is frontal.
The original face capture is stored in the Face::capture member variable.
The attribute can be taken as an ICAO feature.
| EnrollmentException | when attribute can not be calculated |
Total size of solvers is 944 kB.
References face-attribute-eye-gaze.solver
|
inline |
Attribute representing the area of the detected face in the original face capture relative to the size of the original face capture.
The original face capture is stored in the Face::capture member variable.
| EnrollmentException | when attribute can not be calculated |
|
inline |
Attribute representing the visible area of the detected face in the original face capture relative to the total face area.
This value indicates the percentage of the face area that is outside the image. The original face capture is stored in the Face::capture member variable.
| EnrollmentException | when attribute can not be calculated |
|
inline |
Attribute representing face size - the maximum of eye distance and eye-mouth distance.
| EnrollmentException | when attribute can not be calculated |
|
inline |
Attribute for evaluating gender of subject.
It uses BALANCED estimation.
| EnrollmentException | when attribute can not be calculated |
Total size of solvers is 8 MB.
References face-attribute-age-gender-balanced.solver
References BALANCED, and Gender().
Referenced by Gender().
|
inline |
Attribute for evaluating gender of subject.
| mode | mode of gender estimation |
| EnrollmentException | when attribute can not be calculated |
Total size of solvers is 8 MB.
References face-attribute-age-gender-balanced.solver
|
inlinenodiscard |
Provides the facial keypoints detected on the face in the original face capture.
The original face capture is stored in the Face::capture member variable.
|
inline |
Attribute for evaluating glasses presence.
| EnrollmentException | when attribute can not be calculated |
Total size of solvers is 608 kB.
References face-attribute-glasses.solver
|
inline |
Attribute for evaluating whether glasses with heavy frames are not present.
The attribute can be taken as an ICAO feature.
| EnrollmentException | when attribute can not be calculated |
Total size of solvers is 498 kB.
References face-attribute-heavy-frame.solver
|
inline |
|
inline |
Attribute for evaluating left eye status.
The attribute can be taken as an ICAO feature.
| EnrollmentException | when attribute can not be calculated |
Total size of solvers is 16 kB.
References face-attribute-eye-status.solver
|
inline |
Attribute for evaluating whether red-eye effect is not present on left eye.
The attribute can be taken as an ICAO feature.
| EnrollmentException | when attribute can not be calculated |
|
inline |
Attribute for evaluating mouth status.
The attribute can be taken as an ICAO feature.
| EnrollmentException | when attribute can not be calculated |
Total size of solvers is 155 kB.
References face-attribute-mouth-status.solver
|
inline |
Nose Shadow attribute for evaluating whether eyes or a nose don't cast sharp shadows.
The attribute can be taken as an ICAO feature.
| EnrollmentException | when attribute can not be calculated |
|
inline |
|
inline |
|
inline |
Attribute used to assess whether a detected face in the original face capture qualifies as live, using the PassiveLivenessMode::ACCURATE calculation method.
The original face capture is stored in the Face::capture member variable.
References ACCURATE, and PassiveLiveness().
Referenced by PassiveLiveness().
|
inline |
Attribute used to assess whether a detected face in the original face capture qualifies as live.
The original face capture is stored in the Face::capture member variable.
| EnrollmentException | when attribute can not be calculated |
| mode | mode of passive liveness calculation. For more information see Face Passive Liveness. |
References FAST.
|
inline |
Attribute representing the head rotation angle around the X-axis of the detected face in the original face capture, relative to the camera reference frame, as per DIN 9300.
The original face capture is stored in the Face::capture member variable.
| EnrollmentException | when attribute can not be calculated |
|
inline |
Attribute for evaluating right eye status.
The attribute can be taken as an ICAO feature.
| EnrollmentException | when attribute can not be calculated |
Total size of solvers is 16 kB.
References face-attribute-eye-status.solver
|
inline |
Attribute for evaluating whether red-eye effect is not present on right eye.
The attribute can be taken as an ICAO feature.
| EnrollmentException | when attribute can not be calculated |
|
inline |
Attribute representing the head rotation angle around the Z-axis of the detected face in the original face capture, relative to the camera reference frame, as per DIN 9300.
The original face capture is stored in the Face::capture member variable.
| EnrollmentException | when attribute can not be calculated |
|
inline |
Shadow attribute used to evaluate whether an area of the detected face in the original face capture is affected by shadows.
The original face capture is stored in the Face::capture member variable.
The attribute can be taken as an ICAO feature.
| EnrollmentException | when attribute can not be calculated |
|
inline |
Sharpness attribute used to measure the sharpness level of an area of the detected face in the original face capture.
The original face capture is stored in the Face::capture member variable.
The attribute can be taken as an ICAO feature.
| EnrollmentException | when attribute can not be calculated |
|
inline |
Specularity attribute used to evaluate the presence of spotlights in an area of the detected face in the original face capture.
The original face capture is stored in the Face::capture member variable.
The attribute can be taken as an ICAO feature.
| EnrollmentException | when attribute can not be calculated |
|
inline |
Attribute for evaluating tinted glasses presence.
| EnrollmentException | when attribute can not be calculated |
Total size of solvers is 608 kB.
References face-attribute-glasses.solver
|
inlinenodiscard |
Function creates ISO image based on ISO/IEC 19794-5 (Face image data).
ISO standard defines a standard data format of digital face images to allow interoperability among vendors.
| encoder | specific encoder for encoding Print image. Supported JPEG 2000 (lossy & lossless), PNG |
| ImageException | when it is not possible to encode image |
| EnrollmentInvalidArgumentException | when encoder is not supported |
| EnrollmentRuntimeException | for invalid conversion size |
|
inline |
Unique Intensity Levels attribute used to measure whether an area of the detected face in the original face capture has an appropriate number of unique intensity levels.
The original face capture is stored in the Face::capture member variable.
The attribute can be taken as an ICAO feature.
| EnrollmentException | when attribute can not be calculated |
|
inline |
Attribute representing width to height aspect ratio of the original face capture.
This is calculated as an image width divided image height, as defined in B.3.2.2 Width to height ratio of the image [6].
The original face capture is stored in the Face::capture member variable.
|
inlinefinalvirtual |
Function serializes Face via provided Writer.
| writer | used to serialize Face. |
Implements Serializable.
References capture, and confidence.
|
inline |
Attribute representing the head rotation angle around the Y-axis of the detected face in the original face capture, relative to the camera reference frame, as per DIN 9300.
The original face capture is stored in the Face::capture member variable.
| EnrollmentException | when attribute can not be calculated |
| const std::shared_ptr<FaceCapture> capture |
Provides the original FaceCapture.
It contains the image in which this face was detected.
Referenced by Crop(), Extract(), operator==(), and WriteTo().
| const unsigned int confidence |
Provides confidence score of the face related to face detection.
It can be taken as an ICAO feature. Confidence values are from range <0,10000>. The higher the value of the attribute the better quality of the face. The decision thresholds are around 600, but it depends on the face image quality / camera angle etc.
Referenced by WriteTo().