Enrollment 28.2.0
Loading...
Searching...
No Matches

It holds all functions and data related to Face manipulation. More...

#include <Face.h>

Collaboration diagram for Face:

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

Detailed Description

It holds all functions and data related to Face manipulation.

Member Enumeration Documentation

◆ AgeEstimationMode

enum class AgeEstimationMode : uint8_t
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.

Required Solvers

Total size of solvers is 8 MB.

References face-attribute-age-gender-balanced.solver

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.

Note
The age estimation feature MUST be allowed in license to get accurate age estimation.
Required Solvers

Total size of solvers is 313 MB.

References face-attribute-age-gender-accurate.nnkitsolver

◆ AttributeID

enum class AttributeID : uint8_t
strong

Face attributes IDs.

Enumerator
CONFIDENCE 

Provides confidence score of the face related to face detection.

See also
Face::confidence
SHARPNESS 

Sharpness attribute used to measure the sharpness level of an area of the detected face in the original face capture.

See also
Face::Sharpness
BRIGHTNESS 

Brightness attribute used to measure the brightness level of an area of the detected face in the original face capture.

See also
Face::Brightness
CONTRAST 

Contrast attribute used to measure the contrast level of an area of the detected face in the original face capture.

See also
Face::Contrast
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.

See also
Face::UniqueIntensityLevels
SHADOW 

Shadow attribute used to evaluate whether an area of the detected face in the original face capture is affected by shadows.

See also
Face::Shadow
NOSE_SHADOW 

Nose Shadow attribute for evaluating whether eyes or a nose don't cast sharp shadows.

See also
Face::NoseShadow
SPECULARITY 

Specularity attribute used to evaluate the presence of spotlights in an area of the detected face in the original face capture.

See also
Face::Specularity
EYE_GAZE 

Eye Gaze attribute used to evaluate whether the gaze direction of the detected face in the original face capture is frontal.

See also
Face::EyeGaze
RIGHT_EYE_STATUS 

Attribute for evaluating right eye status.

See also
Face::RightEyeStatus
LEFT_EYE_STATUS 

Attribute for evaluating left eye status.

See also
Face::LeftEyeStatus
GLASS_STATUS 

Attribute for evaluating glasses presence.

See also
Face::GlassStatus
HEAVY_FRAME 

Attribute for evaluating whether glasses with heavy frames are not present.

See also
Face::HeavyFrame
MOUTH_STATUS 

Attribute for evaluating mouth status.

See also
Face::MouthStatus
BACKGROUND_UNIFORMITY 

Attribute used to measure background uniformity in the close area around the detected face in the original face capture.

See also
Face::BackgroundUniformity
AGE 

Attribute for evaluating age of subject using the face.

See also
Face::Age
RIGHT_RED_EYE 

Attribute for evaluating whether red-eye effect is not present on right eye.

See also
Face::RightRedEye
LEFT_RED_EYE 

Attribute for evaluating whether red-eye effect is not present on left eye.

See also
Face::LeftRedEye
GENDER 

Attribute for evaluating gender of subject.

See also
Face::Gender
EYE_DISTANCE 

Attribute used to measure the distance between the eyes in pixels for the detected face in the original face capture.

See also
Face::EyeDistance
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.

See also
Face::RollAngle
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.

See also
Face::PitchAngle
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.

See also
Face::YawAngle
FACE_SIZE 

Attribute representing face size - the maximum of eye distance and eye-mouth distance.

See also
Face::FaceSize
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.

See also
Face::FaceRelativeArea
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.

See also
Face::FaceRelativeAreaInImage
TINTED_GLASSES 

Attribute for evaluating tinted glasses presence.

See also
Face::TintedGlasses
WIDTH_HEIGHT_RATIO 

Attribute representing width to height aspect ratio of the original face capture.

See also
Face::WidthHeightRatio

◆ GenderEstimationMode

enum class GenderEstimationMode : uint8_t
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.

Required Solvers

Total size of solvers is 8 MB.

