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

It provides quality measures as defined in ISO/IEC 29794-5:2025. More...

#include <OFIQFace.h>

Collaboration diagram for OFIQFace:

Public Member Functions

void WriteTo (Writer &writer) const final
 Serialize OFIQFace to Writer.
Rectangle GetBoundingBox () const
 Provides bounding box of detected face.
uint8_t GetSharpness () const
 Provides sharpness of the face.
uint8_t GetUnifiedQualityScore () const
 Unified quality score (QS) mapping native OFIQ quality.
uint8_t GetBackgroundUniformity () const
 Background uniformity of the face image.
uint8_t GetIlluminationUniformity () const
 Illumination uniformity across the face.
uint8_t GetLuminanceMean () const
 Luminance mean of the face image.
uint8_t GetLuminanceVariance () const
 Luminance variance in the face image.
uint8_t GetUnderExposurePrevention () const
 Under-exposure prevention.
uint8_t GetOverExposurePrevention () const
 Over-exposure prevention.
uint8_t GetDynamicRange () const
 Dynamic range of the face image.
uint8_t GetCompressionArtifacts () const
 Absence of compression artefacts.
uint8_t GetNaturalColour () const
 Natural colour of the face image.
uint8_t GetSingleFacePresent () const
 Single face present in the image.
uint8_t GetEyesOpen () const
 Eyes open.
uint8_t GetMouthClosed () const
 Mouth closed.
uint8_t GetEyesVisible () const
 Eyes visible.
uint8_t GetMouthOcclusionPrevention () const
 Mouth occlusion prevention.
uint8_t GetFaceOcclusionPrevention () const
 Face occlusion prevention.
uint8_t GetInterEyeDistance () const
 Inter-eye distance quality.
uint8_t GetHeadSize () const
 Head size in the image.
uint8_t GetLeftwardCropOfTheFaceImage () const
 Leftward crop of the face image.
uint8_t GetRightwardCropOfTheFaceImage () const
 Rightward crop of the face image.
uint8_t GetMarginAboveOfTheFaceImage () const
 Margin above the face image.
uint8_t GetMarginBelowOfTheFaceImage () const
 Margin below the face image.
uint8_t GetHeadPoseYaw () const
 Head pose yaw (left-right rotation).
uint8_t GetHeadPosePitch () const
 Head pose pitch (up-down tilt).
uint8_t GetHeadPoseRoll () const
 Head pose roll (tilt about the nose axis).
uint8_t GetExpressionNeutrality () const
 Expression neutrality.
uint8_t GetNoHeadCoverings () const
 No head coverings.

Static Public Member Functions

static std::shared_ptr< OFIQFace > Create (const std::shared_ptr< FaceCapture > &capture, const std::shared_ptr< FaceExecutor > &executor)
 Create OFIQ from FaceCapture using the given executor.
static std::shared_ptr< OFIQFace > Create (const std::shared_ptr< FaceCapture > &capture)
 Create OFIQ from FaceCapture using default executor set in GlobalFaceExecutor.

Detailed Description

It provides quality measures as defined in ISO/IEC 29794-5:2025.

To calculate qualities we are using OFIQ-project.

Member Function Documentation

◆ Create() [1/2]

std::shared_ptr< OFIQFace > Create ( const std::shared_ptr< FaceCapture > & capture)
inlinestatic

Create OFIQ from FaceCapture using default executor set in GlobalFaceExecutor.

It creates this instance and calculates all qualities at once.

Required Solvers

Total size of solvers is 635 MB.

References ofiq/expression_neutrality/grimmer/hse_1_2_C_adaboost.yml, ofiq/expression_neutrality/hsemotion/enet_b0_8_best_vgaf_embed_zeroed.onnx, ofiq/expression_neutrality/hsemotion/enet_b2_8_embed_zeroed.onnx, ofiq/face_detection/ssd_facedetect.caffemodel, ofiq/face_detection/ssd_facedetect.prototxt.txt, ofiq/face_landmark_estimation/ADNet.onnx, ofiq/face_occlusion_segmentation/face_occlusion_segmentation_ort.onnx, ofiq/face_parsing/bisenet_400.onnx, ofiq/head_pose_estimation/mb1_120x120.onnx, ofiq/no_compression_artifacts/ssim_248_model.onnx, ofiq/sharpness/face_sharpness_rtree.xml, ofiq/unified_quality_score/magface_iresnet50_norm.onnx

Parameters
captureFaceCapture
Returns
OFIQFace instance with calculated qualities
Exceptions
NullArgumentExceptionwhen capture is null
EnrollmentExceptionwhen OFIQ calculation fails

References Create(), and GlobalFaceExecutor::Get().

Here is the call graph for this function:

◆ Create() [2/2]

