LMBestShotServiceDelegate
public protocol LMBestShotServiceDelegate : AnyObject
Протокол LMBestShotServiceDelegate обеспечивает методами, необходимыми для получения эталонного снимка для биометрического образца (бестшота). 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
rect
Зона обнаружения лица \ Face detection zone
frameSize
Размер кадра \ Frame size
-
Вызывается при фиксации эталонного биометрического образца (бестшота). Called when the best shot is found. @note В случае возвращения ложного значения, процесс определения эталонного снимка будет продолжен, иначе процесс будет приостановлен. Для продолжения процесса после паузы необходимо использовать метод resume. 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) -> Bool
Parameters
bestShot
Эталонный снимок \ The best shot of the face.
Return Value
Возвращает true, если новых бестшотов не требуется \ Return true, if the new best shots are no longer needed.
-
Вызывается при наборе эталонных биометрических образцов (бестшотов). Called when the best shot is collected. @note Этот метод вызывается только в том случае, если для параметра isMultipartBestShots установлено значение true. В случае возвращения ложного значения, процесс определения эталонного снимка будет продолжен, иначе процесс будет приостановлен. Для продолжения процесса после паузы необходимо использовать метод resume. This method is called only if
isMultipartBestShots
is 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]) -> Bool
Parameters
bestShots
Эталонные снимки \ The best shots of the face.
Return Value
Возвращает true, если новых бестшотов не требуется \ 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
errors
Массив ошибок размером от 0 до 3 элементов \ Errors 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
interactionFrames
Массив кадров выполненных действий и их название