References face-attribute-age-gender-balanced.solver

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.

Note
The gender estimation feature MUST be allowed in license to get accurate gender estimation.
Required Solvers

Total size of solvers is 313 MB.

References face-attribute-age-gender-accurate.nnkitsolver

◆ PassiveLivenessMode

enum class PassiveLivenessMode : uint8_t
strong

Mode of passive liveness calculation.

Enumerator
FAST 

Passive liveness mode with best performance available but worse accuracy as ACCURATE mode.

Required Solvers

Total size of solvers is 5 MB.

References face-attribute-passive-liveness-universal-fast.nnkitsolver

ACCURATE 

Passive liveness mode with highest accuracy available but significantly slower as FAST mode.

Note
Not supported in this variant of Enrollment SDK.

Member Function Documentation

◆ Age() [1/2]

float Age ( )
inline

Attribute for evaluating age of subject using the face.

It uses BALANCED estimation.

Returns
estimated age
Exceptions
EnrollmentExceptionwhen attribute can not be calculated
Required Solvers

Total size of solvers is 8 MB.

References face-attribute-age-gender-balanced.solver

References Age(), and BALANCED.

Referenced by Age().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Age() [2/2]

float Age ( AgeEstimationMode mode)
inline

Attribute for evaluating age of subject using the face.

Parameters
modemode of age estimation
Returns
estimated age
Exceptions
EnrollmentExceptionwhen attribute can not be calculated
Required Solvers
See Face::AgeEstimationMode

◆ BackgroundUniformity() [1/2]

float 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.

The default background percentage of the whole image is 5%.

Returns
Background uniformity values are from range <-10000,10000>. Values near -10000 indicates 'very un-uniform background present', values near 10000 indicates 'uniform background present'. The decision threshold is around 0.
Exceptions
EnrollmentExceptionwhen attribute can not be calculated
Required Solvers

Total size of solvers is 1 MB.

References face-attribute-background-uniformity.solver

References BackgroundUniformity().

Referenced by BackgroundUniformity().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BackgroundUniformity() [2/2]

float BackgroundUniformity ( uint8_t minimalBackgroundRatio)
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.

Parameters
minimalBackgroundRatioSpecifies 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.
Returns
Background uniformity values are from range <-10000,10000>. Values near -10000 indicates 'very un-uniform background present', values near 10000 indicates 'uniform background present'. The decision threshold is around 0.
Exceptions
EnrollmentExceptionwhen attribute can not be calculated
EnrollmentInvalidArgumentExceptionwhen minimalBackgroundRatio is not in range <0,100>
Required Solvers

Total size of solvers is 1 MB.

References face-attribute-background-uniformity.solver

◆ Brightness()

float Brightness ( )
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.

Returns
Brightness values are from range <-10000,10000>. Values near -10000 indicates 'too dark', values near 10000 indicates 'too light', values around 0 indicates OK. The decision thresholds are around -5000 and 5000.
Exceptions
EnrollmentExceptionwhen attribute can not be calculated

◆ Contrast()

float Contrast ( )
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.

Returns
Contrast values are from range <-10000,10000>. Values near -10000 indicates 'very low contrast', values near 10000 indicates 'very high contrast', values around 0 indicates OK. The decision thresholds are around -5000 and 5000.
Exceptions
EnrollmentExceptionwhen attribute can not be calculated

◆ Crop()

std::shared_ptr< CroppedFace > Crop ( FaceCropConfiguration cfg) const
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.

Parameters
cfgThe configuration specifying how the face should be cropped.
Returns
CroppedFace object containing the cropped face.

References capture.

◆ DetectionRectangle()

Rectangle DetectionRectangle ( ) const
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.

Returns
A Rectangle representing the bounding box of the detected face.

◆ Extract() [1/2]

std::shared_ptr< ExtractedFace > Extract ( )
inline

This function creates a template for the detected face with default FaceExtractorConfig.