std::shared_ptr< OFIQFace > Create ( const std::shared_ptr< FaceCapture > & capture,
const std::shared_ptr< FaceExecutor > & executor )
inlinestatic

Create OFIQ from FaceCapture using the given executor.

It creates this instance and calculates all qualities at once.

Required Solvers

Total size of solvers is 635 MB.

References ofiq/expression_neutrality/grimmer/hse_1_2_C_adaboost.yml, ofiq/expression_neutrality/hsemotion/enet_b0_8_best_vgaf_embed_zeroed.onnx, ofiq/expression_neutrality/hsemotion/enet_b2_8_embed_zeroed.onnx, ofiq/face_detection/ssd_facedetect.caffemodel, ofiq/face_detection/ssd_facedetect.prototxt.txt, ofiq/face_landmark_estimation/ADNet.onnx, ofiq/face_occlusion_segmentation/face_occlusion_segmentation_ort.onnx, ofiq/face_parsing/bisenet_400.onnx, ofiq/head_pose_estimation/mb1_120x120.onnx, ofiq/no_compression_artifacts/ssim_248_model.onnx, ofiq/sharpness/face_sharpness_rtree.xml, ofiq/unified_quality_score/magface_iresnet50_norm.onnx

Parameters
captureFaceCapture
executorFaceExecutor used to execute calculation locally or on server
Returns
OFIQFace instance with calculated qualities
Exceptions
NullArgumentExceptionwhen capture is null
NullArgumentExceptionwhen executor is null
EnrollmentExceptionwhen OFIQ calculation fails

References GlobalLogger::Get().

Referenced by Create().

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

◆ GetBackgroundUniformity()

uint8_t GetBackgroundUniformity ( ) const
inlinenodiscard

Background uniformity of the face image.

Measures how uniform the background is behind the face. [8]

Returns
Score in range [0, 100], where 100 is best. Recommended decision threshold is around 40.
Exceptions
EnrollmentExceptionwhen the calculation fails

Referenced by WriteTo().

Here is the caller graph for this function:

◆ GetBoundingBox()

Rectangle GetBoundingBox ( ) const
inlinenodiscard

Provides bounding box of detected face.

Returns
Bounding box of detected face

Referenced by WriteTo().

Here is the caller graph for this function:

◆ GetCompressionArtifacts()

uint8_t GetCompressionArtifacts ( ) const
inlinenodiscard

Absence of compression artefacts.

Measures degradation from lossy compression (e.g. JPEG). [8]

Returns
Score in range [0, 100], where 100 is best. Recommended decision threshold is around 95.
Exceptions
EnrollmentExceptionwhen the calculation fails

Referenced by WriteTo().

Here is the caller graph for this function:

◆ GetDynamicRange()

uint8_t GetDynamicRange ( ) const
inlinenodiscard

Dynamic range of the face image.

Reflects whether the image has sufficient range between darkest and brightest areas.

Returns
Score in range [0, 100], where 100 is best. Recommended decision threshold is around 95.
Exceptions
EnrollmentExceptionwhen the calculation fails

Referenced by WriteTo().

Here is the caller graph for this function:

◆ GetExpressionNeutrality()

uint8_t GetExpressionNeutrality ( ) const
inlinenodiscard

Expression neutrality.

Indicates that the face has a neutral expression (e.g. mouth closed, no smile). [8]

Returns
Score in range [0, 100], where 100 is best. Recommended decision threshold is around 40.
Exceptions
EnrollmentExceptionwhen the calculation fails

Referenced by WriteTo().

Here is the caller graph for this function:

◆ GetEyesOpen()

uint8_t GetEyesOpen ( ) const
inlinenodiscard

Eyes open.

Indicates that both eyes are open (no closed or drooping eyelids). [8]

Returns
Score in range [0, 100], where 100 is best. Recommended decision threshold is around 95.
Exceptions
EnrollmentExceptionwhen the calculation fails

Referenced by WriteTo().

Here is the caller graph for this function:

◆ GetEyesVisible()

uint8_t GetEyesVisible ( ) const
inlinenodiscard

Eyes visible.

Indicates that both eyes are visible and not occluded.

Returns
Score in range [0, 100], where 100 is best. Recommended decision threshold is around 95.
Exceptions
EnrollmentExceptionwhen the calculation fails

Referenced by WriteTo().

Here is the caller graph for this function:

◆ GetFaceOcclusionPrevention()

uint8_t GetFaceOcclusionPrevention ( ) const
inlinenodiscard

Face occlusion prevention.

Indicates that the face is not occluded by objects, hair, or other obstructions.

Returns
Score in range [0, 100], where 100 is best. Recommended decision threshold is around 95.
Exceptions
EnrollmentExceptionwhen the calculation fails

