SBSDKGenericDocumentRecognizerViewControllerDelegate
@protocol SBSDKGenericDocumentRecognizerViewControllerDelegate <NSObject>
The delegate protocol for the SBSDKGenericDocumentRecognizerViewController.
-
Informs the delegate that a document has been recognized successfully.
Declaration
Objective-C
- (void)documentRecognizerViewController: (nonnull SBSDKGenericDocumentRecognizerViewController *)controller didRecognizeResult: (nonnull SBSDKGenericDocumentRecognitionResult *) result onImage:(nonnull UIImage *)image;
Swift
func documentRecognizerViewController(_ controller: SBSDKGenericDocumentRecognizerViewController, didRecognizeResult result: SBSDKGenericDocumentRecognitionResult, on image: UIImage)
Parameters
controller
The SBSDKGenericDocumentRecognizerViewController instance that recognized the document.
result
The recognition result.
image
The original image where the document has been recognized on.
-
Asks the delegate if the generic document recognizer should scan the next video frame. Optional.
Declaration
Objective-C
- (BOOL)genericDocumentRecognizerViewControllerShouldRecognize: (nonnull SBSDKGenericDocumentRecognizerViewController *)controller;
Swift
optional func genericDocumentRecognizerViewControllerShouldRecognize(_ controller: SBSDKGenericDocumentRecognizerViewController) -> Bool
Parameters
controller
The generic document recognizer view controller that will receive the video frame.
Return Value
Return YES to run the recognition on the next video frame, NO otherwise. Can be used to pause the detection.