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) -> CGFloat

    Return Value

    score from 0.0 to 1.0 of matching