PortraitProcessor class

Facilitates the creation of portraits in various scenarios such as enrolment or face verification.

Implemented types

Constructors

PortraitProcessor()
Creates a new instance of the PortraitProcessor class.
PortraitProcessor.fromHandle(Pointer<id3FacePortraitProcessor> handle)
Creates a new instance of the PortraitProcessor class.

Properties

backgroundColorUniformityThreshold int
Background color uniformity threshold. If the score is above this value, the background color of the image is definitely uniform. Hint: Default value is 80.
getter/setter pair
backgroundStructureUniformityThreshold int
Background structure uniformity threshold. If the score is above this value, the background structure of the image is definitely uniform. Hint: Default value is 80.
getter/setter pair
cropAspectRatio double
Aspect ratio (height to width) of the cropped portrait image. Hint: Default value is 4/3.
getter/setter pair
cropEyePositionRatio double
Ratio between the vertical eye position and the image height for ICAO portrait cropping. Must be in the range ]0;1[. Hint: Default value is 0.45.
getter/setter pair
cropIodRatio double
Ratio between the interocular distance (IOD) and the image width for ICAO portrait cropping. Must be in the range ]0;1[. Hint: Default value is 0.25.
getter/setter pair
cropMargin double
Relative margin around the face for basic portrait cropping. Hint: Default value is 0.5.
getter/setter pair
dynamicRangeThreshold int
Face dynamic range threshold. Above this threshold, the dynamic range of the image in the face region is good enough. Hint: Default value is 128.
getter/setter pair
equalBrightnessThreshold int
Equal brightness threshold. Above this value, the face is equally exposed. Hint: Default value is 10.
getter/setter pair
expressionSensibility int
Sensibility of the expression classifier. The higher the value, the more sensitive the algorithm will be, meaning that it will be less likely to estimate neutral expression out of the detected face. Hint: Default value is 60.
getter/setter pair
eyeOcclusionThreshold int
Visible eye threshold. If the score is above this value, the eye is probably occluded. Hint: Default value 80.
getter/setter pair
eyeOpeningThreshold int
Eye opening threshold. If the score is above this value, the eyes are definitely open. Hint: Default value is 5.
getter/setter pair
faceDetectionImageSize int
The size, in pixels, of the downscaled image used for face detection. Hint: Default value is 256. Low values tend to ignore small faces in the input image, while higher values tend to take longer to process.
getter/setter pair
faceDetectionModel FaceModel
Specifies the model used to detect and track faces. Hint: Default value is FaceDetector4B. Some better accuracy/speed balances can be found by choosing another model.
getter/setter pair
faceDetectionThreshold int
Specifies the face detection confidence threshold, in the range is 0;100. Hint: Default value is 50. Setting a high threshold reduces false detections but may increase the number of undetected faces.
getter/setter pair
faceEncodingModel FaceModel
Model used to create features and assess consistancy among views of a given face. Hint: Default value is FaceEncoder9B. Some better accuracy/speed balances can be found by choosing another model.
getter/setter pair
faceMaskThreshold int
Face mask detection threshold. If the detection score is above this value, the person is probably wearing a mask. Hint: Default value is 35.
getter/setter pair
glassesThreshold int
Glasses detection threshold. If the score is above this value, the person is probably wearing glasses. Hint: Default value 90.
getter/setter pair
handle Pointer<id3FacePortraitProcessor>
Gets the native handle. return The native handle.
no setter
hashCode int
The hash code for this object.
no setterinherited
hatThreshold int
Threshold for confirming that the person is wearing a hat. Hint: Default value is 98.
getter/setter pair
makeupThreshold int
Make-up detection threshold. If the detection score is above this value, the persone is definitely wearing make-up. Hint: Default value 50.
getter/setter pair
maleThreshold int
Male gender detection threshold. If the score is higher than this value, the person is probably male. Hint: Default value is 50.
getter/setter pair
maximumEyeGazeX int
Maximum value of the eye gaze alongside the X axis. Hint: Default value is 10.
getter/setter pair
maximumEyeGazeY int
Maximum value of the eye gaze alongside the Y axis. Hint: Default value is 10.
getter/setter pair
maximumHeadHeightRatio int
Maximum distance between the base of the chin and the crown is less than 80% of the total height of the image. For ICAO compliance, this distance must be in the range 60 to 90. Hint: Default value is 90.
getter/setter pair
maximumHeadWidthRatio int
Value indicating if the image width is conform to the (image width / head width) ratio of 7:5. The head width is defined as the distance between the left and right ears. For ICAO compliance, the value must be in the range 50 to 75. Hint: Default value is 75.
getter/setter pair
maximumHorizontalPosition int
Value indicating if the head is correctly centered horizontally. For ICAO compliance, the value must be in the range 45 to 55. Hint: Default value is 55.
getter/setter pair
maximumIod int
Maximum interocular distance (IOD), in pixels. This parameter is used to prevent the subject from being too close to the camera. Hint: Default value is 512.
getter/setter pair
maximumPitchAngle double
Maximum head pitch angle, in degrees, for frontal positioning. Hint: Default value is 20.
getter/setter pair
maximumRollAngle double
Maximum head roll angle, in degrees, for frontal positioning. Hint: Default value is 15.
getter/setter pair
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. For ICAO compliance, the value must be in the range 30 to 50. Hint: Default value is 50.
getter/setter pair
maximumYawAngle double
Maximum head yaw angle, in degrees, for frontal positioning. Hint: Default value is 8.
getter/setter pair
minimumHeadHeightRatio int
Minimum distance between the base of the chin and the crown is less than 80% of the total height of the image. For ICAO compliance, this distance must be in the range 60 to 90. Hint: Default value is 60.
getter/setter pair
minimumHeadWidthRatio int
Value indicating if the image width is conform to the (image width / head width) ratio of 7:5. The head width is defined as the distance between the left and right ears. For ICAO compliance, the value must be in the range 50 to 75. Hint: Default value is 50.
getter/setter pair
minimumHorizontalPosition int
Value indicating if the head is correctly centered horizontally. For ICAO compliance, the value must be in the range 45 to 55. Hint: Default value is 45.
getter/setter pair
minimumIod int
Minimum intra-occular distance, in pixels. This parameter is used to the limit the distance from the subject to the camera. Hint: Default value is 0.
getter/setter pair
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. For ICAO compliance, the value must be in the range 30 to 50. Hint: Default value is 30.
getter/setter pair
mouthOcclusionThreshold int
Mouth occlusion threshold. If the mouth occlusion score is above this value, the mouth is probably occluded. Hint: Default value 70.
getter/setter pair
mouthOpenThreshold int
Mouth opening threshold. If the mouth opening score is above this value, the mouth of detected face is definitely open. Hint: Default value is 35.
getter/setter pair
naturalSkinColorThreshold int
Natural skin color threshold. Above this threshold, th skin of the person looks natural. Hint: Default value is 5.
getter/setter pair
noFlashReflectionThreshold int
Flash reflexion detection threshold. Above this threshold, the flash reflexion is probably present on the face. Hint: Default value is 70.
getter/setter pair
noiseThreshold int
Threshold for confirming the presence of noise in the image. Hint: Default value is 90.
getter/setter pair
noseOcclusionThreshold int
Nose occlusion threshold. If the score is above this value, the nose is probably occluded. Hint: Default value 50.
getter/setter pair
overExposureThreshold int
Over exposure threshold. Above this threshold, the ratio of face pixels are over-exposed. Hint: Default value is 50.
getter/setter pair
padThreshold int
Presentation attack detection threshold, from 0 to 100. Higher values enable more attacks to be detected, but may reduce ease of use. Hint: Default value 95.
getter/setter pair
pixelationThreshold int
Pixelation detection threshold. Above this threshold, the image is probably pixelated. Hint: Default value is 90.
getter/setter pair
redEyeThreshold int
Threshold for confirming the presence of red eyes. Hint: Default value is 10.
getter/setter pair
resolutionThreshold int
Threshold indicating whether the image resolution is sufficient. Hint: Default value is 90.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sharpnessThreshold int
Sharpness threshold. If the sharpness score is above this value, the image sharpness is sufficient. Hint: Default value is 50.
getter/setter pair
smileThreshold int
Smile threshold. If the Smile score is above this value, the detected face is definitely smiling. Hint: Default value is 75.
getter/setter pair
threadCount int
Number of threads to be used for portrait processing. Hint: Default value is 1. Allocating more than one thread can increase the speed of the process.
getter/setter pair
tintedGlassThreshold int
Tinted glass detection threshold. If the score is above this value, the person is definitely wearing tinted glasses. Hint: Default value 25.
getter/setter pair
trackerMatchingThreshold int
Minimum match score to reach to preserve the ID of a tracked face between frame 't-1' and frame 't'. Hint: Default value is 3000 which corresponds to a False Match Rate of 1/1000.
getter/setter pair
trackerMaximumFaceAge int
Maximum number of consecutive non-detections to be reached before deleting a tracked face. Hint: Default value is 2. One must adapt this value to its needs in terms of tracker identity memory (in seconds) and measured frame rate on target platform.
getter/setter pair
trackerMinimumFaceAge int
Minimum number of consecutive detections to reach before creating a tracked face. Hint: Default value is 1 for FaceDetector4B since the false detection rate is low enough. If using a less accurate detector (such as FaceDetector3C) one might consider increasing a bit this value to avoid false tracks.
getter/setter pair
trackerNmsIouThreshold int
Non-maximum suppression (NMS) intersection-over-union (IOU) threshold, in the range 0;100. Hint: Default value is 0. Setting a high threshold allows to detect more overlapping faces which can be useful in a multi-face scenario. On the contrary, in a portrait scenario, a low NMS IOU threshold should be preferred.
getter/setter pair
underExposureThreshold int
Under exposure threshold. Above this threshold, the face is probably under-exposed. Hint: Default value is 50.
getter/setter pair

Methods

createPortrait(Image image) Portrait
Analyses an image and creates a portrait with the first detected face or the currently tracked face if the update parameter is activated. This method performs the following tasks:
cropIcaoPortrait(Portrait portrait) Image
Creates an ICAO-compliant portrait image by cropping the source image around the detected face. This method uses the following parameters:
cropPortrait(Portrait portrait) Image
Creates a portrait image by cropping the source image around the detected face.
detectOcclusions(Portrait portrait) → void
Detects occlusions on the subject's face. Important: This function requires the FaceOcclusionDetector2A model to be loaded.
detectPresentationAttack(Portrait portrait) → void
Detects a possible presentation attack. Important: This method requires the FaceColorBasedPad models to be loaded.
dispose() → void
Releases all resources used by this PortraitProcessor.
estimateAge(Portrait portrait) → void
Estimates the age of the person. Important: This method requires the FaceAgeEstimator1A model to be loaded.
estimateBackgroundUniformity(Portrait portrait) → void
Checks the background uniformity of the specified portrait. Important: This method requires the FaceBackgroundUniformityEstimator1A model to be loaded.
estimateExpression(Portrait portrait) → void
Estimates the subject's expression on the specified portrait. Important: This method requires the FaceExpressionClassifier1A model to be loaded.
estimateFaceAttributes(Portrait portrait) → void
Estimates the face attributes of the specified portrait. It includes glasses, hat, makeup, mouth opening, gender, smile, eye gaze, eye opening, face mask Note: The appropriate AI models must be loaded.
estimateGeometryQuality(Portrait portrait) → void
Estimates the geometric quality of the specified portrait according to the ICAO portrait parameters.
estimatePhotographicQuality(Portrait portrait) → void
Etimates the photographic quality of the specified portrait. It includes image colorization, equal brightness, dynamic range, resolution, natural skin color, flash reflection, noise, over-exposure, under-exposure, pixelation, sharpness.
getBackgroundColorUniformityThreshold() int
Gets the background color uniformity threshold. If the score is above this value, the background color of the image is definitely uniform. Hint: Default value is 80.
getBackgroundStructureUniformityThreshold() int
Gets the background structure uniformity threshold. If the score is above this value, the background structure of the image is definitely uniform. Hint: Default value is 80.
getCropAspectRatio() double
Gets the aspect ratio (height to width) of the cropped portrait image. Hint: Default value is 4/3.
getCropEyePositionRatio() double
Gets the ratio between the vertical eye position and the image height for ICAO portrait cropping. Must be in the range )0;1(. Hint: Default value is 0.45.
getCropIodRatio() double
Gets the ratio between the interocular distance (IOD) and the image width for ICAO portrait cropping. Must be in the range )0;1(. Hint: Default value is 0.25.
getCropMargin() double
Gets the relative margin around the face for basic portrait cropping. Hint: Default value is 0.5.
getDynamicRangeThreshold() int
Gets the face dynamic range threshold. Above this threshold, the dynamic range of the image in the face region is good enough. Hint: Default value is 128.
getEqualBrightnessThreshold() int
Gets the equal brightness threshold. Above this value, the face is equally exposed. Hint: Default value is 10.
getExpressionSensibility() int
Gets the sensibility of the expression classifier. The higher the value, the more sensitive the algorithm will be, meaning that it will be less likely to estimate neutral expression out of the detected face. Hint: Default value is 60.
getEyeOcclusionThreshold() int
Gets the visible eye threshold. If the score is above this value, the eye is probably occluded. Hint: Default value 80.
getEyeOpeningThreshold() int
Gets the eye opening threshold. If the score is above this value, the eyes are definitely open. Hint: Default value is 5.
getFaceDetectionImageSize() int
Gets the the size, in pixels, of the downscaled image used for face detection. Hint: Default value is 256. Low values tend to ignore small faces in the input image, while higher values tend to take longer to process.
getFaceDetectionModel() FaceModel
Gets the specifies the model used to detect and track faces. Hint: Default value is FaceDetector4B. Some better accuracy/speed balances can be found by choosing another model.
getFaceDetectionThreshold() int
Gets the specifies the face detection confidence threshold, in the range is (0;100). Hint: Default value is 50. Setting a high threshold reduces false detections but may increase the number of undetected faces.
getFaceEncodingModel() FaceModel
Gets the model used to create features and assess consistancy among views of a given face. Hint: Default value is FaceEncoder9B. Some better accuracy/speed balances can be found by choosing another model.
getFaceMaskThreshold() int
Gets the face mask detection threshold. If the detection score is above this value, the person is probably wearing a mask. Hint: Default value is 35.
getGlassesThreshold() int
Gets the glasses detection threshold. If the score is above this value, the person is probably wearing glasses. Hint: Default value 90.
getHatThreshold() int
Gets the threshold for confirming that the person is wearing a hat. Hint: Default value is 98.
getMakeupThreshold() int
Gets the make-up detection threshold. If the detection score is above this value, the persone is definitely wearing make-up. Hint: Default value 50.
getMaleThreshold() int
Gets the male gender detection threshold. If the score is higher than this value, the person is probably male. Hint: Default value is 50.
getMaximumEyeGazeX() int
Gets the maximum value of the eye gaze alongside the X axis. Hint: Default value is 10.
getMaximumEyeGazeY() int
Gets the maximum value of the eye gaze alongside the Y axis. Hint: Default value is 10.
getMaximumHeadHeightRatio() int
Gets the maximum distance between the base of the chin and the crown is less than 80% of the total height of the image. For ICAO compliance, this distance must be in the range 60 to 90. Hint: Default value is 90.
getMaximumHeadWidthRatio() int
Gets the value indicating if the image width is conform to the (image width / head width) ratio of 7:5. The head width is defined as the distance between the left and right ears. For ICAO compliance, the value must be in the range 50 to 75. Hint: Default value is 75.
getMaximumHorizontalPosition() int
Gets the value indicating if the head is correctly centered horizontally. For ICAO compliance, the value must be in the range 45 to 55. Hint: Default value is 55.
getMaximumIod() int
Gets the maximum interocular distance (IOD), in pixels. This parameter is used to prevent the subject from being too close to the camera. Hint: Default value is 512.
getMaximumPitchAngle() double
Gets the maximum head pitch angle, in degrees, for frontal positioning. Hint: Default value is 20.
getMaximumRollAngle() double
Gets the maximum head roll angle, in degrees, for frontal positioning. Hint: Default value is 15.
getMaximumVerticalPosition() int
Gets the 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. For ICAO compliance, the value must be in the range 30 to 50. Hint: Default value is 50.
getMaximumYawAngle() double
Gets the maximum head yaw angle, in degrees, for frontal positioning. Hint: Default value is 8.
getMinimumHeadHeightRatio() int
Gets the minimum distance between the base of the chin and the crown is less than 80% of the total height of the image. For ICAO compliance, this distance must be in the range 60 to 90. Hint: Default value is 60.
getMinimumHeadWidthRatio() int
Gets the value indicating if the image width is conform to the (image width / head width) ratio of 7:5. The head width is defined as the distance between the left and right ears. For ICAO compliance, the value must be in the range 50 to 75. Hint: Default value is 50.
getMinimumHorizontalPosition() int
Gets the value indicating if the head is correctly centered horizontally. For ICAO compliance, the value must be in the range 45 to 55. Hint: Default value is 45.
getMinimumIod() int
Gets the minimum intra-occular distance, in pixels. This parameter is used to the limit the distance from the subject to the camera. Hint: Default value is 0.
getMinimumVerticalPosition() int
Gets the 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. For ICAO compliance, the value must be in the range 30 to 50. Hint: Default value is 30.
getMouthOcclusionThreshold() int
Gets the mouth occlusion threshold. If the mouth occlusion score is above this value, the mouth is probably occluded. Hint: Default value 70.
getMouthOpenThreshold() int
Gets the mouth opening threshold. If the mouth opening score is above this value, the mouth of detected face is definitely open. Hint: Default value is 35.
getNaturalSkinColorThreshold() int
Gets the natural skin color threshold. Above this threshold, th skin of the person looks natural. Hint: Default value is 5.
getNoFlashReflectionThreshold() int
Gets the flash reflexion detection threshold. Above this threshold, the flash reflexion is probably present on the face. Hint: Default value is 70.
getNoiseThreshold() int
Gets the threshold for confirming the presence of noise in the image. Hint: Default value is 90.
getNoseOcclusionThreshold() int
Gets the nose occlusion threshold. If the score is above this value, the nose is probably occluded. Hint: Default value 50.
getOverExposureThreshold() int
Gets the over exposure threshold. Above this threshold, the ratio of face pixels are over-exposed. Hint: Default value is 50.
getPadThreshold() int
Gets the presentation attack detection threshold, from 0 to 100. Higher values enable more attacks to be detected, but may reduce ease of use. Hint: Default value 95.
getPixelationThreshold() int
Gets the pixelation detection threshold. Above this threshold, the image is probably pixelated. Hint: Default value is 90.
getRedEyeThreshold() int
Gets the threshold for confirming the presence of red eyes. Hint: Default value is 10.
getResolutionThreshold() int
Gets the threshold indicating whether the image resolution is sufficient. Hint: Default value is 90.
getSharpnessThreshold() int
Gets the sharpness threshold. If the sharpness score is above this value, the image sharpness is sufficient. Hint: Default value is 50.
getSmileThreshold() int
Gets the smile threshold. If the Smile score is above this value, the detected face is definitely smiling. Hint: Default value is 75.
getThreadCount() int
Gets the number of threads to be used for portrait processing. Hint: Default value is 1. Allocating more than one thread can increase the speed of the process.
getTintedGlassThreshold() int
Gets the tinted glass detection threshold. If the score is above this value, the person is definitely wearing tinted glasses. Hint: Default value 25.
getTrackerMatchingThreshold() int
Gets the minimum match score to reach to preserve the ID of a tracked face between frame 't-1' and frame 't'. Hint: Default value is 3000 which corresponds to a False Match Rate of 1/1000.
getTrackerMaximumFaceAge() int
Gets the maximum number of consecutive non-detections to be reached before deleting a tracked face. Hint: Default value is 2. One must adapt this value to its needs in terms of tracker identity memory (in seconds) and measured frame rate on target platform.
getTrackerMinimumFaceAge() int
Gets the minimum number of consecutive detections to reach before creating a tracked face. Hint: Default value is 1 for FaceDetector4B since the false detection rate is low enough. If using a less accurate detector (such as FaceDetector3C) one might consider increasing a bit this value to avoid false tracks.
getTrackerNmsIouThreshold() int
Gets the non-maximum suppression (NMS) intersection-over-union (IOU) threshold, in the range (0;100). Hint: Default value is 0. Setting a high threshold allows to detect more overlapping faces which can be useful in a multi-face scenario. On the contrary, in a portrait scenario, a low NMS IOU threshold should be preferred.
getUnderExposureThreshold() int
Gets the under exposure threshold. Above this threshold, the face is probably under-exposed. Hint: Default value is 50.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeBackground(Image image, int red, int green, int blue) → void
Removes the background on the specified portrait image. Important: This method requires the FaceBackgroundSegmenter1A model to be loaded.
reset() → void
Resets the face tracker.
setBackgroundColorUniformityThreshold(int backgroundColorUniformityThreshold) → void
Sets the background color uniformity threshold. If the score is above this value, the background color of the image is definitely uniform. Hint: Default value is 80.
setBackgroundStructureUniformityThreshold(int backgroundStructureUniformityThreshold) → void
Sets the background structure uniformity threshold. If the score is above this value, the background structure of the image is definitely uniform. Hint: Default value is 80.
setCropAspectRatio(double cropAspectRatio) → void
Sets the aspect ratio (height to width) of the cropped portrait image. Hint: Default value is 4/3.
setCropEyePositionRatio(double cropEyePositionRatio) → void
Sets the ratio between the vertical eye position and the image height for ICAO portrait cropping. Must be in the range )0;1(. Hint: Default value is 0.45.
setCropIodRatio(double cropIodRatio) → void
Sets the ratio between the interocular distance (IOD) and the image width for ICAO portrait cropping. Must be in the range )0;1(. Hint: Default value is 0.25.
setCropMargin(double cropMargin) → void
Sets the relative margin around the face for basic portrait cropping. Hint: Default value is 0.5.
setDynamicRangeThreshold(int dynamicRangeThreshold) → void
Sets the face dynamic range threshold. Above this threshold, the dynamic range of the image in the face region is good enough. Hint: Default value is 128.
setEqualBrightnessThreshold(int equalBrightnessThreshold) → void
Sets the equal brightness threshold. Above this value, the face is equally exposed. Hint: Default value is 10.
setExpressionSensibility(int expressionSensibility) → void
Sets the sensibility of the expression classifier. The higher the value, the more sensitive the algorithm will be, meaning that it will be less likely to estimate neutral expression out of the detected face. Hint: Default value is 60.
setEyeOcclusionThreshold(int eyeOcclusionThreshold) → void
Sets the visible eye threshold. If the score is above this value, the eye is probably occluded. Hint: Default value 80.
setEyeOpeningThreshold(int eyeOpeningThreshold) → void
Sets the eye opening threshold. If the score is above this value, the eyes are definitely open. Hint: Default value is 5.
setFaceDetectionImageSize(int faceDetectionImageSize) → void
Sets the the size, in pixels, of the downscaled image used for face detection. Hint: Default value is 256. Low values tend to ignore small faces in the input image, while higher values tend to take longer to process.
setFaceDetectionModel(FaceModel faceDetectionModel) → void
Sets the specifies the model used to detect and track faces. Hint: Default value is FaceDetector4B. Some better accuracy/speed balances can be found by choosing another model.
setFaceDetectionThreshold(int faceDetectionThreshold) → void
Sets the specifies the face detection confidence threshold, in the range is (0;100). Hint: Default value is 50. Setting a high threshold reduces false detections but may increase the number of undetected faces.
setFaceEncodingModel(FaceModel faceEncodingModel) → void
Sets the model used to create features and assess consistancy among views of a given face. Hint: Default value is FaceEncoder9B. Some better accuracy/speed balances can be found by choosing another model.
setFaceMaskThreshold(int faceMaskThreshold) → void
Sets the face mask detection threshold. If the detection score is above this value, the person is probably wearing a mask. Hint: Default value is 35.
setGlassesThreshold(int glassesThreshold) → void
Sets the glasses detection threshold. If the score is above this value, the person is probably wearing glasses. Hint: Default value 90.
setHatThreshold(int hatThreshold) → void
Sets the threshold for confirming that the person is wearing a hat. Hint: Default value is 98.
setMakeupThreshold(int makeupThreshold) → void
Sets the make-up detection threshold. If the detection score is above this value, the persone is definitely wearing make-up. Hint: Default value 50.
setMaleThreshold(int maleThreshold) → void
Sets the male gender detection threshold. If the score is higher than this value, the person is probably male. Hint: Default value is 50.
setMaximumEyeGazeX(int maximumEyeGazeX) → void
Sets the maximum value of the eye gaze alongside the X axis. Hint: Default value is 10.
setMaximumEyeGazeY(int maximumEyeGazeY) → void
Sets the maximum value of the eye gaze alongside the Y axis. Hint: Default value is 10.
setMaximumHeadHeightRatio(int maximumHeadHeightRatio) → void
Sets the maximum distance between the base of the chin and the crown is less than 80% of the total height of the image. For ICAO compliance, this distance must be in the range 60 to 90. Hint: Default value is 90.
setMaximumHeadWidthRatio(int maximumHeadWidthRatio) → void
Sets the value indicating if the image width is conform to the (image width / head width) ratio of 7:5. The head width is defined as the distance between the left and right ears. For ICAO compliance, the value must be in the range 50 to 75. Hint: Default value is 75.
setMaximumHorizontalPosition(int maximumHorizontalPosition) → void
Sets the value indicating if the head is correctly centered horizontally. For ICAO compliance, the value must be in the range 45 to 55. Hint: Default value is 55.
setMaximumIod(int maximumIod) → void
Sets the maximum interocular distance (IOD), in pixels. This parameter is used to prevent the subject from being too close to the camera. Hint: Default value is 512.
setMaximumPitchAngle(double maximumPitchAngle) → void
Sets the maximum head pitch angle, in degrees, for frontal positioning. Hint: Default value is 20.
setMaximumRollAngle(double maximumRollAngle) → void
Sets the maximum head roll angle, in degrees, for frontal positioning. Hint: Default value is 15.
setMaximumVerticalPosition(int maximumVerticalPosition) → void
Sets the 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. For ICAO compliance, the value must be in the range 30 to 50. Hint: Default value is 50.
setMaximumYawAngle(double maximumYawAngle) → void
Sets the maximum head yaw angle, in degrees, for frontal positioning. Hint: Default value is 8.
setMinimumHeadHeightRatio(int minimumHeadHeightRatio) → void
Sets the minimum distance between the base of the chin and the crown is less than 80% of the total height of the image. For ICAO compliance, this distance must be in the range 60 to 90. Hint: Default value is 60.
setMinimumHeadWidthRatio(int minimumHeadWidthRatio) → void
Sets the value indicating if the image width is conform to the (image width / head width) ratio of 7:5. The head width is defined as the distance between the left and right ears. For ICAO compliance, the value must be in the range 50 to 75. Hint: Default value is 50.
setMinimumHorizontalPosition(int minimumHorizontalPosition) → void
Sets the value indicating if the head is correctly centered horizontally. For ICAO compliance, the value must be in the range 45 to 55. Hint: Default value is 45.
setMinimumIod(int minimumIod) → void
Sets the minimum intra-occular distance, in pixels. This parameter is used to the limit the distance from the subject to the camera. Hint: Default value is 0.
setMinimumVerticalPosition(int minimumVerticalPosition) → void
Sets the 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. For ICAO compliance, the value must be in the range 30 to 50. Hint: Default value is 30.
setMouthOcclusionThreshold(int mouthOcclusionThreshold) → void
Sets the mouth occlusion threshold. If the mouth occlusion score is above this value, the mouth is probably occluded. Hint: Default value 70.
setMouthOpenThreshold(int mouthOpenThreshold) → void
Sets the mouth opening threshold. If the mouth opening score is above this value, the mouth of detected face is definitely open. Hint: Default value is 35.
setNaturalSkinColorThreshold(int naturalSkinColorThreshold) → void
Sets the natural skin color threshold. Above this threshold, th skin of the person looks natural. Hint: Default value is 5.
setNoFlashReflectionThreshold(int noFlashReflectionThreshold) → void
Sets the flash reflexion detection threshold. Above this threshold, the flash reflexion is probably present on the face. Hint: Default value is 70.
setNoiseThreshold(int noiseThreshold) → void
Sets the threshold for confirming the presence of noise in the image. Hint: Default value is 90.
setNoseOcclusionThreshold(int noseOcclusionThreshold) → void
Sets the nose occlusion threshold. If the score is above this value, the nose is probably occluded. Hint: Default value 50.
setOverExposureThreshold(int overExposureThreshold) → void
Sets the over exposure threshold. Above this threshold, the ratio of face pixels are over-exposed. Hint: Default value is 50.
setPadThreshold(int padThreshold) → void
Sets the presentation attack detection threshold, from 0 to 100. Higher values enable more attacks to be detected, but may reduce ease of use. Hint: Default value 95.
setPixelationThreshold(int pixelationThreshold) → void
Sets the pixelation detection threshold. Above this threshold, the image is probably pixelated. Hint: Default value is 90.
setRedEyeThreshold(int redEyeThreshold) → void
Sets the threshold for confirming the presence of red eyes. Hint: Default value is 10.
setResolutionThreshold(int resolutionThreshold) → void
Sets the threshold indicating whether the image resolution is sufficient. Hint: Default value is 90.
setSharpnessThreshold(int sharpnessThreshold) → void
Sets the sharpness threshold. If the sharpness score is above this value, the image sharpness is sufficient. Hint: Default value is 50.
setSmileThreshold(int smileThreshold) → void
Sets the smile threshold. If the Smile score is above this value, the detected face is definitely smiling. Hint: Default value is 75.
setThreadCount(int threadCount) → void
Sets the number of threads to be used for portrait processing. Hint: Default value is 1. Allocating more than one thread can increase the speed of the process.
setTintedGlassThreshold(int tintedGlassThreshold) → void
Sets the tinted glass detection threshold. If the score is above this value, the person is definitely wearing tinted glasses. Hint: Default value 25.
setTrackerMatchingThreshold(int trackerMatchingThreshold) → void
Sets the minimum match score to reach to preserve the ID of a tracked face between frame 't-1' and frame 't'. Hint: Default value is 3000 which corresponds to a False Match Rate of 1/1000.
setTrackerMaximumFaceAge(int trackerMaximumFaceAge) → void
Sets the maximum number of consecutive non-detections to be reached before deleting a tracked face. Hint: Default value is 2. One must adapt this value to its needs in terms of tracker identity memory (in seconds) and measured frame rate on target platform.
setTrackerMinimumFaceAge(int trackerMinimumFaceAge) → void
Sets the minimum number of consecutive detections to reach before creating a tracked face. Hint: Default value is 1 for FaceDetector4B since the false detection rate is low enough. If using a less accurate detector (such as FaceDetector3C) one might consider increasing a bit this value to avoid false tracks.
setTrackerNmsIouThreshold(int trackerNmsIouThreshold) → void
Sets the non-maximum suppression (NMS) intersection-over-union (IOU) threshold, in the range (0;100). Hint: Default value is 0. Setting a high threshold allows to detect more overlapping faces which can be useful in a multi-face scenario. On the contrary, in a portrait scenario, a low NMS IOU threshold should be preferred.
setUnderExposureThreshold(int underExposureThreshold) → void
Sets the under exposure threshold. Above this threshold, the face is probably under-exposed. Hint: Default value is 50.
toString() String
A string representation of this object.
inherited
updatePortrait(Portrait portrait, Image image) → void
Analyses an image and updates the specified portrait with the first detected face or the currently tracked face. This method performs the following tasks:

Operators

operator ==(Object other) bool
The equality operator.
inherited