Portrait class

Represents a portrait.

Implemented types

Constructors

Portrait()
Creates a new instance of the Portrait class.
Portrait.fromHandle(Pointer<id3FacePortrait> handle)
Creates a new instance of the Portrait class.

Properties

age int
Estimated age of the subject. -1 if not computed.
no setter
backgroundUniformity BackgroundUniformity
Result of the background uniformity computation.
no setter
expression FaceExpression
Estimated expression of the subject (angriness, disgust, fear, happiness, sadness, surprise, or neutral). Unknown if not computed.
no setter
eyeGaze EyeGaze
Estimated gaze.
no setter
faceId int
Unique face ID.
no setter
faceMask int
Value indicating whether a face mask is detected. The range is 0-100, 100 meaning a mask is detected.
no setter
faceTemplate FaceTemplate?
Face template.
no setter
genderMale int
Value indicating whether the subject is a male. -1 if not computed. The range is 0 (female) -100 (male).
no setter
geometricAttributes GeometricAttributes
Geometric attributes.
no setter
glasses int
Value indicating whether the subject wears glasses. -1 if not computed. The range is 0-100, 100 meaning glasses are detected.
no setter
handle Pointer<id3FacePortrait>
Gets the native handle. return The native handle.
no setter
hashCode int
The hash code for this object.
no setterinherited
hat int
Value indicating whether the subject wears a hat. -1 if not computed. The range is 0-100, 100 meaning a hat is detected.
no setter
image Image?
Source image.
no setter
imageCenter Point
Center of the portrait in the source image.
no setter
imageScale double
Scale to be applied to the source image to display the portrait.
no setter
imageTranslation Point
Translation to be applied to the source image to display the portrait.
no setter
instruction PortraitInstruction
Instruction to be given to the user for portrait capture.
no setter
landmarks PointList
68-points landmarks.
no setter
leftEyeOpening int
Value estimating the opening of the left eye. -1 if not computed. The range is 0-100, 100 meaning the eye is fully opened.
no setter
leftEyeVisibility int
Value estimating the visibility of the left eye. -1 if not computed. The range is 0-100, 100 meaning the left eye is fully visible.
no setter
lookStraightScore int
Value estimating if the user is looking straight towards the camera. -1 if not computed. The range is 0-100, 100 meaning the look is straight.
no setter
makeup int
Value indicating whether makeup is detected. -1 if not computed. The range is 0-100, 100 meaning makeup is detected.
no setter
mouthOpening int
Value indicating estimating the opening of the mouth. -1 if not computed. The range is 0-100, 100 meaning the mouth is fully open.
no setter
mouthVisibility int
Value estimating the visibility of the mouth. -1 if not computed. The range is 0-100, 100 meaning the mouth is fully visible.
no setter
noseVisibility int
Value estimating the visibility of the nose. -1 if not computed. The range is 0-100, 100 meaning the nose is fully visible.
no setter
padScore int
Score of the presentation attack detection.
no setter
padStatus PadStatus
Status of the presentation attack detection.
no setter
photographicAttributes PhotographicAttributes
Photographic attributes.
no setter
pose FacePose
Face pose.
no setter
qualityCheckpoints PortraitQualityCheckpoints
Quality check points of the portrait.
no setter
qualityScore int
Unified quality score, from 0 to 100. -1 if not computed.
no setter
rightEyeOpening int
Value estimating the opening of the left eye. -1 if not computed. The range is 0-100, 100 meaning the eye is fully opened.
no setter
rightEyeVisibility int
Value estimating the visibility of the right eye. -1 if not computed. The range is 0-100, 100 meaning the right eye is fully visible.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
smile int
Value indicating whether the subject is smiling. -1 if not computed. The range is 0-100, 100 meaning the person is smiling.
no setter
status PortraitStatus
Status of the portrait.
no setter
subjectPosition int
Position of the subject in the image.
no setter
trackedFace TrackedFace?
Tracked face.
no setter

Methods

