SBSDKPayFormScanner
@interface SBSDKPayFormScanner : NSObject
A class to detect and recognize SEPA payforms on UIImage or CMSampleBufferRef. The larger the image the better the recognition results. Images are rotated accordingly to either the UIImage imageOrientation property or the given video orientation. Detection and recognition are successful only if the rotated image has natural orientation.
-
Recognizes the bank transfer form fields in the given UIImage.
Declaration
Objective-C
- (nullable SBSDKPayFormRecognitionResult *)recognizeFromImage: (nonnull UIImage *)image;
Swift
func recognize(from image: UIImage) -> SBSDKPayFormRecognitionResult?
Parameters
image
The image to recognize a payform on.
Return Value
The recognizers result.
-
Recognizes the bank transfer form fields in the given CMSampleBufferRef.
Declaration
Objective-C
- (nullable SBSDKPayFormRecognitionResult *) recognizeFromSampleBuffer:(nonnull CMSampleBufferRef)sampleBuffer orientation:(AVCaptureVideoOrientation)videoOrientation;
Swift
func recognize(from sampleBuffer: CMSampleBuffer, orientation videoOrientation: AVCaptureVideoOrientation) -> SBSDKPayFormRecognitionResult?
Parameters
sampleBuffer
The CMSampleBuffer to recognize a payform on.
videoOrientation
The orientation the sample buffer is taken with.
Return Value
The recognizers result.
-
Sets the recognition mode of the scanner.
Declaration
Objective-C
- (void)setRecognitionMode:(SBSDKPayFormScannerRecognitionMode)mode;
Swift
func setRecognitionMode(_ mode: SBSDKPayFormScannerRecognitionMode)
Parameters
mode
New recognition mode.