TrackedFace class

Represents a tracked face.

Implemented types

Constructors

TrackedFace()
Creates a new instance of the TrackedFace class.
TrackedFace.fromHandle(Pointer<id3TrackedFace> handle)
Creates a new instance of the TrackedFace class.

Properties

bounds Rectangle
Bounds of the detected face.
getter/setter pair
detectionScore int
Confidence score of the detected face.
no setter
faceTemplate FaceTemplate
Computed template the tracked face. It aims at tracking an identity over time and is consolidated.
no setter
handle Pointer<id3TrackedFace>
Gets the native handle. return The native handle.
no setter
hashCode int
The hash code for this object.
no setterinherited
id int
ID of the detected face.
getter/setter pair
landmarks PointList
Landmarks (eyes, nose and mouth corners) of the detected face.
getter/setter pair
predictedBounds Rectangle
Predicted bounds of the tracked face. Those bounds are computed using a Kalman filter which has the effect of making them smooth and robust to false non-detections.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
trackingStatus TrackingStatus
Status of the tracked face. See FaceTrackingStatus for more details.
no setter

Methods

clone() TrackedFace
Creates a copy of the TrackedFace object.
dispose() → void
Releases all resources used by this TrackedFace.
getAsDetectedFace() DetectedFace
Gets the tracked face as a detected face.
getBounds() Rectangle
Gets the bounds of the detected face.
getDetectionScore() int
Gets the confidence score of the detected face.
getDistanceToCamera(Image depthImage) int
Gets the distance between the detected face and the camera when using a depth map in pixels.
getExpandedBounds(double aspectRatio, double margin) Rectangle
Gets the bounding box around the detected face with specified aspect ratio and specified margin.
getFaceTemplate() FaceTemplate
Gets the computed template the tracked face. It aims at tracking an identity over time and is consolidated.
getId() int
Gets the ID of the detected face.
getInterocularDistance() int
Gets the distance between the eyes (IOD) of the detected face in pixels.
getLandmarks() PointList
Gets the landmarks (eyes, nose and mouth corners) of the detected face.
getPortraitBounds(double eyeImageWidthRatio, double eyeImageHeightRatio, double imageRatio) Rectangle
Gets the bounding box of the detected face for ICAO portrait cropping. This method shall be used to ensure compliance with the ICAO standard.
getPredictedBounds() Rectangle
Gets the predicted bounds of the tracked face. Those bounds are computed using a Kalman filter which has the effect of making them smooth and robust to false non-detections.
getTrackingStatus() TrackingStatus
Gets the status of the tracked face. See FaceTrackingStatus for more details.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rescale(double scale) → void
Rescales the detected face object bounding box and landmarks. This function can be useful if the image was downscaled to speed up detection, then you need to upscale the detected face to fit the source image size.
rotate(int angle, Point center) → void
Rotates the face object by a given angle in degrees from a given center.
setBounds(Rectangle bounds) → void
Sets the bounds of the detected face.
setId(int id) → void
Sets the ID of the detected face.
setLandmarks(PointList landmarks) → void
Sets the landmarks (eyes, nose and mouth corners) of the detected face.
toBuffer() Uint8List
Exports the face object to a buffer.
toFile(String? path) → void
Saves the face object to a file.
toString() String
A string representation of this object.
inherited
translate(int tx, int ty) → void
Translates the face object.

Operators

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

Static Methods

create(Rectangle bounds, int detectionScore, int id, PointList landmarks) TrackedFace
Creates a detected face.
fromBuffer(Uint8List? data) TrackedFace
Imports the face object from a buffer.
fromFile(String? path) TrackedFace
Imports the face object from a file.