Referenced by WriteTo().

Here is the caller graph for this function:

◆ GetHeadPosePitch()

uint8_t GetHeadPosePitch ( ) const
inlinenodiscard

Head pose pitch (up-down tilt).

Indicates vertical orientation of the head. [8]

Returns
Score in range [0, 100], where 100 is best. Recommended decision threshold is around 95.
Exceptions
EnrollmentExceptionwhen the calculation fails

Referenced by WriteTo().

Here is the caller graph for this function:

◆ GetHeadPoseRoll()

uint8_t GetHeadPoseRoll ( ) const
inlinenodiscard

Head pose roll (tilt about the nose axis).

Indicates whether the head is upright (no sideways tilt). [8]

Returns
Score in range [0, 100], where 100 is best. Recommended decision threshold is around 95.
Exceptions
EnrollmentExceptionwhen the calculation fails

Referenced by WriteTo().

Here is the caller graph for this function:

◆ GetHeadPoseYaw()

uint8_t GetHeadPoseYaw ( ) const
inlinenodiscard

Head pose yaw (left-right rotation).

Indicates how frontal the face is in the horizontal direction. [8]

Returns
Score in range [0, 100], where 100 is best. Recommended decision threshold is around 95.
Exceptions
EnrollmentExceptionwhen the calculation fails

Referenced by WriteTo().

Here is the caller graph for this function:

◆ GetHeadSize()

uint8_t GetHeadSize ( ) const
inlinenodiscard

Head size in the image.

Indicates whether the head size (e.g. face size) is within the expected range. [8]

Returns
Score in range [0, 100], where 100 is best. Recommended decision threshold is around 40.
Exceptions
EnrollmentExceptionwhen the calculation fails

Referenced by WriteTo().

Here is the caller graph for this function:

◆ GetIlluminationUniformity()

uint8_t GetIlluminationUniformity ( ) const
inlinenodiscard

Illumination uniformity across the face.

Measures uniformity of lighting on the face (e.g. absence of strong shadows or hotspots). [8]

Returns
Score in range [0, 100], where 100 is best. Recommended decision threshold is around 40.
Exceptions
EnrollmentExceptionwhen the calculation fails

Referenced by WriteTo().

Here is the caller graph for this function:

◆ GetInterEyeDistance()

uint8_t GetInterEyeDistance ( ) const
inlinenodiscard

Inter-eye distance quality.

Indicates whether the distance between the eyes is within the expected range for the image. [8]

Returns
Score in range [0, 100], where 100 is best. Recommended decision threshold is around 40.
Exceptions
EnrollmentExceptionwhen the calculation fails

Referenced by WriteTo().

Here is the caller graph for this function:

◆ GetLeftwardCropOfTheFaceImage()

uint8_t GetLeftwardCropOfTheFaceImage ( ) const
inlinenodiscard

Leftward crop of the face image.

Indicates sufficient margin to the left of the face in the frame.

Returns
Score in range [0, 100], where 100 is best. Recommended decision threshold is around 95.
Exceptions
EnrollmentExceptionwhen the calculation fails

Referenced by WriteTo().

Here is the caller graph for this function:

◆ GetLuminanceMean()

uint8_t GetLuminanceMean ( ) const
inlinenodiscard

Luminance mean of the face image.

Indicates whether the face is neither under- nor over-exposed on average.

Returns
Score in range [0, 100], where 100 is best. Recommended decision threshold is around 40.
Exceptions
EnrollmentExceptionwhen the calculation fails

Referenced by WriteTo().

Here is the caller graph for this function:

◆ GetLuminanceVariance()

uint8_t GetLuminanceVariance ( ) const
inlinenodiscard

Luminance variance in the face image.

Reflects variation in brightness across the face.

Returns
Score in range [0, 100], where 100 is best. Recommended decision threshold is around 40.
Exceptions
EnrollmentExceptionwhen the calculation fails

Referenced by WriteTo().

Here is the caller graph for this function:

◆ GetMarginAboveOfTheFaceImage()

uint8_t GetMarginAboveOfTheFaceImage ( ) const
inlinenodiscard

Margin above the face image.

Indicates sufficient margin above the head in the frame. [8]

Returns
Score in range [0, 100], where 100 is best. Recommended decision threshold is around 40.
Exceptions
EnrollmentExceptionwhen the calculation fails

Referenced by WriteTo().

Here is the caller graph for this function:

◆ GetMarginBelowOfTheFaceImage()

uint8_t GetMarginBelowOfTheFaceImage ( ) const
inlinenodiscard

Margin below the face image.

Indicates sufficient margin below the chin in the frame. [8]

Returns
Score in range [0, 100], where 100 is best. Recommended decision threshold is around 40.
Exceptions
EnrollmentExceptionwhen the calculation fails

