TrackedFace Class

Namespace: id3.Face

Definition

Represents a tracked face.
class TrackedFace
class TrackedFace implements Finalizable
public partial class TrackedFace
public class TrackedFace implements AutoCloseable, Serializable
public class TrackedFace
typedef struct id3TrackedFace *ID3_TRACKED_FACE;

Usage

trackedFaceInstance = TrackedFace()
# ...

Explicit destruction

# ...
del trackedFaceInstance
final trackedFaceInstance = sdk.TrackedFace();
// ...

Explicit destruction

// ...
trackedFaceInstance.dispose()
using (var trackedFaceInstance = new TrackedFace())
{
   // ...
}

Explicit destruction

var trackedFaceInstance = new TrackedFace()
// ...
trackedFaceInstance.Dispose()
try (TrackedFace trackedFaceInstance = new TrackedFace()) {
// ...
}

Explicit destruction

TrackedFace trackedFaceInstance = new TrackedFace();
// ...
trackedFaceInstance.close();
private var trackedFaceInstance: TrackedFace? = nil
trackedFaceInstance = try TrackedFace()
ID3_TRACKED_FACE hTrackedFace{};
int err = id3TrackedFace_Initialize(&hTrackedFace);
if (err == ID3_SUCCESS) {
    // ...
    id3TrackedFace_Dispose(&hTrackedFace);
}

Properties

Name

Type

Description

bounds

Rectangle

Bounds of the detected face.

detectionScore

int

Confidence score of the detected face.

faceTemplate

FaceTemplate

Computed template the tracked face. It aims at tracking an identity over time and is consolidated.

id

int

ID of the detected face.

landmarks

PointList

Landmarks (eyes, nose and mouth corners) of the detected face.

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.

trackingStatus

TrackingStatus

Status of the tracked face. See FaceTrackingStatus for more details.

Static Methods

Name

Description

create

Creates a detected face.

fromBuffer

Imports the face object from a buffer.

fromFile

Imports the face object from a file.

Methods

Name

Description

clone

Clones the TrackedFace object.

getAsDetectedFace

Gets the tracked face as a detected face.

getDistanceToCamera

Gets the distance between the detected face and the camera when using a depth map in pixels.

getExpandedBounds

Gets the bounding box around the detected face with specified aspect ratio and specified margin.

getInterocularDistance

Gets the distance between the eyes (IOD) of the detected face in pixels.

getPortraitBounds

Gets the bounding box of the detected face for ICAO portrait cropping.

rescale

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

Rotates the face object by a given angle in degrees from a given center.

toBuffer

Exports the face object to a buffer.

toFile

Saves the face object to a file.

translate

Translates the face object.