Table of Contents

Class Face

Namespace
TCSystem.MetaData
Assembly
TCSystem.MetaData.dll

Represents a detected face and its normalized image rectangle, classification, and optional descriptor.

public sealed class Face : IEquatable<Face>
Inheritance
Face
Implements
Inherited Members
Extension Methods

Constructors

Face(long, Rectangle, FaceMode, FaceQuality, bool, IReadOnlyList<FixedPoint64>)

Initializes a face.

public Face(long faceId, Rectangle rectangle, FaceMode faceMode, FaceQuality faceQuality, bool visible, IReadOnlyList<FixedPoint64> faceDescriptor)

Parameters

faceId long

The persistent face identifier.

rectangle Rectangle

The normalized face rectangle.

faceMode FaceMode

The detector that found the face.

faceQuality FaceQuality

The face quality classification.

visible bool

Whether the face is visible to consumers.

faceDescriptor IReadOnlyList<FixedPoint64>

The optional 128-value face descriptor; descriptors of other lengths are discarded.

Properties

FaceDescriptor

Gets the face descriptor, or null when no valid descriptor is available.

public IReadOnlyList<FixedPoint64> FaceDescriptor { get; }

Property Value

IReadOnlyList<FixedPoint64>

FaceMode

Gets the detector that found the face.

public FaceMode FaceMode { get; }

Property Value

FaceMode

FaceQuality

Gets the face quality classification.

public FaceQuality FaceQuality { get; }

Property Value

FaceQuality

HasFaceDescriptor

Gets whether a valid 128-value face descriptor is available.

public bool HasFaceDescriptor { get; }

Property Value

bool

Id

Gets the persistent face identifier.

public long Id { get; }

Property Value

long

IsFrontFace

Gets whether the face was found by the frontal-face detector.

public bool IsFrontFace { get; }

Property Value

bool

Rectangle

Gets the normalized face rectangle.

public Rectangle Rectangle { get; }

Property Value

Rectangle

Visible

Gets whether the face is visible to consumers.

public bool Visible { get; }

Property Value

bool

Methods

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Equals(Face)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(Face other)

Parameters

other Face

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

FromJsonString(string)

Deserializes a face from JSON.

public static Face FromJsonString(string jsonString)

Parameters

jsonString string

The JSON to deserialize.

Returns

Face

The face, or null for null or empty input.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

ToJsonString()

Serializes the face to compact JSON.

public string ToJsonString()

Returns

string

The serialized face.

ToString()

Serializes the face to indented JSON.

public override string ToString()

Returns

string

The formatted face JSON.