PortraitProcessor Class

Namespace: id3.Face

Definition

Facilitates the creation of portraits in various scenarios such as enrolment or face verification.
class PortraitProcessor
class PortraitProcessor implements Finalizable
public partial class PortraitProcessor
public class PortraitProcessor implements AutoCloseable, Serializable
public class PortraitProcessor
typedef struct id3FacePortraitProcessor *ID3_FACE_PORTRAIT_PROCESSOR;

Usage

portraitProcessorInstance = PortraitProcessor()
# ...

Explicit destruction

# ...
del portraitProcessorInstance
final portraitProcessorInstance = sdk.PortraitProcessor();
// ...

Explicit destruction

// ...
portraitProcessorInstance.dispose()
using (var portraitProcessorInstance = new PortraitProcessor())
{
   // ...
}

Explicit destruction

var portraitProcessorInstance = new PortraitProcessor()
// ...
portraitProcessorInstance.Dispose()
try (PortraitProcessor portraitProcessorInstance = new PortraitProcessor()) {
// ...
}

Explicit destruction

PortraitProcessor portraitProcessorInstance = new PortraitProcessor();
// ...
portraitProcessorInstance.close();
private var portraitProcessorInstance: PortraitProcessor? = nil
portraitProcessorInstance = try PortraitProcessor()
ID3_FACE_PORTRAIT_PROCESSOR hPortraitProcessor{};
int err = id3FacePortraitProcessor_Initialize(&hPortraitProcessor);
if (err == ID3_SUCCESS) {
    // ...
    id3FacePortraitProcessor_Dispose(&hPortraitProcessor);
}

Properties

Name

Type

Description

backgroundColorUniformityThreshold

int

Background color uniformity threshold.

backgroundStructureUniformityThreshold

int

Background structure uniformity threshold.

dynamicRangeThreshold

int

Face dynamic range threshold.

enableAgeEstimation

bool

Value indicating whether age estimation is enabled.

enableBackgroundUniformityComputation

bool

Value indicating whether background uniformity computation is enabled.

enableExpressionDetection

bool

Value indicating whether expression detection is enabled.

enableEyeGazeDetection

bool

Value indicating whether eye gaze detection is enabled.

enableEyeOpeningDetection

bool

Value indicating whether eye opening detection is enabled.

enableFaceMaskDetection

bool

Value indicating whether face mask detection is enabled.

enableGenderEstimation

bool

Value indicating whether gender estimation is enabled.

enableGlassesDetection

bool

Value indicating whether eye glasses detection is enabled.

enableHatDetection

bool

Value indicating whether hat detection is enabled.

enableMakeupDetection

bool

Value indicating whether makeup detection is enabled.

enableMouthOpeningDetection

bool

Value indicating whether mouth opening detection is enabled.

enableOcclusionDetection

bool

Value indicating whether occlusion detection is enabled.

enablePhotographicQualityComputation

bool

Value indicating whether photographic quality computation is enabled.

enablePresentationAttackDetection

bool

Value indicating whether presentation attack detection using passive methods is enabled.

enableRedEyeDetection

bool

Value indicating whether red eye detection is enabled.

enableSmileDetection

bool

Value indicating whether smile detection is enabled.

equalBrightnessThreshold

int

Equal brightness threshold.

expressionSensibility

int

Sensibility of the expression classifier.

eyeOcclusionThreshold

int

Visible eye threshold.

eyeOpeningThreshold

int

Eye opening threshold.

faceDetectionModel

FaceModel

Specifies the model used to detect and track faces.

faceDetectionStrength

int

Face detection strength, from 1 to 10.

faceDetectionThreshold

int

Specifies the face detection confidence threshold, in the range is [0;100].

faceEncodingModel

FaceModel

Model used to create features and assess consistancy among views of a given face.

faceMaskThreshold

int

Face mask detection threshold.

glassesThreshold

int

Glasses detection threshold.

hatThreshold

int

Threshold for confirming that the person is wearing a hat.

makeupThreshold

int

Make-up detection threshold.

maleThreshold

int

Male gender detection threshold.

maximumEyeGazeX

int

