Class FaceInfo
Provides flattened face, file, and person information returned by metadata database queries.
public sealed class FaceInfo : IEquatable<FaceInfo>
- Inheritance
-
FaceInfo
- Implements
- Inherited Members
Constructors
FaceInfo(long, long, long, FaceMode, FaceQuality, IReadOnlyList<FixedPoint64>)
Provides flattened face, file, and person information returned by metadata database queries.
public FaceInfo(long _fileId, long _faceId, long _personId, FaceMode _faceMode, FaceQuality _faceQuality, IReadOnlyList<FixedPoint64> _faceDescriptor)
Parameters
_fileIdlongThe file identifier.
_faceIdlongThe face identifier.
_personIdlongThe associated person identifier.
_faceModeFaceModeThe detector that found the face.
_faceQualityFaceQualityThe face quality classification.
_faceDescriptorIReadOnlyList<FixedPoint64>The optional face descriptor.
Properties
FaceDescriptor
Gets the face descriptor, or an empty list when none is available.
public IReadOnlyList<FixedPoint64> FaceDescriptor { get; }
Property Value
FaceId
Gets the face identifier.
public long FaceId { get; }
Property Value
FaceMode
Gets the detector that found the face.
public FaceMode FaceMode { get; }
Property Value
FaceQuality
Gets the face quality classification.
public FaceQuality FaceQuality { get; }
Property Value
FileId
Gets the file identifier.
public long FileId { get; }
Property Value
PersonId
Gets the person identifier, mapping the reserved empty-person identifier to InvalidId .
public long PersonId { get; }
Property Value
Methods
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object obj)
Parameters
objobjectThe object to compare with the current object.
Returns
Equals(FaceInfo)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(FaceInfo other)
Parameters
otherFaceInfoAn object to compare with this object.
Returns
FromJsonString(string)
Deserializes face information from JSON.
public static FaceInfo FromJsonString(string jsonString)
Parameters
jsonStringstringThe JSON to deserialize.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
ToJsonString()
Serializes the information to compact JSON.
public string ToJsonString()
Returns
- string
The serialized value.
ToJsonStringArray(IEnumerable<FaceInfo>)
Serializes a sequence of face information to a compact JSON array.
public static string ToJsonStringArray(IEnumerable<FaceInfo> faceInfos)
Parameters
faceInfosIEnumerable<FaceInfo>The values to serialize.
Returns
- string
The serialized JSON array.
ToString()
Serializes the information to indented JSON.
public override string ToString()
Returns
- string
The formatted JSON.