Returns
template calculated template
Exceptions
EnrollmentExceptionwhen it is not possible to extract templates

References FaceExtractorConfig::Default(), and Extract().

Referenced by Extract().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Extract() [2/2]

std::shared_ptr< ExtractedFace > Extract ( const FaceExtractorConfig & cfg)
inline

This function creates a template for the detected face.

Parameters
cfgFaceExtractorConfig
Returns
template calculated template
Exceptions
EnrollmentExceptionwhen it is not possible to extract templates
Required Solvers
See FaceExtractorConfig::Type

References capture, and FaceExtractorConfig::GetExtractor().

Here is the call graph for this function:

◆ EyeDistance()

float EyeDistance ( )
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.

Returns
Distance in pixels.
Exceptions
EnrollmentExceptionwhen attribute can not be calculated
Required Solvers
See FaceDetector::Config::Type

◆ EyeGaze()

float EyeGaze ( )
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.

Returns
Eye gaze values are from range <-10000,10000>. Values near -10000 indicates 'sideway ahead eyes gaze', values near 10000 indicates 'straight ahead eyes gaze'. The decision threshold is around 0.
Exceptions
EnrollmentExceptionwhen attribute can not be calculated
Required Solvers

Total size of solvers is 944 kB.

References face-attribute-eye-gaze.solver

◆ FaceRelativeArea()

float FaceRelativeArea ( )
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.

Returns
area of face relative to image size in percentage. It can be more that 100% due to borders added by face detector.
Exceptions
EnrollmentExceptionwhen attribute can not be calculated

◆ FaceRelativeAreaInImage()

float FaceRelativeAreaInImage ( )
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.

Returns
area of face visible in image relative to total area of face. This value implies the percentage of face area outside the image.
Exceptions
EnrollmentExceptionwhen attribute can not be calculated

◆ FaceSize()

float FaceSize ( )
inline

Attribute representing face size - the maximum of eye distance and eye-mouth distance.

Returns
face size - the maximum of eye distance and eye-mouth distance in pixels.
Exceptions
EnrollmentExceptionwhen attribute can not be calculated

◆ Gender() [1/2]

float Gender ( )
inline

Attribute for evaluating gender of subject.

It uses BALANCED estimation.

Returns
Gender values are from range <-10000, 10000>. Values near -10000 indicates 'male', values near 10000 indicates 'female'. The decision threshold is around 0.
Exceptions
EnrollmentExceptionwhen attribute can not be calculated
Required Solvers

Total size of solvers is 8 MB.

References face-attribute-age-gender-balanced.solver

References BALANCED, and Gender().

Referenced by Gender().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Gender() [2/2]

float Gender ( GenderEstimationMode mode)
inline

Attribute for evaluating gender of subject.

Parameters
modemode of gender estimation
Returns
Gender values are from range <-10000, 10000>. Values near -10000 indicates 'male', values near 10000 indicates 'female'. The decision threshold is around 0.
Exceptions
EnrollmentExceptionwhen attribute can not be calculated
Required Solvers

Total size of solvers is 8 MB.

References face-attribute-age-gender-balanced.solver

◆ GetKeypoints()

std::shared_ptr< Keypoints > GetKeypoints ( ) const
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.

Returns
Keypoints instance.

◆ GlassStatus()

float GlassStatus ( )
inline

Attribute for evaluating glasses presence.

Returns
Glasses values are from range <-10000,10000>. Values near -10000 indicates 'no glasses present', values near 10000 indicates 'glasses present'. The decision threshold is around 0
Exceptions
EnrollmentExceptionwhen attribute can not be calculated
Required Solvers

Total size of solvers is 608 kB.

References face-attribute-glasses.solver

◆ HeavyFrame()

float HeavyFrame ( )
inline

Attribute for evaluating whether glasses with heavy frames are not present.

The attribute can be taken as an ICAO feature.