clear() → void
Clears all attributes.
clone() Portrait
Creates a copy of the Portrait object.
dispose() → void
Releases all resources used by this Portrait.
getAge() int
Gets the estimated age of the subject. -1 if not computed.
getBackgroundUniformity() BackgroundUniformity
Gets the result of the background uniformity computation.
getExpression() FaceExpression
Gets the estimated expression of the subject (angriness, disgust, fear, happiness, sadness, surprise, or neutral). Unknown if not computed.
getEyeGaze() EyeGaze
Gets the estimated gaze.
getFaceId() int
Gets the unique face ID.
getFaceMask() int
Gets the value indicating whether a face mask is detected. The range is 0-100, 100 meaning a mask is detected.
getFaceTemplate() FaceTemplate?
Gets the face template.
getGenderMale() int
Gets the value indicating whether the subject is a male. -1 if not computed. The range is 0 (female) -100 (male).
getGeometricAttributes() GeometricAttributes
Gets the geometric attributes.
getGlasses() int
Gets the value indicating whether the subject wears glasses. -1 if not computed. The range is 0-100, 100 meaning glasses are detected.
getHat() int
Gets the value indicating whether the subject wears a hat. -1 if not computed. The range is 0-100, 100 meaning a hat is detected.
getImage() Image?
Gets the source image.
getImageCenter() Point
Gets the center of the portrait in the source image.
getImageScale() double
Gets the scale to be applied to the source image to display the portrait.
getImageTranslation() Point
Gets the translation to be applied to the source image to display the portrait.
getInstruction() PortraitInstruction
Gets the instruction to be given to the user for portrait capture.
getLandmarks() PointList
Gets the 68-points landmarks.
getLeftEyeOpening() int
Gets the value estimating the opening of the left eye. -1 if not computed. The range is 0-100, 100 meaning the eye is fully opened.
getLeftEyeVisibility() int
Gets the value estimating the visibility of the left eye. -1 if not computed. The range is 0-100, 100 meaning the left eye is fully visible.
getLookStraightScore() int
Gets the value estimating if the user is looking straight towards the camera. -1 if not computed. The range is 0-100, 100 meaning the look is straight.
getMakeup() int
Gets the value indicating whether makeup is detected. -1 if not computed. The range is 0-100, 100 meaning makeup is detected.
getMouthOpening() int
Gets the value indicating estimating the opening of the mouth. -1 if not computed. The range is 0-100, 100 meaning the mouth is fully open.
getMouthVisibility() int
Gets the value estimating the visibility of the mouth. -1 if not computed. The range is 0-100, 100 meaning the mouth is fully visible.
getNoseVisibility() int
Gets the value estimating the visibility of the nose. -1 if not computed. The range is 0-100, 100 meaning the nose is fully visible.
getPadScore() int
Gets the score of the presentation attack detection.
getPadStatus() PadStatus
Gets the status of the presentation attack detection.
getPhotographicAttributes() PhotographicAttributes
Gets the photographic attributes.
getPose() FacePose
Gets the face pose.
getQualityCheckpoints() PortraitQualityCheckpoints
Gets the quality check points of the portrait.
getQualityScore() int
Gets the unified quality score, from 0 to 100. -1 if not computed.
getRightEyeOpening() int
Gets the value estimating the opening of the left eye. -1 if not computed. The range is 0-100, 100 meaning the eye is fully opened.
getRightEyeVisibility() int
Gets the value estimating the visibility of the right eye. -1 if not computed. The range is 0-100, 100 meaning the right eye is fully visible.
getSmile() int
Gets the value indicating whether the subject is smiling. -1 if not computed. The range is 0-100, 100 meaning the person is smiling.
getStatus() PortraitStatus
Gets the status of the portrait.
getSubjectPosition() int
Gets the position of the subject in the image.
getTrackedFace() TrackedFace?
Gets the tracked face.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toBuffer() Uint8List
Exports the portrait to a buffer.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

fromBuffer(Uint8List? data) Portrait
Imports the portrait object from a buffer.