LMBestShotServiceDelegate
public protocol LMBestShotServiceDelegate : AnyObject
Protocol LMBestShotServiceDelegate provides methods for capturing bestshot.
-
Called when a face is detected in the shot.
Declaration
Swift
func detectionRect(_ rect: CGRect, inFrameSize frameSize: CGSize)Parameters
rectFace detection zone
frameSizeFrame size
-
Called when the best shot is found. @note If false is returned, a process of the best shot detection will continue, otherwise the process will be paused. Recall a resume method to continue the process after a pause.
Declaration
Swift
func bestShot(_ bestShot: LunaCore.LCBestShotModel) -> BoolParameters
bestShotThe best shot of the face.
Return Value
Return true, if the new best shots are no longer needed.
-
Called when the best shot is collected. @note This method is called only if
isMultipartBestShotsis set to true. If false is returned, a process of the best shot detection will continue, otherwise the process will be paused. Recall a resume method to continue the process after a pause.Declaration
Swift
func multipartBestShots(_ bestShots: [LunaCore.LCBestShotModel]) -> BoolParameters
bestShotsThe best shots of the face.
Return Value
Return true, if the new best shots are no longer needed.
-
Returns errors array received upon last second. User defines array size.
Declaration
Swift
func bestShotErrors(_ errors: [Error])Parameters
errorsErrors array, sized from 0 to 3 elements
-
interactionsFinish(with:Default implementation) Returns an array of frames with the interaction action performed.
Default Implementation
Notify that interactions finished
Declaration
Swift
func interactionsFinish(with interactionFrames: [LCInteractionFrameInfo])Parameters
interactionFramesframes of passed interactions
-
Triggered when interaction changed it’s state
Declaration
Swift
func interactionsStateUpdate(interactionsType: LunaCore.LCInteractionsType, stateUpdate: LunaCore.LCStepState)Parameters
interactionsTypetype of interaction
stateUpdatestate of interaction