Returns
Heavy frame glasses values are from range <-10000,10000>. Values near -10000 indicates 'no heavy frame glasses present', values near 10000 indicates 'heavy frame glasses present'. The decision threshold is around 0.
Exceptions
EnrollmentExceptionwhen attribute can not be calculated
Required Solvers

Total size of solvers is 498 kB.

References face-attribute-heavy-frame.solver

◆ IsSameAs()

bool IsSameAs ( const Face & face) const
inline

Returns true when argument is same object.

Parameters
faceto check if it is reference to same object
Returns
true when given Face is the same object
false when given Face is a different object

◆ LeftEyeStatus()

float LeftEyeStatus ( )
inline

Attribute for evaluating left eye status.

The attribute can be taken as an ICAO feature.

Returns
Left eye values are from range <-10000,10000>. Values near -10000 indicates 'closed, narrowed or bulged eye', values near 10000 indicates 'normally opened eye'. The decision threshold is around 0.
Exceptions
EnrollmentExceptionwhen attribute can not be calculated
Required Solvers

Total size of solvers is 16 kB.

References face-attribute-eye-status.solver

◆ LeftRedEye()

float LeftRedEye ( )
inline

Attribute for evaluating whether red-eye effect is not present on left eye.

The attribute can be taken as an ICAO feature.

Returns
Left red-eye effect values are from range <-10000,10000>. Values near -10000 indicates 'no red-eye effect present', values near 10000 indicates 'red-eye effect present'. The decision threshold is around 0.
Exceptions
EnrollmentExceptionwhen attribute can not be calculated

◆ MouthStatus()

float MouthStatus ( )
inline

Attribute for evaluating mouth status.

The attribute can be taken as an ICAO feature.

Returns
Mouth status values are from range <-10000,10000>. Values near -10000 indicates 'open mouth, smile showing teeth or round lips present', values near 10000 indicates 'mouth with no expression'. The decision threshold is around 0.
Exceptions
EnrollmentExceptionwhen attribute can not be calculated
Required Solvers

Total size of solvers is 155 kB.

References face-attribute-mouth-status.solver

◆ NoseShadow()

float NoseShadow ( )
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.

Returns
Nose shadow values are from range <-10000,10000> Values near -10000 indicates 'very strong local (eyes/nose) shadows present', values near 10000 indicates 'no local shadows present'. The decision threshold is around 0.
Exceptions
EnrollmentExceptionwhen attribute can not be calculated

◆ operator!=()

bool operator!= ( const Face & f) const
inline

Compares if Face is not equal with other one.

Parameters
fcompared Face
Returns
true when data of Face are different
false when data of Face are same

◆ operator==()

bool operator== ( const Face & f) const
inline

Compares if Face is equal with other one.

Parameters
fcompared Face
Returns
true when data of Face are same
false when data of Face are different

References capture.

◆ PassiveLiveness() [1/2]

float PassiveLiveness ( )
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.

Returns
Passive Liveness score from range <0,100>.
Note
Not supported in this variant of Enrollment SDK.

References ACCURATE, and PassiveLiveness().

Referenced by PassiveLiveness().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PassiveLiveness() [2/2]

float PassiveLiveness ( PassiveLivenessMode mode)
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.

Exceptions
EnrollmentExceptionwhen attribute can not be calculated
Parameters
modemode of passive liveness calculation. For more information see Face Passive Liveness.
Note
The passive liveness feature MUST be allowed in license to get face passive liveness.
Returns
Passive Liveness score from range <0,100>.
When mode is PassiveLivenessMode::FAST then Fast Passive Liveness Thresholds can be used to check live and non-live faces.
Required Solvers
See Face::PassiveLivenessMode

References FAST.

◆ PitchAngle()

float PitchAngle ( )
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.

Returns
angle rotation of head towards camera reference frame around X-axis as per DIN9300.
Exceptions
EnrollmentExceptionwhen attribute can not be calculated

◆ RightEyeStatus()

float RightEyeStatus ( )
inline

Attribute for evaluating right eye status.

The attribute can be taken as an ICAO feature.