Maximum value of the eye gaze alongside the X axis.

maximumEyeGazeY

int

Maximum value of the eye gaze alongside the Y axis.

maximumHeadHeightRatio

int

Maximum distance between the base of the chin and the crown is less than 80% of the total height of the image.

maximumHeadWidthRatio

int

Value indicating if the image width is conform to the (image width / head width) ratio of 7:5.

maximumHorizontalPosition

int

Value indicating if the head is correctly centered horizontally.

maximumIod

int

Maximum interocular distance (IOD), in pixels.

maximumPitchAngle

float

Maximum head pitch angle, in degrees.

maximumRollAngle

float

Maximum head roll angle, in degrees.

maximumTrackedFaceAge

int

Maximum number of consecutive non-detections to reach before deleting a tracked face.

maximumVerticalPosition

int

Maximum distance from the bottom edge of the image to the imaginary line passing through the center of the eyes is between 50% - 70% of the total vertical length of the image.

maximumYawAngle

float

Maximum head yaw angle, in degrees.

minimumHeadHeightRatio

int

Minimum distance between the base of the chin and the crown is less than 80% of the total height of the image.

minimumHeadWidthRatio

int

Value indicating if the image width is conform to the (image width / head width) ratio of 7:5.

minimumHorizontalPosition

int

Value indicating if the head is correctly centered horizontally.

minimumIod

int

Minimum intra-occular distance, in pixels.

minimumTrackedFaceAge

int

Minimum number of consecutive detections to reach before creating a tracked face.

minimumVerticalPosition

int

Minimum distance from the bottom edge of the image to the imaginary line passing through the center of the eyes is between 50% - 70% of the total vertical length of the image.

mouthOcclusionThreshold

int

Mouth occlusion threshold.

mouthOpenThreshold

int

Mouth opening threshold.

naturalSkinColorThreshold

int

Natural skin color threshold.

noFlashReflectionThreshold

int

Flash reflexion detection threshold.

noiseThreshold

int

Threshold for confirming the presence of noise in the image.

noseOcclusionThreshold

int

Nose occlusion threshold.

overExposureThreshold

int

Over exposure threshold.

padAttackSupportThreshold

int

Threshold of the attack support PAD method.

pixelationThreshold

int

Pixelation detection threshold.

portraitAspectRatio

float

Aspect ratio (height to width) of the portrait image.

portraitEyePositionRatio

float

Ratio between the vertical eye position and the image height for ICAO portrait cropping. Must be in the range ]0;1[.

portraitIodRatio

float

Ratio between the interocular distance (IOD) and the image width for ICAO portrait cropping. Must be in the range ]0;1[.

portraitMargin

float

Relative margin around the face for portrait cropping.

redEyeThreshold

int

Threshold for confirming the presence of red eyes.

resolutionThreshold

int

Threshold indicating whether the image resolution is sufficient.

sharpnessThreshold

int

Sharpness threshold.

smileThreshold

int

Smile threshold.

threadCount

int

Number of threads to be used for portrait processing.

tintedGlassThreshold

int

Tinted glass detection threshold.

trackerMatchingThreshold

int

Minimum match score to reach to preserve the ID of a tracked face between frame ‘t-1’ and frame ‘t’.

trackerNmsIouThreshold

int

Non-maximum suppression (NMS) intersection-over-union (IOU) threshold, in the range [0;100].

underExposureThreshold

int

Under exposure threshold.

Methods

Name

Description

checkBackgroundUniformity

Checks the background uniformity of the specified portrait.

checkGeometry

Checks the geometric attributes of the specified portrait.

checkPhotographicQuality

Checks the photographic quality of the specified portrait.

createPortrait

Analyses an image and creates a portrait with the first detected face or the currently tracked face if the update parameter is activated.

cropIcaoPortrait

Creates an ICAO-compliant portrait image by cropping the source image around the detected face.

cropPortrait

Creates a portrait image by cropping the source image around the detected face.

detectExpression

Detects the subject’s expression on the specified portrait.

estimateAge

Estimates the age of the person.

removeBackground

Removes the background on the specified portrait image.

reset

Resets the face tracker.