LCBestShotDetectorProtocol
Objective-C
@protocol LCBestShotDetectorProtocol <NSObject>
Swift
protocol LCBestShotDetectorProtocol : NSObjectProtocol
Interface of the best shot detector.
-
Push sample buffer from AVFoundation to processing pipeline
Declaration
Objective-C
- (void)pushFrameWithSampleBuffer:(nonnull CMSampleBufferRef)sampleBuffer;
Swift
func pushFrame(with sampleBuffer: CMSampleBuffer)
Parameters
sampleBuffer
Frame sample buffer ofrom captured video stream.
-
Sends a image in the processing queue. But it works only for one single frame, no video feed or frames sequence support
Declaration
Objective-C
- (void)pushFrameWithUIImage:(nonnull UIImage *)image;
Swift
func pushFrame(with image: UIImage)
Parameters
image
Frame in format of UIImage.
-
Sends an image in the processing queue. This one is use for playback feature, when we are running auto-tests
Declaration
Objective-C
- (void)pushFrameWithCGImage:(nonnull CGImageRef)image;
Swift
func pushFrame(with image: CGImage)
Parameters
image
frame in format of CoreGraphics image.
-
this stuf is used only by internal CI/CD logic
Declaration
Objective-C
- (void)resume;
Swift
func resume()
-
Defines current screen size. It is used to calculate tracking frame and border vilotaion for par borderDistance in LCLunaConfiguration
Declaration
Objective-C
- (void)screenSize:(CGSize)size edges:(UIEdgeInsets)edges;
Swift
func screenSize(_ size: CGSize, edges: UIEdgeInsets)
-
If any face was appeare in camera this return true, even if face moved away after. Otherwise returns false.
Declaration
Objective-C
- (BOOL)faceFound;
Swift
func faceFound() -> Bool
-
Used for internal logic between LunaCamera and LunaCore to mark that current inertaction description was shown alread in UI
Declaration
Objective-C
- (void)interactionHintDidShow;
Swift
func interactionHintDidShow()
-
Setup delegate object
Declaration
Objective-C
- (void)setupDelegate:(nonnull id<LCBestShotDelegate>)delegate;
Swift
func setupDelegate(_ delegate: any LCBestShotDelegate)
-
Launch interactions state machine
Declaration
Objective-C
- (void)launchWizard;
Swift
func launchWizard()
-
Define exact list of interactions
Declaration
Objective-C
- (void)defineStepsList: (nonnull NSArray<NSObject<LCStepConfigProtocol> *> *)stepsList;
Swift
func defineStepsList(_ stepsList: [any LCStepConfigProtocol])
-
This one is the link between the logic of recognition and the logic which controls video record. In case primary face is found this closure will be fired.
Declaration
Objective-C
- (void)enableVideoRecordWatchDog: (nonnull FaceFoundedBlock)primaryfaceFoundBlock;
Swift
func enableVideoRecordWatchDog(_ primaryfaceFoundBlock: @escaping FaceFoundedBlock)