LCLunaIDServiceProtocol
Objective-C
@protocol LCLunaIDServiceProtocol <NSObject>
Swift
protocol LCLunaIDServiceProtocol : NSObjectProtocol
Protocol which describes public API to access common recognition functionality
-
Version of FaceEngine from LunaSDK
Declaration
Objective-C
- (NSString *_Nonnull)faceEngineVersion;Swift
func faceEngineVersion() -> String -
Activate license and return nil in case of success but NSError object in case of problems
Declaration
Objective-C
- (NSError *_Nullable)activateLicense;Swift
func activateLicense() -> (any Error)?Return Value
error in case it is occured
-
Activate license and return nil in case of success but NSError object in case of problems
Declaration
Objective-C
- (NSError *_Nullable)activateLicenseWithConfig: (nonnull LCLicenseConfig *)licenseConfig;Swift
func activateLicense(with licenseConfig: LCLicenseConfig) -> (any Error)?Return Value
error in case it is occured
-
Detect faces in image
Declaration
Objective-C
- (nonnull NSArray<LCFaceDetection *> *)detectFaces:(nonnull UIImage *)image;Swift
func detectFaces(_ image: UIImage) -> [LCFaceDetection]Return Value
array of detected faces
-
Compare descriptor of face detection and bestshot
Declaration
Objective-C
- (CGFloat)match:(nonnull LCBestShotModel *)bestShot faceDetection:(nonnull LCFaceDetection *)faceDetection;Swift
func match(_ bestShot: LCBestShotModel, faceDetection: LCFaceDetection) -> CGFloatReturn Value
score from 0.0 to 1.0 of matching
-
Compare two UIImages. Each image must contain only one face and be in portrait orientation. WARNING: Make sure that the LunaIDServiceProtocol instance is created with trackFaceIdentity enabled in its configuration; otherwise, this function will always return 0.
Declaration
Objective-C
- (nullable NSNumber *)matchWithFirst:(nonnull UIImage *)firstImage second:(nonnull UIImage *)secondImage error:(NSError *_Nullable *_Nullable)error;Swift
func match(withFirst firstImage: UIImage, second secondImage: UIImage) throws -> NSNumberParameters
firstImagefirst UIImage
secondImagesecond UIImage
errorinout error object
Return Value
matching score from 0.0 to 1.0. In case of an error, the function should return 0
LCLunaIDServiceProtocol Protocol Reference