FacialComparisonResult
A base class containing details specific to each facial comparison result
Declaration
Only relevant details are shown, boilerplate or standard Swift generated code is omitted
Summary
Public variables
Public methods
Public variables
result
@objc final public var result: Bool { get }
Indicates whether the facial comparison executed successfully or not.
True
if the facial comparison was successful; otherwise, False
.
message
@objc final public var message: String { get }
A message indicating why the facial comparison failed; Otherwise "Success"
confidence
@objc final public var confidence: Double { get }
The confidence of how similar the faceImage is to the targetImage.
Range: 0 - 1
Due to the laws of physics and limitations that exists between humans and machines, values will rarely be exactly 1 or 0 but should not be discredited.
The closer the value is to 0 the less the faces in the targetImage and faceImage are the same. The closer the value is to 1 the more the faces in the targetImage and faceImage are the same.
timeTakenMilliseconds
@objc final public var timeTakenMilliseconds: Double { get }
The time it took to execute the facial comparison, in milliseconds.
targetName
@objc final public var targetName: String? { get }
The file name of the targetImage.
faceName
@objc final public var faceName: String? { get }
The file name of the faceImage.
faceImage
@objc final public var faceImage: UIImage? { get }
The face image you passed through.
faceImagePath
@objc final public var faceImagePath: String? { get }
The path to faceImage, after it is saved. Otherwise nil.
Public methods
saveImages()
@objc final public func saveImages()
Saves the faceImage and populates its respective path variable.
encode(to encoder: Encoder)
final public func encode(to encoder: Encoder) throws
Encodes the model using the encoder provided. Used to convert the model to JSON.
Where this is used
Last updated