Struct FaceDistanceInfo
Associates two face identifiers with their match percentage.
public readonly struct FaceDistanceInfo : IEquatable<FaceDistanceInfo>
- Implements
- Inherited Members
Constructors
FaceDistanceInfo(long, long, int)
Associates two face identifiers with their match percentage.
public FaceDistanceInfo(long _faceId1, long _faceId2, int _distance)
Parameters
_faceId1longThe first face identifier.
_faceId2longThe second face identifier.
_distanceintThe match percentage.
Properties
Distance
Gets how closely the first face matches the second, in percent.
public int Distance { get; }
Property Value
FaceId1
Gets the first face identifier.
public long FaceId1 { get; }
Property Value
FaceId2
Gets the second face identifier.
public long FaceId2 { get; }
Property Value
Methods
Equals(object)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand this instance are the same type and represent the same value; otherwise, false.
Equals(FaceDistanceInfo)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(FaceDistanceInfo other)
Parameters
otherFaceDistanceInfoAn object to compare with this object.
Returns
FromJsonString(string)
Deserializes face-distance information from JSON.
public static FaceDistanceInfo FromJsonString(string jsonString)
Parameters
jsonStringstringThe JSON object to deserialize.
Returns
- FaceDistanceInfo
The deserialized value.
FromJsonStringArray(string)
Deserializes an array of face-distance values.
public static IEnumerable<FaceDistanceInfo> FromJsonStringArray(string jsonString)
Parameters
jsonStringstringThe JSON array to deserialize.
Returns
- IEnumerable<FaceDistanceInfo>
The values, or an empty sequence for null or empty input.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
ToJsonString()
Serializes the face-distance information to compact JSON.
public string ToJsonString()
Returns
- string
The serialized value.
ToString()
Serializes the face-distance information to indented JSON.
public override string ToString()
Returns
- string
The formatted JSON.
Operators
operator ==(FaceDistanceInfo, FaceDistanceInfo)
Determines whether two values are equal.
public static bool operator ==(FaceDistanceInfo lhs, FaceDistanceInfo rhs)
Parameters
lhsFaceDistanceInforhsFaceDistanceInfo
Returns
operator !=(FaceDistanceInfo, FaceDistanceInfo)
Determines whether two values are not equal.
public static bool operator !=(FaceDistanceInfo lhs, FaceDistanceInfo rhs)
Parameters
lhsFaceDistanceInforhsFaceDistanceInfo