Table of Contents

Struct FaceDistanceInfo

Namespace
TCSystem.MetaData
Assembly
TCSystem.MetaData.dll

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

_faceId1 long

The first face identifier.

_faceId2 long

The second face identifier.

_distance int

The match percentage.

Properties

Distance

Gets how closely the first face matches the second, in percent.

public int Distance { get; }

Property Value

int

FaceId1

Gets the first face identifier.

public long FaceId1 { get; }

Property Value

long

FaceId2

Gets the second face identifier.

public long FaceId2 { get; }

Property Value

long

Methods

Equals(object)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and 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

other FaceDistanceInfo

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 face-distance information from JSON.

public static FaceDistanceInfo FromJsonString(string jsonString)

Parameters

jsonString string

The 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

jsonString string

The 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

lhs FaceDistanceInfo
rhs FaceDistanceInfo

Returns

bool

operator !=(FaceDistanceInfo, FaceDistanceInfo)

Determines whether two values are not equal.

public static bool operator !=(FaceDistanceInfo lhs, FaceDistanceInfo rhs)

Parameters

lhs FaceDistanceInfo
rhs FaceDistanceInfo

Returns

bool