Referenced by WriteTo().

Here is the caller graph for this function:

◆ GetMouthClosed()

uint8_t GetMouthClosed ( ) const
inlinenodiscard

Mouth closed.

Indicates that the mouth is closed (neutral expression). [8]

Returns
Score in range [0, 100], where 100 is best. Recommended decision threshold is around 95.
Exceptions
EnrollmentExceptionwhen the calculation fails

Referenced by WriteTo().

Here is the caller graph for this function:

◆ GetMouthOcclusionPrevention()

uint8_t GetMouthOcclusionPrevention ( ) const
inlinenodiscard

Mouth occlusion prevention.

Indicates that the mouth region is not occluded (e.g. by hands or objects).

Returns
Score in range [0, 100], where 100 is best. Recommended decision threshold is around 95.
Exceptions
EnrollmentExceptionwhen the calculation fails

Referenced by WriteTo().

Here is the caller graph for this function:

◆ GetNaturalColour()

uint8_t GetNaturalColour ( ) const
inlinenodiscard

Natural colour of the face image.

Indicates that skin and scene colours appear natural (no strong colour cast or enhancement). [8]

Returns
Score in range [0, 100], where 100 is best. Recommended decision threshold is around 40.
Exceptions
EnrollmentExceptionwhen the calculation fails

Referenced by WriteTo().

Here is the caller graph for this function:

◆ GetNoHeadCoverings()

uint8_t GetNoHeadCoverings ( ) const
inlinenodiscard

No head coverings.

Indicates that the face is not obscured by hats, caps, scarves, or similar coverings.

Returns
Score in range [0, 100], where 100 is best. Recommended decision threshold is around 40.
Exceptions
EnrollmentExceptionwhen the calculation fails

Referenced by WriteTo().

Here is the caller graph for this function:

◆ GetOverExposurePrevention()

uint8_t GetOverExposurePrevention ( ) const
inlinenodiscard

Over-exposure prevention.

Indicates that the image is not too bright (over-exposed or washed out).

Returns
Score in range [0, 100], where 100 is best. Recommended decision threshold is around 95.
Exceptions
EnrollmentExceptionwhen the calculation fails

Referenced by WriteTo().

Here is the caller graph for this function:

◆ GetRightwardCropOfTheFaceImage()

uint8_t GetRightwardCropOfTheFaceImage ( ) const
inlinenodiscard

Rightward crop of the face image.

Indicates sufficient margin to the right of the face in the frame.

Returns
Score in range [0, 100], where 100 is best. Recommended decision threshold is around 95.
Exceptions
EnrollmentExceptionwhen the calculation fails

Referenced by WriteTo().

Here is the caller graph for this function:

◆ GetSharpness()

uint8_t GetSharpness ( ) const
inlinenodiscard

Provides sharpness of the face.

Sharpness is the clarity of fine details in an image. It will be improved with precise focus, good imaging resolution, and absence of biometric capture subject motion relative to the camera. [8]

This quality component can be used to efficiently choose the better focused face portrait among several face samples of the same biometric capture subject. [8]

Returns
Sharpness score of the face in range [0, 100] where 100 is the best sharpness. Recommended decision threshold is around 40.
Exceptions
EnrollmentExceptionwhen sharpness calculation fails

Referenced by WriteTo().

Here is the caller graph for this function:

◆ GetSingleFacePresent()

uint8_t GetSingleFacePresent ( ) const
inlinenodiscard

Single face present in the image.

Indicates that exactly one face is present and suitable for assessment.

Returns
Score in range [0, 100], where 100 is best. Recommended decision threshold is around 95.
Exceptions
EnrollmentExceptionwhen the calculation fails

Referenced by WriteTo().

Here is the caller graph for this function:

◆ GetUnderExposurePrevention()

uint8_t GetUnderExposurePrevention ( ) const
inlinenodiscard

Under-exposure prevention.

Indicates that the image is not too dark (under-exposed).

Returns
Score in range [0, 100], where 100 is best. Recommended decision threshold is around 95.
Exceptions
EnrollmentExceptionwhen the calculation fails

Referenced by WriteTo().

Here is the caller graph for this function:

◆ GetUnifiedQualityScore()

uint8_t GetUnifiedQualityScore ( ) const
inlinenodiscard

Unified quality score (QS) mapping native OFIQ quality.

Predicts expected face recognition performance when compared to a canonical ISO/ICAO-compliant portrait.

Returns
Score in range [0, 100], where 100 indicates highest conformance. Recommended decision threshold is around 40.
Exceptions
EnrollmentExceptionwhen the calculation fails

Referenced by WriteTo().

Here is the caller graph for this function:

◆ WriteTo()


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