Returns
Right eye values are from range <-10000,10000>. Values near -10000 indicates 'closed, narrowed or bulged eye', values near 10000 indicates 'normally opened eye'. The decision threshold is around 0.
Exceptions
EnrollmentExceptionwhen attribute can not be calculated
Required Solvers

Total size of solvers is 16 kB.

References face-attribute-eye-status.solver

◆ RightRedEye()

float RightRedEye ( )
inline

Attribute for evaluating whether red-eye effect is not present on right eye.

The attribute can be taken as an ICAO feature.

Returns
Right red-eye effect values are from range <-10000,10000>. Values near -10000 indicates 'no red-eye effect present', values near 10000 indicates 'red-eye effect present'. The decision threshold is around 0.
Exceptions
EnrollmentExceptionwhen attribute can not be calculated

◆ RollAngle()

float RollAngle ( )
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.

Returns
angle rotation of head towards camera reference frame around Z-axis as per DIN9300.
Exceptions
EnrollmentExceptionwhen attribute can not be calculated

◆ Shadow()

float Shadow ( )
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.

Returns
Shadow values are from range <-10000,10000>. Values near -10000 indicates 'very strong global shadows present', values near 10000 indicates 'no global shadows present'. The decision threshold is around 0.
Exceptions
EnrollmentExceptionwhen attribute can not be calculated

◆ Sharpness()

float Sharpness ( )
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.

Returns
Sharpness values are from range <-10000,10000>. Values near -10000 indicates 'very blurred', values near 10000 indicates 'very sharp'. The decision threshold is around 0.
Exceptions
EnrollmentExceptionwhen attribute can not be calculated

◆ Specularity()

float Specularity ( )
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.

Returns
Specularity values are from range <-10000,10000> Values near -10000 indicates 'very strong specularity present', values near 10000 indicates 'no specularity present'. The decision threshold is around 0.
Exceptions
EnrollmentExceptionwhen attribute can not be calculated

◆ TintedGlasses()

float TintedGlasses ( )
inline

Attribute for evaluating tinted glasses presence.

Returns
Tinted glasses values are from range <-10000,10000>. Values near -10000 indicates 'no tinted glasses present', values near 10000 indicates 'tinted glasses present'. The decision threshold is around 0.
Exceptions
EnrollmentExceptionwhen attribute can not be calculated
Required Solvers

Total size of solvers is 608 kB.

References face-attribute-glasses.solver

◆ ToIsoImage()

std::vector< uint8_t > ToIsoImage ( ImageEncoder & encoder) const
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.

Parameters
encoderspecific encoder for encoding Print image. Supported JPEG 2000 (lossy & lossless), PNG
Returns
ISO image from ISO/IEC 19794-5 (Face image data)
Exceptions
ImageExceptionwhen it is not possible to encode image
EnrollmentInvalidArgumentExceptionwhen encoder is not supported
EnrollmentRuntimeExceptionfor invalid conversion size

◆ UniqueIntensityLevels()

float UniqueIntensityLevels ( )
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.

Returns
Unique intensity levels values are from range <-10000,10000>. Values near -10000 indicates 'very few unique intensity levels', values near 10000 indicates 'enough unique intensity levels'. The decision threshold is around 0.
Exceptions
EnrollmentExceptionwhen attribute can not be calculated

◆ WidthHeightRatio()

float WidthHeightRatio ( ) const
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.

Returns
width to height aspect ratio of the original Face::capture

◆ WriteTo()

void WriteTo ( Writer & writer) const
inlinefinalvirtual

Function serializes Face via provided Writer.

Parameters
writerused to serialize Face.

Implements Serializable.

References capture, and confidence.

◆ YawAngle()

float YawAngle ( )
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.

Returns
angle rotation of head towards camera reference frame around Y-axis as per DIN9300.
Exceptions
EnrollmentExceptionwhen attribute can not be calculated

Member Data Documentation

◆ capture

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().

◆ confidence

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().


The documentation for this class was generated from the following file: