DetectedFace class
Represents a detected face.
- Implemented types
Constructors
- DetectedFace()
- Creates a new instance of the DetectedFace class.
-
DetectedFace.fromHandle(Pointer<
id3DetectedFace> handle) - Creates a new instance of the DetectedFace class.
Properties
- bounds ↔ Rectangle
-
Bounds of the detected face.
getter/setter pair
- detectionScore → int
-
Confidence score of the detected face.
no setter
-
handle
→ Pointer<
id3DetectedFace> -
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
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clone(
) → DetectedFace - Creates a copy of the DetectedFace object.
-
dispose(
) → void - Releases all resources used by this DetectedFace.
-
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.
-
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.
-
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) → DetectedFace - Creates a detected face.
-
fromBuffer(
Uint8List? data) → DetectedFace - Imports the face object from a buffer.
-
fromFile(
String? path) → DetectedFace - Imports the face object from a file.